(O_DIRECTORY, O_NOFOLLOW): Protect by ifdef __USE_GNU.

(O_LARGEFILE): Define depending on architecture size.
This commit is contained in:
Ulrich Drepper 2000-01-04 19:55:10 +00:00
parent 8e2af6d8b5
commit 21e53eab06

View File

@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux/SPARC. /* O_*, F_*, FD_* bit values for Linux/SPARC.
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -21,6 +21,7 @@
#define _FCNTLBITS_H 1 #define _FCNTLBITS_H 1
#include <sys/types.h> #include <sys/types.h>
#include <bits/wordsize.h>
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */ located on an ext2 file system */
@ -37,11 +38,19 @@
#define O_NONBLOCK 0x4000 #define O_NONBLOCK 0x4000
#define O_NDELAY (0x0004 | O_NONBLOCK) #define O_NDELAY (0x0004 | O_NONBLOCK)
#define O_NOCTTY 0x8000 /* not fcntl */ #define O_NOCTTY 0x8000 /* not fcntl */
#define O_DIRECTORY 0x10000 /* must be a directory */
#define O_NOFOLLOW 0x20000 /* don't follow links */
/* XXX missing */ #ifdef __USE_GNU
#define O_LARGEFILE 0 # define O_DIRECTORY 0x10000 /* must be a directory */
# define O_NOFOLLOW 0x20000 /* don't follow links */
#endif
#ifdef __USE_LARGEFILE64
# if __WORDSIZE == 64
# define O_LARGEFILE 0
# else
# define O_LARGEFILE 0x40000
# endif
#endif
/* For now Linux has synchronisity options for data and read operations. /* For now Linux has synchronisity options for data and read operations.
We define the symbols here but let them do the same as O_SYNC since We define the symbols here but let them do the same as O_SYNC since