• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisión9efce41dd3bb5d721a5b771931126f32a85e1958 (tree)
Tiempo2021-02-19 08:15:01
AutorPaul Cercueil <paul@crap...>
CommiterWaldemar Brodkorb

Log Message

fcntl.h: Make F_DUPFD_CLOEXEC if _USE_XOPEN2K8

The F_DUPFD_CLOEXEC flag was added in POSIX 2008.09.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>

Cambiar Resumen

Diferencia incremental

--- a/libc/sysdeps/linux/aarch64/bits/fcntl.h
+++ b/libc/sysdeps/linux/aarch64/bits/fcntl.h
@@ -105,9 +105,9 @@
105105 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
106106 # define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
107107 #endif
108-#ifdef __USE_XOPEN2K8
108+#if defined __USE_XOPEN2K8 || defined __USE_GNU
109109 # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
110- close-on-exit set. */
110+ close-on-exit set on new fd. */
111111 #endif
112112
113113 /* For F_[GET|SET]FD. */
--- a/libc/sysdeps/linux/alpha/bits/fcntl.h
+++ b/libc/sysdeps/linux/alpha/bits/fcntl.h
@@ -96,11 +96,13 @@
9696 # define F_SETLEASE 1024 /* Set a lease. */
9797 # define F_GETLEASE 1025 /* Enquire what lease is active. */
9898 # define F_NOTIFY 1026 /* Request notfications on a directory. */
99-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
100- close-on-exit set on new fd. */
10199 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
102100 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
103101 #endif
102+#if defined __USE_XOPEN2K8 || defined __USE_GNU
103+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
104+ close-on-exit set on new fd. */
105+#endif
104106
105107 /* for F_[GET|SET]FD */
106108 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/arc/bits/fcntl.h
+++ b/libc/sysdeps/linux/arc/bits/fcntl.h
@@ -89,11 +89,13 @@
8989 # define F_SETLEASE 1024 /* Set a lease. */
9090 # define F_GETLEASE 1025 /* Enquire what lease is active. */
9191 # define F_NOTIFY 1026 /* Request notfications on a directory. */
92-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
93- close-on-exit set on new fd. */
9492 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
9593 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
9694 #endif
95+#if defined __USE_XOPEN2K8 || defined __USE_GNU
96+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
97+ close-on-exit set on new fd. */
98+#endif
9799
98100 /* For F_[GET|SET]FL. */
99101 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/arm/bits/fcntl.h
+++ b/libc/sysdeps/linux/arm/bits/fcntl.h
@@ -101,11 +101,13 @@
101101 # define F_SETLEASE 1024 /* Set a lease. */
102102 # define F_GETLEASE 1025 /* Enquire what lease is active. */
103103 # define F_NOTIFY 1026 /* Request notfications on a directory. */
104-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
105- close-on-exit set on new fd. */
106104 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
107105 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
108106 #endif
107+#if defined __USE_XOPEN2K8 || defined __USE_GNU
108+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
109+ close-on-exit set on new fd. */
110+#endif
109111
110112 /* For F_[GET|SET]FD. */
111113 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/bfin/bits/fcntl.h
+++ b/libc/sysdeps/linux/bfin/bits/fcntl.h
@@ -100,11 +100,13 @@
100100 # define F_SETLEASE 1024 /* Set a lease. */
101101 # define F_GETLEASE 1025 /* Enquire what lease is active. */
102102 # define F_NOTIFY 1026 /* Request notfications on a directory. */
103-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
104- close-on-exit set on new fd. */
105103 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
106104 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
107105 #endif
106+#if defined __USE_XOPEN2K8 || defined __USE_GNU
107+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
108+ close-on-exit set on new fd. */
109+#endif
108110
109111 /* For F_[GET|SET]FL. */
110112 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/cris/bits/fcntl.h
+++ b/libc/sysdeps/linux/cris/bits/fcntl.h
@@ -101,11 +101,13 @@
101101 # define F_SETLEASE 1024 /* Set a lease. */
102102 # define F_GETLEASE 1025 /* Enquire what lease is active. */
103103 # define F_NOTIFY 1026 /* Request notfications on a directory. */
104-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
105- close-on-exit set on new fd. */
106104 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
107105 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
108106 #endif
107+#if defined __USE_XOPEN2K8 || defined __USE_GNU
108+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
109+ close-on-exit set on new fd. */
110+#endif
109111
110112 /* For F_[GET|SET]FL. */
111113 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/csky/bits/fcntl.h
+++ b/libc/sysdeps/linux/csky/bits/fcntl.h
@@ -89,11 +89,13 @@
8989 # define F_SETLEASE 1024 /* Set a lease. */
9090 # define F_GETLEASE 1025 /* Enquire what lease is active. */
9191 # define F_NOTIFY 1026 /* Request notfications on a directory. */
92-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
93- close-on-exit set on new fd. */
9492 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
9593 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
9694 #endif
95+#if defined __USE_XOPEN2K8 || defined __USE_GNU
96+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
97+ close-on-exit set on new fd. */
98+#endif
9799
98100 /* For F_[GET|SET]FD. */
99101 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/frv/bits/fcntl.h
+++ b/libc/sysdeps/linux/frv/bits/fcntl.h
@@ -100,11 +100,13 @@
100100 # define F_SETLEASE 1024 /* Set a lease. */
101101 # define F_GETLEASE 1025 /* Enquire what lease is active. */
102102 # define F_NOTIFY 1026 /* Request notfications on a directory. */
103-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
104- close-on-exit set on new fd. */
105103 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
106104 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
107105 #endif
106+#if defined __USE_XOPEN2K8 || defined __USE_GNU
107+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
108+ close-on-exit set on new fd. */
109+#endif
108110
109111 /* For F_[GET|SET]FL. */
110112 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/h8300/bits/fcntl.h
+++ b/libc/sysdeps/linux/h8300/bits/fcntl.h
@@ -100,11 +100,13 @@
100100 # define F_SETLEASE 1024 /* Set a lease. */
101101 # define F_GETLEASE 1025 /* Enquire what lease is active. */
102102 # define F_NOTIFY 1026 /* Request notfications on a directory. */
103-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
104- close-on-exit set on new fd. */
105103 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
106104 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
107105 #endif
106+#if defined __USE_XOPEN2K8 || defined __USE_GNU
107+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
108+ close-on-exit set on new fd. */
109+#endif
108110
109111 /* For F_[GET|SET]FL. */
110112 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/hppa/bits/fcntl.h
+++ b/libc/sysdeps/linux/hppa/bits/fcntl.h
@@ -97,11 +97,13 @@
9797 # define F_SETLEASE 1024 /* Set a lease. */
9898 # define F_GETLEASE 1025 /* Enquire what lease is active. */
9999 # define F_NOTIFY 1026 /* Request notfications on a directory. */
100-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
101- close-on-exit set on new fd. */
102100 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
103101 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
104102 #endif
103+#if defined __USE_XOPEN2K8 || defined __USE_GNU
104+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
105+ close-on-exit set on new fd. */
106+#endif
105107
106108 /* for F_[GET|SET]FL */
107109 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/i386/bits/fcntl.h
+++ b/libc/sysdeps/linux/i386/bits/fcntl.h
@@ -101,11 +101,13 @@
101101 # define F_SETLEASE 1024 /* Set a lease. */
102102 # define F_GETLEASE 1025 /* Enquire what lease is active. */
103103 # define F_NOTIFY 1026 /* Request notfications on a directory. */
104-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
105- close-on-exit set on new fd. */
106104 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
107105 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
108106 #endif
107+#if defined __USE_XOPEN2K8 || defined __USE_GNU
108+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
109+ close-on-exit set on new fd. */
110+#endif
109111
110112 /* For F_[GET|SET]FD. */
111113 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/ia64/bits/fcntl.h
+++ b/libc/sysdeps/linux/ia64/bits/fcntl.h
@@ -97,11 +97,13 @@
9797 # define F_SETLEASE 1024 /* Set a lease. */
9898 # define F_GETLEASE 1025 /* Enquire what lease is active. */
9999 # define F_NOTIFY 1026 /* Request notfications on a directory. */
100-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
101- close-on-exit set on new fd. */
102100 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
103101 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
104102 #endif
103+#if defined __USE_XOPEN2K8 || defined __USE_GNU
104+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
105+ close-on-exit set on new fd. */
106+#endif
105107
106108 /* For F_[GET|SET]FD. */
107109 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/kvx/bits/fcntl.h
+++ b/libc/sysdeps/linux/kvx/bits/fcntl.h
@@ -86,11 +86,13 @@
8686 # define F_SETLEASE 1024 /* Set a lease. */
8787 # define F_GETLEASE 1025 /* Enquire what lease is active. */
8888 # define F_NOTIFY 1026 /* Request notfications on a directory. */
89-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
90- close-on-exit set on new fd. */
9189 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
9290 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
9391 #endif
92+#if defined __USE_XOPEN2K8 || defined __USE_GNU
93+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
94+ close-on-exit set on new fd. */
95+#endif
9496
9597 /* For F_[GET|SET]FL. */
9698 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/lm32/bits/fcntl.h
+++ b/libc/sysdeps/linux/lm32/bits/fcntl.h
@@ -100,11 +100,13 @@
100100 # define F_SETLEASE 1024 /* Set a lease. */
101101 # define F_GETLEASE 1025 /* Enquire what lease is active. */
102102 # define F_NOTIFY 1026 /* Request notfications on a directory. */
103-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
104- close-on-exit set on new fd. */
105103 # define F_SETPIPE_SZ 1031 /* Set of pipe page size array */
106104 # define F_GETPIPE_SZ 1032 /* Get of pipe page size array */
107105 #endif
106+#if defined __USE_XOPEN2K8 || defined __USE_GNU
107+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
108+ close-on-exit set on new fd. */
109+#endif
108110
109111 /* For F_[GET|SET]FL. */
110112 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/m68k/bits/fcntl.h
+++ b/libc/sysdeps/linux/m68k/bits/fcntl.h
@@ -100,11 +100,13 @@
100100 # define F_SETLEASE 1024 /* Set a lease. */
101101 # define F_GETLEASE 1025 /* Enquire what lease is active. */
102102 # define F_NOTIFY 1026 /* Request notfications on a directory. */
103-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
104- close-on-exit set on new fd. */
105103 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
106104 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
107105 #endif
106+#if defined __USE_XOPEN2K8 || defined __USE_GNU
107+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
108+ close-on-exit set on new fd. */
109+#endif
108110
109111 /* For F_[GET|SET]FL. */
110112 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/metag/bits/fcntl.h
+++ b/libc/sysdeps/linux/metag/bits/fcntl.h
@@ -101,11 +101,13 @@
101101 # define F_SETLEASE 1024 /* Set a lease. */
102102 # define F_GETLEASE 1025 /* Enquire what lease is active. */
103103 # define F_NOTIFY 1026 /* Request notfications on a directory. */
104-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
105- close-on-exit set on new fd. */
106104 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
107105 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
108106 #endif
107+#if defined __USE_XOPEN2K8 || defined __USE_GNU
108+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
109+ close-on-exit set on new fd. */
110+#endif
109111
110112 /* For F_[GET|SET]FD. */
111113 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/microblaze/bits/fcntl.h
+++ b/libc/sysdeps/linux/microblaze/bits/fcntl.h
@@ -100,11 +100,13 @@
100100 # define F_SETLEASE 1024 /* Set a lease. */
101101 # define F_GETLEASE 1025 /* Enquire what lease is active. */
102102 # define F_NOTIFY 1026 /* Request notfications on a directory. */
103-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
104- close-on-exit set on new fd. */
105103 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
106104 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
107105 #endif
106+#if defined __USE_XOPEN2K8 || defined __USE_GNU
107+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
108+ close-on-exit set on new fd. */
109+#endif
108110
109111 /* For F_[GET|SET]FL. */
110112 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/mips/bits/fcntl.h
+++ b/libc/sysdeps/linux/mips/bits/fcntl.h
@@ -113,11 +113,13 @@
113113 # define F_SETLEASE 1024 /* Set a lease. */
114114 # define F_GETLEASE 1025 /* Enquire what lease is active. */
115115 # define F_NOTIFY 1026 /* Request notfications on a directory. */
116-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
117- close-on-exit set on new fd. */
118116 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
119117 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
120118 #endif
119+#if defined __USE_XOPEN2K8 || defined __USE_GNU
120+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
121+ close-on-exit set on new fd. */
122+#endif
121123
122124 /* For F_[GET|SET]FL. */
123125 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/nds32/bits/fcntl.h
+++ b/libc/sysdeps/linux/nds32/bits/fcntl.h
@@ -105,11 +105,13 @@
105105 # define F_SETLEASE 1024 /* Set a lease. */
106106 # define F_GETLEASE 1025 /* Enquire what lease is active. */
107107 # define F_NOTIFY 1026 /* Request notfications on a directory. */
108-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
109- close-on-exit set on new fd. */
110108 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
111109 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
112110 #endif
111+#if defined __USE_XOPEN2K8 || defined __USE_GNU
112+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
113+ close-on-exit set on new fd. */
114+#endif
113115
114116 /* For F_[GET|SET]FD. */
115117 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/nios2/bits/fcntl.h
+++ b/libc/sysdeps/linux/nios2/bits/fcntl.h
@@ -100,11 +100,13 @@
100100 # define F_SETLEASE 1024 /* Set a lease. */
101101 # define F_GETLEASE 1025 /* Enquire what lease is active. */
102102 # define F_NOTIFY 1026 /* Request notfications on a directory. */
103-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
104- close-on-exit set on new fd. */
105103 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
106104 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
107105 #endif
106+#if defined __USE_XOPEN2K8 || defined __USE_GNU
107+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
108+ close-on-exit set on new fd. */
109+#endif
108110
109111 /* For F_[GET|SET]FL. */
110112 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/or1k/bits/fcntl.h
+++ b/libc/sysdeps/linux/or1k/bits/fcntl.h
@@ -102,11 +102,13 @@
102102 # define F_SETLEASE 1024 /* Set a lease. */
103103 # define F_GETLEASE 1025 /* Enquire what lease is active. */
104104 # define F_NOTIFY 1026 /* Request notfications on a directory. */
105-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
106- close-on-exit set on new fd. */
107105 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
108106 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
109107 #endif
108+#if defined __USE_XOPEN2K8 || defined __USE_GNU
109+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
110+ close-on-exit set on new fd. */
111+#endif
110112
111113 /* For F_[GET|SET]FL. */
112114 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/powerpc/bits/fcntl.h
+++ b/libc/sysdeps/linux/powerpc/bits/fcntl.h
@@ -101,11 +101,13 @@
101101 # define F_SETLEASE 1024 /* Set a lease. */
102102 # define F_GETLEASE 1025 /* Enquire what lease is active. */
103103 # define F_NOTIFY 1026 /* Request notfications on a directory. */
104-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
105- close-on-exit set on new fd. */
106104 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
107105 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
108106 #endif
107+#if defined __USE_XOPEN2K8 || defined __USE_GNU
108+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
109+ close-on-exit set on new fd. */
110+#endif
109111
110112 /* For F_[GET|SET]FD. */
111113 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/riscv64/bits/fcntl.h
+++ b/libc/sysdeps/linux/riscv64/bits/fcntl.h
@@ -88,11 +88,13 @@
8888 # define F_SETLEASE 1024 /* Set a lease. */
8989 # define F_GETLEASE 1025 /* Enquire what lease is active. */
9090 # define F_NOTIFY 1026 /* Request notfications on a directory. */
91-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
92- close-on-exit set on new fd. */
9391 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
9492 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
9593 #endif
94+#if defined __USE_XOPEN2K8 || defined __USE_GNU
95+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
96+ close-on-exit set on new fd. */
97+#endif
9698
9799 /* For F_[GET|SET]FL. */
98100 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/sh/bits/fcntl.h
+++ b/libc/sysdeps/linux/sh/bits/fcntl.h
@@ -101,11 +101,13 @@
101101 # define F_SETLEASE 1024 /* Set a lease. */
102102 # define F_GETLEASE 1025 /* Enquire what lease is active. */
103103 # define F_NOTIFY 1026 /* Request notfications on a directory. */
104-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
105- close-on-exit set on new fd. */
106104 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
107105 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
108106 #endif
107+#if defined __USE_XOPEN2K8 || defined __USE_GNU
108+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
109+ close-on-exit set on new fd. */
110+#endif
109111
110112 /* For F_[GET|SET]FD. */
111113 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/sparc/bits/fcntl.h
+++ b/libc/sysdeps/linux/sparc/bits/fcntl.h
@@ -102,11 +102,13 @@
102102 # define F_SETLEASE 1024 /* Set a lease. */
103103 # define F_GETLEASE 1025 /* Enquire what lease is active. */
104104 # define F_NOTIFY 1026 /* Request notfications on a directory. */
105-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
106- close-on-exit set on new fd. */
107105 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
108106 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
109107 #endif
108+#if defined __USE_XOPEN2K8 || defined __USE_GNU
109+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
110+ close-on-exit set on new fd. */
111+#endif
110112
111113 #define F_GETLK64 12 /* Get record locking info. */
112114 #define F_SETLK64 13 /* Set record locking info (non-blocking). */
--- a/libc/sysdeps/linux/sparc64/bits/fcntl.h
+++ b/libc/sysdeps/linux/sparc64/bits/fcntl.h
@@ -98,11 +98,13 @@
9898 # define F_SETLEASE 1024 /* Set a lease. */
9999 # define F_GETLEASE 1025 /* Enquire what lease is active. */
100100 # define F_NOTIFY 1026 /* Request notfications on a directory. */
101-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
102- close-on-exit set on new fd. */
103101 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
104102 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
105103 #endif
104+#if defined __USE_XOPEN2K8 || defined __USE_GNU
105+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
106+ close-on-exit set on new fd. */
107+#endif
106108
107109 #define F_GETLK64 7 /* Get record locking info. */
108110 #define F_SETLK64 8 /* Set record locking info (non-blocking). */
--- a/libc/sysdeps/linux/tile/bits/fcntl.h
+++ b/libc/sysdeps/linux/tile/bits/fcntl.h
@@ -88,11 +88,13 @@
8888 # define F_SETLEASE 1024 /* Set a lease. */
8989 # define F_GETLEASE 1025 /* Enquire what lease is active. */
9090 # define F_NOTIFY 1026 /* Request notfications on a directory. */
91-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
92- close-on-exit set on new fd. */
9391 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
9492 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
9593 #endif
94+#if defined __USE_XOPEN2K8 || defined __USE_GNU
95+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
96+ close-on-exit set on new fd. */
97+#endif
9698
9799 /* For F_[GET|SET]FL. */
98100 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/x86_64/bits/fcntl.h
+++ b/libc/sysdeps/linux/x86_64/bits/fcntl.h
@@ -115,11 +115,13 @@
115115 # define F_SETLEASE 1024 /* Set a lease. */
116116 # define F_GETLEASE 1025 /* Enquire what lease is active. */
117117 # define F_NOTIFY 1026 /* Request notfications on a directory. */
118-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
119- close-on-exit set on new fd. */
120118 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
121119 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
122120 #endif
121+#if defined __USE_XOPEN2K8 || defined __USE_GNU
122+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
123+ close-on-exit set on new fd. */
124+#endif
123125
124126 /* For F_[GET|SET]FD. */
125127 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
--- a/libc/sysdeps/linux/xtensa/bits/fcntl.h
+++ b/libc/sysdeps/linux/xtensa/bits/fcntl.h
@@ -101,11 +101,13 @@
101101 # define F_SETLEASE 1024 /* Set a lease. */
102102 # define F_GETLEASE 1025 /* Enquire what lease is active. */
103103 # define F_NOTIFY 1026 /* Request notfications on a directory. */
104-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
105- close-on-exit set on new fd. */
106104 # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
107105 # define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
108106 #endif
107+#if defined __USE_XOPEN2K8 || defined __USE_GNU
108+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
109+ close-on-exit set on new fd. */
110+#endif
109111
110112 /* For F_[GET|SET]FD. */
111113 #define FD_CLOEXEC 1 /* actually anything with low bit set goes */