Commit 1c3350ef authored by conrad's avatar conrad

Apply patch from dryeo, "OS/2 also needs to set stdin/stdout to binary"

Closes ticket:414


git-svn-id: http://svn.annodex.net/liboggz/trunk@3720 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 5bcb2948
......@@ -40,7 +40,7 @@
#include <oggz/oggz.h>
#include "dirac.h"
#ifdef WIN32
#if defined (WIN32) || defined (__EMX__)
#include <fcntl.h>
#include <io.h>
#define snprintf _snprintf
......@@ -464,11 +464,17 @@ void
ot_init (void)
{
#ifdef _WIN32
/* We need to set stdin/stdout to binary mode */
/* We need to set stdin/stdout to binary mode on Win32 */
_setmode( _fileno( stdin ), _O_BINARY );
_setmode( _fileno( stdout ), _O_BINARY );
#endif
#ifdef __EMX__
/* We need to set stdin/stdout to binary mode on OS/2*/
setmode( fileno( stdin ), O_BINARY );
setmode( fileno( stdout ), O_BINARY );
#endif
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment