summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/kpathsea')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog16
-rw-r--r--Build/source/texk/kpathsea/config.h6
-rw-r--r--Build/source/texk/kpathsea/dir.c2
-rw-r--r--Build/source/texk/kpathsea/mingw32.c4
-rw-r--r--Build/source/texk/kpathsea/mingw32.h2
-rw-r--r--Build/source/texk/kpathsea/strstr.c3
-rw-r--r--Build/source/texk/kpathsea/tex-make.c10
7 files changed, 33 insertions, 10 deletions
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:
;