From 86cb74c0c6d135917d7c8c3c5e6ad314e167fd1f Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Sun, 14 Jan 2018 10:24:48 +0000 Subject: [PATCH] submitted-bits-fcntl_h-at 2012-10-08 Wookey * include AT_* defines in sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h 2009-11-19 Aurelien Jarno * io/fcntl.h: Move AT_* defines to... * sysdeps/mach/hurd/bits/fcntl.h: ...here. * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: ...here. * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: ...here. * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: ...here. * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: ...here. * sysdeps/unix/sysv/linux/x86/bits/fcntl.h: ...here. 2009-11-19 Aurelien Jarno * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Define AT_* constants. * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define AT_* constants. * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Define AT_* constants. * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Define AT_* constants. * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Define AT_* constants. * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define AT_* constants. Gbp-Pq: Topic any Gbp-Pq: Name submitted-bits-fcntl_h-at.diff --- io/fcntl.h | 23 ---------------------- sysdeps/mach/hurd/bits/fcntl.h | 18 +++++++++++++++++ sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 18 +++++++++++++++++ 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/io/fcntl.h b/io/fcntl.h index a6ccb90a1..57677071b 100644 --- a/io/fcntl.h +++ b/io/fcntl.h @@ -139,29 +139,6 @@ typedef __pid_t pid_t; # define SEEK_END 2 /* Seek from end of file. */ #endif /* XPG */ -/* The constants AT_REMOVEDIR and AT_EACCESS have the same value. AT_EASSESS - is meaningful only to faccessat, while AT_REMOVEDIR is meaningful only to - unlinkat. The two functions do completely different things and therefore, - the flags can be allowed to overlap. For example, passing AT_REMOVEDIR to - faccessat would be undefined behavior and thus treating it equivalent to - AT_EACCESS is valid undefined behavior. */ -#ifdef __USE_ATFILE -# define AT_FDCWD -100 /* Special value used to indicate - the *at functions should use the - current working directory. */ -# define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */ -# define AT_REMOVEDIR 0x200 /* Remove directory instead of - unlinking file. */ -# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ -# ifdef __USE_GNU -# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount - traversal. */ -# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */ -# endif -# define AT_EACCESS 0x200 /* Test access permitted for - effective IDs, not real IDs. */ -#endif - /* Do the file control operation described by CMD on FD. The remaining arguments are interpreted depending on CMD. diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fcntl.h index 915c7c6ab..ff0a41dac 100644 --- a/sysdeps/mach/hurd/bits/fcntl.h +++ b/sysdeps/mach/hurd/bits/fcntl.h @@ -219,3 +219,21 @@ struct flock64 # define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif + +/* Values for `*at' functions. */ +#ifdef __USE_ATFILE +# define AT_FDCWD -100 /* Special value used to indicate + the *at functions should use the + current working directory. */ +# define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */ +# define AT_REMOVEDIR 0x200 /* Remove directory instead of + unlinking file. */ +# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ +# ifdef __USE_GNU +# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount + traversal. */ +# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */ +# endif +# define AT_EACCESS 0x200 /* Test access permitted for + effective IDs, not real IDs. */ +#endif diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h index 0cd0a5d73..fef7fd34c 100644 --- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h +++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h @@ -334,6 +334,24 @@ struct file_handle # define MAX_HANDLE_SZ 128 #endif +/* Values for `*at' functions. */ +#ifdef __USE_ATFILE +# define AT_FDCWD -100 /* Special value used to indicate + the *at functions should use the + current working directory. */ +# define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */ +# define AT_REMOVEDIR 0x200 /* Remove directory instead of + unlinking file. */ +# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ +# ifdef __USE_GNU +# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount + traversal. */ +# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */ +# endif +# define AT_EACCESS 0x200 /* Test access permitted for + effective IDs, not real IDs. */ +#endif + __BEGIN_DECLS #ifdef __USE_GNU -- 2.30.2