summaryrefslogtreecommitdiff
path: root/Build/source/texk/cjkutils/TLpatches/patch-05-win32
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/cjkutils/TLpatches/patch-05-win32')
-rw-r--r--Build/source/texk/cjkutils/TLpatches/patch-05-win32153
1 files changed, 153 insertions, 0 deletions
diff --git a/Build/source/texk/cjkutils/TLpatches/patch-05-win32 b/Build/source/texk/cjkutils/TLpatches/patch-05-win32
new file mode 100644
index 00000000000..4f95c048c5c
--- /dev/null
+++ b/Build/source/texk/cjkutils/TLpatches/patch-05-win32
@@ -0,0 +1,153 @@
+diff -urN cjkutils-src.orig/Bg5conv/bg5conv.c cjkutils-src/Bg5conv/bg5conv.c
+--- cjkutils-src.orig/Bg5conv/bg5conv.c 2018-06-04 21:21:53.198895618 +0900
++++ cjkutils-src/Bg5conv/bg5conv.c 2021-07-18 11:20:33.821975945 +0900
+@@ -6,11 +6,18 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef WIN32
++#include <fcntl.h>
++#include <io.h>
++#endif
+
+
+ int main(int argc,char*argv[])
+ {int ch;
+
++#ifdef WIN32
++setmode(fileno(stdout), _O_BINARY);
++#endif
+ fprintf(stdout,"\\def\\CJKpreproc{%s}",banner);
+
+ ch= fgetc(stdin);
+diff -urN cjkutils-src.orig/CEFconv/cef5conv.c cjkutils-src/CEFconv/cef5conv.c
+--- cjkutils-src.orig/CEFconv/cef5conv.c 2018-06-04 21:21:53.198895618 +0900
++++ cjkutils-src/CEFconv/cef5conv.c 2021-07-18 11:20:33.821975945 +0900
+@@ -7,6 +7,10 @@
+ #include <ctype.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef WIN32
++#include <fcntl.h>
++#include <io.h>
++#endif
+
+
+ int main(int argc,char*argv[])
+@@ -15,6 +19,9 @@
+ unsigned char out[32];
+ unsigned char*inp,*outp;
+
++#ifdef WIN32
++setmode(fileno(stdout), _O_BINARY);
++#endif
+ fprintf(stdout,"\\def\\CNSpreproc{%s}",banner);
+
+ ch= fgetc(stdin);
+diff -urN cjkutils-src.orig/CEFconv/cefconv.c cjkutils-src/CEFconv/cefconv.c
+--- cjkutils-src.orig/CEFconv/cefconv.c 2018-06-04 21:21:53.198895618 +0900
++++ cjkutils-src/CEFconv/cefconv.c 2021-07-18 11:20:33.821975945 +0900
+@@ -7,6 +7,10 @@
+ #include <ctype.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef WIN32
++#include <fcntl.h>
++#include <io.h>
++#endif
+
+
+ int main(int argc,char*argv[])
+@@ -15,6 +19,9 @@
+ unsigned char out[32];
+ unsigned char*inp,*outp;
+
++#ifdef WIN32
++setmode(fileno(stdout), _O_BINARY);
++#endif
+ fprintf(stdout,"\\def\\CNSpreproc{%s}",banner);
+
+ ch= fgetc(stdin);
+diff -urN cjkutils-src.orig/CEFconv/cefsconv.c cjkutils-src/CEFconv/cefsconv.c
+--- cjkutils-src.orig/CEFconv/cefsconv.c 2018-06-04 21:21:53.199895618 +0900
++++ cjkutils-src/CEFconv/cefsconv.c 2021-07-18 11:20:33.821975945 +0900
+@@ -7,6 +7,10 @@
+ #include <ctype.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef WIN32
++#include <fcntl.h>
++#include <io.h>
++#endif
+
+
+ int main(int argc,char*argv[])
+@@ -14,6 +18,9 @@
+ unsigned char in[16];
+ unsigned char out[32];
+ unsigned char*inp,*outp;
++#ifdef WIN32
++setmode(fileno(stdout), _O_BINARY);
++#endif
+
+ fprintf(stdout,"\\def\\CNSpreproc{%s}",banner);
+
+diff -urN cjkutils-src.orig/SJISconv/sjisconv.c cjkutils-src/SJISconv/sjisconv.c
+--- cjkutils-src.orig/SJISconv/sjisconv.c 2018-06-04 21:21:53.199895618 +0900
++++ cjkutils-src/SJISconv/sjisconv.c 2021-07-18 11:20:33.821975945 +0900
+@@ -6,11 +6,18 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef WIN32
++#include <fcntl.h>
++#include <io.h>
++#endif
+
+
+ int main(int argc,char*argv[])
+ {int ch;
+
++#ifdef WIN32
++setmode(fileno(stdout), _O_BINARY);
++#endif
+ fprintf(stdout,"\\def\\CJKpreproc{%s}",banner);
+
+ ch= fgetc(stdin);
+diff -urN cjkutils-src.orig/extconv/extconv.c cjkutils-src/extconv/extconv.c
+--- cjkutils-src.orig/extconv/extconv.c 2018-06-04 21:21:53.200895618 +0900
++++ cjkutils-src/extconv/extconv.c 2021-07-18 11:20:33.821975945 +0900
+@@ -6,11 +6,18 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef WIN32
++#include <fcntl.h>
++#include <io.h>
++#endif
+
+
+ int main(int argc,char*argv[])
+ {int ch;
+
++#ifdef WIN32
++setmode(fileno(stdout), _O_BINARY);
++#endif
+
+ fprintf(stdout,"\\def\\CJKpreproc{%s}",banner);
+
+diff -urN cjkutils-src.orig/hbf2gf/hbf2gf.c cjkutils-src/hbf2gf/hbf2gf.c
+--- cjkutils-src.orig/hbf2gf/hbf2gf.c 2018-06-04 21:21:53.202895618 +0900
++++ cjkutils-src/hbf2gf/hbf2gf.c 2021-07-18 11:23:03.151348296 +0900
+@@ -286,9 +286,9 @@
+ FILE*config,*out;
+ HBF*hbf;
+
+-#ifdef msdos
++#ifdef WIN32
+ #define WRITE_BIN "wb"
+-#define WRITE_TXT "wt"
++#define WRITE_TXT "wb"
+ #define READ_BIN "rb"
+ #define READ_TXT "rt"
+ #else