make test's standard output binary under windows

git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@271 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
halleyscometsw 2008-07-01 19:20:09 +00:00
parent 5cd7897407
commit 6f3139a78d

View File

@ -2,6 +2,10 @@
#include <unistd.h>
#include "../src/vgmstream.h"
#include "../src/util.h"
#ifdef WIN32
#include <io.h>
#include <fcntl.h>
#endif
#define BUFSIZE 4000
@ -116,6 +120,13 @@ int main(int argc, char ** argv) {
return 1;
}
#ifdef WIN32
/* make stdout output work with windows */
if (play) {
_setmode(fileno(stdout),_O_BINARY);
}
#endif
if (ignore_loop && force_loop) {
fprintf(stderr,"-e and -i are incompatible\n");
return 1;