]> git.cworth.org Git - tar/blob - lib/fcntl.in.h
Imported Upstream version 1.20
[tar] / lib / fcntl.in.h
1 /* Like <fcntl.h>, but with non-working flags defined to 0.
2
3    Copyright (C) 2006-2007 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 3 of the License, or
8    (at your option) 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, see <http://www.gnu.org/licenses/>.  */
17
18 /* written by Paul Eggert */
19
20 #ifndef _GL_FCNTL_H
21
22 #include <sys/types.h>
23 #include <sys/stat.h>
24 #include <unistd.h>
25 /* The include_next requires a split double-inclusion guard.  */
26 #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
27
28 #ifndef _GL_FCNTL_H
29 #define _GL_FCNTL_H
30
31
32 /* Declare overridden functions.  */
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #if (@GNULIB_OPEN@ && @REPLACE_OPEN@) || defined FCHDIR_REPLACEMENT
39 # define open rpl_open
40 extern int open (const char *filename, int flags, ...);
41 #endif
42
43 #ifdef __cplusplus
44 }
45 #endif
46
47
48 /* Fix up the O_* macros.  */
49
50 #if !defined O_DIRECT && defined O_DIRECTIO
51 /* Tru64 spells it `O_DIRECTIO'.  */
52 # define O_DIRECT O_DIRECTIO
53 #endif
54
55 #ifndef O_DIRECT
56 # define O_DIRECT 0
57 #endif
58
59 #ifndef O_DIRECTORY
60 # define O_DIRECTORY 0
61 #endif
62
63 #ifndef O_DSYNC
64 # define O_DSYNC 0
65 #endif
66
67 #ifndef O_NDELAY
68 # define O_NDELAY 0
69 #endif
70
71 #ifndef O_NOATIME
72 # define O_NOATIME 0
73 #endif
74
75 #ifndef O_NONBLOCK
76 # define O_NONBLOCK O_NDELAY
77 #endif
78
79 #ifndef O_NOCTTY
80 # define O_NOCTTY 0
81 #endif
82
83 #ifndef O_NOFOLLOW
84 # define O_NOFOLLOW 0
85 #endif
86
87 #ifndef O_NOLINKS
88 # define O_NOLINKS 0
89 #endif
90
91 #ifndef O_RSYNC
92 # define O_RSYNC 0
93 #endif
94
95 #ifndef O_SYNC
96 # define O_SYNC 0
97 #endif
98
99 /* For systems that distinguish between text and binary I/O.
100    O_BINARY is usually declared in fcntl.h  */
101 #if !defined O_BINARY && defined _O_BINARY
102   /* For MSC-compatible compilers.  */
103 # define O_BINARY _O_BINARY
104 # define O_TEXT _O_TEXT
105 #endif
106
107 #ifdef __BEOS__
108   /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect.  */
109 # undef O_BINARY
110 # undef O_TEXT
111 #endif
112
113 #ifndef O_BINARY
114 # define O_BINARY 0
115 # define O_TEXT 0
116 #endif
117
118
119 #endif /* _GL_FCNTL_H */
120 #endif /* _GL_FCNTL_H */