diff options
author | Eli Zaretskii <eliz@gnu.org> | 2017-08-14 19:31:12 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2017-08-14 19:31:12 +0300 |
commit | 5ba4c7d16b800864fa14b8a981e33f6aa6fa94d6 (patch) | |
tree | 8df544b12987a25dca4e8f01e98614a767c37b17 /src | |
parent | 16f11be4b96fc37204dc950e64f78ed340cd70d8 (diff) | |
download | emacs-5ba4c7d16b800864fa14b8a981e33f6aa6fa94d6.tar.gz |
Implement renameat_noreplace for MS-Windows
* src/sysdep.c (renameat_noreplace) [WINDOWSNT]: Implement minimal
emulation for MS-Windows. (Bug#27986)
Diffstat (limited to 'src')
-rw-r--r-- | src/sysdep.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 9eb733221e4..35f499c1853 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2694,6 +2694,10 @@ renameat_noreplace (int srcfd, char const *src, int dstfd, char const *dst) #if defined SYS_renameat2 && defined RENAME_NOREPLACE return syscall (SYS_renameat2, srcfd, src, dstfd, dst, RENAME_NOREPLACE); #else +#ifdef WINDOWSNT + if (srcfd == AT_FDCWD && dstfd == AT_FDCWD) + return sys_rename_replace (src, dst, 0); +#endif errno = ENOSYS; return -1; #endif |