cygwin: Implement renameat2

Define the RENAME_NOREPLACE flag in <cygwin/fs.h> as defined on Linux
in <linux/fs.h>.  The other RENAME_* flags defined on Linux are not
supported.
This commit is contained in:
Ken Brown
2017-08-17 09:12:15 -04:00
committed by Corinna Vinschen
parent c496cbb6bd
commit f665b1cef3
5 changed files with 54 additions and 7 deletions

View File

@@ -19,4 +19,10 @@ details. */
#define BLKPBSZGET 0x0000127b
#define BLKGETSIZE64 0x00041268
/* Flags for renameat2, from /usr/include/linux/fs.h. For now we
support only RENAME_NOREPLACE. */
#define RENAME_NOREPLACE (1 << 0)
/* #define RENAME_EXCHANGE (1 << 1) */
/* #define RENAME_WHITEOUT (1 << 2) */
#endif

View File

@@ -481,12 +481,13 @@ details. */
314: Export explicit_bzero.
315: Export pthread_mutex_timedlock.
316: Export pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock.
317: Export renameat2.
Note that we forgot to bump the api for ualarm, strtoll, strtoull,
sigaltstack, sethostname. */
#define CYGWIN_VERSION_API_MAJOR 0
#define CYGWIN_VERSION_API_MINOR 316
#define CYGWIN_VERSION_API_MINOR 317
/* There is also a compatibity version number associated with the shared memory
regions. It is incremented when incompatible changes are made to the shared