summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-03-06 12:38:16 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-03-06 12:38:16 +0000
commit05e88b695a1d56112eee8b4fa0d57f0a1f738231 (patch)
treef4a5bc11562093b4257280a17f55a404b9f4d1a4 /Build/source/texk/kpathsea
parente71489818a87c5bc99fc792e5b9ee6ec56516ef3 (diff)
Reduce Cygwin compiler warnings
git-svn-id: svn://tug.org/texlive/trunk@33105 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog5
-rw-r--r--Build/source/texk/kpathsea/Makefile.am4
-rw-r--r--Build/source/texk/kpathsea/Makefile.in10
-rwxr-xr-xBuild/source/texk/kpathsea/configure20
-rw-r--r--Build/source/texk/kpathsea/configure.ac4
-rw-r--r--Build/source/texk/kpathsea/getopt.h5
6 files changed, 41 insertions, 7 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index c72db005d9a..58caf311d94 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am, configure.ac: Use Cygwin system getopt().
+ * getopt.h: Avoid to redeclare the getopt API.
+
2014-02-08 TANAKA Takuji <KXD02663@nifty.ne.jp>
* knj.[ch]: Add a new function win32_putc().
diff --git a/Build/source/texk/kpathsea/Makefile.am b/Build/source/texk/kpathsea/Makefile.am
index 46e103d41eb..ff15916c27c 100644
--- a/Build/source/texk/kpathsea/Makefile.am
+++ b/Build/source/texk/kpathsea/Makefile.am
@@ -80,11 +80,11 @@ libkpathsea_la_SOURCES = \
xstat.c \
xstrdup.c
-if !MINGW32
+if !CYGWIN_OR_MINGW
libkpathsea_la_SOURCES += \
getopt.c \
getopt1.c
-endif !MINGW32
+endif !CYGWIN_OR_MINGW
if WIN32
if MINGW32
diff --git a/Build/source/texk/kpathsea/Makefile.in b/Build/source/texk/kpathsea/Makefile.in
index 75db7e9b9b2..932c0645fae 100644
--- a/Build/source/texk/kpathsea/Makefile.in
+++ b/Build/source/texk/kpathsea/Makefile.in
@@ -83,9 +83,9 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@have_EXEEXT_TRUE@am__append_1 = -DEXEEXT=\"$(EXEEXT)\"
-@MINGW32_FALSE@am__append_2 = \
-@MINGW32_FALSE@ getopt.c \
-@MINGW32_FALSE@ getopt1.c
+@CYGWIN_OR_MINGW_FALSE@am__append_2 = \
+@CYGWIN_OR_MINGW_FALSE@ getopt.c \
+@CYGWIN_OR_MINGW_FALSE@ getopt1.c
@MINGW32_TRUE@@WIN32_TRUE@am__append_3 = \
@MINGW32_TRUE@@WIN32_TRUE@ mingw32.c \
@@ -190,8 +190,8 @@ am__libkpathsea_la_SOURCES_DIST = tex-file.c absolute.c atou.c cnf.c \
xgetcwd.c xmalloc.c xopendir.c xputenv.c xrealloc.c xstat.c \
xstrdup.c getopt.c getopt1.c mingw32.c xfseeko.c xftello.c \
win32lib.c knj.c
-@MINGW32_FALSE@am__objects_1 = libkpathsea_la-getopt.lo \
-@MINGW32_FALSE@ libkpathsea_la-getopt1.lo
+@CYGWIN_OR_MINGW_FALSE@am__objects_1 = libkpathsea_la-getopt.lo \
+@CYGWIN_OR_MINGW_FALSE@ libkpathsea_la-getopt1.lo
@MINGW32_TRUE@@WIN32_TRUE@am__objects_2 = libkpathsea_la-mingw32.lo \
@MINGW32_TRUE@@WIN32_TRUE@ libkpathsea_la-xfseeko.lo \
@MINGW32_TRUE@@WIN32_TRUE@ libkpathsea_la-xftello.lo
diff --git a/Build/source/texk/kpathsea/configure b/Build/source/texk/kpathsea/configure
index 299689b7dda..f44ffd19ad0 100755
--- a/Build/source/texk/kpathsea/configure
+++ b/Build/source/texk/kpathsea/configure
@@ -638,6 +638,8 @@ LTLIBOBJS
have_EXEEXT_FALSE
have_EXEEXT_TRUE
LT_OBJDIR
+CYGWIN_OR_MINGW_FALSE
+CYGWIN_OR_MINGW_TRUE
MINGW32_FALSE
MINGW32_TRUE
WIN32_FALSE
@@ -13560,6 +13562,20 @@ else
fi
+case $host_os in #(
+ cygwin* | mingw*) :
+ kpse_have_cygwin_or_mingw=yes ;; #(
+ *) :
+ ;;
+esac
+ if test "x$kpse_have_cygwin_or_mingw" = xyes; then
+ CYGWIN_OR_MINGW_TRUE=
+ CYGWIN_OR_MINGW_FALSE='#'
+else
+ CYGWIN_OR_MINGW_TRUE='#'
+ CYGWIN_OR_MINGW_FALSE=
+fi
+
LT_OBJDIR="$lt_cv_objdir"
@@ -13836,6 +13852,10 @@ if test -z "${MINGW32_TRUE}" && test -z "${MINGW32_FALSE}"; then
as_fn_error $? "conditional \"MINGW32\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${CYGWIN_OR_MINGW_TRUE}" && test -z "${CYGWIN_OR_MINGW_FALSE}"; then
+ as_fn_error $? "conditional \"CYGWIN_OR_MINGW\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${have_EXEEXT_TRUE}" && test -z "${have_EXEEXT_FALSE}"; then
as_fn_error $? "conditional \"have_EXEEXT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/Build/source/texk/kpathsea/configure.ac b/Build/source/texk/kpathsea/configure.ac
index 7a8929756aa..3f0372b424e 100644
--- a/Build/source/texk/kpathsea/configure.ac
+++ b/Build/source/texk/kpathsea/configure.ac
@@ -60,6 +60,10 @@ fi
fi
KPSE_COND_MINGW32
+AS_CASE([$host_os],
+ [cygwin* | mingw*], [kpse_have_cygwin_or_mingw=yes])
+AM_CONDITIONAL([CYGWIN_OR_MINGW],
+ [test "x$kpse_have_cygwin_or_mingw" = xyes])
AC_SUBST([LT_OBJDIR], ["$lt_cv_objdir"])
diff --git a/Build/source/texk/kpathsea/getopt.h b/Build/source/texk/kpathsea/getopt.h
index 8acf05fb4fb..e96881d4e6f 100644
--- a/Build/source/texk/kpathsea/getopt.h
+++ b/Build/source/texk/kpathsea/getopt.h
@@ -47,6 +47,9 @@
extern "C" {
#endif
+#if !defined (__GETOPT_H__)
+/* Avoid to redeclare the getopt API. */
+
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
the argument value is returned here.
@@ -78,6 +81,8 @@ extern KPSEDLL int opterr;
extern KPSEDLL int optopt;
+#endif /* !__GETOPT_H__ */
+
#ifndef __need_getopt
/* Describe the long-named options requested by the application.
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector