[Flac-dev] Cygwin patch
Caleb Epstein
cae at bklyn.org
Tue Aug 13 05:36:03 PDT 2002
Building flac 1.0.3 under the latest cygwin craps out in
src/libFLAC/file_decode.c and src/flac/file.c for _O_BINARY
not being defined. It appears that #include <io.h> is not
sufficient to pull in this macro; you need to #include
<fcntl.h>.
BTW, nice test suite! Talk about exhaustive.
If anyone is interested in my Cygwin binaries (no Ogg
support), I can provide an encap package file. Let me know.
--- orig/flac-1.0.3/src/flac/file.c 2002-02-17 17:22:49 -0500
+++ flac-1.0.3/src/flac/file.c 2002-08-13 08:25:38 -0400
@@ -27,6 +27,7 @@
#endif
#ifdef __CYGWIN__
#include <io.h> /* for _setmode(), O_BINARY */
+#include <fcntl.h>
#endif
#include <sys/stat.h> /* for stat(), maybe chmod() */
#include <string.h> /* for strrchr() */
diff -ubr orig/flac-1.0.3/src/libFLAC/file_decoder.c flac-1.0.3/src/libFLAC/file_decoder.c
--- orig/flac-1.0.3/src/libFLAC/file_decoder.c 2002-06-14 02:36:16 -0400
+++ flac-1.0.3/src/libFLAC/file_decoder.c 2002-08-13 08:23:29 -0400
@@ -26,6 +26,7 @@
#include <fcntl.h> /* for _O_BINARY */
#elif defined __CYGWIN__
#include <io.h> /* for _setmode(), O_BINARY */
+#include <fcntl.h>
#endif
#include "FLAC/assert.h"
#include "protected/file_decoder.h"
--
Caleb Epstein | bklyn . org | Mr. Cole's Axiom:
cae at | Brooklyn Dust | The sum of the intelligence on the
bklyn dot org | Bunny Mfg. | planet is a constant; the population
| | is growing.
More information about the Flac-dev
mailing list