summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-06-28 09:25:09 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-06-28 09:25:09 +0000
commit5c8f5c4c20e8920b2f8e2c74653551163bda28de (patch)
tree481c25ae4552b98c4ed44dd8a980db16111a8c73 /Build/source
parentd3f00c44bc132127a0384e451576561f0c9940eb (diff)
Slightly modify luatex.c and ptexlib.h because Visual Studio cannot compile luatex.c.
git-svn-id: svn://tug.org/texlive/trunk@31001 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/luatexdir/luatex.c13
-rw-r--r--Build/source/texk/web2c/luatexdir/ptexlib.h2
3 files changed, 19 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index f068a084c8e..0e5fd298c6d 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * luatex.c, ptexlib.h: Slightly modify because Visual Studio cannot
+ compile luatex.c.
+
2013-06-28 Peter Breitenlohner <peb@mppmu.mpg.de>
* lua/lcallbacklib.c, lua/luainit.w: Replace index() => strchr().
diff --git a/Build/source/texk/web2c/luatexdir/luatex.c b/Build/source/texk/web2c/luatexdir/luatex.c
index 2af2575af1a..120f05dd0bd 100644
--- a/Build/source/texk/web2c/luatexdir/luatex.c
+++ b/Build/source/texk/web2c/luatexdir/luatex.c
@@ -9,6 +9,16 @@
changed to include texd.h or mfd.h. The ?d.h file is what
#defines TeX or MF, which avoids the need for a special
Makefile rule. */
+#ifdef _MSC_VER
+#define LUATEXC_MAIN
+#include <time.h> /* For `struct tm'. */
+#if defined (HAVE_SYS_TIME_H)
+# include <sys/time.h>
+#elif defined (HAVE_SYS_TIMEB_H)
+# include <sys/timeb.h>
+#endif
+#endif
+
#include "ptexlib.h"
#include "luatex.h"
#include "lua/luatex-api.h"
@@ -36,13 +46,14 @@ const char *engine_name = "luatex"; /* the name of this engine */
#include <kpathsea/concatn.h>
#endif
-
+#ifndef _MSC_VER
#include <time.h> /* For `struct tm'. */
#if defined (HAVE_SYS_TIME_H)
# include <sys/time.h>
#elif defined (HAVE_SYS_TIMEB_H)
# include <sys/timeb.h>
#endif
+#endif
#if defined(__STDC__)
# include <locale.h>
diff --git a/Build/source/texk/web2c/luatexdir/ptexlib.h b/Build/source/texk/web2c/luatexdir/ptexlib.h
index f313e6c03e1..f1fd0898f27 100644
--- a/Build/source/texk/web2c/luatexdir/ptexlib.h
+++ b/Build/source/texk/web2c/luatexdir/ptexlib.h
@@ -24,11 +24,13 @@
# define PTEXLIB_H
/* Try to detect if a system header has already been included. */
+#ifndef LUATEXC_MAIN
#if (defined(__linux__) && defined(_FEATURES_H)) || \
(defined(_MSC_VER) && (defined(_INC_CRTDEFS) || defined(_OFF_T_DEFINED))) || \
(defined(__MINGW32__) && defined(__MINGW_H))
ptexlib.h must be included first!!!
#endif
+#endif
#ifdef HAVE_CONFIG_H
#include <w2c/config.h>