about summary refs log tree commit diff
path: root/io
diff options
context:
space:
mode:
authorPatsy Franklin <pfrankli@redhat.com>2013-03-06 12:54:10 -0500
committerPatsy Franklin <pfrankli@redhat.com>2013-03-06 13:39:16 -0500
commit39120df9b9e2ad9674c0d6265757a7a68e10051f (patch)
treeddef45a58945fed230d26a155bbc10739b3fa864 /io
parent664a9ce4ca40feabff781fff044c93a43ae15b59 (diff)
downloadglibc-39120df9b9e2ad9674c0d6265757a7a68e10051f.tar.gz
glibc-39120df9b9e2ad9674c0d6265757a7a68e10051f.tar.xz
glibc-39120df9b9e2ad9674c0d6265757a7a68e10051f.zip
T_REMOVEDIR and AT_EACCESS have the same value.
Add comments to fcntl.h explaining why AT_REMOVEDIR
and AT_EACCESS can have the same value.
Diffstat (limited to 'io')
-rw-r--r--io/fcntl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/io/fcntl.h b/io/fcntl.h
index 61834cef1b..14ccae0d26 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -129,6 +129,12 @@ 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