summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-02 19:40:44 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-02 19:40:44 +0000
commitf8fb7c905b2ebbea240082c064c2444b482a14f7 (patch)
tree2d0858816a7d4cee9d80e4431cc07be6e528da18 /win32/win32.c
parent0da1743ca62caf8fa1145a4f68e1aa6df56ea774 (diff)
downloadperl-f8fb7c905b2ebbea240082c064c2444b482a14f7.tar.gz
patch to fix mingw32 build under USE_IMP_SYS (from Benjamin Stuhl);
some parts not applied p4raw-id: //depot/perl@5445
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 5fb1f46545..4ccae52d84 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -15,7 +15,11 @@
#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>
@@ -58,7 +62,12 @@ int _CRT_glob = 0;
#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__)