From 54faff05177fa993e3d656ee1882c56e9da39393 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 30 Jan 2010 00:19:01 +0000 Subject: [PATCH] Update Alpha bits/fcntl.h for XPG7 and allow bits/stat.h inclusion from fcntl.h. --- 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 2bf2d52..ea50ee7 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,5 +1,13 @@ 2010-01-12 Matt Turner + * 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 + * 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 directly; use instead." #endif -- 2.7.4