diff options
Diffstat (limited to 'libpthread')
-rw-r--r-- | libpthread/linuxthreads.old/semaphore.h | 3 | ||||
-rw-r--r-- | libpthread/linuxthreads/semaphore.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libpthread/linuxthreads.old/semaphore.h b/libpthread/linuxthreads.old/semaphore.h index fea127b1e..c5ff6a038 100644 --- a/libpthread/linuxthreads.old/semaphore.h +++ b/libpthread/linuxthreads.old/semaphore.h @@ -17,6 +17,7 @@ #include <features.h> #include <sys/types.h> +#include <limits.h> #ifdef __USE_XOPEN2K # define __need_timespec # include <time.h> @@ -42,7 +43,9 @@ typedef struct #define SEM_FAILED ((sem_t *) 0) /* Maximum value the semaphore can have. */ +#ifndef SEM_VALUE_MAX #define SEM_VALUE_MAX ((int) ((~0u) >> 1)) +#endif __BEGIN_DECLS diff --git a/libpthread/linuxthreads/semaphore.h b/libpthread/linuxthreads/semaphore.h index 3084209f6..f9ad4c536 100644 --- a/libpthread/linuxthreads/semaphore.h +++ b/libpthread/linuxthreads/semaphore.h @@ -17,6 +17,7 @@ #include <features.h> #include <sys/types.h> +#include <limits.h> #ifdef __USE_XOPEN2K # define __need_timespec # include <time.h> @@ -42,7 +43,9 @@ typedef struct #define SEM_FAILED ((sem_t *) 0) /* Maximum value the semaphore can have. */ +#ifndef SEM_VALUE_MAX #define SEM_VALUE_MAX (2147483647) +#endif __BEGIN_DECLS |