]> granicus.if.org Git - re2c/commit
Handle cases when rename() fails because destination file exists.
authorUlya Trofimovich <skvadrik@gmail.com>
Thu, 7 Mar 2019 13:08:51 +0000 (13:08 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Thu, 7 Mar 2019 13:08:51 +0000 (13:08 +0000)
commita804c1e35ff1493554f2df5fca7359e93221819b
tree7c5108acfc4c6a7bdc37d6826d8c8fb1f0880bba
parent47e1c662d1040b2f978b92f34c49cad2bb7ea206
Handle cases when rename() fails because destination file exists.

In C/C++ rename() behaviour is implementation-defined. POSIX and Windows
have different behaviour when destination file exists: POSIX says rename()
should overwrite it, but Windows says rename() should fail.
re2c/src/codegen/output.cc
re2c/src/util/temp_file.cc
re2c/src/util/temp_file.h