summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/lib/texmfmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/lib/texmfmp.c')
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c40
1 files changed, 17 insertions, 23 deletions
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 3b5e1ddb235..7a253cf7373 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -151,7 +151,22 @@ char *generic_synctex_get_current_name (void)
#if !IS_pTeX
FILE *Poptr;
#endif
-#endif
+#undef fopen
+#undef xfopen
+#define fopen fsyscp_fopen
+#define xfopen fsyscp_xfopen
+#include <wchar.h>
+int fsyscp_stat(const char *path, struct stat *buffer)
+{
+ wchar_t *wpath;
+ int ret;
+ wpath = get_wstring_from_mbstring(file_system_codepage,
+ path, wpath = NULL);
+ ret = _wstat(wpath, buffer);
+ free(wpath);
+ return ret;
+}
+#endif /* WIN32 */
#if defined(TeX) || (defined(MF) && defined(WIN32))
static int
@@ -1379,24 +1394,6 @@ tcx_get_num (int upb,
/* FIXME: A new format ought to be introduced for these files. */
-#ifdef _WIN32
-#undef fopen
-#undef xfopen
-#define fopen fsyscp_fopen
-#define xfopen fsyscp_xfopen
-#include <wchar.h>
-int fsyscp_stat(const char *path, struct stat *buffer)
-{
- wchar_t *wpath;
- int ret;
- wpath = get_wstring_from_mbstring(file_system_codepage,
- path, wpath = NULL);
- ret = _wstat(wpath, buffer);
- free(wpath);
- return ret;
-}
-#endif /* WIN32 */
-
void
readtcxfile (void)
{
@@ -2322,7 +2319,7 @@ WARNING1 ("invalid value (expected 0 or 1) for environment variable $FORCE_SOURC
}
}
-#if defined(pdfTeX) || defined(epTeX) || defined(eupTeX)
+#if defined(pdfTeX) || defined(epTeX) || defined(eupTeX) || defined(XeTeX)
/*
Getting a high resolution time.
*/
@@ -3010,8 +3007,6 @@ void pdftex_fail(const char *fmt, ...)
}
#endif /* not pdfTeX */
-#if !defined(XeTeX)
-
#define TIME_STR_SIZE 30
char start_time_str[TIME_STR_SIZE];
static char time_str[TIME_STR_SIZE];
@@ -3280,7 +3275,6 @@ void getfiledump(integer s, int offset, int length)
}
xfree(file_name);
}
-#endif /* not XeTeX */
/* Converts any given string in into an allowed PDF string which is
* hexadecimal encoded;