diff options
author | Bruno Haible <bruno@clisp.org> | 2020-08-30 02:31:27 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-08-30 02:31:27 +0200 |
commit | 313d1a67708737cab0e917ac4064cb39a167e794 (patch) | |
tree | 66759bc041ba8afc2e1eefb09976af68357b1c38 | |
parent | 47065726284ba17d29e7a2a76d99dcf3af93a6ce (diff) | |
download | gperf-313d1a67708737cab0e917ac4064cb39a167e794.tar.gz |
Fix link error on native Windows with MSVC/clang.
* tests/test2.c (SET_BINARY): On native Windows, use _setmode, not
setmode.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | tests/test2.c | 6 |
2 files changed, 11 insertions, 1 deletions
@@ -1,5 +1,11 @@ 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> + Update after gnulib changed. * configure.ac (AC_PREREQ): Require Autoconf >= 2.64. * doc/configure.ac (AC_PREREQ): Likewise. diff --git a/tests/test2.c b/tests/test2.c index 130a0a3..c1c08cc 100644 --- a/tests/test2.c +++ b/tests/test2.c @@ -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 |