mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-03 10:45:37 +00:00
Fix RGBFIX --output with a pre-existing or same-as-input file (#2145)
This commit is contained in:
1 parent
f5f503c7b1
commit
321ad497fa
3 files changed
+48
-4
No files matched your search
@@ -53,6 +53,12 @@
|
||||
#define O_TEXT 0 // Assume that it's not defined either
|
||||
#endif // _MSC_VER
|
||||
|
||||
// MSVC doesn't have POSIX `ftruncate`, use a suitable replacement
|
||||
#if defined(_MSC_VER)
|
||||
#include <io.h> // IWYU pragma: export
|
||||
#define ftruncate _chsize_s
|
||||
#endif
|
||||
|
||||
// Windows has stdin and stdout open as text by default, which we may not want
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#include <io.h> // IWYU pragma: export
|
||||
|
||||
Reference in new issue
Block a user