From 741caa9982ba54bd58867b59ce2acf07de779bab Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Mon, 14 Mar 2011 18:33:13 +0100 Subject: semaphore.h, uClibc_local_lim.h: make sure SEM_VALUE_MAX is always defined LT old and new provided SEM_VALUE_MAX in semaphore.h, NPTL in local_lim.h Make sure to get the same definitions, independently of the fact, that semaphore.h is included or not. Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- libpthread/linuxthreads.old/semaphore.h | 3 +++ libpthread/linuxthreads/semaphore.h | 3 +++ 2 files changed, 6 insertions(+) (limited to 'libpthread') 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 #include +#include #ifdef __USE_XOPEN2K # define __need_timespec # include @@ -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 #include +#include #ifdef __USE_XOPEN2K # define __need_timespec # include @@ -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 -- cgit v1.2.3