summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2024-02-02 03:02:24 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2024-02-02 03:02:24 +0000
commitdb85d87ee9acd4092a328af61ee84240b036e7ab (patch)
tree1fc16460bfc5190ef2469b261b89a3e0f92a9066 /Build/source/texk
parent8efb54cb065ccf940966a1d3ee50b831973bc97a (diff)
ptekf.c: enable to compile on Windows (Windows only)
git-svn-id: svn://tug.org/texlive/trunk@69670 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/ptexenc/ptekf.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/Build/source/texk/ptexenc/ptekf.c b/Build/source/texk/ptexenc/ptekf.c
index 50d495a71bb..2865349d2c4 100644
--- a/Build/source/texk/ptexenc/ptekf.c
+++ b/Build/source/texk/ptexenc/ptekf.c
@@ -5,7 +5,9 @@ Distributed under the 3-Clause BSD License.
*/
+#ifndef _WIN32
#include <unistd.h>
+#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -13,7 +15,12 @@ Distributed under the 3-Clause BSD License.
#include <kpathsea/getopt.h>
#include <kpathsea/progname.h>
#include <kpathsea/lib.h>
-
+#ifdef _WIN32
+#include <kpathsea/knj.h>
+#ifndef CP_UTF8
+#define CP_UTF8 65001
+#endif
+#endif
#include <ptexenc/ptexenc.h>
#include <c-auto.h>
@@ -65,7 +72,7 @@ const char *infname;
char *outfname;
FILE *infp, *outfp;
-#if defined(WIN32)
+#if defined(_WIN32)
#define R_MODE "rb"
#define W_MODE "wb"
#else
@@ -101,10 +108,10 @@ main (int argc, char **argv)
return 0;
}
kpse_set_program_name(argv[0], "ptekf");
-#if defined(WIN32)
+#if defined(_WIN32)
{
int ac;
- char **av, *enc;
+ char **av;
file_system_codepage = CP_UTF8;
is_cp932_system = 0;
if (get_command_line_args_utf8("utf-8", &ac, &av)) {