diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2008-01-26 21:59:22 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2008-01-26 21:59:22 +0000 |
commit | 82c271e7f480f9cf99db7f1179b74859c999063c (patch) | |
tree | 94d3a43380b00b32a456c008b4d48f6152cee1b9 /Build/source/utils | |
parent | 8628b87d786a4ccda7e7faaf46412734ec08e832 (diff) |
TLUtils: `type ... | $lzmadec ' changed into `$lzmadec < ...'
otherwise cd install on w2k failed.
lzmadec: stdin/stdout patch applied to included source.
Windows binary generated from included patched source.
git-svn-id: svn://tug.org/texlive/trunk@6424 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils')
-rw-r--r-- | Build/source/utils/lzma-utils/src/lzmadec/lzmadec.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Build/source/utils/lzma-utils/src/lzmadec/lzmadec.c b/Build/source/utils/lzma-utils/src/lzmadec/lzmadec.c index 1c2c8019506..54ff96003a8 100644 --- a/Build/source/utils/lzma-utils/src/lzmadec/lzmadec.c +++ b/Build/source/utils/lzma-utils/src/lzmadec/lzmadec.c @@ -12,6 +12,12 @@ #define CHUNKSIZE_IN 4096 #define CHUNKSIZE_OUT (1024*512) + +/* for O_BINARY: */ +#ifdef WIN32 +#include <fcntl.h> +#endif + int main(int argc, char **argv) { int ret; @@ -37,6 +43,12 @@ 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 if (buffer_in == NULL || buffer_out == NULL) { fprintf (stderr, "%s: Not enough memory.\n", argv[0]); return 5; |