From bc5485edeff0ccb3fbcc7fe6b6f13c666699e959 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 14 Sep 2017 07:23:13 -0700 Subject: [PATCH] Port renameat_noreplace to openSUSE 12.3 Problem reported by M. Nomiya in: http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00363.html * src/sysdep.c (renameat_noreplace): Call renameat2 only if CYGWIN. --- src/sysdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sysdep.c b/src/sysdep.c index 318d4eb..1e6e0d0 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2689,7 +2689,7 @@ 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); -#elif defined RENAME_NOREPLACE /* Cygwin >= 2.9.0. */ +#elif defined CYGWIN && defined RENAME_NOREPLACE return renameat2 (srcfd, src, dstfd, dst, RENAME_NOREPLACE); #elif defined RENAME_EXCL return renameatx_np (srcfd, src, dstfd, dst, RENAME_EXCL); -- 2.7.4