mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
add support for building on os/2 with emx
This commit is contained in:
@@ -196,7 +196,7 @@ static char *local__get_field_(char **s, FLAC__bool allow_quotes)
|
||||
|
||||
static FLAC__bool local__cuesheet_parse_(FILE *file, const char **error_message, unsigned *last_line_read, FLAC__StreamMetadata *cuesheet, FLAC__bool is_cdda, FLAC__uint64 lead_out_offset)
|
||||
{
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
#if defined _MSC_VER || defined __MINGW32__ || defined __EMX__
|
||||
#define FLAC__STRCASECMP stricmp
|
||||
#else
|
||||
#define FLAC__STRCASECMP strcasecmp
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */
|
||||
#include <utime.h> /* for utime() */
|
||||
#endif
|
||||
#ifdef __CYGWIN__
|
||||
#if defined __CYGWIN__ || defined __EMX__
|
||||
#include <io.h> /* for setmode(), O_BINARY */
|
||||
#include <fcntl.h> /* for _O_BINARY */
|
||||
#endif
|
||||
@@ -120,6 +120,8 @@ FILE *grabbag__file_get_binary_stdin()
|
||||
#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
|
||||
|
||||
return stdin;
|
||||
@@ -136,6 +138,8 @@ FILE *grabbag__file_get_binary_stdout()
|
||||
#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
|
||||
|
||||
return stdout;
|
||||
|
||||
Reference in New Issue
Block a user