mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-08 18:19:08 +08:00
7b3b2c201a
In contrast to rename default behaviour, Linux' renameat2 returns -1 with errno set to EEXIST, if oldfile and newfile refer to the same file, and the RENAME_NOREPLACE flag is set. Follow suit, given this is a Linux-only function anyway. Fixes: f665b1cef30f ("cygwin: Implement renameat2") Reported-by: Bruno Haible <bruno@clisp.org> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>