Fixed OS/2 compilation.

merge-requests/1/head
Gerhard Jaeger 2003-10-13 07:16:09 +00:00
rodzic 52d44e1aae
commit cd7b8f8cb2
2 zmienionych plików z 9 dodań i 10 usunięć

Wyświetl plik

@ -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 */

Wyświetl plik

@ -59,11 +59,15 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_OS2_H
# define INCL_DOSPROCESS
# include <os2.h>
#endif
#if !defined USE_PTHREAD && !defined HAVE_OS2_H
#include <signal.h>
# include <signal.h>
#endif
#if defined USE_PTHREAD
#include <pthread.h>
# include <pthread.h>
#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 <os2.h>
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 .......................................................*/