diff -urp src.old/winsup/cygwin/include/cygwin/types.h src/winsup/cygwin/include/cygwin/types.h --- src.old/winsup/cygwin/include/cygwin/types.h 2002-06-06 17:35:09.000000000 +0200 +++ src/winsup/cygwin/include/cygwin/types.h 2002-07-08 17:29:28.000000000 +0200 @@ -61,14 +61,21 @@ typedef __gid16_t gid_t; #if !defined(__INSIDE_CYGWIN__) || !defined(__cplusplus) -typedef void *pthread_t; -typedef void *pthread_mutex_t; - -typedef void *pthread_key_t; -typedef void *pthread_attr_t; -typedef void *pthread_mutexattr_t; -typedef void *pthread_condattr_t; -typedef void *pthread_cond_t; +typedef struct {char __dummy;} __pthread_t; +typedef __pthread_t *pthread_t; +typedef struct {char __dummy;} __pthread_mutex_t; +typedef __pthread_mutex_t *pthread_mutex_t; + +typedef struct {char __dummy;} __pthread_key_t; +typedef __pthread_key_t *pthread_key_t; +typedef struct {char __dummy;} __pthread_attr_t; +typedef __pthread_attr_t *pthread_attr_t; +typedef struct {char __dummy;} __pthread_mutexattr_t; +typedef __pthread_mutexattr_t *pthread_mutexattr_t; +typedef struct {char __dummy;} __pthread_condattr_t; +typedef __pthread_condattr_t *pthread_condattr_t; +typedef struct {char __dummy;} __pthread_cond_t; +typedef __pthread_cond_t *pthread_cond_t; /* These variables are not user alterable. This means you!. */ typedef struct @@ -77,8 +84,10 @@ typedef struct int state; } pthread_once_t; -typedef void *pthread_rwlock_t; -typedef void *pthread_rwlockattr_t; +typedef struct {char __dummy;} __pthread_rwlock_t; +typedef __pthread_rwlock_t *pthread_rwlock_t; +typedef struct {char __dummy;} __pthread_rwlockattr_t; +typedef __pthread_rwlockattr_t *pthread_rwlockattr_t; #else diff -urp src.old/winsup/cygwin/include/pthread.h src/winsup/cygwin/include/pthread.h --- src.old/winsup/cygwin/include/pthread.h 2002-07-04 16:17:30.000000000 +0200 +++ src/winsup/cygwin/include/pthread.h 2002-07-08 17:40:26.000000000 +0200 @@ -44,7 +44,12 @@ extern "C" #define PTHREAD_CANCEL_DISABLE 1 #define PTHREAD_CANCELED ((void *)-1) /* this should be a value that can never be a valid address */ +#if !defined(__INSIDE_CYGWIN__) || !defined(__cplusplus) +#define PTHREAD_COND_INITIALIZER (pthread_cond_t)21 +#else #define PTHREAD_COND_INITIALIZER (void *)21 +#endif + #define PTHREAD_CREATE_DETACHED 1 /* the default : joinable */ #define PTHREAD_CREATE_JOINABLE 0 @@ -54,7 +59,12 @@ extern "C" #define PTHREAD_MUTEX_ERRORCHECK 1 #define PTHREAD_MUTEX_NORMAL 2 /* this should be too low to ever be a valid address */ +#if !defined(__INSIDE_CYGWIN__) || !defined(__cplusplus) +#define PTHREAD_MUTEX_INITIALIZER (pthread_mutex_t)20 +#else #define PTHREAD_MUTEX_INITIALIZER (void *)20 +#endif + #define PTHREAD_MUTEX_RECURSIVE 0 #define PTHREAD_ONCE_INIT { PTHREAD_MUTEX_INITIALIZER, 0 } #define PTHREAD_PRIO_INHERIT @@ -103,7 +113,7 @@ void pthread_cleanup_push (void (*routin void pthread_cleanup_pop (int execute); */ typedef void (*__cleanup_routine_type) (void *); -typedef struct _pthread_cleanup_handler +typedef struct _pthread_cleanup_handler { __cleanup_routine_type function; void *arg; diff -urp src.old/winsup/cygwin/include/semaphore.h src/winsup/cygwin/include/semaphore.h --- src.old/winsup/cygwin/include/semaphore.h 2001-03-21 17:06:22.000000000 +0100 +++ src/winsup/cygwin/include/semaphore.h 2002-07-08 17:29:28.000000000 +0200 @@ -21,7 +21,8 @@ extern "C" #endif #ifndef __INSIDE_CYGWIN__ - typedef void *sem_t; + typedef struct {char __dummy;} __sem_t; + typedef __sem_t *sem_t; #endif #define SEM_FAILED 0