From eed40b7b7e7b51945654ee0d41e09d40510a6e18 Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 22 Sep 2004 11:43:41 +0000 Subject: [PATCH] Fix for Windows: added O_BINARY. --- swfs/PreLoaderTemplate.c | 2 +- swfs/keyboard_viewer.c | 2 +- swfs/simple_viewer.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/swfs/PreLoaderTemplate.c b/swfs/PreLoaderTemplate.c index e99948f..fd95b1a 100644 --- a/swfs/PreLoaderTemplate.c +++ b/swfs/PreLoaderTemplate.c @@ -98,7 +98,7 @@ int main (int argc,char ** argv) tag = swf_InsertTag(tag,ST_END); - f = open("PreLoaderTemplate.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644); + f = open("PreLoaderTemplate.swf",O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644); if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n"); close(f); diff --git a/swfs/keyboard_viewer.c b/swfs/keyboard_viewer.c index e90a84e..6fb0a2d 100644 --- a/swfs/keyboard_viewer.c +++ b/swfs/keyboard_viewer.c @@ -203,7 +203,7 @@ int main (int argc,char ** argv) tag = swf_InsertTag(tag,ST_SHOWFRAME); tag = swf_InsertTag(tag,ST_END); - f = open("keyboard_viewer.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644); + f = open("keyboard_viewer.swf",O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644); if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n"); close(f); diff --git a/swfs/simple_viewer.c b/swfs/simple_viewer.c index 7a21883..507409f 100644 --- a/swfs/simple_viewer.c +++ b/swfs/simple_viewer.c @@ -271,7 +271,7 @@ int main (int argc,char ** argv) tag = swf_InsertTag(tag,ST_END); - f = open("simple_viewer.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644); + f = open("simple_viewer.swf",O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644); if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n"); close(f); -- 1.7.10.4