.\include\dirent.h \
.\include\netdb.h \
.\include\sys\socket.h \
- .\win32.h \
- .\perlhost.h \
- .\vdir.h \
- .\vmem.h
+ .\win32.h
CORE_H = $(CORE_NOCFG_H) .\config.h
$(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
+# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
!IF "$(USE_IMP_SYS)$(USE_OBJECT)" == "defineundef"
-perllib$(o) : perllib.c
+perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
$(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
!ENDIF
.\include\dirent.h \
.\include\netdb.h \
.\include\sys\socket.h \
- .\win32.h \
- .\perlhost.h \
- .\vdir.h \
- .\vmem.h
+ .\win32.h
CORE_H = $(CORE_NOCFG_H) .\config.h
# -DPERL_IMPLICIT_SYS needs C++ for perllib.c
# rules wrapped in .IFs break Win9X build (we end up with unbalanced []s unless
-# unless the .IF is true), so instead we use a .ELSE with the default
-perllib$(o) : perllib.c
+# unless the .IF is true), so instead we use a .ELSE with the default.
+# This is the only file that depends on perlhost.h, vmem.h, and vdir.h
+
+perllib$(o) : perllib.c .\perlhost.h .\vdir.h .\vmem.h
.IF "$(USE_IMP_SYS)$(USE_OBJECT)" == "defineundef"
$(CC) -c -I. $(CFLAGS_O) $(CXX_FLAG) $(OBJOUT_FLAG)$@ perllib.c
.ELSE
EXTERN_C void
set_w32_module_name(void);
+#ifdef __MINGW32__
+EXTERN_C /* GCC in C++ mode mangles the name, otherwise */
+#endif
BOOL APIENTRY
DllMain(HANDLE hModule, /* DLL module handle */
DWORD fdwReason, /* reason called */
#define Win32_Winsock
#endif
#include <windows.h>
-#include <shellapi.h>
+#ifndef __MINGW32__ /* GCC/Mingw32-2.95.2 forgot the WINAPI on CommandLineToArgvW() */
+# include <shellapi.h>
+#else
+ LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCommandLine, int * pNumArgs);
+#endif
#include <winnt.h>
#include <io.h>
#endif
#if defined(__MINGW32__)
-# define _stat stat
+/* Mingw32 is missing some prototypes */
+FILE * _wfopen(LPCWSTR wszFileName, LPCWSTR wszMode);
+FILE * _wfdopen(int nFd, LPCWSTR wszMode);
+FILE * _freopen(LPCWSTR wszFileName, LPCWSTR wszMode, FILE * pOldStream);
+int _flushall();
+int _fcloseall();
#endif
#if defined(__BORLANDC__)
#define flushall _flushall
#define fcloseall _fcloseall
-#ifndef CP_UTF8
-# define CP_UTF8 65001
-#endif
-
#ifdef PERL_OBJECT
# define MEMBER_TO_FPTR(name) &(name)
#endif
#endif /* __MINGW32__ */
+/* both GCC/Mingw32 and MSVC++ 4.0 are missing this, so we put it here */
+#ifndef CP_UTF8
+# define CP_UTF8 65001
+#endif
+
/* compatibility stuff for other compilers goes here */