diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-15 11:25:39 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-15 11:25:39 +0200 |
commit | 1edb02101a9306fc711cd422ed507d18165b1691 (patch) | |
tree | bd2d48a139bfbe869f4f49359b63097931a45e7b /sanei/sanei_thread.c | |
parent | 2ca8a81bd0d99fe4d75c229d0e988d8ef710285f (diff) |
move from support/1.0.27 to feature/1.0.27
Diffstat (limited to 'sanei/sanei_thread.c')
-rw-r--r-- | sanei/sanei_thread.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sanei/sanei_thread.c b/sanei/sanei_thread.c index 8db4a21..fcf52c1 100644 --- a/sanei/sanei_thread.c +++ b/sanei/sanei_thread.c @@ -71,9 +71,6 @@ #if !defined USE_PTHREAD && !defined HAVE_OS2_H && !defined __BEOS__ # include <sys/wait.h> #endif -#if defined USE_PTHREAD -# include <pthread.h> -#endif #define BACKEND_NAME sanei_thread /**< name of this module for debugging */ @@ -135,9 +132,9 @@ sanei_thread_set_invalid( SANE_Pid *pid ) /* Return if PID is a valid PID or not. */ SANE_Bool -sanei_thread_is_invalid( SANE_Pid pid ) +sanei_thread_is_valid( SANE_Pid pid ) { - SANE_Bool rc = SANE_FALSE; + SANE_Bool rc = SANE_TRUE; #ifdef WIN32 #ifdef WINPTHREAD_API @@ -145,10 +142,10 @@ sanei_thread_is_invalid( SANE_Pid pid ) #else if (pid.p == 0) #endif - rc = SANE_TRUE; + rc = SANE_FALSE; #else - if (pid == -1) - rc = SANE_TRUE; + if (pid == (SANE_Pid) -1) + rc = SANE_FALSE; #endif return rc; @@ -491,7 +488,7 @@ sanei_thread_waitpid( SANE_Pid pid, int *status ) #else int ls; #endif - SANE_Pid result; + SANE_Pid result = pid; int stat; stat = 0; |