summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/luatexdir/font/mapfile.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/font/sfnt.w3
-rw-r--r--Build/source/texk/web2c/luatexdir/font/tt_table.w3
-rw-r--r--Build/source/texk/web2c/luatexdir/lang/hyphen.w3
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lstrlibext.c6
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luainit.w3
-rw-r--r--Build/source/texk/web2c/luatexdir/luatex.c4
-rw-r--r--Build/source/texk/web2c/luatexdir/ptexlib.h6
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/texfileio.w3
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/unistring.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/utils.w3
12 files changed, 29 insertions, 14 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index cda2face16b..74b214fad16 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-28 Karl Berry <karl@tug.org>
+
+ * ptexlib.h: complain if various common things are #defined;
+ this must be the first #include.
+
2013-06-27 Peter Breitenlohner <peb@mppmu.mpg.de>
Bug fix for LuaTeX crash on 32bit Unix systems from Taco,
diff --git a/Build/source/texk/web2c/luatexdir/font/mapfile.w b/Build/source/texk/web2c/luatexdir/font/mapfile.w
index bb454553b7f..f391a4a2be9 100644
--- a/Build/source/texk/web2c/luatexdir/font/mapfile.w
+++ b/Build/source/texk/web2c/luatexdir/font/mapfile.w
@@ -23,8 +23,8 @@ static const char _svn_version[] =
"$Id: mapfile.w 4442 2012-05-25 22:40:34Z hhenkel $"
"$URL: https://foundry.supelec.fr/svn/luatex/tags/beta-0.76.0/source/texk/web2c/luatexdir/font/mapfile.w $";
-#include <math.h>
#include "ptexlib.h"
+#include <math.h>
#include <kpathsea/c-auto.h>
#include <kpathsea/c-memstr.h>
#include <string.h>
diff --git a/Build/source/texk/web2c/luatexdir/font/sfnt.w b/Build/source/texk/web2c/luatexdir/font/sfnt.w
index 9c73082b668..49d5d3ace8b 100644
--- a/Build/source/texk/web2c/luatexdir/font/sfnt.w
+++ b/Build/source/texk/web2c/luatexdir/font/sfnt.w
@@ -25,13 +25,14 @@ static const char _svn_version[] =
"$Id: sfnt.w 4457 2012-07-13 13:16:19Z taco $"
"$URL: https://foundry.supelec.fr/svn/luatex/tags/beta-0.76.0/source/texk/web2c/luatexdir/font/sfnt.w $";
+#include "ptexlib.h"
+
#if HAVE_CONFIG_H
# include <w2c/config.h>
#endif /* |HAVE_CONFIG_H_| */
#include <string.h>
-# include "ptexlib.h"
#include "font/sfnt.h"
@ type:
diff --git a/Build/source/texk/web2c/luatexdir/font/tt_table.w b/Build/source/texk/web2c/luatexdir/font/tt_table.w
index 4e010f27236..0607b8cefcc 100644
--- a/Build/source/texk/web2c/luatexdir/font/tt_table.w
+++ b/Build/source/texk/web2c/luatexdir/font/tt_table.w
@@ -24,8 +24,9 @@ static const char _svn_version[] =
"$Id: tt_table.w 4442 2012-05-25 22:40:34Z hhenkel $"
"$URL: https://foundry.supelec.fr/svn/luatex/tags/beta-0.76.0/source/texk/web2c/luatexdir/font/tt_table.w $";
-#include <stdio.h>
#include "ptexlib.h"
+
+#include <stdio.h>
#include "font/sfnt.h"
#include "font/tt_table.h"
diff --git a/Build/source/texk/web2c/luatexdir/lang/hyphen.w b/Build/source/texk/web2c/luatexdir/lang/hyphen.w
index e29e7b2712e..99825638fac 100644
--- a/Build/source/texk/web2c/luatexdir/lang/hyphen.w
+++ b/Build/source/texk/web2c/luatexdir/lang/hyphen.w
@@ -42,6 +42,8 @@ static const char _svn_version[] =
"$Id: hyphen.w 4599 2013-03-19 15:41:07Z taco $ "
"$URL: https://foundry.supelec.fr/svn/luatex/tags/beta-0.76.0/source/texk/web2c/luatexdir/lang/hyphen.w $";
+#include "lang/hyphen.h" /* includes ptexlib.h */
+
#include <stdlib.h> /* for NULL, malloc */
#include <stdio.h> /* for fprintf */
#include <string.h> /* for strdup */
@@ -58,7 +60,6 @@ static const char _svn_version[] =
#define noVERBOSE
#include "lang/hnjalloc.h"
-#include "lang/hyphen.h"
@ TODO: should be moved to separate library
diff --git a/Build/source/texk/web2c/luatexdir/lua/lstrlibext.c b/Build/source/texk/web2c/luatexdir/lua/lstrlibext.c
index c33a0d87c38..164e378872a 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lstrlibext.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lstrlibext.c
@@ -1,6 +1,6 @@
/* lstrlibext.c
- Copyright 2012 Taco Hoekwater <taco@luatex.org>
+ Copyright 2012-2013 Taco Hoekwater <taco@luatex.org>
This file is part of LuaTeX.
@@ -21,14 +21,14 @@
otherwise some of the defines that are needed for lua_sdump
come out wrong.
*/
+#include "ptexlib.h"
+
#define LUA_CORE
#include "lua.h"
#include "luaconf.h"
#include "lapi.h"
#include "lundump.h"
-#include "ptexlib.h"
-
static const char _svn_version[] =
"$Id: lstrlibext.c 4544 2012-12-25 14:07:44Z oneiros $ $URL: https://foundry.supelec.fr/svn/luatex/tags/beta-0.76.0/source/texk/web2c/luatexdir/lua/lstrlibext.c $";
diff --git a/Build/source/texk/web2c/luatexdir/lua/luainit.w b/Build/source/texk/web2c/luatexdir/lua/luainit.w
index 26a10429e6f..c838a836f88 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luainit.w
+++ b/Build/source/texk/web2c/luatexdir/lua/luainit.w
@@ -22,9 +22,10 @@ static const char _svn_version[] =
"$Id: luainit.w 4524 2012-12-20 15:38:02Z taco $"
"$URL: https://foundry.supelec.fr/svn/luatex/tags/beta-0.76.0/source/texk/web2c/luatexdir/lua/luainit.w $";
+#include "ptexlib.h"
+
#include <kpathsea/c-stat.h>
-#include "ptexlib.h"
#include "lua/luatex-api.h"
@
diff --git a/Build/source/texk/web2c/luatexdir/luatex.c b/Build/source/texk/web2c/luatexdir/luatex.c
index ff6dba0e246..2af2575af1a 100644
--- a/Build/source/texk/web2c/luatexdir/luatex.c
+++ b/Build/source/texk/web2c/luatexdir/luatex.c
@@ -1,4 +1,4 @@
-/* texmf.c: Hand-coded routines for TeX or Metafont in C. Originally
+/* luatex.c: Hand-coded routines for TeX or Metafont in C. Originally
written by Tim Morgan, drawing from other Unix ports of TeX. This is
a collection of miscellany, everything that's easier (or only
possible) to do in C.
@@ -9,8 +9,8 @@
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. */
-#include "luatex.h"
#include "ptexlib.h"
+#include "luatex.h"
#include "lua/luatex-api.h"
#include "luatex_svnversion.h"
diff --git a/Build/source/texk/web2c/luatexdir/ptexlib.h b/Build/source/texk/web2c/luatexdir/ptexlib.h
index b9486d9b25a..d983011771f 100644
--- a/Build/source/texk/web2c/luatexdir/ptexlib.h
+++ b/Build/source/texk/web2c/luatexdir/ptexlib.h
@@ -1,7 +1,7 @@
/* ptexlib.h
Copyright 1996-2006 Han The Thanh <thanh@pdftex.org>
- Copyright 2006-2012 Taco Hoekwater <taco@luatex.org>
+ Copyright 2006-2013 Taco Hoekwater <taco@luatex.org>
This file is part of LuaTeX.
@@ -23,6 +23,10 @@
#ifndef PTEXLIB_H
# define PTEXLIB_H
+#if defined (_OFF_T_DEFINED) || defined (EOF) || defined (assert) || defined (_FEATURES_H)
+ptexlib.h must be included first!!!
+#endif
+
#ifdef HAVE_CONFIG_H
#include <w2c/config.h>
#endif
diff --git a/Build/source/texk/web2c/luatexdir/tex/texfileio.w b/Build/source/texk/web2c/luatexdir/tex/texfileio.w
index 8c0aafd5766..5e85b6e3f0e 100644
--- a/Build/source/texk/web2c/luatexdir/tex/texfileio.w
+++ b/Build/source/texk/web2c/luatexdir/tex/texfileio.w
@@ -22,8 +22,9 @@ static const char _svn_version[] =
"$Id: texfileio.w 4521 2012-12-14 13:54:54Z taco $"
"$URL: https://foundry.supelec.fr/svn/luatex/tags/beta-0.76.0/source/texk/web2c/luatexdir/tex/texfileio.w $";
-#include <string.h>
#include "ptexlib.h"
+
+#include <string.h>
#include <kpathsea/absolute.h>
@ @c
diff --git a/Build/source/texk/web2c/luatexdir/utils/unistring.w b/Build/source/texk/web2c/luatexdir/utils/unistring.w
index d7281598955..3da34427552 100644
--- a/Build/source/texk/web2c/luatexdir/utils/unistring.w
+++ b/Build/source/texk/web2c/luatexdir/utils/unistring.w
@@ -23,8 +23,8 @@ static const char _svn_version[] =
"$URL: https://foundry.supelec.fr/svn/luatex/tags/beta-0.76.0/source/texk/web2c/luatexdir/utils/unistring.w $";
@ @c
-#include <string.h>
#include "ptexlib.h"
+#include <string.h>
@ @c
static void utf_error(void)
diff --git a/Build/source/texk/web2c/luatexdir/utils/utils.w b/Build/source/texk/web2c/luatexdir/utils/utils.w
index 780a98ca5aa..85a6c99208d 100644
--- a/Build/source/texk/web2c/luatexdir/utils/utils.w
+++ b/Build/source/texk/web2c/luatexdir/utils/utils.w
@@ -24,6 +24,8 @@ static const char _svn_version[] =
"$URL: https://foundry.supelec.fr/svn/luatex/tags/beta-0.76.0/source/texk/web2c/luatexdir/utils/utils.w $";
@ @c
+#include "ptexlib.h"
+
#include <kpathsea/config.h> /* this is a trick to load mingw32's io.h early,
using a macro redefinition of |eof()|. */
#include "sys/types.h"
@@ -33,7 +35,6 @@ static const char _svn_version[] =
#include <time.h>
#include <float.h> /* for |DBL_EPSILON| */
#include "zlib.h"
-#include "ptexlib.h"
#include "md5.h"
#include "lua/luatex-api.h" /* for ptexbanner */