From 5c8f5c4c20e8920b2f8e2c74653551163bda28de Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Fri, 28 Jun 2013 09:25:09 +0000 Subject: 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 --- Build/source/texk/web2c/luatexdir/ChangeLog | 5 +++++ Build/source/texk/web2c/luatexdir/luatex.c | 13 ++++++++++++- Build/source/texk/web2c/luatexdir/ptexlib.h | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) (limited to 'Build') 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 + + * luatex.c, ptexlib.h: Slightly modify because Visual Studio cannot + compile luatex.c. + 2013-06-28 Peter Breitenlohner * 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 /* For `struct tm'. */ +#if defined (HAVE_SYS_TIME_H) +# include +#elif defined (HAVE_SYS_TIMEB_H) +# include +#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 #endif - +#ifndef _MSC_VER #include /* For `struct tm'. */ #if defined (HAVE_SYS_TIME_H) # include #elif defined (HAVE_SYS_TIMEB_H) # include #endif +#endif #if defined(__STDC__) # include 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 -- cgit v1.2.3