3 C_Errno_t(C_Int_t
) Posix_FileSys_rename (NullString8_t p1
, NullString8_t p2
) {
4 C_Errno_t(C_Int_t
) res
;
5 res
= rename ((const char *) p1
, (const char *) p2
);
7 /* the MinGW rename() function does not remove the destination file
8 * if it exists; we emulate the Unix behavior here.
10 if ((res
!= 0) && (errno
== EEXIST
)) {
11 res
= unlink ((const char *) p2
);
13 res
= rename((const char *) p1
, (const char *) p2
);