diff options
author | Rosen Penev <rosenp@gmail.com> | 2017-02-08 19:42:42 -0800 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2017-02-09 20:02:18 +1100 |
commit | c669249e4c3b23e3a3bb41223035cc41a0e75508 (patch) | |
tree | c4061c97517e304d2da0cd17eb47a3f3a9f422e2 | |
parent | d2cb0d1eb2f713d7f3ff83da9869be7bddba909c (diff) | |
download | flac-c669249e4c3b23e3a3bb41223035cc41a0e75508.tar.gz |
Fix compile with cygwin
The underscores are wrong. The comment is also correct.
Also remove the configure.ac option. Otherwise it tries to compile the
windows unicode stuff which POSIX(cygwin) does not understand.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | include/share/compat.h | 2 | ||||
-rw-r--r-- | src/libFLAC/stream_decoder.c | 3 | ||||
-rw-r--r-- | src/libFLAC/stream_encoder.c | 3 | ||||
-rw-r--r-- | src/share/grabbag/file.c | 8 |
5 files changed, 3 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index c5b63370..9a1570c0 100644 --- a/configure.ac +++ b/configure.ac @@ -185,7 +185,7 @@ AM_CONDITIONAL(FLaC__CPU_PPC_SPE, test "x$abi_spe" = xtrue) os_is_windows=no case "$host" in - *-*-cygwin|*mingw*) + *mingw*) CPPFLAGS="-D__MSVCRT_VERSION__=0x0601 $CPPFLAGS" os_is_windows=yes ;; diff --git a/include/share/compat.h b/include/share/compat.h index f74a5c1f..2ad40fb9 100644 --- a/include/share/compat.h +++ b/include/share/compat.h @@ -98,7 +98,7 @@ #define FLAC__STRNCASECMP strncasecmp #endif -#if defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ || defined __EMX__ +#if defined _MSC_VER || defined __MINGW32__ || defined __EMX__ #include <io.h> /* for _setmode(), chmod() */ #include <fcntl.h> /* for _O_BINARY */ #else diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index 2e1fdd5b..d3b6e03e 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -1253,9 +1253,6 @@ FILE *get_binary_stdin_(void) */ #if defined _MSC_VER || defined __MINGW32__ _setmode(_fileno(stdin), _O_BINARY); -#elif defined __CYGWIN__ - /* almost certainly not needed for any modern Cygwin, but let's be safe... */ - setmode(_fileno(stdin), _O_BINARY); #elif defined __EMX__ setmode(fileno(stdin), O_BINARY); #endif diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c index 1993ec5e..665fe55b 100644 --- a/src/libFLAC/stream_encoder.c +++ b/src/libFLAC/stream_encoder.c @@ -4540,9 +4540,6 @@ FILE *get_binary_stdout_(void) */ #if defined _MSC_VER || defined __MINGW32__ _setmode(_fileno(stdout), _O_BINARY); -#elif defined __CYGWIN__ - /* almost certainly not needed for any modern Cygwin, but let's be safe... */ - setmode(_fileno(stdout), _O_BINARY); #elif defined __EMX__ setmode(fileno(stdout), O_BINARY); #endif diff --git a/src/share/grabbag/file.c b/src/share/grabbag/file.c index 4cbef9d9..3a972925 100644 --- a/src/share/grabbag/file.c +++ b/src/share/grabbag/file.c @@ -29,7 +29,7 @@ #include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */ #include <utime.h> /* for utime() */ #endif -#if defined __CYGWIN__ || defined __EMX__ +#if defined __EMX__ #include <io.h> /* for setmode(), O_BINARY */ #include <fcntl.h> /* for _O_BINARY */ #endif @@ -164,9 +164,6 @@ FILE *grabbag__file_get_binary_stdin(void) */ #if defined _MSC_VER || defined __MINGW32__ _setmode(_fileno(stdin), _O_BINARY); -#elif defined __CYGWIN__ - /* almost certainly not needed for any modern Cygwin, but let's be safe... */ - setmode(_fileno(stdin), _O_BINARY); #elif defined __EMX__ setmode(fileno(stdin), O_BINARY); #endif @@ -182,9 +179,6 @@ FILE *grabbag__file_get_binary_stdout(void) */ #if defined _MSC_VER || defined __MINGW32__ _setmode(_fileno(stdout), _O_BINARY); -#elif defined __CYGWIN__ - /* almost certainly not needed for any modern Cygwin, but let's be safe... */ - setmode(_fileno(stdout), _O_BINARY); #elif defined __EMX__ setmode(fileno(stdout), O_BINARY); #endif |