3 //=============================================================================
7 * standard symbolic constants and types
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_UNISTD_H
15 #define ACE_OS_INCLUDE_OS_UNISTD_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 #include "ace/os_include/sys/os_types.h"
26 #include "ace/os_include/os_inttypes.h"
28 #if defined (ACE_HAS_PROCESS_H)
29 # include /**/ <process.h>
30 #endif /* ACE_HAS_PROCESS_H */
32 #if defined (ACE_HAS_IO_H)
34 #endif /* ACE_HAS_IO_H */
36 #if !defined (ACE_LACKS_UNISTD_H)
37 # include /**/ <unistd.h>
38 #endif /* !ACE_LACKS_UNISTD_H */
40 #if defined (ACE_VXWORKS)
41 # if !defined (__RTP__)
42 // for unlink(), close(), read(), write(), lseek(), chdir(), getcwd(),
43 // getwd(), and isatty()
44 # include /**/ <ioLib.h>
47 # include /**/ <hostLib.h>
48 #endif /* ACE_VXWORKS */
51 # if !defined (STDIN_FILENO) && defined (_LLIO_STDIN)
52 # define STDIN_FILENO (_LLIO_STDIN)
54 # if !defined (STDOUT_FILENO) && defined (_LLIO_STDOUT)
55 # define STDOUT_FILENO (_LLIO_STDOUT)
57 # if !defined (STDERR_FILENO) && defined (_LLIO_STDERR)
58 # define STDERR_FILENO (_LLIO_STDERR)
62 // Place all additions (especially function declarations) within extern "C" {}
66 #endif /* __cplusplus */
68 #if defined (ACE_WIN32)
69 // The following are #defines and #includes that are specific to
71 # define ACE_STDIN GetStdHandle (STD_INPUT_HANDLE)
72 # define ACE_STDOUT GetStdHandle (STD_OUTPUT_HANDLE)
73 # define ACE_STDERR GetStdHandle (STD_ERROR_HANDLE)
74 // The following are #defines and #includes that are specific to UNIX.
75 #else /* !ACE_WIN32 */
76 # if defined (STDIN_FILENO)
77 # define ACE_STDIN STDIN_FILENO
81 # if defined (STDOUT_FILENO)
82 # define ACE_STDOUT STDOUT_FILENO
86 # if defined (STDERR_FILENO)
87 # define ACE_STDERR STDERR_FILENO
91 #endif /* ACE_WIN32 */
93 // for use by access()
95 # define R_OK 04 /* Test for Read permission. */
99 # define W_OK 02 /* Test for Write permission. */
103 # if defined (ACE_WIN32)
104 /* Windows has no test for X_OK - use R_OK instead */
105 # define X_OK R_OK /* Test for eXecute permission. */
106 # else /* ACE_WIN32 */
107 # define X_OK 01 /* Test for eXecute permission. */
108 # endif /* ACE_WIN32 */
112 # define F_OK 0 /* Test for existence of File. */
115 #if defined (ACE_LACKS_GETPGID_PROTOTYPE) && \
116 !defined (_XOPEN_SOURCE) && !defined (_XOPEN_SOURCE_EXTENDED)
117 pid_t
getpgid (pid_t pid
);
118 #endif /* ACE_LACKS_GETPGID_PROTOTYPE &&
119 !_XOPEN_SOURCE && !_XOPEN_SOURCE_EXTENDED */
121 #if defined (__BORLANDC__)
122 # define _isatty isatty
123 #endif /* __BORLANDC__ */
125 # if defined (ACE_LACKS_TIMEDWAIT_PROTOTYPES)
127 ssize_t
read_timedwait (ACE_HANDLE handle
,
130 struct timespec
*timeout
);
132 ssize_t
write_timedwait (ACE_HANDLE handle
,
135 struct timespec
*timeout
);
137 # endif /* ACE_LACKS_TIMEDWAIT_PROTOTYPES */
141 #endif /* __cplusplus */
143 #include /**/ "ace/post.h"
144 #endif /* ACE_OS_INCLUDE_OS_UNISTD_H */