diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-02-23 16:14:03 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-02-23 16:14:03 +0000 |
commit | 8ee4ce87e030dd4e217f99e924233dbbf393e049 (patch) | |
tree | a4fc2a004c2e92bdbba8d57a192ef96c0a434ef1 /Build/source/texk | |
parent | b243861dbff7f1514485d8f4df1770c4aba31a4a (diff) |
build system fixes, mostly for mingw32 cross and win32
git-svn-id: svn://tug.org/texlive/trunk@17166 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
24 files changed, 92 insertions, 28 deletions
diff --git a/Build/source/texk/dvi2tty/ChangeLog b/Build/source/texk/dvi2tty/ChangeLog index e5c84b44fda..3aedae95cfa 100644 --- a/Build/source/texk/dvi2tty/ChangeLog +++ b/Build/source/texk/dvi2tty/ChangeLog @@ -1,3 +1,8 @@ +2010-02-22 Peter Breitenlohner <peb@mppmu.mpg.de> + + * dvi2tty.c (readable_file) [WIN32]: Remove unused variable err. + * dvi2tty.h: Remove pre-ANSI C prototypes. + 2010-02-12 Peter Breitenlohner <peb@mppmu.mpg.de> * disdvi.c, dvi2tty.h: #define NO_DEBUG as 1, to avoid warning. diff --git a/Build/source/texk/dvi2tty/dvi2tty.c b/Build/source/texk/dvi2tty/dvi2tty.c index 738c1159eb8..ede91b9e637 100644 --- a/Build/source/texk/dvi2tty/dvi2tty.c +++ b/Build/source/texk/dvi2tty/dvi2tty.c @@ -481,7 +481,7 @@ readable_file(char *name) char *ret; #ifdef WIN32 - unsigned int fa, err; + unsigned int fa; fa = GetFileAttributes(name); if (fa == 0xFFFFFFFF) { diff --git a/Build/source/texk/dvi2tty/dvi2tty.h b/Build/source/texk/dvi2tty/dvi2tty.h index 19225a823d3..0dae38fce63 100644 --- a/Build/source/texk/dvi2tty/dvi2tty.h +++ b/Build/source/texk/dvi2tty/dvi2tty.h @@ -85,15 +85,7 @@ extern FILE *output; /* output file (dvi2tty.c) */ /*---------------------------------------------------------------------------*/ /* dvi2tty.c */ -#if defined(KPATHSEA) || defined(MSDOS) void errorexit(int); -#else -void errorexit(); -#endif /* dvistuff.c */ -#if defined(KPATHSEA) || defined(MSDOS) void dvimain(void); -#else -void dvimain(); -#endif diff --git a/Build/source/texk/dvipos/ChangeLog b/Build/source/texk/dvipos/ChangeLog index 5cfb42f74a2..665e1735090 100644 --- a/Build/source/texk/dvipos/ChangeLog +++ b/Build/source/texk/dvipos/ChangeLog @@ -1,3 +1,7 @@ +2010-02-23 Peter Breitenlohner <peb@mppmu.mpg.de> + + * utils.h: Also need to #include <kpathsea/c-ctype.h>. + 2010-02-20 Peter Breitenlohner <peb@mppmu.mpg.de> * utils.h: Can't #include <kpathsea/kpathsea.h> for WIN32. diff --git a/Build/source/texk/dvipos/utils.h b/Build/source/texk/dvipos/utils.h index 397cf3d998f..af06ad33ecc 100644 --- a/Build/source/texk/dvipos/utils.h +++ b/Build/source/texk/dvipos/utils.h @@ -29,6 +29,7 @@ #else #include <kpathsea/config.h> #include <kpathsea/c-auto.h> +#include <kpathsea/c-ctype.h> #include <kpathsea/tex-file.h> #ifndef WIN32 #include <kpathsea/getopt.h> diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index 089d3df44a7..f7b270ccf99 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,3 +1,7 @@ +2010-02-23 Peter Breitenlohner <peb@mppmu.mpg.de> + + * search.c: #include <kpathsea/variable.h> for kpse_var_value. + 2010-02-19 Peter Breitenlohner <peb@mppmu.mpg.de> * Makefile.am (EXTRA_DIST): Add the new files. diff --git a/Build/source/texk/dvipsk/search.c b/Build/source/texk/dvipsk/search.c index e7a58b71ed6..c7b7300388f 100644 --- a/Build/source/texk/dvipsk/search.c +++ b/Build/source/texk/dvipsk/search.c @@ -18,6 +18,7 @@ #include <kpathsea/tex-glyph.h> #include <kpathsea/absolute.h> #include <kpathsea/c-pathch.h> +#include <kpathsea/variable.h> #ifndef GUNZIP #define GUNZIP "gzip -d" diff --git a/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/ChangeLog b/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/ChangeLog index 59b110e6c6c..8a946155d41 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/ChangeLog +++ b/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/ChangeLog @@ -1,3 +1,9 @@ +2010-02-23 Peter Breitenlohner <peb@mppmu.mpg.de> + + Added patch-30-WIN32-warning. + * src/MetafontWrapper.cpp (execute) [WIN32]: Initialize the + DWORD exitcode with (DWORD)-1 to avoid warning. + 2009-12-14 Peter Breitenlohner <peb@mppmu.mpg.de> Added patch-20-gettimeofday-or-ftime. diff --git a/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/patch-30-WIN32-warning b/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/patch-30-WIN32-warning new file mode 100644 index 00000000000..2ce14dbe623 --- /dev/null +++ b/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/patch-30-WIN32-warning @@ -0,0 +1,14 @@ + Avoid compiler warning. + +diff -ur dvisvgm-0.8.7.orig/src/MetafontWrapper.cpp dvisvgm-0.8.7/src/MetafontWrapper.cpp +--- dvisvgm-0.8.7.orig/src/MetafontWrapper.cpp 2009-11-06 22:17:58.000000000 +0100 ++++ dvisvgm-0.8.7/src/MetafontWrapper.cpp 2010-02-23 13:49:35.706277518 +0100 +@@ -55,7 +55,7 @@ + string cmdline = string("\"")+cmd+"\" "+params; + CreateProcess(NULL, (LPSTR)cmdline.c_str(), NULL, NULL, true, 0, NULL, NULL, &si, &pi); + WaitForSingleObject(pi.hProcess, INFINITE); +- DWORD exitcode = -1; ++ DWORD exitcode = (DWORD)-1; + GetExitCodeProcess(pi.hProcess, &exitcode); + CloseHandle(devnull); + return exitcode; diff --git a/Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/MetafontWrapper.cpp b/Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/MetafontWrapper.cpp index f551b640ef1..1f9f7c314f0 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/MetafontWrapper.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/MetafontWrapper.cpp @@ -55,7 +55,7 @@ static int execute (const char *cmd, const char *params) { string cmdline = string("\"")+cmd+"\" "+params; CreateProcess(NULL, (LPSTR)cmdline.c_str(), NULL, NULL, true, 0, NULL, NULL, &si, &pi); WaitForSingleObject(pi.hProcess, INFINITE); - DWORD exitcode = -1; + DWORD exitcode = (DWORD)-1; GetExitCodeProcess(pi.hProcess, &exitcode); CloseHandle(devnull); return exitcode; diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index f534b676c5c..57e131da8ca 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,19 @@ +2010-02-23 Peter Breitenlohner <peb@mppmu.mpg.de> + + * dir.c (kpathsea_dir_p), tex-make.c (maketex): [WIN32]: Cast + the result of GetLastError() to int (may be or is DWORD). + * tex-make.c (kpathsea_make_tex) [WIN32]: Avoid initialized ret. + * mingw32.c (look_for_cmd): Declare suffixes and s as const. + + * config.h [WIN32]: Ensure that __STDC__ is #defined. + #include <kpathsea/win32lib.h>, not <win32lib.h>. + Diffs from Akira, 11 Feb 2010 11:03:39. + + * strstr.c (str): Add empty statement after label at the end of + a block. From Javier Mugica, 23 Feb 2010 12:25:55. + + * mingw32.c (win32_get_long_filename): Declare extern KPSEDLL. + 2010-02-20 Peter Breitenlohner <peb@mppmu.mpg.de> * mingw32.c (win32_system): Declare as non-static, for web2c. diff --git a/Build/source/texk/kpathsea/config.h b/Build/source/texk/kpathsea/config.h index d9e4123b25f..4abd0b52b53 100644 --- a/Build/source/texk/kpathsea/config.h +++ b/Build/source/texk/kpathsea/config.h @@ -54,6 +54,10 @@ #define DEV_NULL "/dev/null" #endif +#if defined (WIN32) && !defined (__STDC__) +#define __STDC__ 1 +#endif + /* System dependencies that are figured out by `configure'. */ #include <kpathsea/c-auto.h> @@ -94,7 +98,7 @@ #ifdef __MINGW32__ #include <kpathsea/mingw32.h> #else -#include <win32lib.h> +#include <kpathsea/win32lib.h> #endif #endif diff --git a/Build/source/texk/kpathsea/dir.c b/Build/source/texk/kpathsea/dir.c index 295e4dcb75c..1062f28f63f 100644 --- a/Build/source/texk/kpathsea/dir.c +++ b/Build/source/texk/kpathsea/dir.c @@ -43,7 +43,7 @@ kpathsea_dir_p (kpathsea kpse, const_string fn) if (KPATHSEA_DEBUG_P (KPSE_DEBUG_STAT)) { if (fa == 0xFFFFFFFF) { fprintf(stderr, "failed to get file attributes for %s (%d)\n", - fn, GetLastError()); + fn, (int)(GetLastError())); } else { fprintf(stderr, "path %s %s a directory\n", fn , (fa & FILE_ATTRIBUTE_DIRECTORY) ? diff --git a/Build/source/texk/kpathsea/mingw32.c b/Build/source/texk/kpathsea/mingw32.c index 755514e42ca..b0e15e6a2a4 100644 --- a/Build/source/texk/kpathsea/mingw32.c +++ b/Build/source/texk/kpathsea/mingw32.c @@ -404,8 +404,8 @@ look_for_cmd(const char *cmd, char **app) char *env_path; const char *p, *q; char pname[MAXPATHLEN], *fp; - char *suffixes[] = { ".bat", ".cmd", ".com", ".exe", NULL }; - char **s; + const char *suffixes[] = { ".bat", ".cmd", ".com", ".exe", NULL }; + const char **s; char *app_name; BOOL go_on; diff --git a/Build/source/texk/kpathsea/mingw32.h b/Build/source/texk/kpathsea/mingw32.h index 24b79396123..18ca5380513 100644 --- a/Build/source/texk/kpathsea/mingw32.h +++ b/Build/source/texk/kpathsea/mingw32.h @@ -45,12 +45,12 @@ #ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ extern void init_user_info (void); -extern BOOL win32_get_long_filename (char *, char *, int); extern BOOL look_for_cmd (const char *, char **); extern char *quote_args(char **); #endif /* MAKE_KPSE_DLL */ +extern KPSEDLL BOOL win32_get_long_filename (char *, char *, int); extern KPSEDLL int win32_system(const char *, int); #endif diff --git a/Build/source/texk/kpathsea/strstr.c b/Build/source/texk/kpathsea/strstr.c index 9aa885f5bc3..0229f463fdc 100644 --- a/Build/source/texk/kpathsea/strstr.c +++ b/Build/source/texk/kpathsea/strstr.c @@ -77,7 +77,8 @@ strstr (phaystack, pneedle) a = *++haystack; if (a == '\0') goto ret0; -shloop: } +shloop: ; + } while (a != b); jin: a = *++haystack; diff --git a/Build/source/texk/kpathsea/tex-make.c b/Build/source/texk/kpathsea/tex-make.c index f65be651cf2..5024d97ad18 100644 --- a/Build/source/texk/kpathsea/tex-make.c +++ b/Build/source/texk/kpathsea/tex-make.c @@ -271,8 +271,8 @@ maketex (kpathsea kpse, kpse_file_format_type format, string* args) &si, /* pointer to STARTUPINFO */ &pi /* pointer to PROCESS_INFORMATION */ ) == 0) { - LIB_FATAL2 ("kpathsea: CreateProcess() failed for `%s' (Error %x)\n", - new_cmd, GetLastError()); + LIB_FATAL2 ("kpathsea: CreateProcess() failed for `%s' (Error %d)\n", + new_cmd, (int)(GetLastError())); } CloseHandle(child_in); @@ -289,7 +289,7 @@ maketex (kpathsea kpse, kpse_file_format_type format, string* args) if (num <= 0) { if (GetLastError() != ERROR_BROKEN_PIPE) { LIB_FATAL2 ("kpathsea: read() error code for `%s' (Error %d)", - new_cmd, GetLastError()); + new_cmd, (int)(GetLastError())); break; } } else { @@ -305,7 +305,7 @@ maketex (kpathsea kpse, kpse_file_format_type format, string* args) if (WaitForSingleObject(pi.hProcess, INFINITE) != WAIT_OBJECT_0) { WARNING2 ("kpathsea: process termination wait failed: %s (Error %d)\n", - new_cmd, GetLastError()); + new_cmd, (int)(GetLastError())); } CloseHandle(pi.hProcess); @@ -331,6 +331,8 @@ maketex (kpathsea kpse, kpse_file_format_type format, string* args) /* Free the name if we're not returning it. */ if (fn != ret) free (fn); + } else { + ret = NULL; } error_exit: ; diff --git a/Build/source/texk/makeindexk/ChangeLog b/Build/source/texk/makeindexk/ChangeLog index 5b675c9feba..afe346a8629 100644 --- a/Build/source/texk/makeindexk/ChangeLog +++ b/Build/source/texk/makeindexk/ChangeLog @@ -1,3 +1,7 @@ +2010-02-23 Peter Breitenlohner <peb@mppmu.mpg.de> + + * mkind.h (DUPLICATE) [WIN32]: #undef before #define. + 2010-02-12 Peter Breitenlohner <peb@mppmu.mpg.de> * mkind.h: #define NO_DEBUG as 1, to avoid warning. diff --git a/Build/source/texk/makeindexk/mkind.h b/Build/source/texk/makeindexk/mkind.h index e034da8bc85..d8e331073d8 100644 --- a/Build/source/texk/makeindexk/mkind.h +++ b/Build/source/texk/makeindexk/mkind.h @@ -383,6 +383,7 @@ ensuing. #define ARAB 2 #define ALPL 3 #define ALPU 4 +#undef DUPLICATE /* may already be defined for WIN32 */ #define DUPLICATE 9999 #define SYMBOL -1 diff --git a/Build/source/texk/ps2pkm/ChangeLog b/Build/source/texk/ps2pkm/ChangeLog index 184fc5a52a4..c31603f8523 100644 --- a/Build/source/texk/ps2pkm/ChangeLog +++ b/Build/source/texk/ps2pkm/ChangeLog @@ -1,3 +1,10 @@ +2010-02-23 Peter Breitenlohner <peb@mppmu.mpg.de> + + * t1info.c (ComputeStdProps): Declare rc as int, not LONG, + because they differ for WIN32. + * t1stub.c: Use ANSI C protos (not only for WIN32). + Declare struct segment (#include "paths.h" doesn't work). + 2010-02-20 Peter Breitenlohner <peb@mppmu.mpg.de> * basics.c: Don't #include <win32lib.h> for MinGW32. diff --git a/Build/source/texk/ps2pkm/t1info.c b/Build/source/texk/ps2pkm/t1info.c index f7cdb4e5a2e..8b64d600f6b 100644 --- a/Build/source/texk/ps2pkm/t1info.c +++ b/Build/source/texk/ps2pkm/t1info.c @@ -269,7 +269,7 @@ ComputeStdProps(pInfo, Vals, Filename, Fontname) char *ptr1, *ptr2; char *infostrP; - LONG rc; + int rc; char scaledName[MAXFONTNAMELEN]; strcpy (scaledName, Fontname); diff --git a/Build/source/texk/ps2pkm/t1stub.c b/Build/source/texk/ps2pkm/t1stub.c index b537b53b989..6405b64c106 100644 --- a/Build/source/texk/ps2pkm/t1stub.c +++ b/Build/source/texk/ps2pkm/t1stub.c @@ -30,17 +30,15 @@ #include "objects.h" /* get #define for t1_abort() */ -xiStub() +xiStub(void) { printf("xiStub called\n"); t1_abort("xiStub called"); } - -#ifdef WIN32 + +struct segment; + void t1_DumpText(struct segment * foo) -#else -void t1_DumpText() -#endif { xiStub(); } diff --git a/Build/source/texk/tex4htk/ChangeLog b/Build/source/texk/tex4htk/ChangeLog index a31ff248cfe..6c3940c7380 100644 --- a/Build/source/texk/tex4htk/ChangeLog +++ b/Build/source/texk/tex4htk/ChangeLog @@ -1,3 +1,7 @@ +2010-02-23 Peter Breitenlohner <peb@mppmu.mpg.de> + + * t4ht.c (get_env_dir0 [WIN32]: Declare as static. + 2010-02-20 Peter Breitenlohner <peb@mppmu.mpg.de> * tex4ht.c [__MINGW32__]: #define HAVE_BOOLEAN in order to avoid diff --git a/Build/source/texk/tex4htk/t4ht.c b/Build/source/texk/tex4htk/t4ht.c index 0aed8c8bb9b..37db830fe66 100644 --- a/Build/source/texk/tex4htk/t4ht.c +++ b/Build/source/texk/tex4htk/t4ht.c @@ -905,7 +905,7 @@ static struct script_struct * add_script #if defined(DOS_WIN32) || defined(__MSDOS__) -char *get_env_dir +static char *get_env_dir #ifdef ANSI #define SEP , ( |