summaryrefslogtreecommitdiff
path: root/Build/source/texk/makeindexk/mkind.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-07-27 07:27:29 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-07-27 07:27:29 +0000
commitb8d362466a8e4c679b09c8044f85073655bd7ff4 (patch)
treeaf6cc69d21cd49bbcfb8c326128740363a2ba293 /Build/source/texk/makeindexk/mkind.c
parentc5709ea5924966b82883b45f0b92e7d6a0486226 (diff)
makeindexk: Use binary mode for input and output (from W32TeX)
Add a new file with the qqsort() prototype Add a new test case git-svn-id: svn://tug.org/texlive/trunk@27192 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/makeindexk/mkind.c')
-rw-r--r--Build/source/texk/makeindexk/mkind.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Build/source/texk/makeindexk/mkind.c b/Build/source/texk/makeindexk/mkind.c
index 63360fe320b..72f93d0449e 100644
--- a/Build/source/texk/makeindexk/mkind.c
+++ b/Build/source/texk/makeindexk/mkind.c
@@ -3,7 +3,7 @@
* This file is part of
* MakeIndex - A formatter and format independent index processor
*
- * Copyright (C) 1998-2011 by the TeX Live project.
+ * Copyright (C) 1998-2012 by the TeX Live project.
* Copyright (C) 1989 by Chen & Harrison International Systems, Inc.
* Copyright (C) 1988 by Olivetti Research Center
* Copyright (C) 1987 by Regents of the University of California
@@ -323,6 +323,9 @@ FATAL1("Option -g invalid, quote character must be different from '%c'.\n",
if (use_stdin) {
idx_fn = "stdin";
idx_fp = stdin;
+#ifdef WIN32
+ setmode(fileno(stdin), _O_BINARY);
+#endif
if (ind_given) {
if (!kpse_out_name_ok(ind_fn) ||
@@ -331,6 +334,9 @@ FATAL1("Option -g invalid, quote character must be different from '%c'.\n",
} else {
ind_fn = "stdout";
ind_fp = stdout;
+#ifdef WIN32
+ setmode(fileno(stdout), _O_BINARY);
+#endif
}
if (ilg_given) {