summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-08-02 10:26:16 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-08-02 10:26:16 +0000
commit9a634e078306d7a674684828beaabdc6f14c37cc (patch)
tree172b53bc09053fd914090aab6c0e272b3c0bd791 /Build
parent875be8166b919a05395f1754da3678a18758fab8 (diff)
kpathsea: More changes to reduce diffs with W32TeX
git-svn-id: svn://tug.org/texlive/trunk@23314 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog9
-rw-r--r--Build/source/texk/kpathsea/elt-dirs.c10
-rw-r--r--Build/source/texk/kpathsea/getopt.h11
-rw-r--r--Build/source/texk/kpathsea/mingw32.h6
-rw-r--r--Build/source/utils/chktex/ChangeLog4
-rw-r--r--Build/source/utils/chktex/getopt.h11
6 files changed, 42 insertions, 9 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index d5c624b5140..33023544ee9 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,12 @@
+2011-08-02 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ More diffs between TeX Live and W32TeX.
+ * elt-dirs.c (dir_list_add, do_subdir, expand_elt): Replace
+ IS_DIR_SEP by IS_DIR_SEP_CH.
+
+ * getopt.h: Add (non-ANSI) declaration for getopt().
+ * mingw32.h: #define off_t as off64_t for ftello64 and fseeko64.
+
2011-08-01 Peter Breitenlohner <peb@mppmu.mpg.de>
* win32lib.h.mugica: Renamed from win32lib.h.
diff --git a/Build/source/texk/kpathsea/elt-dirs.c b/Build/source/texk/kpathsea/elt-dirs.c
index 2fe3139cf90..d1c5f74ef13 100644
--- a/Build/source/texk/kpathsea/elt-dirs.c
+++ b/Build/source/texk/kpathsea/elt-dirs.c
@@ -36,7 +36,7 @@ dir_list_add (str_llist_type *l, string dir)
{
char last_char = dir[strlen (dir) - 1];
string saved_dir
- = IS_DIR_SEP (last_char) || IS_DEVICE_SEP (last_char)
+ = IS_DIR_SEP_CH (last_char) || IS_DEVICE_SEP (last_char)
? xstrdup (dir)
: concat (dir, DIR_SEP_STRING);
@@ -125,7 +125,7 @@ do_subdir (kpathsea kpse, str_llist_type *str_list_ptr, string elt,
/* Some old compilers don't allow aggregate initialization. */
name = fn_copy0 (elt, elt_length);
- assert (IS_DIR_SEP (elt[elt_length - 1])
+ assert (IS_DIR_SEP_CH (elt[elt_length - 1])
|| IS_DEVICE_SEP (elt[elt_length - 1]));
#if defined (WIN32)
@@ -312,12 +312,12 @@ expand_elt (kpathsea kpse, str_llist_type * str_list_ptr, string elt,
while (*dir != 0)
{
- if (IS_DIR_SEP (*dir))
+ if (IS_DIR_SEP_CH (*dir))
{
/* If two or more consecutive /'s, find subdirectories. */
- if (IS_DIR_SEP (dir[1]))
+ if (IS_DIR_SEP_CH (dir[1]))
{
- for (post = dir + 1; IS_DIR_SEP (*post); post++) ;
+ for (post = dir + 1; IS_DIR_SEP_CH (*post); post++) ;
do_subdir (kpse, str_list_ptr, elt, dir - elt + 1, post);
return;
}
diff --git a/Build/source/texk/kpathsea/getopt.h b/Build/source/texk/kpathsea/getopt.h
index 68d10c0d5ea..af446433688 100644
--- a/Build/source/texk/kpathsea/getopt.h
+++ b/Build/source/texk/kpathsea/getopt.h
@@ -1,6 +1,6 @@
/* Declarations for getopt.
- Copyright 2008, 2010 Karl Berry.
+ Copyright 2008, 2010, 2011 Karl Berry.
Copyright 1989,90,91,92,93,94,96,97,2000,05 Free Software Foundation, Inc.
The original version of this file was part of the GNU C Library.
@@ -28,6 +28,7 @@
#define KPSE_DLL 1
#endif /* WIN32 && !__MINGW32__ && !NO_KPSE_DLL */
+#if !defined (KPSEDLL)
#if defined (KPSE_DLL) && (defined (WIN32) || defined (__CYGWIN__))
#ifdef MAKE_KPSE_DLL
#define KPSEDLL __declspec(dllexport)
@@ -36,7 +37,8 @@
#endif
#else /* ! (KPSE_DLL && (WIN32 || __CYGWIN__)) */
#define KPSEDLL
-#endif
+#endif /* ! (KPSE_DLL && (WIN32 || __CYGWIN__)) */
+#endif /* ! KPSEDLL */
#ifdef __cplusplus
extern "C" {
@@ -116,6 +118,10 @@ struct option
differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */
extern KPSEDLL int getopt (int argc, char *const *argv, const char *shortopts);
+#else /* not __GNU_LIBRARY__ */
+#ifndef __cplusplus
+extern KPSEDLL int getopt ();
+#endif /* not __cplusplus */
#endif /* __GNU_LIBRARY__ */
extern KPSEDLL int getopt_long (int argc, char *const *argv, const char *shortopts,
const struct option *longopts, int *longind);
@@ -133,6 +139,7 @@ extern int _getopt_internal (int argc, char *const *argv,
#endif /* MAKE_KPSE_DLL || NO_KPSE_DLL */
#else /* not __STDC__ */
+extern KPSEDLL int getopt ();
extern KPSEDLL int getopt_long ();
extern KPSEDLL int getopt_long_only ();
diff --git a/Build/source/texk/kpathsea/mingw32.h b/Build/source/texk/kpathsea/mingw32.h
index c32312c2fce..db6a53e37bc 100644
--- a/Build/source/texk/kpathsea/mingw32.h
+++ b/Build/source/texk/kpathsea/mingw32.h
@@ -15,6 +15,12 @@
#include <fcntl.h>
#include <ctype.h>
+/* sys/types.h defines off_t as `long' and we do not want that.
+ We need to include unistd.h and sys/stat.h using off_t
+ before defining off_t (no need to include wchar.h). */
+#include <unistd.h>
+#include <sys/stat.h>
+#define off_t off64_t
#define ftello ftello64
#define fseeko fseeko64
diff --git a/Build/source/utils/chktex/ChangeLog b/Build/source/utils/chktex/ChangeLog
index e3490c574b1..2cf30625957 100644
--- a/Build/source/utils/chktex/ChangeLog
+++ b/Build/source/utils/chktex/ChangeLog
@@ -1,3 +1,7 @@
+2011-08-02 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * getopt.h: Sync with ../../texk/kpathsea/getopt.h.
+
2011-04-19 Peter Breitenlohner <peb@mppmu.mpg.de>
* getopt.c: #include <string.h> for prototypes.
diff --git a/Build/source/utils/chktex/getopt.h b/Build/source/utils/chktex/getopt.h
index 68d10c0d5ea..af446433688 100644
--- a/Build/source/utils/chktex/getopt.h
+++ b/Build/source/utils/chktex/getopt.h
@@ -1,6 +1,6 @@
/* Declarations for getopt.
- Copyright 2008, 2010 Karl Berry.
+ Copyright 2008, 2010, 2011 Karl Berry.
Copyright 1989,90,91,92,93,94,96,97,2000,05 Free Software Foundation, Inc.
The original version of this file was part of the GNU C Library.
@@ -28,6 +28,7 @@
#define KPSE_DLL 1
#endif /* WIN32 && !__MINGW32__ && !NO_KPSE_DLL */
+#if !defined (KPSEDLL)
#if defined (KPSE_DLL) && (defined (WIN32) || defined (__CYGWIN__))
#ifdef MAKE_KPSE_DLL
#define KPSEDLL __declspec(dllexport)
@@ -36,7 +37,8 @@
#endif
#else /* ! (KPSE_DLL && (WIN32 || __CYGWIN__)) */
#define KPSEDLL
-#endif
+#endif /* ! (KPSE_DLL && (WIN32 || __CYGWIN__)) */
+#endif /* ! KPSEDLL */
#ifdef __cplusplus
extern "C" {
@@ -116,6 +118,10 @@ struct option
differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */
extern KPSEDLL int getopt (int argc, char *const *argv, const char *shortopts);
+#else /* not __GNU_LIBRARY__ */
+#ifndef __cplusplus
+extern KPSEDLL int getopt ();
+#endif /* not __cplusplus */
#endif /* __GNU_LIBRARY__ */
extern KPSEDLL int getopt_long (int argc, char *const *argv, const char *shortopts,
const struct option *longopts, int *longind);
@@ -133,6 +139,7 @@ extern int _getopt_internal (int argc, char *const *argv,
#endif /* MAKE_KPSE_DLL || NO_KPSE_DLL */
#else /* not __STDC__ */
+extern KPSEDLL int getopt ();
extern KPSEDLL int getopt_long ();
extern KPSEDLL int getopt_long_only ();