mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 22:15:45 +01:00
Document rename_replace_existing macro
This commit is contained in:
parent
fdda7de048
commit
86095bcaa8
@ -62,9 +62,12 @@
|
|||||||
#define PSA_ITS_MAGIC_STRING "PSA\0ITS\0"
|
#define PSA_ITS_MAGIC_STRING "PSA\0ITS\0"
|
||||||
#define PSA_ITS_MAGIC_LENGTH 8
|
#define PSA_ITS_MAGIC_LENGTH 8
|
||||||
|
|
||||||
|
/* As rename fails on Windows if the new filepath already exists,
|
||||||
|
* use MoveFileExA with the MOVEFILE_REPLACE_EXISTING flag instead.
|
||||||
|
* Returns 0 on success, nonzero on failure. */
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#define rename_replace_existing( oldpath, newpath ) \
|
#define rename_replace_existing( oldpath, newpath ) \
|
||||||
(!MoveFileExA( oldpath, newpath, MOVEFILE_REPLACE_EXISTING ))
|
( ! MoveFileExA( oldpath, newpath, MOVEFILE_REPLACE_EXISTING ) )
|
||||||
#else
|
#else
|
||||||
#define rename_replace_existing( oldpath, newpath ) rename( oldpath, newpath )
|
#define rename_replace_existing( oldpath, newpath ) rename( oldpath, newpath )
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user