# New Ticket Created by François PERRAD
# Please include the string: [perl #35954]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=35954 >
Patch for two compilation problems with MinGW32 :
imcc/main.c
In file included from imcc/parser.h:15,
from imcc/main.c:21:
imcc/imcparser.h:38: parse error before "__attribute__"
In file included from imcc/parser.h:15,
from imcc/main.c:21:
imcc/imcparser.h:156:1: warning: "FASTCALL" redefined
In file included from c:/MinGW/include/windows.h:48,
from include/parrot/thr_windows.h:17,
from config/gen/platform/win32/threads.h:2,
from include/parrot/parrot.h:231,
from imcc/imc.h:18,
from imcc/main.c:17:
c:/MinGW/include/windef.h:106:1: warning: this is the location of the
previous definition
src/events.c: In function `init_events_first':
src/events.c:269: `PTHREAD_START_ROUTINE' undeclared (first use in this
function)
src/events.c:269: (Each undeclared identifier is reported only once
src/events.c:269: for each function it appears in.)
src/events.c:269: parse error before "event_thread"
Francois Perrad.
svn diff
Index: include/parrot/thr_windows.h
===================================================================
--- include/parrot/thr_windows.h (revision 8133)
+++ include/parrot/thr_windows.h (working copy)
@@ -15,6 +15,7 @@
# undef CONST
# include <windows.h>
+# undef FASTCALL
# include <process.h>
# include <limits.h>
@@ -107,7 +108,7 @@
# define THREAD_CREATE_JOINABLE(t, func, arg) \
do { \
DWORD tid; \
- t = CreateThread( NULL, 0, (PTHREAD_START_ROUTINE)func, (PVOID)arg,
0, &tid ); \
+ t = CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)func, (PVOID)arg,
0, &tid ); \
} while (0)
# endif