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.
#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
#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
# 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
-/* 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.
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