public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] Define _AT_NULL_PATHNAME_ALLOWED
@ 2023-07-26 13:18 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2023-07-26 13:18 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a891dc7605b565282a1274198c9e4a033cafc348

commit a891dc7605b565282a1274198c9e4a033cafc348
Author:     Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Wed Jul 12 13:27:04 2023 +0200
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Wed Jul 26 15:14:22 2023 +0200

    Define _AT_NULL_PATHNAME_ALLOWED
    
    Cygwin needs an internal flag to allow specifying an empty pathname
    in utimesat (GLIBC extension). We define it in _default_fcntl.h to
    make sure we never introduce a value collision accidentally.
    While at it, define the values as 16 bit hex values.
    
    Reviewed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 newlib/libc/include/sys/_default_fcntl.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/newlib/libc/include/sys/_default_fcntl.h b/newlib/libc/include/sys/_default_fcntl.h
index 48914c92eab4..ce721fa23c02 100644
--- a/newlib/libc/include/sys/_default_fcntl.h
+++ b/newlib/libc/include/sys/_default_fcntl.h
@@ -162,12 +162,13 @@ extern "C" {
 #define AT_FDCWD -2
 
 /* Flag values for faccessat2) et al. */
-#define AT_EACCESS              1
-#define AT_SYMLINK_NOFOLLOW     2
-#define AT_SYMLINK_FOLLOW       4
-#define AT_REMOVEDIR            8
+#define AT_EACCESS                 0x0001
+#define AT_SYMLINK_NOFOLLOW        0x0002
+#define AT_SYMLINK_FOLLOW          0x0004
+#define AT_REMOVEDIR               0x0008
 #if __GNU_VISIBLE
-#define AT_EMPTY_PATH          16
+#define AT_EMPTY_PATH              0x0010
+#define _AT_NULL_PATHNAME_ALLOWED  0x4000 /* Internal flag used by futimesat */
 #endif
 #endif

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-26 13:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26 13:18 [newlib-cygwin/main] Define _AT_NULL_PATHNAME_ALLOWED Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).