diff options
Diffstat (limited to 'Build/source/utils/lzma-utils/src/lzmadec/lzmadec.c')
-rw-r--r-- | Build/source/utils/lzma-utils/src/lzmadec/lzmadec.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/Build/source/utils/lzma-utils/src/lzmadec/lzmadec.c b/Build/source/utils/lzma-utils/src/lzmadec/lzmadec.c index 54ff96003a8..3b3eeeeaccb 100644 --- a/Build/source/utils/lzma-utils/src/lzmadec/lzmadec.c +++ b/Build/source/utils/lzma-utils/src/lzmadec/lzmadec.c @@ -9,15 +9,13 @@ #include <lzmadec.h> #include "../lzma_version.h" -#define CHUNKSIZE_IN 4096 -#define CHUNKSIZE_OUT (1024*512) - - -/* for O_BINARY: */ #ifdef WIN32 #include <fcntl.h> #endif +#define CHUNKSIZE_IN 4096 +#define CHUNKSIZE_OUT (1024*512) + int main(int argc, char **argv) { int ret; @@ -43,12 +41,11 @@ int main(int argc, char **argv) return 0; } - /* - * Windows: set stdin/stdout to binary mode */ - #ifdef WIN32 - setmode(fileno(stdout), O_BINARY); - setmode(fileno(stdin), O_BINARY); - #endif +#ifdef WIN32 + setmode(fileno(stdout), O_BINARY); + setmode(fileno(stdin), O_BINARY); +#endif + if (buffer_in == NULL || buffer_out == NULL) { fprintf (stderr, "%s: Not enough memory.\n", argv[0]); return 5; |