* lib/fcntl_.h: New file.
[gnulib.git] / lib / fcntl_.h
1 /* Like <fcntl.h>, but with non-working flags defined to 0.
2
3    Copyright (C) 2006 Free Software Foundation, Inc.
4
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 2, or (at your option)
8    any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program; if not, write to the Free Software Foundation,
17    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
18
19 /* written by Paul Eggert */
20
21 #ifndef _GL_FCNTL_H
22 #define _GL_FCNTL_H
23
24 #include <sys/types.h>
25 #include <sys/stat.h>
26 #include <unistd.h>
27 #include @ABSOLUTE_FCNTL_H@
28
29 #if !defined O_DIRECT && defined O_DIRECTIO
30 /* Tru64 spells it `O_DIRECTIO'.  */
31 # define O_DIRECT O_DIRECTIO
32 #endif
33
34 #ifndef O_DIRECT
35 # define O_DIRECT 0
36 #endif
37
38 #ifndef O_DIRECTORY
39 # define O_DIRECTORY 0
40 #endif
41
42 #ifndef O_DSYNC
43 # define O_DSYNC 0
44 #endif
45
46 #ifndef O_NDELAY
47 # define O_NDELAY 0
48 #endif
49
50 #ifndef O_NOATIME
51 # define O_NOATIME 0
52 #endif
53
54 #ifndef O_NONBLOCK
55 # define O_NONBLOCK O_NDELAY
56 #endif
57
58 #ifndef O_NOCTTY
59 # define O_NOCTTY 0
60 #endif
61
62 #ifdef O_NOFOLLOW_IS_INEFFECTIVE
63 # undef O_NOFOLLOW
64 #endif
65 #ifndef O_NOFOLLOW
66 # define O_NOFOLLOW 0
67 #endif
68
69 #ifndef O_NOLINKS
70 # define O_NOLINKS 0
71 #endif
72
73 #ifndef O_RSYNC
74 # define O_RSYNC 0
75 #endif
76
77 #ifndef O_SYNC
78 # define O_SYNC 0
79 #endif
80
81 /* For systems that distinguish between text and binary I/O.
82    O_BINARY is usually declared in fcntl.h  */
83 #if !defined O_BINARY && defined _O_BINARY
84   /* For MSC-compatible compilers.  */
85 # define O_BINARY _O_BINARY
86 # define O_TEXT _O_TEXT
87 #endif
88
89 #ifdef __BEOS__
90   /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect.  */
91 # undef O_BINARY
92 # undef O_TEXT
93 #endif
94
95 #ifndef O_BINARY
96 # define O_BINARY 0
97 # define O_TEXT 0
98 #endif
99
100 #endif