Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed bug 3388 - Fail to build src/thread/windows/SDL_systhread.c on …
…MinGW 4.9.3

Vitaly Novichkov

Line 124
====================================================================
const DWORD flags = thread->stacksize ? STACK_SIZE_PARAM_IS_A_RESERVATION : 0;
====================================================================

Error of compiler:
====================================================================
  CC     build/SDL_systhread.lo
src/thread/windows/SDL_systhread.c: In function 'SDL_SYS_CreateThread':
src/thread/windows/SDL_systhread.c:124:45: error: 'STACK_SIZE_PARAM_IS_A_RESERVA
TION' undeclared (first use in this function)
     const DWORD flags = thread->stacksize ? STACK_SIZE_PARAM_IS_A_RESERVATION :
 0;
                                             ^
src/thread/windows/SDL_systhread.c:124:45: note: each undeclared identifier is r
eported only once for each function it appears in
make: *** [build/SDL_systhread.lo] Error 1
====================================================================

Fixing when I adding into begin of the file:
====================================================================
#ifndef STACK_SIZE_PARAM_IS_A_RESERVATION
#define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000
#endif
====================================================================
  • Loading branch information
slouken committed Oct 1, 2016
1 parent c2cb0b0 commit 9f854cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/thread/windows/SDL_systhread.c
Expand Up @@ -33,6 +33,10 @@
/* We'll use the C library from this DLL */
#include <process.h>

#ifndef STACK_SIZE_PARAM_IS_A_RESERVATION
#define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000
#endif

/* Cygwin gcc-3 ... MingW64 (even with a i386 host) does this like MSVC. */
#if (defined(__MINGW32__) && (__GNUC__ < 4))
typedef unsigned long (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned,
Expand Down

0 comments on commit 9f854cd

Please sign in to comment.