Browse Source

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>
Paul Cercueil 3 years ago
parent
commit
9efce41dd3

+ 2 - 2
libc/sysdeps/linux/aarch64/bits/fcntl.h

@@ -105,9 +105,9 @@
 # define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
 #endif
-#ifdef __USE_XOPEN2K8
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set.  */
+				   close-on-exit set on new fd.  */
 #endif
 
 /* For F_[GET|SET]FD.  */

+ 4 - 2
libc/sysdeps/linux/alpha/bits/fcntl.h

@@ -96,11 +96,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* for F_[GET|SET]FD */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/arc/bits/fcntl.h

@@ -89,11 +89,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/arm/bits/fcntl.h

@@ -101,11 +101,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FD.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/bfin/bits/fcntl.h

@@ -100,11 +100,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/cris/bits/fcntl.h

@@ -101,11 +101,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/csky/bits/fcntl.h

@@ -89,11 +89,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FD.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/frv/bits/fcntl.h

@@ -100,11 +100,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/h8300/bits/fcntl.h

@@ -100,11 +100,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/hppa/bits/fcntl.h

@@ -97,11 +97,13 @@
 # define F_SETLEASE     1024    /* Set a lease.  */
 # define F_GETLEASE     1025    /* Enquire what lease is active.  */
 # define F_NOTIFY       1026    /* Request notfications on a directory.  */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* for F_[GET|SET]FL */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/i386/bits/fcntl.h

@@ -101,11 +101,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FD.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/ia64/bits/fcntl.h

@@ -97,11 +97,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FD.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/kvx/bits/fcntl.h

@@ -86,11 +86,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/lm32/bits/fcntl.h

@@ -100,11 +100,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031	/* Set of pipe page size array */
 # define F_GETPIPE_SZ	1032	/* Get of pipe page size array */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/m68k/bits/fcntl.h

@@ -100,11 +100,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/metag/bits/fcntl.h

@@ -101,11 +101,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FD.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/microblaze/bits/fcntl.h

@@ -100,11 +100,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/mips/bits/fcntl.h

@@ -113,11 +113,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/nds32/bits/fcntl.h

@@ -105,11 +105,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FD.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/nios2/bits/fcntl.h

@@ -100,11 +100,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/or1k/bits/fcntl.h

@@ -102,11 +102,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/powerpc/bits/fcntl.h

@@ -101,11 +101,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FD.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/riscv64/bits/fcntl.h

@@ -88,11 +88,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/sh/bits/fcntl.h

@@ -101,11 +101,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FD.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/sparc/bits/fcntl.h

@@ -102,11 +102,13 @@
 # define F_SETLEASE     1024	/* Set a lease.  */
 # define F_GETLEASE     1025	/* Enquire what lease is active.  */
 # define F_NOTIFY       1026	/* Request notfications on a directory.  */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 #define F_GETLK64	12	/* Get record locking info.  */
 #define F_SETLK64	13	/* Set record locking info (non-blocking).  */

+ 4 - 2
libc/sysdeps/linux/sparc64/bits/fcntl.h

@@ -98,11 +98,13 @@
 # define F_SETLEASE     1024	/* Set a lease.  */
 # define F_GETLEASE     1025	/* Enquire what lease is active.  */
 # define F_NOTIFY       1026	/* Request notfications on a directory.  */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 #define F_GETLK64	7	/* Get record locking info.  */
 #define F_SETLK64	8	/* Set record locking info (non-blocking).  */

+ 4 - 2
libc/sysdeps/linux/tile/bits/fcntl.h

@@ -88,11 +88,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FL.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/x86_64/bits/fcntl.h

@@ -115,11 +115,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FD.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */

+ 4 - 2
libc/sysdeps/linux/xtensa/bits/fcntl.h

@@ -101,11 +101,13 @@
 # define F_SETLEASE	1024	/* Set a lease.	 */
 # define F_GETLEASE	1025	/* Enquire what lease is active.  */
 # define F_NOTIFY	1026	/* Request notfications on a directory.	 */
-# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
-				   close-on-exit set on new fd.  */
 # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */
 # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */
 #endif
+#if defined __USE_XOPEN2K8 || defined __USE_GNU
+# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
+				   close-on-exit set on new fd.  */
+#endif
 
 /* For F_[GET|SET]FD.  */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */