Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / ace / os_include / os_fcntl.h
blobf8b3de56871485290c9e69ff374cc5ecf40aa0f5
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file os_fcntl.h
7 * file control options
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_FCNTL_H
15 #define ACE_OS_INCLUDE_OS_FCNTL_H
17 #include /**/ "ace/pre.h"
19 #include /**/ "ace/config-all.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #include "ace/os_include/sys/os_stat.h"
26 #include "ace/os_include/sys/os_types.h"
28 #if !defined (ACE_LACKS_FCNTL_H)
29 # include /**/ <fcntl.h>
30 #endif /* !ACE_LACKS_FCNTL_H */
32 // Place all additions (especially function declarations) within extern "C" {}
33 #ifdef __cplusplus
34 extern "C"
36 #endif /* __cplusplus */
38 #if defined (__BORLANDC__)
39 # if !defined (_O_CREAT)
40 # define _O_CREAT O_CREAT
41 # endif
42 # if !defined (_O_EXCL)
43 # define _O_EXCL O_EXCL
44 # endif
45 # if !defined (_O_TRUNC)
46 # define _O_TRUNC O_TRUNC
47 # endif
48 # if !defined (_O_TEMPORARY)
49 // 0x0800 is used for O_APPEND. 0x08 looks free.
50 # define _O_TEMPORARY 0x08 /* see fcntl.h */
51 # endif
52 # if !defined (_O_RDWR)
53 # define _O_RDWR O_RDWR
54 # endif
55 # if !defined (_O_WRONLY)
56 # define _O_WRONLY O_WRONLY
57 # endif
58 # if !defined (_O_RDONLY)
59 # define _O_RDONLY O_RDONLY
60 # endif
61 # if !defined (_O_APPEND)
62 # define _O_APPEND O_APPEND
63 # endif
64 # if !defined (_O_BINARY)
65 # define _O_BINARY O_BINARY
66 # endif
67 # if !defined (_O_TEXT)
68 # define _O_TEXT O_TEXT
69 # endif
70 #endif /* __BORLANDC__ */
72 // defined Win32 specific macros for UNIX platforms
73 #if !defined (O_BINARY)
74 # define O_BINARY 0
75 #endif /* O_BINARY */
76 #if !defined (_O_BINARY)
77 # define _O_BINARY O_BINARY
78 #endif /* _O_BINARY */
79 #if !defined (O_TEXT)
80 # define O_TEXT 0
81 #endif /* O_TEXT */
82 #if !defined (_O_TEXT)
83 # define _O_TEXT O_TEXT
84 #endif /* _O_TEXT */
85 #if !defined (O_RAW)
86 # define O_RAW 0
87 #endif /* O_RAW */
88 #if !defined (_O_RAW)
89 # define _O_RAW O_RAW
90 #endif /* _O_RAW */
92 #if defined (ACE_WIN32)
93 # define O_NDELAY 1
94 #endif /* ACE_WIN32 */
96 # if !defined (O_NONBLOCK)
97 # define O_NONBLOCK 1
98 # endif /* O_NONBLOCK */
100 #if defined (ACE_HAS_POSIX_NONBLOCK)
101 # define ACE_NONBLOCK O_NONBLOCK
102 #else
103 # define ACE_NONBLOCK O_NDELAY
104 #endif /* ACE_HAS_POSIX_NONBLOCK */
106 # if !defined (F_GETFL)
107 # define F_GETFL 0
108 # endif /* F_GETFL */
110 #ifdef __cplusplus
112 #endif /* __cplusplus */
114 #include /**/ "ace/post.h"
115 #endif /* ACE_OS_INCLUDE_OS_FCNTL_H */