1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

Fix link error on native Windows with MSVC/clang.

* tests/test2.c (SET_BINARY): On native Windows, use _setmode, not
setmode.
This commit is contained in:
Bruno Haible
2020-08-30 02:31:27 +02:00
parent 4706572628
commit 313d1a6770
2 changed files with 11 additions and 1 deletions

View File

@@ -16,7 +16,11 @@
#endif
#if O_BINARY
# include <io.h>
# define SET_BINARY(f) setmode (f, O_BINARY)
# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
# define SET_BINARY(f) setmode (f, O_BINARY)
# else
# define SET_BINARY(f) _setmode (f, O_BINARY)
# endif
#else
# define SET_BINARY(f) (void)0
#endif