Windows uses some macros to replace DeleteFile() by DeleteFileA() or DeleteFileW(). This was causing an error at link time.
I could have used "#undef DeleteFile", but I decided to change the function name to avoid future problem if we want to use Windows's function DeleteFile().
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I won't object to this change, but, in my experience, the #undef approach is better. It doesn't force you to compromise your API design, and it keeps the Windows-specific fixes local to the Windows-specific code.
If we were to #undef DeleteFile and later wanted to call the actual WinAPI DeleteFile, we'd just have to use the actual function name, either DeleteFileW or DeleteFileA, which modern code should be doing anyway.