summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-08-04 10:36:14 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-08-04 10:36:14 +0000
commitf5a70a2471199a683251957835ce4bf23ff28a37 (patch)
treeefde234413fdfd7970007d82861d5c92efcc06a7 /Build
parenta00b8579aa9ec33a98f9438b38ad27bcc3c220c7 (diff)
luaTeX: Reduce diffs between TeX Live and W32TeX
git-svn-id: svn://tug.org/texlive/trunk@27303 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/luatexdir/luatex.c9
-rw-r--r--Build/source/texk/web2c/luatexdir/luatex.h4
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfgen.w11
4 files changed, 26 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index 0ac4784d11e..ba1c99c0f1e 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * luatex.[ch] [W32TeX]: Use DLLPROC for luatex.dll.
+ * pdf/pdfgen.w [WIN32]: Convert file names '\\' -> '/'.
+
2012-08-02 Peter Breitenlohner <peb@mppmu.mpg.de>
* tex/texdeffont.w (tex_def_font): Better tracing of font
diff --git a/Build/source/texk/web2c/luatexdir/luatex.c b/Build/source/texk/web2c/luatexdir/luatex.c
index 814ee4d7f49..a9b7aa88a75 100644
--- a/Build/source/texk/web2c/luatexdir/luatex.c
+++ b/Build/source/texk/web2c/luatexdir/luatex.c
@@ -438,11 +438,15 @@ const_string c_job_name;
const char *ptexbanner;
-#if !defined(WIN32) || defined(__MINGW32__)
/* The entry point: set up for reading the command line, which will
happen in `topenin', then call the main body. */
-int main(int ac, string * av)
+int
+#if defined(WIN32) && !defined(__MINGW32__) && defined(DLLPROC)
+DLLPROC (int ac, string *av)
+#else
+main (int ac, string *av)
+#endif
{
# ifdef __EMX__
_wildcard(&ac, &av);
@@ -460,7 +464,6 @@ int main(int ac, string * av)
return EXIT_SUCCESS;
}
-#endif /* !(WIN32 || __MINGW32__) */
/* This is supposed to ``open the terminal for input'', but what we
diff --git a/Build/source/texk/web2c/luatexdir/luatex.h b/Build/source/texk/web2c/luatexdir/luatex.h
index db9c0961102..bb62e8885d3 100644
--- a/Build/source/texk/web2c/luatexdir/luatex.h
+++ b/Build/source/texk/web2c/luatexdir/luatex.h
@@ -76,6 +76,10 @@ extern int shell_cmd_is_allowed(const char *cmd, char **safecmd,
char **cmdname);
extern int runsystem(char *cmd);
+#if defined(WIN32) && !defined(__MINGW32__) && defined(DLLPROC)
+extern __declspec(dllexport) int DLLPROC (int ac, string *av);
+#endif
+
# ifndef GLUERATIO_TYPE
# define GLUERATIO_TYPE double
# endif
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
index 9f475149176..5a7e3bb5b98 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
@@ -1380,6 +1380,17 @@ static void print_ID(PDF pdf, const char *file_name)
/* get the file name */
if (getcwd(pwd, sizeof(pwd)) == NULL)
pdftex_fail("getcwd() failed (%s), (path too long?)", strerror(errno));
+#ifdef WIN32
+ {
+ char *p;
+ for (p = pwd; *p; p++) {
+ if (*p == '\\')
+ *p = '/';
+ else if (IS_KANJI(p))
+ p++;
+ }
+ }
+#endif
md5_append(&state, (const md5_byte_t *) pwd, (int) strlen(pwd));
md5_append(&state, (const md5_byte_t *) "/", 1);
md5_append(&state, (const md5_byte_t *) file_name, (int) strlen(file_name));