1 /* Copyright (C) 2001-2006 Artifex Software, Inc.
2    All Rights Reserved.
3 
4    This software is provided AS-IS with no warranty, either express or
5    implied.
6 
7    This software is distributed under license and may not be copied, modified
8    or distributed except as expressly authorized under the terms of that
9    license.  Refer to licensing information at http://www.artifex.com/
10    or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
11    San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12 */
13 /* $Id: fcntl_.h 8022 2007-06-05 22:23:38Z giles $ */
14 /* Declaration of the O_* flags for open */
15 
16 #ifndef fcntl__INCLUDED
17 #  define fcntl__INCLUDED
18 
19 /*
20  * This absurd little file is needed because Microsoft C, in defiance
21  * of multiple standards, does not define the O_ modes for 'open'.
22  */
23 
24 /*
25  * We must include std.h before any file that includes (or might include)
26  * sys/types.h.
27  */
28 #include "std.h"
29 #include <fcntl.h>
30 
31 #if !defined(O_APPEND) && defined(_O_APPEND)
32 #  define O_APPEND _O_APPEND
33 #endif
34 #if !defined(O_BINARY) && defined(_O_BINARY)
35 #  define O_BINARY _O_BINARY
36 #endif
37 #if !defined(O_CREAT) && defined(_O_CREAT)
38 #  define O_CREAT _O_CREAT
39 #endif
40 #if !defined(O_EXCL) && defined(_O_EXCL)
41 #  define O_EXCL _O_EXCL
42 #endif
43 #if !defined(O_RDONLY) && defined(_O_RDONLY)
44 #  define O_RDONLY _O_RDONLY
45 #endif
46 #if !defined(O_RDWR) && defined(_O_RDWR)
47 #  define O_RDWR _O_RDWR
48 #endif
49 #if !defined(O_TRUNC) && defined(_O_TRUNC)
50 #  define O_TRUNC _O_TRUNC
51 #endif
52 #if !defined(O_WRONLY) && defined(_O_WRONLY)
53 #  define O_WRONLY _O_WRONLY
54 #endif
55 
56 #endif /* fcntl__INCLUDED */
57