summaryrefslogtreecommitdiff
path: root/semaphore.h
diff options
context:
space:
mode:
authorrpj <rpj>2011-05-30 00:30:56 +0000
committerrpj <rpj>2011-05-30 00:30:56 +0000
commit26ed1ebeb95caec8d733a6a91e71e31312a8eb06 (patch)
treea957bdd3826088a9e447fc830ac4ccf835b77c44 /semaphore.h
parent2fe8aba6a8a4ce09f353f34881c77f93a9c01ca3 (diff)
Compiler directive cleanups
Diffstat (limited to 'semaphore.h')
-rw-r--r--semaphore.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/semaphore.h b/semaphore.h
index 891c929..c6e9407 100644
--- a/semaphore.h
+++ b/semaphore.h
@@ -39,33 +39,33 @@
#if !defined( SEMAPHORE_H )
#define SEMAPHORE_H
-#undef PTW32_LEVEL
+#undef PTW32_SEMAPHORE_LEVEL
#if defined(_POSIX_SOURCE)
-#define PTW32_LEVEL 0
+#define PTW32_SEMAPHORE_LEVEL 0
/* Early POSIX */
#endif
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309
-#undef PTW32_LEVEL
-#define PTW32_LEVEL 1
+#undef PTW32_SEMAPHORE_LEVEL
+#define PTW32_SEMAPHORE_LEVEL 1
/* Include 1b, 1c and 1d */
#endif
#if defined(INCLUDE_NP)
-#undef PTW32_LEVEL
-#define PTW32_LEVEL 2
+#undef PTW32_SEMAPHORE_LEVEL
+#define PTW32_SEMAPHORE_LEVEL 2
/* Include Non-Portable extensions */
#endif
-#define PTW32_LEVEL_MAX 3
+#define PTW32_SEMAPHORE_LEVEL_MAX 3
-#if !defined(PTW32_LEVEL)
-#define PTW32_LEVEL PTW32_LEVEL_MAX
+#if !defined(PTW32_SEMAPHORE_LEVEL)
+#define PTW32_SEMAPHORE_LEVEL PTW32_SEMAPHORE_LEVEL_MAX
/* Include everything */
#endif
-#if __GNUC__ && ! defined (__declspec)
+#if defined(__GNUC__) && ! defined (__declspec)
# error Please upgrade your GNU compiler to one that supports __declspec.
#endif
@@ -76,7 +76,7 @@
* be imported correctly.
*/
#if !defined(PTW32_STATIC_LIB)
-# ifdef PTW32_BUILD
+# if defined(PTW32_BUILD)
# define PTW32_DLLPORT __declspec (dllexport)
# else
# define PTW32_DLLPORT __declspec (dllimport)
@@ -90,7 +90,7 @@
* which is only used when building the pthread-win32 libraries.
*/
-#ifndef PTW32_CONFIG_H
+#if !defined(PTW32_CONFIG_H)
# if defined(WINCE)
# define NEED_ERRNO
# define NEED_SEM
@@ -107,22 +107,22 @@
*
*/
-#if PTW32_LEVEL >= PTW32_LEVEL_MAX
-#ifdef NEED_ERRNO
+#if PTW32_SEMAPHORE_LEVEL >= PTW32_SEMAPHORE_LEVEL_MAX
+#if defined(NEED_ERRNO)
#include "need_errno.h"
#else
#include <errno.h>
#endif
-#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */
+#endif /* PTW32_SEMAPHORE_LEVEL >= PTW32_SEMAPHORE_LEVEL_MAX */
#define _POSIX_SEMAPHORES
-#ifdef __cplusplus
+#if defined(__cplusplus)
extern "C"
{
#endif /* __cplusplus */
-#ifndef HAVE_MODE_T
+#if !defined(HAVE_MODE_T)
typedef unsigned int mode_t;
#endif
@@ -159,11 +159,11 @@ PTW32_DLLPORT int __cdecl sem_unlink (const char * name);
PTW32_DLLPORT int __cdecl sem_getvalue (sem_t * sem,
int * sval);
-#ifdef __cplusplus
+#if defined(__cplusplus)
} /* End of extern "C" */
#endif /* __cplusplus */
-#undef PTW32_LEVEL
-#undef PTW32_LEVEL_MAX
+#undef PTW32_SEMAPHORE_LEVEL
+#undef PTW32_SEMAPHORE_LEVEL_MAX
#endif /* !SEMAPHORE_H */