1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 21:19:24 +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

@@ -1,3 +1,9 @@
2020-08-29 Bruno Haible <bruno@clisp.org>
Fix link error on native Windows with MSVC/clang.
* tests/test2.c (SET_BINARY): On native Windows, use _setmode, not
setmode.
2020-08-29 Bruno Haible <bruno@clisp.org> 2020-08-29 Bruno Haible <bruno@clisp.org>
Update after gnulib changed. Update after gnulib changed.

View File

@@ -16,7 +16,11 @@
#endif #endif
#if O_BINARY #if O_BINARY
# include <io.h> # 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 #else
# define SET_BINARY(f) (void)0 # define SET_BINARY(f) (void)0
#endif #endif