summaryrefslogtreecommitdiff
path: root/debian/patches/any/submitted-bits-fcntl_h-at.diff
blob: d09ad971d12bdb95b288711839721b643aef7771 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
2012-10-08  Wookey  <wookey@wookware.org>

        * include AT_* defines in sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h

2009-11-19  Aurelien Jarno  <aurelien@aurel32.net>
    
	* 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  <aurelien@aurel32.net>
    
	* 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.

---
 io/fcntl.h                                 |   28 ----------------------------
 sysdeps/mach/hurd/bits/fcntl.h             |   23 +++++++++++++++++++++++
 sysdeps/unix/sysv/linux/bits/fcntl-linux.h |   23 +++++++++++++++++++++++
 3 files changed, 46 insertions(+), 28 deletions(-)

--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -139,34 +139,6 @@
 # define SEEK_END	2	/* Seek from end of file.  */
 #endif	/* XPG */
 
-/* The constants AT_REMOVEDIR and AT_EACCESS have the same value.  AT_EACCESS
-   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.  */
-#  define AT_STATX_SYNC_TYPE	0x6000
-#  define AT_STATX_SYNC_AS_STAT	0x0000
-#  define AT_STATX_FORCE_SYNC	0x2000
-#  define AT_STATX_DONT_SYNC	0x4000
-#  define AT_RECURSIVE		0x8000	/* Apply to the entire subtree.  */
-# 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.
 
--- a/sysdeps/mach/hurd/bits/fcntl.h
+++ b/sysdeps/mach/hurd/bits/fcntl.h
@@ -228,3 +228,26 @@
 # 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.  */
+#  define AT_STATX_SYNC_TYPE	0x6000
+#  define AT_STATX_SYNC_AS_STAT	0x0000
+#  define AT_STATX_FORCE_SYNC	0x2000
+#  define AT_STATX_DONT_SYNC	0x4000
+#  define AT_RECURSIVE		0x8000	/* Apply to the entire subtree.  */
+# endif
+# define AT_EACCESS		0x200	/* Test access permitted for
+					   effective IDs, not real IDs.  */
+#endif
--- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
+++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
@@ -366,6 +366,29 @@
 # 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.  */
+#  define AT_STATX_SYNC_TYPE	0x6000
+#  define AT_STATX_SYNC_AS_STAT	0x0000
+#  define AT_STATX_FORCE_SYNC	0x2000
+#  define AT_STATX_DONT_SYNC	0x4000
+#  define AT_RECURSIVE		0x8000	/* Apply to the entire subtree.  */
+# endif
+# define AT_EACCESS		0x200	/* Test access permitted for
+					   effective IDs, not real IDs.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU