2 #ifndef ACE_CONFIG_POSIX_H
3 #define ACE_CONFIG_POSIX_H
7 /* The following POSIX constants are defined after <unistd.h> is
8 * included. They are documented in:
9 * http://www.opengroup.org/onlinepubs/007904975/basedefs/unistd.h.html
11 #if defined(_POSIX_REALTIME_SIGNALS) && (_POSIX_REALTIME_SIGNALS-0 != -1 )
12 # if !defined(ACE_HAS_POSIX_REALTIME_SIGNALS)
13 # define ACE_HAS_POSIX_REALTIME_SIGNALS
14 # endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */
15 #endif /* _POSIX_REALTIME_SIGNALS */
17 #if defined(_POSIX_ASYNCHRONOUS_IO) && (_POSIX_ASYNCHRONOUS_IO-0 != -1 )
18 # if !defined(ACE_HAS_AIO_CALLS)
19 # define ACE_HAS_AIO_CALLS
20 # endif /* ACE_HAS_AIO_CALLS */
21 #endif /* _POSIX_ASYNCHRONOUS_IO */
23 #if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE != 0)
24 # if defined(_POSIX_SEMAPHORES) && (_POSIX_SEMAPHORES-0 != -1 )
25 # if !defined(ACE_HAS_POSIX_SEM)
26 # define ACE_HAS_POSIX_SEM
27 # endif /* ACE_HAS_POSIX_SEM */
28 # if defined(ACE_HAS_POSIX_SEM)
29 # if !defined (ACE_HAS_POSIX_SEM_TIMEOUT) && \
30 (defined (_POSIX_TIMEOUTS) && (_POSIX_TIMEOUTS-0 != -1))
31 # define ACE_HAS_POSIX_SEM_TIMEOUT
32 # endif /* ACE_HAS_POSIX_SEM_TIMEOUT && _POSIX_TIMEOUTS */
33 # endif /* ACE_HAS_POSIX_SEM */
34 # endif /* ACE_HAS_POSIX_SEM */
35 #endif /* !ACE_MT_SAFE */
37 #if defined(_POSIX_SHARED_MEMORY_OBJECTS) && (_POSIX_SHARED_MEMORY_OBJECTS-0 != -1 )
38 # if !defined(ACE_HAS_SHM_OPEN)
39 # define ACE_HAS_SHM_OPEN
40 # endif /* ACE_HAS_SHM_OPEN */
41 #endif /* _POSIX_SHARED_MEMORY_OBJECTS */
43 // Check if threading enabled/disable through platform_macros
44 #if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE != 0)
45 // Allow the user to disable use of threads by setting ACE_HAS_THREADS to 0
46 // before including this file. The platform config (not macros) file can
47 // often detect that the compiler was invoked with or without threads support
48 // and set this accordingly.
49 # if defined (ACE_HAS_THREADS) && (ACE_HAS_THREADS == 0)
50 # undef ACE_HAS_THREADS
52 # if defined(_POSIX_THREADS) && (_POSIX_THREADS-0 != -1 )
53 # if !defined(ACE_HAS_THREADS)
54 # define ACE_HAS_THREADS
55 # endif /* ACE_HAS_THREADS */
57 # if !defined(ACE_HAS_PTHREADS)
58 # define ACE_HAS_PTHREADS
59 # endif /* ACE_HAS_PTHREADS */
61 # if defined (_POSIX_CLOCK_SELECTION) && (_POSIX_CLOCK_SELECTION-0 != -1)
62 # if !defined (ACE_HAS_CONDATTR_SETCLOCK) && !defined (ACE_LACKS_CONDATTR_SETCLOCK)
63 # define ACE_HAS_CONDATTR_SETCLOCK
66 # endif /* _POSIX_THREADS */
67 # endif /* ACE_HAS_THREADS */
68 #endif /* !ACE_MT_SAFE */
70 #if defined(_POSIX_MESSAGE_PASSING) && (_POSIX_MESSAGE_PASSING-0 != -1 )
71 # if !defined(ACE_HAS_POSIX_MESSAGE_PASSING)
72 # define ACE_HAS_POSIX_MESSAGE_PASSING
73 # endif /* ACE_HAS_POSIX_MESSAGE_PASSING */
74 #endif /* _POSIX_MESSAGE_PASSING */
76 #if defined (_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK-0 != -1)
77 # if !defined (ACE_HAS_CLOCK_GETTIME_MONOTONIC) && !defined (ACE_LACKS_CLOCK_MONOTONIC)
78 # define ACE_HAS_CLOCK_GETTIME_MONOTONIC
82 #if defined (ACE_HAS_CONDATTR_SETCLOCK) && defined (ACE_HAS_CLOCK_GETTIME_MONOTONIC)
83 # if !defined (ACE_HAS_POSIX_MONOTONIC_CONDITIONS)
84 # define ACE_HAS_POSIX_MONOTONIC_CONDITIONS
86 # if !defined (ACE_HAS_MONOTONIC_CONDITIONS)
87 # define ACE_HAS_MONOTONIC_CONDITIONS
91 #endif /* ACE_CONFIG_POSIX_H */