summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-06-10 08:35:26 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-06-10 08:35:26 +0000
commit91e8bc6ee3290fc6f8fa1d0c35f900726899b39e (patch)
treeec547bcbcb004269426560ea643816f076076b5e /Build/source
parentbe341f8a8fd8c2ac481ea0b2abb04e95475f962a (diff)
chktex and getopt
git-svn-id: svn://tug.org/texlive/trunk@18859 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog5
-rw-r--r--Build/source/texk/kpathsea/getopt.h12
-rw-r--r--Build/source/utils/chktex/ChangeLog5
-rw-r--r--Build/source/utils/chktex/Makefile.am1
-rw-r--r--Build/source/utils/chktex/Makefile.in1
-rw-r--r--Build/source/utils/chktex/getopt.h18
6 files changed, 36 insertions, 6 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 074eb007f28..75dd7484a89 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * getopt.h [NO_KPSE_DLL]: Allow use of this file for chktex.
+ From Karl Berry, 9 Jun 2010 15:36:44.
+
2010-06-06 Karl Berry <karl@tug.org>
* getopt.h (getopt) [! __STDC__]: remove decl since AIX/Solaris
diff --git a/Build/source/texk/kpathsea/getopt.h b/Build/source/texk/kpathsea/getopt.h
index 69a40426506..68d10c0d5ea 100644
--- a/Build/source/texk/kpathsea/getopt.h
+++ b/Build/source/texk/kpathsea/getopt.h
@@ -24,9 +24,9 @@
#ifndef _GETOPT_H
#define _GETOPT_H 1
-#if defined (WIN32) && !defined(__MINGW32__)
+#if defined (WIN32) && !defined (__MINGW32__) && !defined (NO_KPSE_DLL)
#define KPSE_DLL 1
-#endif /* WIN32 && ! __MINGW32__ */
+#endif /* WIN32 && !__MINGW32__ && !NO_KPSE_DLL */
#if defined (KPSE_DLL) && (defined (WIN32) || defined (__CYGWIN__))
#ifdef MAKE_KPSE_DLL
@@ -123,7 +123,7 @@ extern KPSEDLL int getopt_long_only (int argc, char *const *argv,
const char *shortopts,
const struct option *longopts, int *longind);
-#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+#if defined (MAKE_KPSE_DLL) || defined (NO_KPSE_DLL) /* libkpathsea internal only */
/* Internal only. Users should not call this directly. */
extern int _getopt_internal (int argc, char *const *argv,
@@ -131,16 +131,16 @@ extern int _getopt_internal (int argc, char *const *argv,
const struct option *longopts, int *longind,
int long_only);
-#endif /* MAKE_KPSE_DLL */
+#endif /* MAKE_KPSE_DLL || NO_KPSE_DLL */
#else /* not __STDC__ */
extern KPSEDLL int getopt_long ();
extern KPSEDLL int getopt_long_only ();
-#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+#if defined (MAKE_KPSE_DLL) || defined (NO_KPSE_DLL) /* libkpathsea internal only */
extern int _getopt_internal ();
-#endif /* MAKE_KPSE_DLL */
+#endif /* MAKE_KPSE_DLL || NO_KPSE_DLL */
#endif /* __STDC__ */
#ifdef __cplusplus
diff --git a/Build/source/utils/chktex/ChangeLog b/Build/source/utils/chktex/ChangeLog
index 3eb03429b92..279cb70daf2 100644
--- a/Build/source/utils/chktex/ChangeLog
+++ b/Build/source/utils/chktex/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (AM_CPPFLAGS): Added -DNO_KPSE_DLL.
+ * getopt.h: Now identically copied from ../../texk/kpathsea.
+
2010-06-08 Peter Breitenlohner <peb@mppmu.mpg.de>
* getopt.c, getopt1.c (new): Copied from ../../texk/kpathsea.
diff --git a/Build/source/utils/chktex/Makefile.am b/Build/source/utils/chktex/Makefile.am
index 1413011fde3..18e177e2d7d 100644
--- a/Build/source/utils/chktex/Makefile.am
+++ b/Build/source/utils/chktex/Makefile.am
@@ -26,6 +26,7 @@ EXTRA_DIST += $(CHKTEX_TREE)-PATCHES
dist-hook:
rm -rf `find $(distdir) -name .svn`
+AM_CPPFLAGS = -DNO_KPSE_DLL
AM_CFLAGS = $(WARNING_CFLAGS)
bin_PROGRAMS = chktex
diff --git a/Build/source/utils/chktex/Makefile.in b/Build/source/utils/chktex/Makefile.in
index 5c365ed4de8..7fef3e26d00 100644
--- a/Build/source/utils/chktex/Makefile.in
+++ b/Build/source/utils/chktex/Makefile.in
@@ -221,6 +221,7 @@ top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I ../../m4
EXTRA_DIST = $(CHKTEX_TREE) $(CHKTEX_TREE)-PATCHES ChkTeX.tex \
chktex.test
+AM_CPPFLAGS = -DNO_KPSE_DLL
AM_CFLAGS = $(WARNING_CFLAGS)
chktex_SOURCES = \
getopt.c \
diff --git a/Build/source/utils/chktex/getopt.h b/Build/source/utils/chktex/getopt.h
index 5e942ffa005..68d10c0d5ea 100644
--- a/Build/source/utils/chktex/getopt.h
+++ b/Build/source/utils/chktex/getopt.h
@@ -24,7 +24,19 @@
#ifndef _GETOPT_H
#define _GETOPT_H 1
+#if defined (WIN32) && !defined (__MINGW32__) && !defined (NO_KPSE_DLL)
+#define KPSE_DLL 1
+#endif /* WIN32 && !__MINGW32__ && !NO_KPSE_DLL */
+
+#if defined (KPSE_DLL) && (defined (WIN32) || defined (__CYGWIN__))
+#ifdef MAKE_KPSE_DLL
+#define KPSEDLL __declspec(dllexport)
+#else /* ! MAKE_KPSE_DLL */
+#define KPSEDLL __declspec(dllimport)
+#endif
+#else /* ! (KPSE_DLL && (WIN32 || __CYGWIN__)) */
#define KPSEDLL
+#endif
#ifdef __cplusplus
extern "C" {
@@ -111,18 +123,24 @@ extern KPSEDLL int getopt_long_only (int argc, char *const *argv,
const char *shortopts,
const struct option *longopts, int *longind);
+#if defined (MAKE_KPSE_DLL) || defined (NO_KPSE_DLL) /* libkpathsea internal only */
+
/* Internal only. Users should not call this directly. */
extern int _getopt_internal (int argc, char *const *argv,
const char *shortopts,
const struct option *longopts, int *longind,
int long_only);
+#endif /* MAKE_KPSE_DLL || NO_KPSE_DLL */
#else /* not __STDC__ */
extern KPSEDLL int getopt_long ();
extern KPSEDLL int getopt_long_only ();
+#if defined (MAKE_KPSE_DLL) || defined (NO_KPSE_DLL) /* libkpathsea internal only */
+
extern int _getopt_internal ();
+#endif /* MAKE_KPSE_DLL || NO_KPSE_DLL */
#endif /* __STDC__ */
#ifdef __cplusplus