#endif
#ifdef I_UTIME
-# ifdef _MSC_VER
+# if defined(_MSC_VER) || defined(__MINGW32__)
# include <sys/utime.h>
# else
# include <utime.h>
#endif
#ifdef I_UTIME
-# ifdef _MSC_VER
+# if defined(_MSC_VER) || defined(__MINGW32__)
# include <sys/utime.h>
# else
# include <utime.h>
ksh=''
large=''
ld='gcc'
-lddlflags='-dll ~LINK_FLAGS~'
+lddlflags='-mdll ~LINK_FLAGS~'
ldflags='~LINK_FLAGS~'
less='less'
lib_ext='.lib'
# uncomment one
#CCTYPE *= MSVC20
#CCTYPE *= MSVC
-CCTYPE *= BORLAND
-#CCTYPE *= GCC
+#CCTYPE *= BORLAND
+CCTYPE *= GCC
#
# uncomment next line if you want debug version of perl (big,slow)
#
# set the install locations of the compiler include/libraries
#CCHOME *= f:\msdev\vc
-CCHOME *= C:\bc5
-#CCHOME *= C:\mingw32
+#CCHOME *= C:\bc5
+CCHOME *= D:\packages\mingw32
CCINCDIR *= $(CCHOME)\include
CCLIBDIR *= $(CCHOME)\lib
.SUFFIXES : .c $(o) .dll .lib .exe .a
.c$(o):
- $(CC) -c -I$(<:d) $(CFLAGS) $(OBJOUT_FLAG)$@ $<
+ $(CC) -c $(null,$(<:d) $(NULL) -I$(<:d)) $(CFLAGS) $(OBJOUT_FLAG)$@ $<
.y.c:
$(NOOP)
perldll.def\n)
$(IMPLIB) $*.lib $@
.ELIF "$(CCTYPE)" == "GCC"
- $(LINK32) -dll -o $@ -Wl,--base-file -Wl,perl.base $(LINK_FLAGS) \
+ $(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(LINK_FLAGS) \
$(mktmp $(LKPRE) $(CORE_OBJ:s,\,\\) $(WIN32_OBJ:s,\,\\) \
$(DLL_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
dlltool --output-lib $(PERLIMPLIB) \
--def perldll.def \
--base-file perl.base \
--output-exp perl.exp
- $(LINK32) -dll -o $@ $(LINK_FLAGS) \
+ $(LINK32) -mdll -o $@ $(LINK_FLAGS) \
$(mktmp $(LKPRE) $(CORE_OBJ:s,\,\\) $(WIN32_OBJ:s,\,\\) \
$(DLL_OBJ:s,\,\\) $(LIBFILES) perl.exp $(LKPOST))
.ELSE
#include <stdarg.h>
#include <float.h>
#include <time.h>
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__MINGW32__)
#include <sys/utime.h>
#else
#include <utime.h>
}
DllExport void
-win32_str_os_error(SV *sv, unsigned long dwErr)
+win32_str_os_error(void *sv, DWORD dwErr)
{
DWORD dwLen;
char *sMsg;
"Unknown error #0x%lX (lookup 0x%lX)",
dwErr, GetLastError());
}
- sv_setpvn(sv, sMsg, dwLen);
+ sv_setpvn((SV*)sv, sMsg, dwLen);
LocalFree(sMsg);
}
typedef long uid_t;
typedef long gid_t;
+#define _environ environ
+#define flushall _flushall
+#define fcloseall _fcloseall
#endif /* __MINGW32__ */
DllExport void Perl_win32_init(int *argcp, char ***argvp);
DllExport void Perl_init_os_extras(void);
-DllExport void win32_str_os_error(struct sv *s, DWORD err);
+/*DllExport void win32_str_os_error(struct sv *s, DWORD err);*/
+DllExport void win32_str_os_error(void *sv, DWORD err);
#ifndef USE_SOCKETS_AS_HANDLES
extern FILE * my_fdopen(int, char *);
#endif
#endif
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__MINGW32__)
# include <sys/utime.h>
#else
# include <utime.h>
# include "../config.h"
#endif
+#if defined(__STDC__) || defined(vax11c) || defined(_AIX) || defined(__stdc__) || defined(__cplusplus)
+# define STANDARD_C 1
+#endif
+
#ifdef WIN32
#undef USE_STDIO_PTR /* XXX fast gets won't work, must investigate */
# ifndef STANDARD_C
# endif
#endif
-#if defined(__STDC__) || defined(vax11c) || defined(_AIX) || defined(__stdc__) || defined(__cplusplus)
-# define STANDARD_C 1
-#endif
-
/* Use all the "standard" definitions? */
#if defined(STANDARD_C) && defined(I_STDLIB)
# include <stdlib.h>