diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-03-06 12:38:16 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-03-06 12:38:16 +0000 |
commit | 05e88b695a1d56112eee8b4fa0d57f0a1f738231 (patch) | |
tree | f4a5bc11562093b4257280a17f55a404b9f4d1a4 /Build/source/texk | |
parent | e71489818a87c5bc99fc792e5b9ee6ec56516ef3 (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')
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/Makefile.am | 4 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/Makefile.in | 10 | ||||
-rwxr-xr-x | Build/source/texk/kpathsea/configure | 20 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/configure.ac | 4 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/getopt.h | 5 | ||||
-rw-r--r-- | Build/source/texk/psutils/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/psutils/Makefile.am | 1 | ||||
-rw-r--r-- | Build/source/texk/psutils/Makefile.in | 1 | ||||
-rw-r--r-- | Build/source/texk/psutils/config.h.in | 15 | ||||
-rw-r--r-- | Build/source/texk/psutils/configure.ac | 15 | ||||
-rw-r--r-- | Build/source/texk/psutils/texlive.h | 33 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c | 8 |
14 files changed, 94 insertions, 37 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 diff --git a/Build/source/texk/psutils/ChangeLog b/Build/source/texk/psutils/ChangeLog index 33993aa72f7..ad035e8111c 100644 --- a/Build/source/texk/psutils/ChangeLog +++ b/Build/source/texk/psutils/ChangeLog @@ -1,3 +1,9 @@ +2014-03-06 Peter Breitenlohner <peb@mppmu.mpg.de> + + * texlive.h: New file with additional code for TeX Live, + #included from config.h, such that we can #undef _Noreturn. + * configure.ac: Adapted. + 2014-02-06 Peter Breitenlohner <peb@mppmu.mpg.de> * Makefile.am: Fix dependencies for build "on demand". diff --git a/Build/source/texk/psutils/Makefile.am b/Build/source/texk/psutils/Makefile.am index 8675e80a28f..9d28d9ca54b 100644 --- a/Build/source/texk/psutils/Makefile.am +++ b/Build/source/texk/psutils/Makefile.am @@ -22,6 +22,7 @@ libpsutils_a_SOURCES = \ paper-size.c \ progname.c \ progname.h \ + texlive.h \ verror.h \ verror.c \ xvasprintf.h \ diff --git a/Build/source/texk/psutils/Makefile.in b/Build/source/texk/psutils/Makefile.in index e82aa3411fb..e78f73d697f 100644 --- a/Build/source/texk/psutils/Makefile.in +++ b/Build/source/texk/psutils/Makefile.in @@ -603,6 +603,7 @@ libpsutils_a_SOURCES = \ paper-size.c \ progname.c \ progname.h \ + texlive.h \ verror.h \ verror.c \ xvasprintf.h \ diff --git a/Build/source/texk/psutils/config.h.in b/Build/source/texk/psutils/config.h.in index df55454a3f0..02ae8ce7c3d 100644 --- a/Build/source/texk/psutils/config.h.in +++ b/Build/source/texk/psutils/config.h.in @@ -178,19 +178,6 @@ such a type exists and the standard includes do not define it. */ #undef uint64_t -#include <kpathsea/kpathsea.h> - -#define _Noreturn -#define _GL_ATTRIBUTE_CONST - -#ifdef WIN32 -# define set_binary_mode(file, mode) _setmode(file, mode) -# ifndef __MINGW32__ -# define ftello _ftelli64 -# define fseeko _fseeki64 -# endif -#else -# define set_binary_mode(file, mode) 0 -#endif +#include <texlive.h> #endif /* _PSUTILS_CONFIG_H */ diff --git a/Build/source/texk/psutils/configure.ac b/Build/source/texk/psutils/configure.ac index aa6249d229a..8b043b45852 100644 --- a/Build/source/texk/psutils/configure.ac +++ b/Build/source/texk/psutils/configure.ac @@ -19,20 +19,7 @@ AC_CONFIG_HEADERS([config.h]) AH_TOP([#ifndef _PSUTILS_CONFIG_H #define _PSUTILS_CONFIG_H 1]) -AH_BOTTOM([#include <kpathsea/kpathsea.h> - -#define _Noreturn -#define _GL_ATTRIBUTE_CONST - -#ifdef WIN32 -# define set_binary_mode(file, mode) _setmode(file, mode) -# ifndef __MINGW32__ -# define ftello _ftelli64 -# define fseeko _fseeki64 -# endif -#else -# define set_binary_mode(file, mode) 0 -#endif +AH_BOTTOM([#include <texlive.h> #endif /* _PSUTILS_CONFIG_H */]) diff --git a/Build/source/texk/psutils/texlive.h b/Build/source/texk/psutils/texlive.h new file mode 100644 index 00000000000..fef3f741d4e --- /dev/null +++ b/Build/source/texk/psutils/texlive.h @@ -0,0 +1,33 @@ +/* texlive.h: TeX Live specific declarations - included from config.h + + Copyright 2014 Peter Breitenlohner. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this library; if not, see <http://www.gnu.org/licenses/>. */ + +#include <kpathsea/kpathsea.h> + +#undef _Noreturn /* Cygwin defines this */ +#define _Noreturn +#define _GL_ATTRIBUTE_CONST + +#ifdef WIN32 +# define set_binary_mode(file, mode) _setmode(file, mode) +# ifndef __MINGW32__ +# define ftello _ftelli64 +# define fseeko _fseeki64 +# endif +#else +# define set_binary_mode(file, mode) 0 +#endif + diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog index e5ebdcb3f33..6c83202e817 100644 --- a/Build/source/texk/web2c/luatexdir/ChangeLog +++ b/Build/source/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,7 @@ +2014-03-06 Peter Breitenlohner <peb@mppmu.mpg.de> + + * luafilesystem/src/lfs.c: Avoid to redefine _O_TEXT, _O_BINARY. + 2014-02-17 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * utils/utils.w: Typo in a comment. Simplify rint() for W32. diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c b/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c index 6279c0f2b5c..fe0d432a459 100644 --- a/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c +++ b/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c @@ -98,8 +98,12 @@ typedef struct dir_data { #endif #define STAT_FUNC _stati64 #else -#define _O_TEXT 0 -#define _O_BINARY 0 +#ifndef _O_TEXT + #define _O_TEXT 0 +#endif +#ifndef _O_BINARY + #define _O_BINARY 0 +#endif #define lfs_setmode(L,file,m) ((void)((void)file,m), \ luaL_error(L, LUA_QL("setmode") " not supported on this platform"), -1) #define STAT_STRUCT struct stat |