Update Alpha bits/fcntl.h for XPG7 and allow bits/stat.h inclusion from fcntl.h.
authorMatt Turner <mattst88@gmail.com>
Sat, 30 Jan 2010 00:19:01 +0000 (00:19 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Sat, 30 Jan 2010 00:19:01 +0000 (00:19 +0000)
ChangeLog.alpha
sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
sysdeps/unix/sysv/linux/alpha/bits/stat.h

index 2bf2d52..ea50ee7 100644 (file)
@@ -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.
 
index a6ea1ca..7a6a3fd 100644 (file)
 #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
index 0aaabe2..4dbfebe 100644 (file)
@@ -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