修訂 | e68457ebd6a8bc324319abf4ccde0e69ca151373 (tree) |
---|---|
時間 | 2022-11-30 15:43:09 |
作者 | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
RX: fix build error
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
@@ -1,5 +1,6 @@ | ||
1 | 1 | /* O_*, F_*, FD_* bit values for Linux. |
2 | - Copyright (C) 2000, 2004 Free Software Foundation, Inc. | |
2 | + Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004, 2006, 2007 | |
3 | + Free Software Foundation, Inc. | |
3 | 4 | This file is part of the GNU C Library. |
4 | 5 | |
5 | 6 | The GNU C Library is free software; you can redistribute it and/or |
@@ -13,20 +14,19 @@ | ||
13 | 14 | Lesser General Public License for more details. |
14 | 15 | |
15 | 16 | You should have received a copy of the GNU Lesser General Public |
16 | - License along with the GNU C Library; if not, write to the Free | |
17 | - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
18 | - 02111-1307 USA. */ | |
17 | + License along with the GNU C Library; if not, see | |
18 | + <http://www.gnu.org/licenses/>. */ | |
19 | 19 | |
20 | 20 | #ifndef _FCNTL_H |
21 | 21 | # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." |
22 | 22 | #endif |
23 | 23 | |
24 | - | |
25 | 24 | #include <sys/types.h> |
26 | 25 | #ifdef __USE_GNU |
27 | 26 | # include <bits/uio.h> |
28 | 27 | #endif |
29 | 28 | |
29 | + | |
30 | 30 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
31 | 31 | located on an ext2 file system */ |
32 | 32 | #define O_ACCMODE 0003 |
@@ -44,12 +44,17 @@ | ||
44 | 44 | #define O_FSYNC O_SYNC |
45 | 45 | #define O_ASYNC 020000 |
46 | 46 | |
47 | +#ifdef __USE_XOPEN2K8 | |
48 | +# define O_DIRECTORY 0200000 /* Must be a directory. */ | |
49 | +# define O_NOFOLLOW 0400000 /* Do not follow links. */ | |
50 | +# define O_CLOEXEC 02000000 /* Set close_on_exec. */ | |
51 | +#endif | |
52 | + | |
47 | 53 | #ifdef __USE_GNU |
48 | -# define O_DIRECTORY 040000 /* Must be a directory. */ | |
49 | -# define O_NOFOLLOW 0100000 /* Do not follow links. */ | |
50 | -# define O_DIRECT 0200000 /* Direct disk access. */ | |
51 | -# define O_NOATIME 01000000 /* Do not set atime. */ | |
52 | -# define O_CLOEXEC 02000000 /* set close_on_exec */ | |
54 | +# define O_DIRECT 040000 /* Direct disk access. */ | |
55 | +# define O_NOATIME 01000000 /* Do not set atime. */ | |
56 | +# define O_PATH 010000000 /* Resolve pathname but do not open file. */ | |
57 | +# define O_TMPFILE 020200000 /* Atomically create nameless file. */ | |
53 | 58 | #endif |
54 | 59 | |
55 | 60 | /* For now Linux has synchronisity options for data and read operations. |
@@ -61,7 +66,7 @@ | ||
61 | 66 | #endif |
62 | 67 | |
63 | 68 | #ifdef __USE_LARGEFILE64 |
64 | -# define O_LARGEFILE 0400000 | |
69 | +# define O_LARGEFILE 0100000 | |
65 | 70 | #endif |
66 | 71 | |
67 | 72 | /* Values for the second argument to `fcntl'. */ |
@@ -97,11 +102,15 @@ | ||
97 | 102 | # define F_SETLEASE 1024 /* Set a lease. */ |
98 | 103 | # define F_GETLEASE 1025 /* Enquire what lease is active. */ |
99 | 104 | # define F_NOTIFY 1026 /* Request notfications on a directory. */ |
105 | +# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */ | |
106 | +# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */ | |
107 | +#endif | |
108 | +#if defined __USE_XOPEN2K8 || defined __USE_GNU | |
100 | 109 | # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with |
101 | 110 | close-on-exit set on new fd. */ |
102 | 111 | #endif |
103 | 112 | |
104 | -/* For F_[GET|SET]FL. */ | |
113 | +/* For F_[GET|SET]FD. */ | |
105 | 114 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ |
106 | 115 | |
107 | 116 | /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ |
@@ -64,7 +64,7 @@ | ||
64 | 64 | register unsigned long r5 __asm__("r5") = __arg5; \ |
65 | 65 | register unsigned long r15 __asm__("r15") = name |
66 | 66 | |
67 | -#define ASM_ARGS_6 , "0"(r1), "r"(r2), "r"(r3), "r"(r4), "r"(r5), "r"(r7) | |
67 | +#define ASM_ARGS_6 , "0"(r1), "r"(r2), "r"(r3), "r"(r4), "r"(r5), "r"(r14) | |
68 | 68 | #define ARGS_6(name, a1, a2, a3, a4, a5, a6) \ |
69 | 69 | unsigned long __arg1 = (unsigned long)a1; \ |
70 | 70 | unsigned long __arg2 = (unsigned long)a2; \ |
@@ -77,7 +77,7 @@ | ||
77 | 77 | register unsigned long r3 __asm__("r3") = __arg3; \ |
78 | 78 | register unsigned long r4 __asm__("r4") = __arg4; \ |
79 | 79 | register unsigned long r5 __asm__("r5") = __arg5; \ |
80 | - register unsigned long r7 __asm__("r7") = __arg6; \ | |
80 | + register unsigned long r14 __asm__("r14") = __arg6; \ | |
81 | 81 | register unsigned long r15 __asm__("r15") = name |
82 | 82 | |
83 | 83 | #define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ |