[flac-dev] flac 1.3.0pre3 pre-release

Janne Hyvärinen cse at sci.fi
Sun Apr 7 01:19:22 PDT 2013


On 2.4.2013 12:57, Erik de Castro Lopo wrote:
> I noticed compat.h patch didn't make it into git. I know it may not be
> perfect patch but unistd.h is in two different #ifdef checks. First one
> is fine when it's excluded on _WIN32 but second check gives is for
> everyone if __CYGWIN__ or __EMX__ isn't defined. That has to be a mistake.
> Someone with access to those systems needs to test this. If it doesn't
> get tested it won't make it into the release.
>
> Erik

Here's one more try to solve the compilation problem when non-existing 
unistd.h is tried to include with MSVC. It now includes it like before 
the cleanup so it shouldn't do any harm to environments that have worked 
in the past.
-------------- next part --------------
diff --git a/include/share/compat.h b/include/share/compat.h
index 88caf1e..222de65 100644
--- a/include/share/compat.h
+++ b/include/share/compat.h
@@ -93,13 +93,9 @@
 #define FLAC__STRNCASECMP strncasecmp
 #endif
 
-#if defined _MSC_VER || defined __MINGW32__
+#if defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ || defined __EMX__
 #include <io.h> /* for _setmode(), chmod() */
 #include <fcntl.h> /* for _O_BINARY */
-#endif
-#if defined __CYGWIN__ || defined __EMX__
-#include <io.h> /* for setmode(), chmod() */
-#include <fcntl.h> /* for _O_BINARY */
 #else
 #include <unistd.h> /* for chown(), unlink() */
 #endif


More information about the flac-dev mailing list