From 7fdb900bc169f0105bf5fb2cd282f6448f3f11f7 Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 4 Nov 1999 17:18:43 +0000 Subject: 1999-11-05 Ross Johnson * general: Patched for portability to WinCE. The details are described in the file WinCE-PORT. Follow the instructions in README.WinCE to make the appropriate changes in config.h. - Tristan Savatier --- pthread.h | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'pthread.h') diff --git a/pthread.h b/pthread.h index 87f769e..54d00ba 100644 --- a/pthread.h +++ b/pthread.h @@ -215,7 +215,12 @@ #endif /* HAVE_CONFIG_H */ #include + +#ifndef NEED_FTIME #include +#else /* NEED_FTIME */ +/* use native WIN32 time API */ +#endif /* NEED_FTIME */ #if HAVE_SIGNAL_H #include @@ -242,15 +247,24 @@ struct timespec { #define SIG_SETMASK 2 #endif /* SIG_SETMASK */ - #include + +/* + * note: ETIMEDOUT is correctly defined in winsock.h on winCE + */ +#ifdef HAVE_WINSOCK_H +#include +#endif + +#ifdef NEED_ERRNO +#include "need_errno.h" +#else #include +#endif -#ifdef _WIN32 #ifndef ETIMEDOUT -#define ETIMEDOUT 19981220 /* Let's hope this is unique */ +#define ETIMEDOUT 19981220 /* FIXME: Need the proper value here. */ #endif -#endif /* _WIN32 */ #ifdef _MSC_VER /* @@ -264,6 +278,13 @@ struct timespec { #define FALSE 0 #endif /* !TRUE */ +#ifdef __MINGW32__ +#define PT_STDCALL +#else +#define PT_STDCALL __stdcall +#endif + + /* * This should perhaps be in autoconf or * possibly fixed in Mingw32 to @@ -703,6 +724,12 @@ struct _pthread_cleanup_t * =============== */ +/* + * Useful if an application wants to statically link + * the lib rather than load the DLL at run-time. + */ +int pthread_win32_initialize_np(void); + /* * PThread Attribute Functions */ @@ -902,7 +929,7 @@ int pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); /* * Thread-Safe C Runtime Library Mappings. */ -#if ! defined( _REENTRANT ) && ! defined( _MT ) +#if (! defined(NEED_ERRNO)) || (! defined( _REENTRANT ) && ! defined( _MT )) int * _errno( void ); #endif -- cgit v1.2.3