This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/4] Update Alpha bits/fcntl.h for XPG7 and allow bits/stat.h inclusion from fcntl.h.


Signed-off-by: Matt Turner <mattst88@gmail.com>
---
 ChangeLog.alpha                            |    8 ++++++++
 sysdeps/unix/sysv/linux/alpha/bits/fcntl.h |   10 +++++++---
 sysdeps/unix/sysv/linux/alpha/bits/stat.h  |    4 ++--
 3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/ChangeLog.alpha b/ChangeLog.alpha
index 812a9cf..2f36660 100644
--- a/ChangeLog.alpha
+++ b/ChangeLog.alpha
@@ -1,5 +1,13 @@
 2010-01-12  Matt Turner  <mattst88@gmail.com>
 
+	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Define O_DIRECTORY,
+	O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN for
+	XPG7.
+	* sysdeps/unix/sysv/linux/alpha/bits/stat.h: Enable using from
+	fcntl.h.
+
+2010-01-12  Matt Turner  <mattst88@gmail.com>
+
 	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Redefine O_SYNC and
 	O_DSYNC to match 2.6.33+ kernels.
 
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index a6ea1ca..7a6a3fd 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -45,12 +45,14 @@
 #define O_FSYNC		O_SYNC
 #define O_ASYNC		020000	/* fcntl, for BSD compatibility */
 
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
 # define O_DIRECTORY	0100000	/* Must be a directory.  */
 # define O_NOFOLLOW	0200000	/* Do not follow links.  */
+# define O_CLOEXEC	010000000 /* Set close_on_exec.  */
+#endif
+#ifdef __USE_GNU
 # define O_DIRECT	02000000 /* Direct disk access.  */
 # define O_NOATIME	04000000 /* Do not set atime.  */
-# define O_CLOEXEC      010000000 /* Set close_on_exec.  */
 #endif
 
 #ifdef __USE_LARGEFILE64
@@ -79,7 +81,7 @@
 #define F_SETLK64	F_SETLK	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	F_SETLKW /* Set record locking info (blocking).  */
 
-#if defined __USE_BSD || defined __USE_UNIX98
+#if defined __USE_BSD || defined __USE_UNIX98 || defiend __USE_XOPEN2K8
 # define F_SETOWN	5	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	6	/* Set owner of socket (receiver of SIGIO).  */
 #endif
@@ -93,6 +95,8 @@
 # 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.	 */
+#endif
+#ifdef __USE_XOPEN2K8
 # define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
 				   close-on-exit set.  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
index 0aaabe2..4dbfebe 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004
+/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -17,7 +17,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#ifndef _SYS_STAT_H
+#if !defined _SYS_STAT_H && !defined _FCNTL_H
 # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
 #endif
 
-- 
1.6.4.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]