This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] [v4] Add Comment to io/fcntl.h


Thanks for your help Roland.


v1 - Initial submission. v2 - Included missing ChangeLog. - Adjusted wording. - Two spaces after periods. - Reflow text to 80 characters. v3 - removed "()" - changed the wording v4 - Every line is under 80 characters. Patch mangling has been fixed.


Will push this once I get my accounts set up.



2013-02-25 Patsy Franklin <pfrankli@redhat.com>


* io/fcntl.h: Added a comment about AT_EACCESS and AT_REMOVEDIR.


diff --git a/io/fcntl.h b/io/fcntl.h
index 61834ce..fb46143 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_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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]