Module: wine Branch: master Commit: 4ccf78fbcd6df296365a22a41855c9287360596b URL: http://source.winehq.org/git/wine.git/?a=commit;h=4ccf78fbcd6df296365a22a418...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Feb 12 11:42:06 2009 +0100
loader: Start phasing out the LinuxThreads support.
---
loader/glibc.c | 14 +++++++++++++- loader/kthread.c | 8 -------- 2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/loader/glibc.c b/loader/glibc.c index 28a8d19..e312cf3 100644 --- a/loader/glibc.c +++ b/loader/glibc.c @@ -56,11 +56,23 @@ static void *xmalloc( size_t size ) /* separate thread to check for NPTL and TLS features */ static void *needs_pthread( void *arg ) { + const char *loader; pid_t tid = gettid(); /* check for NPTL */ if (tid != -1 && tid != getpid()) return (void *)1; /* check for TLS glibc */ - return (void *)(wine_get_gs() != 0); + if (wine_get_gs() != 0) return (void *)1; + /* check for exported epoll_create to detect new glibc versions without TLS */ + if (wine_dlsym( RTLD_DEFAULT, "epoll_create", NULL, 0 )) + fprintf( stderr, + "wine: glibc >= 2.3 without NPTL or TLS is not a supported combination.\n" + " Please upgrade to a glibc with NPTL support.\n" ); + else + fprintf( stderr, + "wine: Your C library is too old. You need at least glibc 2.3 with NPTL support.\n" ); + if (!(loader = getenv( "WINELOADER" )) || !strstr( loader, "wine-kthread" )) + exit(1); + return 0; }
/* return the name of the Wine threading variant to use */ diff --git a/loader/kthread.c b/loader/kthread.c index c791ef6..fcdd34d 100644 --- a/loader/kthread.c +++ b/loader/kthread.c @@ -907,14 +907,6 @@ void __pthread_initialize(void) if (!done) { done = 1; - /* check for exported epoll_create to detect glibc versions that we cannot support */ - if (wine_dlsym( RTLD_DEFAULT, "epoll_create", NULL, 0 )) - { - static const char warning[] = - "wine: glibc >= 2.3 without NPTL or TLS is not a supported combination.\n" - " It will most likely crash. Please upgrade to a glibc with NPTL support.\n"; - write( 2, warning, sizeof(warning)-1 ); - } libc_fork = wine_dlsym( RTLD_NEXT, "fork", NULL, 0 ); libc_sigaction = wine_dlsym( RTLD_NEXT, "sigaction", NULL, 0 ); libc_uselocale = wine_dlsym( RTLD_DEFAULT, "uselocale", NULL, 0 );