From 679aab877f57d012ac7513390567115dd3feae3f Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 29 Apr 2008 20:19:02 +0200 Subject: [PATCH] loader: Add stub versions of the pthread functions. --- loader/pthread.c | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/loader/pthread.c b/loader/pthread.c index 7414e9893f3..dd1a3ba08ec 100644 --- a/loader/pthread.c +++ b/loader/pthread.c @@ -21,8 +21,6 @@ #include "config.h" #include "wine/port.h" -#ifdef HAVE_PTHREAD_H - #include #include #include @@ -45,6 +43,8 @@ #include "wine/library.h" #include "wine/pthread.h" +#ifdef HAVE_PTHREAD_H + static int init_done; static int nb_threads = 1; @@ -201,6 +201,47 @@ static void DECLSPEC_NORETURN abort_thread( long status ) pthread_exit( (void *)status ); } +#else /* HAVE_PTHREAD_H */ + +static void init_process( const struct wine_pthread_callbacks *callbacks, size_t size ) +{ +} + +static void init_thread( struct wine_pthread_thread_info *info ) +{ +} + +static int create_thread( struct wine_pthread_thread_info *info ) +{ + return -1; +} + +static void init_current_teb( struct wine_pthread_thread_info *info ) +{ +} + +static void *get_current_teb(void) +{ + return NULL; +} + +static void DECLSPEC_NORETURN exit_thread( struct wine_pthread_thread_info *info ) +{ + abort(); +} + +static void DECLSPEC_NORETURN abort_thread( long status ) +{ + abort(); +} + +static int pthread_sigmask( int how, const sigset_t *newset, sigset_t *oldset ) +{ + return -1; +} + +#endif /* HAVE_PTHREAD_H */ + /*********************************************************************** * pthread_functions @@ -216,5 +257,3 @@ const struct wine_pthread_functions pthread_functions = abort_thread, pthread_sigmask }; - -#endif /* HAVE_PTHREAD_H */