1 /* Like <fcntl.h>, but with non-working flags defined to 0.
3 Copyright (C) 2006 Free Software Foundation, Inc.
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)
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.
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. */
19 /* written by Paul Eggert */
24 #include <sys/types.h>
27 #include @ABSOLUTE_FCNTL_H@
30 /* Declare overridden functions. */
36 #ifdef FCHDIR_REPLACEMENT
37 # define open rpl_open
38 extern int open (const char *, int, ...);
46 /* Fix up the O_* macros. */
48 #if !defined O_DIRECT && defined O_DIRECTIO
49 /* Tru64 spells it `O_DIRECTIO'. */
50 # define O_DIRECT O_DIRECTIO
58 # define O_DIRECTORY 0
74 # define O_NONBLOCK O_NDELAY
97 /* For systems that distinguish between text and binary I/O.
98 O_BINARY is usually declared in fcntl.h */
99 #if !defined O_BINARY && defined _O_BINARY
100 /* For MSC-compatible compilers. */
101 # define O_BINARY _O_BINARY
102 # define O_TEXT _O_TEXT
106 /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */