Commit e73f888c authored by colinw's avatar colinw

Now sets stdin and stdout to binary mode when running under Windows, to prevent

extranneous CRs from getting into created files

git-svn-id: 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent dc54bd68
......@@ -41,6 +41,12 @@
#include <oggz/oggz.h>
#ifdef _WIN32
/* Supply missing headers and functions for Win32 */
#include <fcntl.h>
#define READ_SIZE 4096
static void
......@@ -238,6 +244,13 @@ main (int argc, char * argv[])
OMData * omdata;
int i;
#ifdef _WIN32
/* We need to set stdin/stdout to binary mode */
_setmode( _fileno( stdin ), _O_BINARY );
_setmode( _fileno( stdout ), _O_BINARY );
progname = argv[0];
if (argc < 2) {
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