# HG changeset patch # User Sam Lantinga # Date 1017514403 0 # Node ID af42e7c4c860481a0ba27f04df1c349d17bcac15 # Parent 66f815c147edd2476f8c877c2e3014bb8803d2e4 Fixes for GNU pthreads from Patrice diff -r 66f815c147ed -r af42e7c4c860 configure.in --- a/configure.in Thu Mar 28 16:20:10 2002 +0000 +++ b/configure.in Sat Mar 30 18:53:23 2002 +0000 @@ -1262,7 +1262,7 @@ use_pth=no else PTH_CFLAGS=`$PTH_CONFIG --cflags` - PTH_LIBS=`$PTH_CONFIG --libs` + PTH_LIBS=`$PTH_CONFIG --libs --all` SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS" SDL_LIBS="$SDL_LIBS $PTH_LIBS" use_pth=yes diff -r 66f815c147ed -r af42e7c4c860 src/thread/pth/SDL_systhread.c --- a/src/thread/pth/SDL_systhread.c Thu Mar 28 16:20:10 2002 +0000 +++ b/src/thread/pth/SDL_systhread.c Sat Mar 30 18:53:23 2002 +0000 @@ -51,15 +51,17 @@ { pth_attr_t type; + type = pth_attr_new(); + /* Set the thread attributes */ - if ( pth_attr_init(&type) != 0 ) { + if ( pth_attr_init(type) != 0 ) { SDL_SetError("Couldn't initialize pth attributes"); return(-1); } - pth_attr_set(&type, PTH_ATTR_JOINABLE, TRUE); + pth_attr_set(type, PTH_ATTR_JOINABLE, TRUE); /* Create the thread and go! */ - if ( pth_spawn( &type, RunThread, args) != 0 ) { + if ( pth_spawn(type, RunThread, args) != 0 ) { SDL_SetError("Not enough resources to create thread"); return(-1); }