summaryrefslogtreecommitdiff
path: root/Build/source/texk/detex/TLPATCHES/patch-09-binary
blob: 95d272030ad418024072e48fa2521bf839d93c5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
	In TeX Live we use binary mode for all output files.

diff -ur detex-2.8.orig/detex.l detex-2.8/detex.l
--- detex-2.8.orig/detex.l	2012-08-24 10:37:03.000000000 +0200
+++ detex-2.8/detex.l	2012-08-24 10:51:12.000000000 +0200
@@ -83,6 +83,11 @@
 #include <stdlib.h>
 #endif
 
+#ifdef WIN32
+#include <fcntl.h>
+#include <io.h>
+#endif
+
 #endif /* KPATHSEA */
 
 #undef IGNORE
@@ -494,6 +499,10 @@
 	}
 	SetEnvIgnore(sbEnvList);
 
+#ifdef WIN32
+	_setmode(fileno(stdout), _O_BINARY);
+#endif
+
 	/* process input files */
 	for (; iArgs < cArgs; iArgs++) {
 	    fSawFile++;