diff --git a/include/sane/sanei_thread.h b/include/sane/sanei_thread.h index 7cf38548b..6182fc898 100644 --- a/include/sane/sanei_thread.h +++ b/include/sane/sanei_thread.h @@ -103,6 +103,7 @@ extern SANE_Status sanei_thread_get_status( int pid ); * argument. Add a function to your backend with this name and let it call your * own reader process. See mustek.c for an example. */ +/* FIXME: remove this ASAP */ #ifdef HAVE_OS2_H static int os2_reader_process( void* data); @@ -110,6 +111,5 @@ static int os2_reader_process( void* data); #define kill(a, b) sanei_thread_kill( a ) #define waitpid(a, b, c) sanei_thread_waitpid( a, b ) #endif -#endif #endif /* sanei_thread_h */ diff --git a/sanei/sanei_thread.c b/sanei/sanei_thread.c index 694b5a0d3..f7e01340c 100644 --- a/sanei/sanei_thread.c +++ b/sanei/sanei_thread.c @@ -59,11 +59,15 @@ #ifdef HAVE_UNISTD_H # include #endif +#ifdef HAVE_OS2_H +# define INCL_DOSPROCESS +# include +#endif #if !defined USE_PTHREAD && !defined HAVE_OS2_H -#include +# include #endif #if defined USE_PTHREAD -#include +# include #endif #define BACKEND_NAME sanei_thread /**< name of this module for debugging */ @@ -143,9 +147,6 @@ sanei_thread_get_status( int pid ) #ifdef HAVE_OS2_H -#define INCL_DOSPROCESS -#include - static void local_thread( void *arg ) { @@ -155,7 +156,7 @@ local_thread( void *arg ) ltd->status = ltd->func( ltd->func_data ); DBG( 2, "func() done - status = %d\n", ltd->status ); - _end_thread(); + _endthread(); } /* @@ -183,8 +184,6 @@ sanei_thread_begin( int (*func)(void *args), void* args ) return pid; } -} - int sanei_thread_waitpid( int pid, int *status ) { @@ -363,4 +362,4 @@ sanei_thread_waitpid( int pid, int *status ) #endif /* HAVE_OS2_H */ - +/* END sanei_thread.c .......................................................*/