diff options
author | Steve Peters <steve@fisharerojo.org> | 2006-10-30 13:58:15 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2006-10-30 13:58:15 +0000 |
commit | d06fc7d4ca982fb56f0bbeb3d160a8e6c2f856da (patch) | |
tree | d0763bf1d38b7deeffadfe09b9aedb830afe53d0 /win32 | |
parent | 58e2a187089bff134d6be8e45e155c798efe2773 (diff) | |
download | perl-d06fc7d4ca982fb56f0bbeb3d160a8e6c2f856da.tar.gz |
Initial cleanups to support compiling Win32 with MinGW g++.
p4raw-id: //depot/perl@29155
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/win32/win32.c b/win32/win32.c index 49ba63ae93..be5e3f6fd8 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -18,12 +18,6 @@ #ifndef HWND_MESSAGE # define HWND_MESSAGE ((HWND)-3) #endif -/* GCC-2.95.2/Mingw32-1.1 forgot the WINAPI on CommandLineToArgvW() */ -#if defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION==1) -# include <shellapi.h> -#else - LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCommandLine, int * pNumArgs); -#endif #include <winnt.h> #include <io.h> #include <signal.h> @@ -38,6 +32,13 @@ #include "EXTERN.h" #include "perl.h" +/* GCC-2.95.2/Mingw32-1.1 forgot the WINAPI on CommandLineToArgvW() */ +#if defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION==1) +# include <shellapi.h> +#else +EXTERN_C LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCommandLine, int * pNumArgs); +#endif + #define NO_XSLOCKS #define PERL_NO_GET_CONTEXT #include "XSUB.h" @@ -66,11 +67,13 @@ int _CRT_glob = 0; #if defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION==1) /* Mingw32-1.1 is missing some prototypes */ +START_EXTERN_C FILE * _wfopen(LPCWSTR wszFileName, LPCWSTR wszMode); FILE * _wfdopen(int nFd, LPCWSTR wszMode); FILE * _freopen(LPCWSTR wszFileName, LPCWSTR wszMode, FILE * pOldStream); int _flushall(); int _fcloseall(); +END_EXTERN_C #endif #if defined(__BORLANDC__) @@ -4960,7 +4963,7 @@ Perl_sys_intern_init(pTHX) w32_num_pseudo_children = 0; # endif w32_timerid = 0; - w32_message_hwnd = INVALID_HANDLE_VALUE; + w32_message_hwnd = (HWND__*)INVALID_HANDLE_VALUE; w32_poll_count = 0; for (i=0; i < SIG_SIZE; i++) { w32_sighandler[i] = SIG_DFL; |