| Summary: | src/thread/generic/SDL_systhread.c does not support SDL_PASSED_BEGINTHREAD_ENDTHREAD | ||
|---|---|---|---|
| Product: | SDL | Reporter: | John Chadwick <johnwchadwick> |
| Component: | thread | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | aschiffler, ravas.gorefiend |
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
John Chadwick
2012-11-27 21:13:45 UTC
Slightly different repro around SDL_PASSED_BEGINTHREAD_ENDTHREAD (Win7/cygwin): $ ../configure CFLAGS=-DSDL_PASSED_BEGINTHREAD_ENDTHREAD $ make ... /bin/sh ./libtool --mode=compile gcc -DSDL_PASSED_BEGINTHREAD_ENDTHREAD -DUSING_GENERATED_CONFIG_H -Iinclude -I../include -I/usr/include/mingw -mno-cygwin -mmmx -msse -mpreferred-stack-boundary=2 -Wall -MMD -MT build/SDL_thread.lo -c ../src/thread/SDL_thread.c -o build/SDL_thread.lo libtool: compile: gcc -DSDL_PASSED_BEGINTHREAD_ENDTHREAD -DUSING_GENERATED_CONFIG_H -Iinclude -I../include -I/usr/include/mingw -mno-cygwin -mmmx -msse -mpreferred-stack-boundary=2 -Wall -MMD -MT build/SDL_thread.lo -c ../src/thread/SDL_thread.c -DDLL_EXPORT -DPIC -o build/.libs/SDL_thread.o In file included from ../src/thread/SDL_thread.c:28: ../src/thread/SDL_systhread.h:36: error: parse error before "pfnSDL_CurrentBeginThread" ../src/thread/SDL_thread.c:217: error: parse error before "pfnSDL_CurrentBeginThread" ../src/thread/SDL_thread.c: In function `SDL_CreateThread': ../src/thread/SDL_thread.c:224: error: number of arguments doesn't match prototype ../include/SDL_thread.h:133: error: prototype declaration ../src/thread/SDL_thread.c:239: error: `name' undeclared (first use in this function) ../src/thread/SDL_thread.c:239: error: (Each undeclared identifier is reported only once ../src/thread/SDL_thread.c:239: error: for each function it appears in.) ../src/thread/SDL_thread.c:256: error: `fn' undeclared (first use in this function) ../src/thread/SDL_thread.c:257: error: `data' undeclared (first use in this function) ../src/thread/SDL_thread.c:272: error: `pfnBeginThread' undeclared (first use in this function) ../src/thread/SDL_thread.c:272: error: `pfnEndThread' undeclared (first use in this function) Makefile:442: recipe for target `build/SDL_thread.lo' failed make: *** [build/SDL_thread.lo] Error 1 It appears that SDL_PASSED_BEGINTHREAD_ENDTHREAD is not intended to be defined manually like that. SDL_thread.h defines it on Windows when configured to not use the C library (HAVE_LIBC is undefined). Is there some reason you are trying to force the definition of it? Actually, this wasn't a bug. It was a mistake on my part, when trying to build SDL without it's own build system, iirc. I forgot to close this when I discovered that. |