annotate lib/fcntl.in.h @ 10375:f96e845fc36d

Avoid some "gcc -pedantic" warnings.
author Bruno Haible <bruno@clisp.org>
date Sat, 30 Aug 2008 03:09:15 +0200
parents bbbbbf4cd1c5
children 97cab1215a7c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9247
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Like <fcntl.h>, but with non-working flags defined to 0.
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9309
diff changeset
3 Copyright (C) 2006-2008 Free Software Foundation, Inc.
9247
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9299
diff changeset
5 This program is free software: you can redistribute it and/or modify
9247
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9299
diff changeset
7 the Free Software Foundation; either version 3 of the License, or
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9299
diff changeset
8 (at your option) any later version.
9247
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 GNU General Public License for more details.
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9299
diff changeset
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
9247
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 /* written by Paul Eggert */
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 #ifndef _GL_FCNTL_H
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9309
diff changeset
22 @PRAGMA_SYSTEM_HEADER@
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9309
diff changeset
23
9247
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 #include <sys/types.h>
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 #include <sys/stat.h>
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 #include <unistd.h>
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 /* The include_next requires a split double-inclusion guard. */
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 #ifndef _GL_FCNTL_H
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 #define _GL_FCNTL_H
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 /* Declare overridden functions. */
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 #ifdef __cplusplus
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 extern "C" {
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39
9299
ada4d73c37a6 New module 'open'.
Bruno Haible <bruno@clisp.org>
parents: 9247
diff changeset
40 #if (@GNULIB_OPEN@ && @REPLACE_OPEN@) || defined FCHDIR_REPLACEMENT
9247
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 # define open rpl_open
9299
ada4d73c37a6 New module 'open'.
Bruno Haible <bruno@clisp.org>
parents: 9247
diff changeset
42 extern int open (const char *filename, int flags, ...);
9247
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 #ifdef __cplusplus
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 }
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 /* Fix up the O_* macros. */
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 #if !defined O_DIRECT && defined O_DIRECTIO
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 /* Tru64 spells it `O_DIRECTIO'. */
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 # define O_DIRECT O_DIRECTIO
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 #ifndef O_DIRECT
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 # define O_DIRECT 0
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 #ifndef O_DIRECTORY
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 # define O_DIRECTORY 0
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65 #ifndef O_DSYNC
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66 # define O_DSYNC 0
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 #ifndef O_NDELAY
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 # define O_NDELAY 0
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73 #ifndef O_NOATIME
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74 # define O_NOATIME 0
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
77 #ifndef O_NONBLOCK
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78 # define O_NONBLOCK O_NDELAY
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
79 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
80
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 #ifndef O_NOCTTY
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82 # define O_NOCTTY 0
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85 #ifndef O_NOFOLLOW
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
86 # define O_NOFOLLOW 0
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 #ifndef O_NOLINKS
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
90 # define O_NOLINKS 0
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
91 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
92
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
93 #ifndef O_RSYNC
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
94 # define O_RSYNC 0
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
97 #ifndef O_SYNC
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
98 # define O_SYNC 0
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
99 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
100
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
101 /* For systems that distinguish between text and binary I/O.
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
102 O_BINARY is usually declared in fcntl.h */
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
103 #if !defined O_BINARY && defined _O_BINARY
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
104 /* For MSC-compatible compilers. */
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
105 # define O_BINARY _O_BINARY
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
106 # define O_TEXT _O_TEXT
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
107 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
108
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
109 #ifdef __BEOS__
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
110 /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
111 # undef O_BINARY
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
112 # undef O_TEXT
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
113 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
114
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
115 #ifndef O_BINARY
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
116 # define O_BINARY 0
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
117 # define O_TEXT 0
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
118 #endif
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
119
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
120
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
121 #endif /* _GL_FCNTL_H */
dc86ef955b9b Rename fcntl_.h to fcntl.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
122 #endif /* _GL_FCNTL_H */