3 //=============================================================================
9 * @author Don Hinton <dhinton@dresystems.com>
10 * @author This code was originally in various places including ace/OS.h.
12 //=============================================================================
14 #ifndef ACE_OS_INCLUDE_OS_TIME_H
15 #define ACE_OS_INCLUDE_OS_TIME_H
17 #include /**/ "ace/pre.h"
19 #include /**/ "ace/config-lite.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 // @todo should we include anything from signal.h?
26 #include "ace/os_include/sys/os_types.h"
28 // To get the proper select() signature, this is required for maybe other platforms
29 // that offer both int and fdset forms of select().
30 #if !defined (ACE_LACKS_SYS_TIME_H)
31 # include /**/ <sys/time.h>
32 #endif /* !ACE_LACKS_SYS_TIME_H */
34 #include /**/ <time.h>
36 #if defined (ACE_USES_STD_NAMESPACE_FOR_STDC_LIB) && \
37 (ACE_USES_STD_NAMESPACE_FOR_STDC_LIB != 0)
39 # if defined (ACE_WIN32)
43 # endif /* ACE_WIN32 */
45 #endif /* ACE_USES_STD_NAMESPACE_FOR_STDC_LIB */
47 # if !defined (ACE_HAS_POSIX_TIME)
48 // Definition per POSIX.
49 typedef struct timespec
56 # endif /* !ACE_HAS_POSIX_TIME */
58 # if defined(ACE_LACKS_TIMESPEC_T)
59 typedef struct timespec timespec_t
;
60 # endif /* ACE_LACKS_TIMESPEC_T */
62 // Place all additions (especially function declarations) within extern "C" {}
66 #endif /* __cplusplus */
68 // There are a lot of threads-related macro definitions in the config files.
69 // They came in at different times and from different places and platform
70 // requirements as threads evolved. They are probably not all needed - some
71 // overlap or are otherwise confused. This is an attempt to start
72 // straightening them out.
73 #if defined (ACE_HAS_PTHREADS) /* POSIX.1c threads (pthreads) */
74 // ... and 2-parameter asctime_r and ctime_r
75 # if !defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R) && !defined (ACE_VXWORKS)
76 # define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
78 #endif /* ACE_HAS_PTHREADS */
80 #if defined (ACE_LACKS_CONST_TIMESPEC_PTR)
81 typedef struct timespec
* ACE_TIMESPEC_PTR
;
83 typedef const struct timespec
* ACE_TIMESPEC_PTR
;
84 #endif /* ACE_LACKS_CONST_TIMESPEC_PTR */
88 #endif /* __cplusplus */
90 #include /**/ "ace/post.h"
91 #endif /* ACE_OS_INCLUDE_OS_TIME_H */