FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio;
if (ptr != NULL) {
#ifdef STDIO_PTR_LVALUE
- PerlSIO_set_ptr(stdio, (void*)ptr); /* LHS STDCHAR* cast non-portable */
+ PerlSIO_set_ptr(stdio, ptr); /* LHS STDCHAR* cast non-portable */
#ifdef STDIO_PTR_LVAL_SETS_CNT
if (PerlSIO_get_cnt(stdio) != (cnt)) {
assert(PerlSIO_get_cnt(stdio) == (cnt));
#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>
#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"
#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__)
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;