From 81b20f4125fa3265443780bdc91eee1a43668936 Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" Date: Tue, 20 Dec 2016 21:19:45 +0100 Subject: [PATCH] libidn2: new package, libidn2 0.11 --- libidn2/build.sh | 71 + libidn2/meta/ChangeLog | 4 + libidn2/meta/pkgdef | 27 + libidn2/src/libidn2-0.11-add-getopt-gnu.patch | 14024 ++++++++++++++++ 4 files changed, 14126 insertions(+) create mode 100755 libidn2/build.sh create mode 100644 libidn2/meta/ChangeLog create mode 100644 libidn2/meta/pkgdef create mode 100644 libidn2/src/libidn2-0.11-add-getopt-gnu.patch diff --git a/libidn2/build.sh b/libidn2/build.sh new file mode 100755 index 0000000..0f6c12b --- /dev/null +++ b/libidn2/build.sh @@ -0,0 +1,71 @@ +#!/bin/bash +# This is a buildpkg build.sh script +# build.sh helper functions +. ${BUILDPKG_SCRIPTS}/build.sh.functions +# +########################################################### +# Check the following 4 variables before running the script +topdir=libidn2 +version=0.11 +pkgver=1 +source[0]=http://www.mirrorservice.org/sites/alpha.gnu.org/gnu/libidn/$topdir-$version.tar.gz +#source[0]=libidn2-with-getopt-gnu-0.11.tar.gz +# If there are no patches, simply comment this +patch[0]=libidn2-0.11-add-getopt-gnu.patch + +# Source function library +. ${BUILDPKG_SCRIPTS}/buildpkg.functions + +# Global settings +export CPPFLAGS="-I$prefix/include" +export LDFLAGS="-L$prefix/lib -R$prefix/lib" +configure_args+=(--disable-static --with-libiconv-prefix=$prefix --with-libintl-prefix=$prefix) + +reg prep +prep() +{ + generic_prep + setdir source + # Do not build examples + ${__gsed} -i 's/examples//' Makefile.in + # No stdint.h on Solaris < 10 + ${__gsed} -i 's/stdint.h/inttypes.h/' idn2.h.in +} + +reg build +build() +{ + generic_build +} + +reg check +check() +{ + setdir source + ${__gsed} -i '/^DEFAULT_INCLUDES/ s#.*#& -I../gl#' tests/Makefile.in + generic_check +} + +reg install +install() +{ + generic_install DESTDIR + doc AUTHORS COPYING* NEWS README +} + +reg pack +pack() +{ + generic_pack +} + +reg distclean +distclean() +{ + clean distclean +} + +################################################### +# No need to look below here +################################################### +build_sh $* diff --git a/libidn2/meta/ChangeLog b/libidn2/meta/ChangeLog new file mode 100644 index 0000000..8b8f0ff --- /dev/null +++ b/libidn2/meta/ChangeLog @@ -0,0 +1,4 @@ +CHANGELOG +--------- +* Sat Nov 26 2016 Tom G. Christensen - 0.11-1 +- Initial build diff --git a/libidn2/meta/pkgdef b/libidn2/meta/pkgdef new file mode 100644 index 0000000..0660f44 --- /dev/null +++ b/libidn2/meta/pkgdef @@ -0,0 +1,27 @@ +[libidn2] +pkgname="${pkgprefix}lidn2" +name="$topdir - GNU libidn2" +pkgcat="application" +pkgvendor="https://www.gnu.org/software/libidn/" +pkgdesc="An implementation of the IDNA2008 specifications" +pkgver="$pkgver" +files(-,root,bin) +default_docs +$_bindir/idn2 +$_libdir/libidn2.so.* +$_infodir +$_mandir/man1 + +[libidn2-devel] +pkgname="${pkgprefix}lidn2d" +name="${topdir}-devel - Development support for libidn2" +pkgcat="application" +pkgvendor="https://www.gnu.org/software/libidn/" +pkgdesc="Files needed for developing with libidn2" +pkgver="$pkgver" +files(-,root,bin) +$_includedir +$_libdir/libidn2.so +$_mandir/man3 +$_sharedir/gtk-doc/html/libidn2 + diff --git a/libidn2/src/libidn2-0.11-add-getopt-gnu.patch b/libidn2/src/libidn2-0.11-add-getopt-gnu.patch new file mode 100644 index 0000000..55cacdb --- /dev/null +++ b/libidn2/src/libidn2-0.11-add-getopt-gnu.patch @@ -0,0 +1,14024 @@ +diff -urN libidn2-0.11.pristine/build-aux/snippet/arg-nonnull.h libidn2-0.11/build-aux/snippet/arg-nonnull.h +--- libidn2-0.11.pristine/build-aux/snippet/arg-nonnull.h 2016-11-03 11:30:52.000000000 +0100 ++++ libidn2-0.11/build-aux/snippet/arg-nonnull.h 2016-11-24 21:38:50.607573445 +0100 +@@ -1,5 +1,5 @@ + /* A C macro for declaring that specific arguments must not be NULL. +- Copyright (C) 2009-2014 Free Software Foundation, Inc. ++ Copyright (C) 2009-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published +diff -urN libidn2-0.11.pristine/build-aux/snippet/arg-nonnull.h~ libidn2-0.11/build-aux/snippet/arg-nonnull.h~ +--- libidn2-0.11.pristine/build-aux/snippet/arg-nonnull.h~ 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/build-aux/snippet/arg-nonnull.h~ 2016-11-03 11:30:52.000000000 +0100 +@@ -0,0 +1,26 @@ ++/* A C macro for declaring that specific arguments must not be NULL. ++ Copyright (C) 2009-2014 Free Software Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify it ++ under the terms of the GNU General Public License as published ++ by the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools ++ that the values passed as arguments n, ..., m must be non-NULL pointers. ++ n = 1 stands for the first argument, n = 2 for the second argument etc. */ ++#ifndef _GL_ARG_NONNULL ++# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 ++# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) ++# else ++# define _GL_ARG_NONNULL(params) ++# endif ++#endif +diff -urN libidn2-0.11.pristine/build-aux/snippet/c++defs.h libidn2-0.11/build-aux/snippet/c++defs.h +--- libidn2-0.11.pristine/build-aux/snippet/c++defs.h 2016-11-03 11:30:52.000000000 +0100 ++++ libidn2-0.11/build-aux/snippet/c++defs.h 2016-11-24 21:38:50.611573585 +0100 +@@ -1,5 +1,5 @@ + /* C++ compatible function declaration macros. +- Copyright (C) 2010-2014 Free Software Foundation, Inc. ++ Copyright (C) 2010-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published +@@ -17,6 +17,15 @@ + #ifndef _GL_CXXDEFS_H + #define _GL_CXXDEFS_H + ++/* Begin/end the GNULIB_NAMESPACE namespace. */ ++#if defined __cplusplus && defined GNULIB_NAMESPACE ++# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { ++# define _GL_END_NAMESPACE } ++#else ++# define _GL_BEGIN_NAMESPACE ++# define _GL_END_NAMESPACE ++#endif ++ + /* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some +@@ -111,14 +120,25 @@ + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); +- */ ++ ++ Wrapping rpl_func in an object with an inline conversion operator ++ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is ++ actually used in the program. */ + #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) + #if defined __cplusplus && defined GNULIB_NAMESPACE + # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ +- rettype (*const func) parameters = ::rpl_func; \ ++ static const struct _gl_ ## func ## _wrapper \ ++ { \ ++ typedef rettype (*type) parameters; \ ++ \ ++ inline operator type () const \ ++ { \ ++ return ::rpl_func; \ ++ } \ ++ } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy + #else +@@ -135,8 +155,15 @@ + # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ +- rettype (*const func) parameters = \ +- reinterpret_cast(::rpl_func); \ ++ static const struct _gl_ ## func ## _wrapper \ ++ { \ ++ typedef rettype (*type) parameters; \ ++ \ ++ inline operator type () const \ ++ { \ ++ return reinterpret_cast(::rpl_func); \ ++ } \ ++ } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy + #else +@@ -150,19 +177,24 @@ + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); +- */ ++ ++ Wrapping func in an object with an inline conversion operator ++ avoids a reference to func unless GNULIB_NAMESPACE::func is ++ actually used in the program. */ + #if defined __cplusplus && defined GNULIB_NAMESPACE +- /* If we were to write +- rettype (*const func) parameters = ::func; +- like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls +- better (remove an indirection through a 'static' pointer variable), +- but then the _GL_CXXALIASWARN macro below would cause a warning not only +- for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */ +-# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ +- namespace GNULIB_NAMESPACE \ +- { \ +- static rettype (*func) parameters = ::func; \ +- } \ ++# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ ++ namespace GNULIB_NAMESPACE \ ++ { \ ++ static const struct _gl_ ## func ## _wrapper \ ++ { \ ++ typedef rettype (*type) parameters; \ ++ \ ++ inline operator type () const \ ++ { \ ++ return ::func; \ ++ } \ ++ } func = {}; \ ++ } \ + _GL_EXTERN_C int _gl_cxxalias_dummy + #else + # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ +@@ -178,8 +210,15 @@ + # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ +- static rettype (*func) parameters = \ +- reinterpret_cast(::func); \ ++ static const struct _gl_ ## func ## _wrapper \ ++ { \ ++ typedef rettype (*type) parameters; \ ++ \ ++ inline operator type () const \ ++ { \ ++ return reinterpret_cast(::func); \ ++ } \ ++ } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy + #else +@@ -202,9 +241,15 @@ + # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ +- static rettype (*func) parameters = \ +- reinterpret_cast( \ +- (rettype2(*)parameters2)(::func)); \ ++ static const struct _gl_ ## func ## _wrapper \ ++ { \ ++ typedef rettype (*type) parameters; \ ++ \ ++ inline operator type () const \ ++ { \ ++ return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ ++ } \ ++ } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy + #else +diff -urN libidn2-0.11.pristine/build-aux/snippet/c++defs.h~ libidn2-0.11/build-aux/snippet/c++defs.h~ +--- libidn2-0.11.pristine/build-aux/snippet/c++defs.h~ 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/build-aux/snippet/c++defs.h~ 2016-11-03 11:30:52.000000000 +0100 +@@ -0,0 +1,271 @@ ++/* C++ compatible function declaration macros. ++ Copyright (C) 2010-2014 Free Software Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify it ++ under the terms of the GNU General Public License as published ++ by the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#ifndef _GL_CXXDEFS_H ++#define _GL_CXXDEFS_H ++ ++/* The three most frequent use cases of these macros are: ++ ++ * For providing a substitute for a function that is missing on some ++ platforms, but is declared and works fine on the platforms on which ++ it exists: ++ ++ #if @GNULIB_FOO@ ++ # if !@HAVE_FOO@ ++ _GL_FUNCDECL_SYS (foo, ...); ++ # endif ++ _GL_CXXALIAS_SYS (foo, ...); ++ _GL_CXXALIASWARN (foo); ++ #elif defined GNULIB_POSIXCHECK ++ ... ++ #endif ++ ++ * For providing a replacement for a function that exists on all platforms, ++ but is broken/insufficient and needs to be replaced on some platforms: ++ ++ #if @GNULIB_FOO@ ++ # if @REPLACE_FOO@ ++ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++ # undef foo ++ # define foo rpl_foo ++ # endif ++ _GL_FUNCDECL_RPL (foo, ...); ++ _GL_CXXALIAS_RPL (foo, ...); ++ # else ++ _GL_CXXALIAS_SYS (foo, ...); ++ # endif ++ _GL_CXXALIASWARN (foo); ++ #elif defined GNULIB_POSIXCHECK ++ ... ++ #endif ++ ++ * For providing a replacement for a function that exists on some platforms ++ but is broken/insufficient and needs to be replaced on some of them and ++ is additionally either missing or undeclared on some other platforms: ++ ++ #if @GNULIB_FOO@ ++ # if @REPLACE_FOO@ ++ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++ # undef foo ++ # define foo rpl_foo ++ # endif ++ _GL_FUNCDECL_RPL (foo, ...); ++ _GL_CXXALIAS_RPL (foo, ...); ++ # else ++ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ ++ _GL_FUNCDECL_SYS (foo, ...); ++ # endif ++ _GL_CXXALIAS_SYS (foo, ...); ++ # endif ++ _GL_CXXALIASWARN (foo); ++ #elif defined GNULIB_POSIXCHECK ++ ... ++ #endif ++*/ ++ ++/* _GL_EXTERN_C declaration; ++ performs the declaration with C linkage. */ ++#if defined __cplusplus ++# define _GL_EXTERN_C extern "C" ++#else ++# define _GL_EXTERN_C extern ++#endif ++ ++/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); ++ declares a replacement function, named rpl_func, with the given prototype, ++ consisting of return type, parameters, and attributes. ++ Example: ++ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) ++ _GL_ARG_NONNULL ((1))); ++ */ ++#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ ++ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) ++#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ ++ _GL_EXTERN_C rettype rpl_func parameters_and_attributes ++ ++/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); ++ declares the system function, named func, with the given prototype, ++ consisting of return type, parameters, and attributes. ++ Example: ++ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) ++ _GL_ARG_NONNULL ((1))); ++ */ ++#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ ++ _GL_EXTERN_C rettype func parameters_and_attributes ++ ++/* _GL_CXXALIAS_RPL (func, rettype, parameters); ++ declares a C++ alias called GNULIB_NAMESPACE::func ++ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. ++ Example: ++ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); ++ */ ++#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ ++ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) ++#if defined __cplusplus && defined GNULIB_NAMESPACE ++# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ ++ namespace GNULIB_NAMESPACE \ ++ { \ ++ rettype (*const func) parameters = ::rpl_func; \ ++ } \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++#else ++# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++#endif ++ ++/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); ++ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); ++ except that the C function rpl_func may have a slightly different ++ declaration. A cast is used to silence the "invalid conversion" error ++ that would otherwise occur. */ ++#if defined __cplusplus && defined GNULIB_NAMESPACE ++# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ ++ namespace GNULIB_NAMESPACE \ ++ { \ ++ rettype (*const func) parameters = \ ++ reinterpret_cast(::rpl_func); \ ++ } \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++#else ++# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++#endif ++ ++/* _GL_CXXALIAS_SYS (func, rettype, parameters); ++ declares a C++ alias called GNULIB_NAMESPACE::func ++ that redirects to the system provided function func, if GNULIB_NAMESPACE ++ is defined. ++ Example: ++ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); ++ */ ++#if defined __cplusplus && defined GNULIB_NAMESPACE ++ /* If we were to write ++ rettype (*const func) parameters = ::func; ++ like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls ++ better (remove an indirection through a 'static' pointer variable), ++ but then the _GL_CXXALIASWARN macro below would cause a warning not only ++ for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */ ++# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ ++ namespace GNULIB_NAMESPACE \ ++ { \ ++ static rettype (*func) parameters = ::func; \ ++ } \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++#else ++# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++#endif ++ ++/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); ++ is like _GL_CXXALIAS_SYS (func, rettype, parameters); ++ except that the C function func may have a slightly different declaration. ++ A cast is used to silence the "invalid conversion" error that would ++ otherwise occur. */ ++#if defined __cplusplus && defined GNULIB_NAMESPACE ++# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ ++ namespace GNULIB_NAMESPACE \ ++ { \ ++ static rettype (*func) parameters = \ ++ reinterpret_cast(::func); \ ++ } \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++#else ++# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++#endif ++ ++/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); ++ is like _GL_CXXALIAS_SYS (func, rettype, parameters); ++ except that the C function is picked among a set of overloaded functions, ++ namely the one with rettype2 and parameters2. Two consecutive casts ++ are used to silence the "cannot find a match" and "invalid conversion" ++ errors that would otherwise occur. */ ++#if defined __cplusplus && defined GNULIB_NAMESPACE ++ /* The outer cast must be a reinterpret_cast. ++ The inner cast: When the function is defined as a set of overloaded ++ functions, it works as a static_cast<>, choosing the designated variant. ++ When the function is defined as a single variant, it works as a ++ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ ++# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ ++ namespace GNULIB_NAMESPACE \ ++ { \ ++ static rettype (*func) parameters = \ ++ reinterpret_cast( \ ++ (rettype2(*)parameters2)(::func)); \ ++ } \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++#else ++# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++#endif ++ ++/* _GL_CXXALIASWARN (func); ++ causes a warning to be emitted when ::func is used but not when ++ GNULIB_NAMESPACE::func is used. func must be defined without overloaded ++ variants. */ ++#if defined __cplusplus && defined GNULIB_NAMESPACE ++# define _GL_CXXALIASWARN(func) \ ++ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) ++# define _GL_CXXALIASWARN_1(func,namespace) \ ++ _GL_CXXALIASWARN_2 (func, namespace) ++/* To work around GCC bug , ++ we enable the warning only when not optimizing. */ ++# if !__OPTIMIZE__ ++# define _GL_CXXALIASWARN_2(func,namespace) \ ++ _GL_WARN_ON_USE (func, \ ++ "The symbol ::" #func " refers to the system function. " \ ++ "Use " #namespace "::" #func " instead.") ++# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING ++# define _GL_CXXALIASWARN_2(func,namespace) \ ++ extern __typeof__ (func) func ++# else ++# define _GL_CXXALIASWARN_2(func,namespace) \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++# endif ++#else ++# define _GL_CXXALIASWARN(func) \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++#endif ++ ++/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); ++ causes a warning to be emitted when the given overloaded variant of ::func ++ is used but not when GNULIB_NAMESPACE::func is used. */ ++#if defined __cplusplus && defined GNULIB_NAMESPACE ++# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ ++ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ ++ GNULIB_NAMESPACE) ++# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ ++ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) ++/* To work around GCC bug , ++ we enable the warning only when not optimizing. */ ++# if !__OPTIMIZE__ ++# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ ++ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ ++ "The symbol ::" #func " refers to the system function. " \ ++ "Use " #namespace "::" #func " instead.") ++# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING ++# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ ++ extern __typeof__ (func) func ++# else ++# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++# endif ++#else ++# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ ++ _GL_EXTERN_C int _gl_cxxalias_dummy ++#endif ++ ++#endif /* _GL_CXXDEFS_H */ +diff -urN libidn2-0.11.pristine/build-aux/snippet/_Noreturn.h libidn2-0.11/build-aux/snippet/_Noreturn.h +--- libidn2-0.11.pristine/build-aux/snippet/_Noreturn.h 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/build-aux/snippet/_Noreturn.h 2016-11-24 21:38:50.534570884 +0100 +@@ -0,0 +1,10 @@ ++#if !defined _Noreturn && __STDC_VERSION__ < 201112 ++# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ ++ || 0x5110 <= __SUNPRO_C) ++# define _Noreturn __attribute__ ((__noreturn__)) ++# elif 1200 <= _MSC_VER ++# define _Noreturn __declspec (noreturn) ++# else ++# define _Noreturn ++# endif ++#endif +diff -urN libidn2-0.11.pristine/build-aux/snippet/warn-on-use.h libidn2-0.11/build-aux/snippet/warn-on-use.h +--- libidn2-0.11.pristine/build-aux/snippet/warn-on-use.h 2016-11-03 11:30:52.000000000 +0100 ++++ libidn2-0.11/build-aux/snippet/warn-on-use.h 2016-11-24 21:38:50.615573725 +0100 +@@ -1,5 +1,5 @@ + /* A C macro for emitting warnings if a function is used. +- Copyright (C) 2010-2014 Free Software Foundation, Inc. ++ Copyright (C) 2010-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published +diff -urN libidn2-0.11.pristine/build-aux/snippet/warn-on-use.h~ libidn2-0.11/build-aux/snippet/warn-on-use.h~ +--- libidn2-0.11.pristine/build-aux/snippet/warn-on-use.h~ 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/build-aux/snippet/warn-on-use.h~ 2016-11-03 11:30:52.000000000 +0100 +@@ -0,0 +1,109 @@ ++/* A C macro for emitting warnings if a function is used. ++ Copyright (C) 2010-2014 Free Software Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify it ++ under the terms of the GNU General Public License as published ++ by the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++/* _GL_WARN_ON_USE (function, "literal string") issues a declaration ++ for FUNCTION which will then trigger a compiler warning containing ++ the text of "literal string" anywhere that function is called, if ++ supported by the compiler. If the compiler does not support this ++ feature, the macro expands to an unused extern declaration. ++ ++ This macro is useful for marking a function as a potential ++ portability trap, with the intent that "literal string" include ++ instructions on the replacement function that should be used ++ instead. However, one of the reasons that a function is a ++ portability trap is if it has the wrong signature. Declaring ++ FUNCTION with a different signature in C is a compilation error, so ++ this macro must use the same type as any existing declaration so ++ that programs that avoid the problematic FUNCTION do not fail to ++ compile merely because they included a header that poisoned the ++ function. But this implies that _GL_WARN_ON_USE is only safe to ++ use if FUNCTION is known to already have a declaration. Use of ++ this macro implies that there must not be any other macro hiding ++ the declaration of FUNCTION; but undefining FUNCTION first is part ++ of the poisoning process anyway (although for symbols that are ++ provided only via a macro, the result is a compilation error rather ++ than a warning containing "literal string"). Also note that in ++ C++, it is only safe to use if FUNCTION has no overloads. ++ ++ For an example, it is possible to poison 'getline' by: ++ - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], ++ [getline]) in configure.ac, which potentially defines ++ HAVE_RAW_DECL_GETLINE ++ - adding this code to a header that wraps the system : ++ #undef getline ++ #if HAVE_RAW_DECL_GETLINE ++ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" ++ "not universally present; use the gnulib module getline"); ++ #endif ++ ++ It is not possible to directly poison global variables. But it is ++ possible to write a wrapper accessor function, and poison that ++ (less common usage, like &environ, will cause a compilation error ++ rather than issue the nice warning, but the end result of informing ++ the developer about their portability problem is still achieved): ++ #if HAVE_RAW_DECL_ENVIRON ++ static char ***rpl_environ (void) { return &environ; } ++ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); ++ # undef environ ++ # define environ (*rpl_environ ()) ++ #endif ++ */ ++#ifndef _GL_WARN_ON_USE ++ ++# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) ++/* A compiler attribute is available in gcc versions 4.3.0 and later. */ ++# define _GL_WARN_ON_USE(function, message) \ ++extern __typeof__ (function) function __attribute__ ((__warning__ (message))) ++# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING ++/* Verify the existence of the function. */ ++# define _GL_WARN_ON_USE(function, message) \ ++extern __typeof__ (function) function ++# else /* Unsupported. */ ++# define _GL_WARN_ON_USE(function, message) \ ++_GL_WARN_EXTERN_C int _gl_warn_on_use ++# endif ++#endif ++ ++/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") ++ is like _GL_WARN_ON_USE (function, "string"), except that the function is ++ declared with the given prototype, consisting of return type, parameters, ++ and attributes. ++ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does ++ not work in this case. */ ++#ifndef _GL_WARN_ON_USE_CXX ++# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) ++# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ ++extern rettype function parameters_and_attributes \ ++ __attribute__ ((__warning__ (msg))) ++# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING ++/* Verify the existence of the function. */ ++# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ ++extern rettype function parameters_and_attributes ++# else /* Unsupported. */ ++# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ ++_GL_WARN_EXTERN_C int _gl_warn_on_use ++# endif ++#endif ++ ++/* _GL_WARN_EXTERN_C declaration; ++ performs the declaration with C linkage. */ ++#ifndef _GL_WARN_EXTERN_C ++# if defined __cplusplus ++# define _GL_WARN_EXTERN_C extern "C" ++# else ++# define _GL_WARN_EXTERN_C extern ++# endif ++#endif +diff -urN libidn2-0.11.pristine/src/aclocal.m4 libidn2-0.11/src/aclocal.m4 +--- libidn2-0.11.pristine/src/aclocal.m4 2016-11-03 11:35:16.000000000 +0100 ++++ libidn2-0.11/src/aclocal.m4 2016-11-24 21:39:09.968252603 +0100 +@@ -1,6 +1,6 @@ +-# generated automatically by aclocal 1.14.1 -*- Autoconf -*- ++# generated automatically by aclocal 1.15 -*- Autoconf -*- + +-# Copyright (C) 1996-2013 Free Software Foundation, Inc. ++# Copyright (C) 1996-2014 Free Software Foundation, Inc. + + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -20,19 +20,19 @@ + If you have problems, you may need to regenerate the build system entirely. + To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +-# po.m4 serial 22 (gettext-0.19) +-dnl Copyright (C) 1995-2014 Free Software Foundation, Inc. ++# po.m4 serial 24 (gettext-0.19) ++dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + dnl +-dnl This file can can be used in projects which are not available under ++dnl This file can be used in projects which are not available under + dnl the GNU General Public License or the GNU Library General Public + dnl License but which still want to provide support for the GNU gettext + dnl functionality. + dnl Please note that the actual code of the GNU gettext library is covered + dnl by the GNU Library General Public License, and the rest of the GNU +-dnl gettext package package is covered by the GNU General Public License. ++dnl gettext package is covered by the GNU General Public License. + dnl They are *not* in the public domain. + + dnl Authors: +@@ -474,7 +474,7 @@ + XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1" + ]) + +-# Copyright (C) 2002-2013 Free Software Foundation, Inc. ++# Copyright (C) 2002-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -486,10 +486,10 @@ + # generated from the m4 files accompanying Automake X.Y. + # (This private macro should not be called outside this file.) + AC_DEFUN([AM_AUTOMAKE_VERSION], +-[am__api_version='1.14' ++[am__api_version='1.15' + dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to + dnl require some minimum version. Point them to the right macro. +-m4_if([$1], [1.14.1], [], ++m4_if([$1], [1.15], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl + ]) + +@@ -505,12 +505,12 @@ + # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. + # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +-[AM_AUTOMAKE_VERSION([1.14.1])dnl ++[AM_AUTOMAKE_VERSION([1.15])dnl + m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl + _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +-# Copyright (C) 2011-2013 Free Software Foundation, Inc. ++# Copyright (C) 2011-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -572,7 +572,7 @@ + + # AM_AUX_DIR_EXPAND -*- Autoconf -*- + +-# Copyright (C) 2001-2013 Free Software Foundation, Inc. ++# Copyright (C) 2001-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -624,7 +624,7 @@ + + # AM_CONDITIONAL -*- Autoconf -*- + +-# Copyright (C) 1997-2013 Free Software Foundation, Inc. ++# Copyright (C) 1997-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -655,7 +655,7 @@ + Usually this means the macro was only invoked conditionally.]]) + fi])]) + +-# Copyright (C) 1999-2013 Free Software Foundation, Inc. ++# Copyright (C) 1999-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -846,7 +846,7 @@ + + # Generate code to set up dependency tracking. -*- Autoconf -*- + +-# Copyright (C) 1999-2013 Free Software Foundation, Inc. ++# Copyright (C) 1999-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -922,7 +922,7 @@ + + # Do all the work for Automake. -*- Autoconf -*- + +-# Copyright (C) 1996-2013 Free Software Foundation, Inc. ++# Copyright (C) 1996-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -1012,8 +1012,8 @@ + # + # + AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +-# We need awk for the "check" target. The system "awk" is bad on +-# some platforms. ++# We need awk for the "check" target (and possibly the TAP driver). The ++# system "awk" is bad on some platforms. + AC_REQUIRE([AC_PROG_AWK])dnl + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AM_SET_LEADING_DOT])dnl +@@ -1087,6 +1087,9 @@ + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi + fi ++dnl The trailing newline in this macro's definition is deliberate, for ++dnl backward compatibility and to allow trailing 'dnl'-style comments ++dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. + ]) + + dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +@@ -1116,7 +1119,7 @@ + done + echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +-# Copyright (C) 2001-2013 Free Software Foundation, Inc. ++# Copyright (C) 2001-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -1127,7 +1130,7 @@ + # Define $install_sh. + AC_DEFUN([AM_PROG_INSTALL_SH], + [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +-if test x"${install_sh}" != xset; then ++if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; +@@ -1137,7 +1140,7 @@ + fi + AC_SUBST([install_sh])]) + +-# Copyright (C) 2003-2013 Free Software Foundation, Inc. ++# Copyright (C) 2003-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -1158,7 +1161,7 @@ + + # Check to see how 'make' treats includes. -*- Autoconf -*- + +-# Copyright (C) 2001-2013 Free Software Foundation, Inc. ++# Copyright (C) 2001-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -1208,7 +1211,7 @@ + + # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +-# Copyright (C) 1997-2013 Free Software Foundation, Inc. ++# Copyright (C) 1997-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -1247,7 +1250,7 @@ + + # Helper functions for option handling. -*- Autoconf -*- + +-# Copyright (C) 2001-2013 Free Software Foundation, Inc. ++# Copyright (C) 2001-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -1276,7 +1279,7 @@ + AC_DEFUN([_AM_IF_OPTION], + [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +-# Copyright (C) 1999-2013 Free Software Foundation, Inc. ++# Copyright (C) 1999-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -1323,7 +1326,7 @@ + # For backward compatibility. + AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +-# Copyright (C) 2001-2013 Free Software Foundation, Inc. ++# Copyright (C) 2001-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -1342,7 +1345,7 @@ + + # Check to make sure that the build environment is sane. -*- Autoconf -*- + +-# Copyright (C) 1996-2013 Free Software Foundation, Inc. ++# Copyright (C) 1996-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -1423,7 +1426,7 @@ + rm -f conftest.file + ]) + +-# Copyright (C) 2009-2013 Free Software Foundation, Inc. ++# Copyright (C) 2009-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -1483,7 +1486,7 @@ + _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl + ]) + +-# Copyright (C) 2001-2013 Free Software Foundation, Inc. ++# Copyright (C) 2001-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -1511,7 +1514,7 @@ + INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +-# Copyright (C) 2006-2013 Free Software Foundation, Inc. ++# Copyright (C) 2006-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -1530,7 +1533,7 @@ + + # Check how to create a tarball. -*- Autoconf -*- + +-# Copyright (C) 2004-2013 Free Software Foundation, Inc. ++# Copyright (C) 2004-2014 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -1664,22 +1667,30 @@ + m4_include([gl/m4/00gnulib.m4]) + m4_include([gl/m4/absolute-header.m4]) + m4_include([gl/m4/configmake.m4]) ++m4_include([gl/m4/dirname.m4]) ++m4_include([gl/m4/double-slash-root.m4]) + m4_include([gl/m4/errno_h.m4]) + m4_include([gl/m4/error.m4]) + m4_include([gl/m4/extensions.m4]) + m4_include([gl/m4/extern-inline.m4]) ++m4_include([gl/m4/getopt.m4]) ++m4_include([gl/m4/getprogname.m4]) + m4_include([gl/m4/gnulib-common.m4]) + m4_include([gl/m4/gnulib-comp.m4]) + m4_include([gl/m4/include_next.m4]) ++m4_include([gl/m4/malloc.m4]) + m4_include([gl/m4/manywarnings.m4]) + m4_include([gl/m4/msvc-inval.m4]) + m4_include([gl/m4/msvc-nothrow.m4]) ++m4_include([gl/m4/nocrash.m4]) + m4_include([gl/m4/off_t.m4]) + m4_include([gl/m4/onceonly.m4]) + m4_include([gl/m4/ssize_t.m4]) + m4_include([gl/m4/stdarg.m4]) ++m4_include([gl/m4/stdbool.m4]) + m4_include([gl/m4/stddef_h.m4]) + m4_include([gl/m4/stdio_h.m4]) ++m4_include([gl/m4/stdlib_h.m4]) + m4_include([gl/m4/strerror.m4]) + m4_include([gl/m4/string_h.m4]) + m4_include([gl/m4/sys_socket_h.m4]) +diff -urN libidn2-0.11.pristine/src/config.h.in libidn2-0.11/src/config.h.in +--- libidn2-0.11.pristine/src/config.h.in 2016-11-03 11:35:37.000000000 +0100 ++++ libidn2-0.11/src/config.h.in 2016-11-24 21:39:10.953287157 +0100 +@@ -1,9 +1,16 @@ + /* config.h.in. Generated from configure.ac by autoheader. */ + ++/* Define to 1 if // is a file system root distinct from /. */ ++#undef DOUBLE_SLASH_IS_DISTINCT_ROOT ++ + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fscanf shall be considered present. */ + #undef GNULIB_FSCANF + ++/* Define to 1 if printf and friends should be labeled with attribute ++ "__gnu_printf__" instead of "__printf__" */ ++#undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU ++ + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module scanf shall be considered present. */ + #undef GNULIB_SCANF +@@ -12,9 +19,19 @@ + whether the gnulib module strerror shall be considered present. */ + #undef GNULIB_STRERROR + ++/* Define to 1 when the gnulib module getopt-gnu should be tested. */ ++#undef GNULIB_TEST_GETOPT_GNU ++ ++/* Define to 1 when the gnulib module malloc-posix should be tested. */ ++#undef GNULIB_TEST_MALLOC_POSIX ++ + /* Define to 1 when the gnulib module strerror should be tested. */ + #undef GNULIB_TEST_STRERROR + ++/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. ++ */ ++#undef HAVE_DECL_GETENV ++ + /* Define to 1 if you have the declaration of `program_invocation_name', and + to 0 if you don't. */ + #undef HAVE_DECL_PROGRAM_INVOCATION_NAME +@@ -27,12 +44,31 @@ + don't. */ + #undef HAVE_DECL_STRERROR_R + ++/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. ++ */ ++#undef HAVE_DECL___ARGV ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_DLFCN_H + ++/* Define to 1 if you have the 'getexecname' function. */ ++#undef HAVE_GETEXECNAME ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_GETOPT_H ++ ++/* Define to 1 if you have the `getopt_long_only' function. */ ++#undef HAVE_GETOPT_LONG_ONLY ++ ++/* Define to 1 if you have the 'getprogname' function. */ ++#undef HAVE_GETPROGNAME ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_INTTYPES_H + ++/* Define if the 'malloc' function is POSIX compliant. */ ++#undef HAVE_MALLOC_POSIX ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_MEMORY_H + +@@ -40,6 +76,13 @@ + concept. */ + #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER + ++/* Define to 1 if atoll is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_ATOLL ++ ++/* Define to 1 if canonicalize_file_name is declared even after undefining ++ macros. */ ++#undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME ++ + /* Define to 1 if chdir is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_CHDIR + +@@ -121,6 +164,9 @@ + /* Define to 1 if getline is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_GETLINE + ++/* Define to 1 if getloadavg is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_GETLOADAVG ++ + /* Define to 1 if getlogin is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_GETLOGIN + +@@ -133,12 +179,24 @@ + /* Define to 1 if gets is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_GETS + ++/* Define to 1 if getsubopt is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_GETSUBOPT ++ + /* Define to 1 if getusershell is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_GETUSERSHELL + ++/* Define to 1 if grantpt is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_GRANTPT ++ + /* Define to 1 if group_member is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_GROUP_MEMBER + ++/* Define to 1 if initstate is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_INITSTATE ++ ++/* Define to 1 if initstate_r is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_INITSTATE_R ++ + /* Define to 1 if isatty is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_ISATTY + +@@ -163,6 +221,21 @@ + /* Define to 1 if memrchr is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_MEMRCHR + ++/* Define to 1 if mkdtemp is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_MKDTEMP ++ ++/* Define to 1 if mkostemp is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_MKOSTEMP ++ ++/* Define to 1 if mkostemps is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_MKOSTEMPS ++ ++/* Define to 1 if mkstemp is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_MKSTEMP ++ ++/* Define to 1 if mkstemps is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_MKSTEMPS ++ + /* Define to 1 if pclose is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_PCLOSE + +@@ -175,12 +248,30 @@ + /* Define to 1 if popen is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_POPEN + ++/* Define to 1 if posix_openpt is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_POSIX_OPENPT ++ + /* Define to 1 if pread is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_PREAD + ++/* Define to 1 if ptsname is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_PTSNAME ++ ++/* Define to 1 if ptsname_r is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_PTSNAME_R ++ + /* Define to 1 if pwrite is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_PWRITE + ++/* Define to 1 if qsort_r is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_QSORT_R ++ ++/* Define to 1 if random is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_RANDOM ++ ++/* Define to 1 if random_r is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_RANDOM_R ++ + /* Define to 1 if rawmemchr is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_RAWMEMCHR + +@@ -190,15 +281,33 @@ + /* Define to 1 if readlinkat is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_READLINKAT + ++/* Define to 1 if realpath is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_REALPATH ++ + /* Define to 1 if renameat is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_RENAMEAT + + /* Define to 1 if rmdir is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_RMDIR + ++/* Define to 1 if rpmatch is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_RPMATCH ++ ++/* Define to 1 if secure_getenv is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_SECURE_GETENV ++ ++/* Define to 1 if setenv is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_SETENV ++ + /* Define to 1 if sethostname is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_SETHOSTNAME + ++/* Define to 1 if setstate is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_SETSTATE ++ ++/* Define to 1 if setstate_r is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_SETSTATE_R ++ + /* Define to 1 if setusershell is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_SETUSERSHELL + +@@ -208,6 +317,12 @@ + /* Define to 1 if snprintf is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_SNPRINTF + ++/* Define to 1 if srandom is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_SRANDOM ++ ++/* Define to 1 if srandom_r is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_SRANDOM_R ++ + /* Define to 1 if stpcpy is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_STPCPY + +@@ -244,9 +359,18 @@ + /* Define to 1 if strsignal is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_STRSIGNAL + ++/* Define to 1 if strtod is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_STRTOD ++ + /* Define to 1 if strtok_r is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_STRTOK_R + ++/* Define to 1 if strtoll is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_STRTOLL ++ ++/* Define to 1 if strtoull is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_STRTOULL ++ + /* Define to 1 if strverscmp is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_STRVERSCMP + +@@ -268,6 +392,12 @@ + /* Define to 1 if unlinkat is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_UNLINKAT + ++/* Define to 1 if unlockpt is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_UNLOCKPT ++ ++/* Define to 1 if unsetenv is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL_UNSETENV ++ + /* Define to 1 if usleep is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_USLEEP + +@@ -277,6 +407,9 @@ + /* Define to 1 if vsnprintf is declared even after undefining macros. */ + #undef HAVE_RAW_DECL_VSNPRINTF + ++/* Define to 1 if _Exit is declared even after undefining macros. */ ++#undef HAVE_RAW_DECL__EXIT ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_STDINT_H + +@@ -304,12 +437,18 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_UNISTD_H + ++/* Define if you have a global __progname variable */ ++#undef HAVE_VAR___PROGNAME ++ + /* Define if you have the 'wchar_t' type. */ + #undef HAVE_WCHAR_T + + /* Define to 1 if you have the header file. */ + #undef HAVE_WINSOCK2_H + ++/* Define to 1 if the system has the type `_Bool'. */ ++#undef HAVE__BOOL ++ + /* Define to 1 if you have the '_set_invalid_parameter_handler' function. */ + #undef HAVE__SET_INVALID_PARAMETER_HANDLER + +@@ -317,6 +456,12 @@ + */ + #undef LT_OBJDIR + ++/* Use GNU style printf and scanf. */ ++#ifndef __USE_MINGW_ANSI_STDIO ++# undef __USE_MINGW_ANSI_STDIO ++#endif ++ ++ + /* Name of package */ + #undef PACKAGE + +@@ -360,7 +505,7 @@ + #ifndef _ALL_SOURCE + # undef _ALL_SOURCE + #endif +-/* Enable general extensions on OS X. */ ++/* Enable general extensions on macOS. */ + #ifndef _DARWIN_C_SOURCE + # undef _DARWIN_C_SOURCE + #endif +@@ -372,6 +517,34 @@ + #ifndef _POSIX_PTHREAD_SEMANTICS + # undef _POSIX_PTHREAD_SEMANTICS + #endif ++/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ ++#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ ++# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ ++#endif ++/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ ++#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ ++# undef __STDC_WANT_IEC_60559_BFP_EXT__ ++#endif ++/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ ++#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ ++# undef __STDC_WANT_IEC_60559_DFP_EXT__ ++#endif ++/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ ++#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ ++# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ ++#endif ++/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ ++#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ ++# undef __STDC_WANT_IEC_60559_TYPES_EXT__ ++#endif ++/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ ++#ifndef __STDC_WANT_LIB_EXT2__ ++# undef __STDC_WANT_LIB_EXT2__ ++#endif ++/* Enable extensions specified by ISO/IEC 24747:2009. */ ++#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ ++# undef __STDC_WANT_MATH_SPEC_FUNCS__ ++#endif + /* Enable extensions on HP NonStop. */ + #ifndef _TANDEM_SOURCE + # undef _TANDEM_SOURCE +@@ -418,6 +591,10 @@ + /* Define to 1 if you need to in order for 'stat' and other things to work. */ + #undef _POSIX_SOURCE + ++/* Define to rpl_ if the getopt replacement functions and variables should be ++ used. */ ++#undef __GETOPT_PREFIX ++ + /* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see +@@ -464,6 +641,7 @@ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ ++ && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) + # define _GL_INLINE inline +@@ -484,17 +662,19 @@ + # define _GL_EXTERN_INLINE static _GL_UNUSED + #endif + +-#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) ++/* In GCC 4.6 (inclusive) to 5.1 (exclusive), ++ suppress bogus "no previous prototype for 'FOO'" ++ and "no previous declaration for 'FOO'" diagnostics, ++ when FOO is an inline function in the header; see ++ and ++ . */ ++#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ + # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ + # define _GL_INLINE_HEADER_CONST_PRAGMA + # else + # define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") + # endif +- /* Suppress GCC's bogus "no previous prototype for 'FOO'" +- and "no previous declaration for 'FOO'" diagnostics, +- when FOO is an inline function in the header; see +- . */ + # define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ +diff -urN libidn2-0.11.pristine/src/configure libidn2-0.11/src/configure +--- libidn2-0.11.pristine/src/configure 2016-11-03 11:35:19.000000000 +0100 ++++ libidn2-0.11/src/configure 2016-11-24 21:39:10.762280457 +0100 +@@ -631,8 +631,10 @@ + # include + #endif" + +-gl_func_list= ++gl_getopt_required=POSIX + gl_header_list= ++gl_getopt_required=POSIX ++gl_func_list= + ac_subst_vars='gltests_LTLIBOBJS + gltests_LIBOBJS + gl_LTLIBOBJS +@@ -652,127 +654,6 @@ + NEXT_AS_FIRST_DIRECTIVE_STRING_H + NEXT_STRING_H + HAVE_WINSOCK2_H +-UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS +-UNISTD_H_HAVE_WINSOCK2_H +-REPLACE_WRITE +-REPLACE_USLEEP +-REPLACE_UNLINKAT +-REPLACE_UNLINK +-REPLACE_TTYNAME_R +-REPLACE_SYMLINK +-REPLACE_SLEEP +-REPLACE_RMDIR +-REPLACE_READLINK +-REPLACE_READ +-REPLACE_PWRITE +-REPLACE_PREAD +-REPLACE_LSEEK +-REPLACE_LINKAT +-REPLACE_LINK +-REPLACE_LCHOWN +-REPLACE_ISATTY +-REPLACE_GETPAGESIZE +-REPLACE_GETGROUPS +-REPLACE_GETLOGIN_R +-REPLACE_GETDTABLESIZE +-REPLACE_GETDOMAINNAME +-REPLACE_GETCWD +-REPLACE_FTRUNCATE +-REPLACE_FCHOWNAT +-REPLACE_DUP2 +-REPLACE_DUP +-REPLACE_CLOSE +-REPLACE_CHOWN +-HAVE_SYS_PARAM_H +-HAVE_OS_H +-HAVE_DECL_TTYNAME_R +-HAVE_DECL_SETHOSTNAME +-HAVE_DECL_GETUSERSHELL +-HAVE_DECL_GETPAGESIZE +-HAVE_DECL_GETLOGIN_R +-HAVE_DECL_GETDOMAINNAME +-HAVE_DECL_FDATASYNC +-HAVE_DECL_FCHDIR +-HAVE_DECL_ENVIRON +-HAVE_USLEEP +-HAVE_UNLINKAT +-HAVE_SYMLINKAT +-HAVE_SYMLINK +-HAVE_SLEEP +-HAVE_SETHOSTNAME +-HAVE_READLINKAT +-HAVE_READLINK +-HAVE_PWRITE +-HAVE_PREAD +-HAVE_PIPE2 +-HAVE_PIPE +-HAVE_LINKAT +-HAVE_LINK +-HAVE_LCHOWN +-HAVE_GROUP_MEMBER +-HAVE_GETPAGESIZE +-HAVE_GETLOGIN +-HAVE_GETHOSTNAME +-HAVE_GETGROUPS +-HAVE_GETDTABLESIZE +-HAVE_FTRUNCATE +-HAVE_FSYNC +-HAVE_FDATASYNC +-HAVE_FCHOWNAT +-HAVE_FCHDIR +-HAVE_FACCESSAT +-HAVE_EUIDACCESS +-HAVE_DUP3 +-HAVE_DUP2 +-HAVE_CHOWN +-GNULIB_WRITE +-GNULIB_USLEEP +-GNULIB_UNLINKAT +-GNULIB_UNLINK +-GNULIB_UNISTD_H_SIGPIPE +-GNULIB_UNISTD_H_NONBLOCKING +-GNULIB_TTYNAME_R +-GNULIB_SYMLINKAT +-GNULIB_SYMLINK +-GNULIB_SLEEP +-GNULIB_SETHOSTNAME +-GNULIB_RMDIR +-GNULIB_READLINKAT +-GNULIB_READLINK +-GNULIB_READ +-GNULIB_PWRITE +-GNULIB_PREAD +-GNULIB_PIPE2 +-GNULIB_PIPE +-GNULIB_LSEEK +-GNULIB_LINKAT +-GNULIB_LINK +-GNULIB_LCHOWN +-GNULIB_ISATTY +-GNULIB_GROUP_MEMBER +-GNULIB_GETUSERSHELL +-GNULIB_GETPAGESIZE +-GNULIB_GETLOGIN_R +-GNULIB_GETLOGIN +-GNULIB_GETHOSTNAME +-GNULIB_GETGROUPS +-GNULIB_GETDTABLESIZE +-GNULIB_GETDOMAINNAME +-GNULIB_GETCWD +-GNULIB_FTRUNCATE +-GNULIB_FSYNC +-GNULIB_FDATASYNC +-GNULIB_FCHOWNAT +-GNULIB_FCHDIR +-GNULIB_FACCESSAT +-GNULIB_EUIDACCESS +-GNULIB_ENVIRON +-GNULIB_DUP3 +-GNULIB_DUP2 +-GNULIB_DUP +-GNULIB_CLOSE +-GNULIB_CHOWN +-GNULIB_CHDIR + UNDEFINE_STRTOK_R + REPLACE_STRTOK_R + REPLACE_STRSIGNAL +@@ -846,6 +727,8 @@ + GNULIB_MEMCHR + GNULIB_FFSLL + GNULIB_FFSL ++NEXT_AS_FIRST_DIRECTIVE_STDLIB_H ++NEXT_STDLIB_H + NEXT_AS_FIRST_DIRECTIVE_STDIO_H + NEXT_STDIO_H + REPLACE_VSPRINTF +@@ -955,15 +838,227 @@ + GL_GENERATE_STDDEF_H_TRUE + STDDEF_H + HAVE_WCHAR_T ++HAVE_MAX_ALIGN_T + REPLACE_NULL ++HAVE__BOOL ++GL_GENERATE_STDBOOL_H_FALSE ++GL_GENERATE_STDBOOL_H_TRUE ++STDBOOL_H + GL_GENERATE_STDARG_H_FALSE + GL_GENERATE_STDARG_H_TRUE + STDARG_H + NEXT_AS_FIRST_DIRECTIVE_STDARG_H + NEXT_STDARG_H + HAVE_MSVC_INVALID_PARAMETER_HANDLER ++REPLACE_WCTOMB ++REPLACE_UNSETENV ++REPLACE_STRTOD ++REPLACE_SETENV ++REPLACE_REALPATH ++REPLACE_REALLOC ++REPLACE_RANDOM_R ++REPLACE_QSORT_R ++REPLACE_PUTENV ++REPLACE_PTSNAME_R ++REPLACE_PTSNAME ++REPLACE_MKSTEMP ++REPLACE_MBTOWC ++REPLACE_MALLOC ++REPLACE_CANONICALIZE_FILE_NAME ++REPLACE_CALLOC ++HAVE_DECL_UNSETENV ++HAVE_UNLOCKPT ++HAVE_SYS_LOADAVG_H ++HAVE_STRUCT_RANDOM_DATA ++HAVE_STRTOULL ++HAVE_STRTOLL ++HAVE_STRTOD ++HAVE_DECL_SETENV ++HAVE_SETENV ++HAVE_SECURE_GETENV ++HAVE_RPMATCH ++HAVE_REALPATH ++HAVE_RANDOM_R ++HAVE_RANDOM_H ++HAVE_RANDOM ++HAVE_QSORT_R ++HAVE_PTSNAME_R ++HAVE_PTSNAME ++HAVE_POSIX_OPENPT ++HAVE_MKSTEMPS ++HAVE_MKSTEMP ++HAVE_MKOSTEMPS ++HAVE_MKOSTEMP ++HAVE_MKDTEMP ++HAVE_GRANTPT ++HAVE_GETSUBOPT ++HAVE_DECL_GETLOADAVG ++HAVE_CANONICALIZE_FILE_NAME ++HAVE_ATOLL ++HAVE__EXIT ++GNULIB_WCTOMB ++GNULIB_UNSETENV ++GNULIB_UNLOCKPT ++GNULIB_SYSTEM_POSIX ++GNULIB_STRTOULL ++GNULIB_STRTOLL ++GNULIB_STRTOD ++GNULIB_SETENV ++GNULIB_SECURE_GETENV ++GNULIB_RPMATCH ++GNULIB_REALPATH ++GNULIB_REALLOC_POSIX ++GNULIB_RANDOM_R ++GNULIB_RANDOM ++GNULIB_QSORT_R ++GNULIB_PUTENV ++GNULIB_PTSNAME_R ++GNULIB_PTSNAME ++GNULIB_POSIX_OPENPT ++GNULIB_MKSTEMPS ++GNULIB_MKSTEMP ++GNULIB_MKOSTEMPS ++GNULIB_MKOSTEMP ++GNULIB_MKDTEMP ++GNULIB_MBTOWC ++GNULIB_MALLOC_POSIX ++GNULIB_GRANTPT ++GNULIB_GETSUBOPT ++GNULIB_GETLOADAVG ++GNULIB_CANONICALIZE_FILE_NAME ++GNULIB_CALLOC_POSIX ++GNULIB_ATOLL ++GNULIB__EXIT + LTLIBINTL + LIBINTL ++GNULIB_GL_UNISTD_H_GETOPT ++GETOPT_H ++HAVE_GETOPT_H ++NEXT_AS_FIRST_DIRECTIVE_GETOPT_H ++NEXT_GETOPT_H ++UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS ++UNISTD_H_HAVE_WINSOCK2_H ++REPLACE_WRITE ++REPLACE_USLEEP ++REPLACE_UNLINKAT ++REPLACE_UNLINK ++REPLACE_TTYNAME_R ++REPLACE_SYMLINKAT ++REPLACE_SYMLINK ++REPLACE_SLEEP ++REPLACE_RMDIR ++REPLACE_READLINKAT ++REPLACE_READLINK ++REPLACE_READ ++REPLACE_PWRITE ++REPLACE_PREAD ++REPLACE_LSEEK ++REPLACE_LINKAT ++REPLACE_LINK ++REPLACE_LCHOWN ++REPLACE_ISATTY ++REPLACE_GETPAGESIZE ++REPLACE_GETGROUPS ++REPLACE_GETLOGIN_R ++REPLACE_GETDTABLESIZE ++REPLACE_GETDOMAINNAME ++REPLACE_GETCWD ++REPLACE_FTRUNCATE ++REPLACE_FCHOWNAT ++REPLACE_DUP2 ++REPLACE_DUP ++REPLACE_CLOSE ++REPLACE_CHOWN ++HAVE_SYS_PARAM_H ++HAVE_OS_H ++HAVE_DECL_TTYNAME_R ++HAVE_DECL_SETHOSTNAME ++HAVE_DECL_GETUSERSHELL ++HAVE_DECL_GETPAGESIZE ++HAVE_DECL_GETLOGIN_R ++HAVE_DECL_GETDOMAINNAME ++HAVE_DECL_FDATASYNC ++HAVE_DECL_FCHDIR ++HAVE_DECL_ENVIRON ++HAVE_USLEEP ++HAVE_UNLINKAT ++HAVE_SYMLINKAT ++HAVE_SYMLINK ++HAVE_SLEEP ++HAVE_SETHOSTNAME ++HAVE_READLINKAT ++HAVE_READLINK ++HAVE_PWRITE ++HAVE_PREAD ++HAVE_PIPE2 ++HAVE_PIPE ++HAVE_LINKAT ++HAVE_LINK ++HAVE_LCHOWN ++HAVE_GROUP_MEMBER ++HAVE_GETPAGESIZE ++HAVE_GETLOGIN ++HAVE_GETHOSTNAME ++HAVE_GETGROUPS ++HAVE_GETDTABLESIZE ++HAVE_FTRUNCATE ++HAVE_FSYNC ++HAVE_FDATASYNC ++HAVE_FCHOWNAT ++HAVE_FCHDIR ++HAVE_FACCESSAT ++HAVE_EUIDACCESS ++HAVE_DUP3 ++HAVE_DUP2 ++HAVE_CHOWN ++GNULIB_WRITE ++GNULIB_USLEEP ++GNULIB_UNLINKAT ++GNULIB_UNLINK ++GNULIB_UNISTD_H_SIGPIPE ++GNULIB_UNISTD_H_NONBLOCKING ++GNULIB_TTYNAME_R ++GNULIB_SYMLINKAT ++GNULIB_SYMLINK ++GNULIB_SLEEP ++GNULIB_SETHOSTNAME ++GNULIB_RMDIR ++GNULIB_READLINKAT ++GNULIB_READLINK ++GNULIB_READ ++GNULIB_PWRITE ++GNULIB_PREAD ++GNULIB_PIPE2 ++GNULIB_PIPE ++GNULIB_LSEEK ++GNULIB_LINKAT ++GNULIB_LINK ++GNULIB_LCHOWN ++GNULIB_ISATTY ++GNULIB_GROUP_MEMBER ++GNULIB_GETUSERSHELL ++GNULIB_GETPAGESIZE ++GNULIB_GETLOGIN_R ++GNULIB_GETLOGIN ++GNULIB_GETHOSTNAME ++GNULIB_GETGROUPS ++GNULIB_GETDTABLESIZE ++GNULIB_GETDOMAINNAME ++GNULIB_GETCWD ++GNULIB_FTRUNCATE ++GNULIB_FSYNC ++GNULIB_FDATASYNC ++GNULIB_FCHOWNAT ++GNULIB_FCHDIR ++GNULIB_FACCESSAT ++GNULIB_EUIDACCESS ++GNULIB_ENVIRON ++GNULIB_DUP3 ++GNULIB_DUP2 ++GNULIB_DUP ++GNULIB_CLOSE ++GNULIB_CHOWN ++GNULIB_CHDIR + EOVERFLOW_VALUE + EOVERFLOW_HIDDEN + ENOLINK_VALUE +@@ -1008,9 +1103,9 @@ + build_cpu + build + LIBTOOL +-ac_ct_AR + RANLIB + ARFLAGS ++ac_ct_AR + AR + EGREP + GREP +@@ -2777,6 +2872,10 @@ + >$cache_file + fi + ++gl_getopt_required=GNU ++gl_header_list="$gl_header_list getopt.h" ++gl_func_list="$gl_func_list getprogname" ++gl_func_list="$gl_func_list getexecname" + gl_func_list="$gl_func_list _set_invalid_parameter_handler" + gl_header_list="$gl_header_list sys/socket.h" + gl_header_list="$gl_header_list unistd.h" +@@ -2881,7 +2980,7 @@ + ac_config_headers="$ac_config_headers config.h" + + +-am__api_version='1.14' ++am__api_version='1.15' + + # Find a good install program. We prefer a C program (faster), + # so one script is as good as another. But avoid the broken or +@@ -3073,7 +3172,7 @@ + $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} + fi + +-if test x"${install_sh}" != xset; then ++if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; +@@ -3401,8 +3500,8 @@ + # + mkdir_p='$(MKDIR_P)' + +-# We need awk for the "check" target. The system "awk" is bad on +-# some platforms. ++# We need awk for the "check" target (and possibly the TAP driver). The ++# system "awk" is bad on some platforms. + # Always define AMTAR for backward compatibility. Yes, it's still used + # in the wild :-( We should find a proper way to deprecate it ... + AMTAR='$${TAR-tar}' +@@ -4769,247 +4868,9 @@ + EGREP="$ac_cv_path_EGREP" + + +- +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 +-$as_echo_n "checking for Minix Amsterdam compiler... " >&6; } +-if ${gl_cv_c_amsterdam_compiler+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-#ifdef __ACK__ +-Amsterdam +-#endif +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "Amsterdam" >/dev/null 2>&1; then : +- gl_cv_c_amsterdam_compiler=yes +-else +- gl_cv_c_amsterdam_compiler=no +-fi +-rm -f conftest* +- +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 +-$as_echo "$gl_cv_c_amsterdam_compiler" >&6; } +- if test -z "$AR"; then +- if test $gl_cv_c_amsterdam_compiler = yes; then +- AR='cc -c.a' +- if test -z "$ARFLAGS"; then +- ARFLAGS='-o' +- fi +- else +- if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if ${ac_cv_prog_AR+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- if test -n "$AR"; then +- ac_cv_prog_AR="$AR" # Let the user override the test. +-else +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +-fi +-fi +-AR=$ac_cv_prog_AR +-if test -n "$AR"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +-$as_echo "$AR" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +-fi +-if test -z "$ac_cv_prog_AR"; then +- ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if ${ac_cv_prog_ac_ct_AR+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- if test -n "$ac_ct_AR"; then +- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +-else +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_ac_ct_AR="ar" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +-fi +-fi +-ac_ct_AR=$ac_cv_prog_ac_ct_AR +-if test -n "$ac_ct_AR"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +-$as_echo "$ac_ct_AR" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- if test "x$ac_ct_AR" = x; then +- AR="ar" +- else +- case $cross_compiling:$ac_tool_warned in +-yes:) +-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +-ac_tool_warned=yes ;; +-esac +- AR=$ac_ct_AR +- fi +-else +- AR="$ac_cv_prog_AR" +-fi +- +- if test -z "$ARFLAGS"; then +- ARFLAGS='cru' +- fi +- fi +- else +- if test -z "$ARFLAGS"; then +- ARFLAGS='cru' +- fi +- fi +- +- +- if test -z "$RANLIB"; then +- if test $gl_cv_c_amsterdam_compiler = yes; then +- RANLIB=':' +- else +- if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if ${ac_cv_prog_RANLIB+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- if test -n "$RANLIB"; then +- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +-else +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +-fi +-fi +-RANLIB=$ac_cv_prog_RANLIB +-if test -n "$RANLIB"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +-$as_echo "$RANLIB" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +-fi +-if test -z "$ac_cv_prog_RANLIB"; then +- ac_ct_RANLIB=$RANLIB +- # Extract the first word of "ranlib", so it can be a program name with args. +-set dummy ranlib; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- if test -n "$ac_ct_RANLIB"; then +- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +-else +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_ac_ct_RANLIB="ranlib" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +-fi +-fi +-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +-if test -n "$ac_ct_RANLIB"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +-$as_echo "$ac_ct_RANLIB" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- if test "x$ac_ct_RANLIB" = x; then +- RANLIB=":" +- else +- case $cross_compiling:$ac_tool_warned in +-yes:) +-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +-ac_tool_warned=yes ;; +-esac +- RANLIB=$ac_ct_RANLIB +- fi +-else +- RANLIB="$ac_cv_prog_RANLIB" +-fi +- +- fi +- fi +- +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +-$as_echo_n "checking for ANSI C header files... " >&6; } +-if ${ac_cv_header_stdc+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 ++$as_echo_n "checking for ANSI C header files... " >&6; } ++if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -5199,6 +5060,20 @@ + + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + ++ $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h ++ ++ $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h ++ ++ $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h ++ ++ $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h ++ ++ $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h ++ ++ $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h ++ ++ $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h ++ + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 +@@ -5256,24 +5131,433 @@ + + + +- case $ac_cv_prog_cc_stdc in #( +- no) : +- ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( +- *) : +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 +-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } +-if ${ac_cv_prog_cc_c99+:} false; then : ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 ++$as_echo_n "checking for Minix Amsterdam compiler... " >&6; } ++if ${gl_cv_c_amsterdam_compiler+:} false; then : + $as_echo_n "(cached) " >&6 + else +- ac_cv_prog_cc_c99=no +-ac_save_CC=$CC +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-#include +-#include +-#include +-#include ++ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#ifdef __ACK__ ++Amsterdam ++#endif ++ ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "Amsterdam" >/dev/null 2>&1; then : ++ gl_cv_c_amsterdam_compiler=yes ++else ++ gl_cv_c_amsterdam_compiler=no ++fi ++rm -f conftest* ++ ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 ++$as_echo "$gl_cv_c_amsterdam_compiler" >&6; } ++ ++ if test $gl_cv_c_amsterdam_compiler = yes; then ++ if test -z "$AR"; then ++ AR='cc -c.a' ++ fi ++ if test -z "$ARFLAGS"; then ++ ARFLAGS='-o' ++ fi ++ else ++ if test -n "$ac_tool_prefix"; then ++ for ac_prog in ar lib "link -lib" ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_AR+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$AR"; then ++ ac_cv_prog_AR="$AR" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++AR=$ac_cv_prog_AR ++if test -n "$AR"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 ++$as_echo "$AR" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++ test -n "$AR" && break ++ done ++fi ++if test -z "$AR"; then ++ ac_ct_AR=$AR ++ for ac_prog in ar lib "link -lib" ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_AR+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_AR"; then ++ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_AR="$ac_prog" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_AR=$ac_cv_prog_ac_ct_AR ++if test -n "$ac_ct_AR"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 ++$as_echo "$ac_ct_AR" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++ test -n "$ac_ct_AR" && break ++done ++ ++ if test "x$ac_ct_AR" = x; then ++ AR="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ AR=$ac_ct_AR ++ fi ++fi ++ ++: ${AR=ar} ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 ++$as_echo_n "checking the archiver ($AR) interface... " >&6; } ++if ${am_cv_ar_interface+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++ ++ am_cv_ar_interface=ar ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++int some_variable = 0; ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 ++ (eval $am_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ am_cv_ar_interface=ar ++ else ++ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 ++ (eval $am_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ am_cv_ar_interface=lib ++ else ++ am_cv_ar_interface=unknown ++ fi ++ fi ++ rm -f conftest.lib libconftest.a ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 ++$as_echo "$am_cv_ar_interface" >&6; } ++ ++case $am_cv_ar_interface in ++ar) ++ ;; ++lib) ++ # Microsoft lib, so override with the ar-lib wrapper script. ++ # FIXME: It is wrong to rewrite AR. ++ # But if we don't then we get into trouble of one sort or another. ++ # A longer-term fix would be to have automake use am__AR in this case, ++ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something ++ # similar. ++ AR="$am_aux_dir/ar-lib $AR" ++ ;; ++unknown) ++ as_fn_error $? "could not determine $AR interface" "$LINENO" 5 ++ ;; ++esac ++ ++ fi ++ ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. ++set dummy ${ac_tool_prefix}ar; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_AR+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$AR"; then ++ ac_cv_prog_AR="$AR" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_AR="${ac_tool_prefix}ar" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++AR=$ac_cv_prog_AR ++if test -n "$AR"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 ++$as_echo "$AR" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_AR"; then ++ ac_ct_AR=$AR ++ # Extract the first word of "ar", so it can be a program name with args. ++set dummy ar; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_AR+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_AR"; then ++ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_AR="ar" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_AR=$ac_cv_prog_ac_ct_AR ++if test -n "$ac_ct_AR"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 ++$as_echo "$ac_ct_AR" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_AR" = x; then ++ AR="ar" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ AR=$ac_ct_AR ++ fi ++else ++ AR="$ac_cv_prog_AR" ++fi ++ ++ if test -z "$ARFLAGS"; then ++ ARFLAGS='cr' ++ fi ++ ++ ++ ++ if test -z "$RANLIB"; then ++ if test $gl_cv_c_amsterdam_compiler = yes; then ++ RANLIB=':' ++ else ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. ++set dummy ${ac_tool_prefix}ranlib; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_RANLIB+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$RANLIB"; then ++ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++RANLIB=$ac_cv_prog_RANLIB ++if test -n "$RANLIB"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 ++$as_echo "$RANLIB" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_RANLIB"; then ++ ac_ct_RANLIB=$RANLIB ++ # Extract the first word of "ranlib", so it can be a program name with args. ++set dummy ranlib; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_RANLIB"; then ++ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_RANLIB="ranlib" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB ++if test -n "$ac_ct_RANLIB"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 ++$as_echo "$ac_ct_RANLIB" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_RANLIB" = x; then ++ RANLIB=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ RANLIB=$ac_ct_RANLIB ++ fi ++else ++ RANLIB="$ac_cv_prog_RANLIB" ++fi ++ ++ fi ++ fi ++ ++ ++ case $ac_cv_prog_cc_stdc in #( ++ no) : ++ ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( ++ *) : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 ++$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } ++if ${ac_cv_prog_cc_c99+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_cv_prog_cc_c99=no ++ac_save_CC=$CC ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++#include ++#include ++#include ++#include + + // Check varargs macros. These examples are taken from C99 6.10.3.5. + #define debug(...) fprintf (stderr, __VA_ARGS__) +@@ -5550,20 +5834,32 @@ + + + ++ # Pre-early section. ++ ++ ++ + # Code from module absolute-header: + # Code from module configmake: ++ # Code from module dirname-lgpl: ++ # Code from module dosname: ++ # Code from module double-slash-root: + # Code from module errno: + # Code from module error: + # Code from module extensions: +- + # Code from module extern-inline: ++ # Code from module getopt-gnu: ++ # Code from module getopt-posix: ++ # Code from module getprogname: + # Code from module gettext-h: + # Code from module include_next: + # Code from module intprops: ++ # Code from module malloc-posix: + # Code from module manywarnings: + # Code from module msvc-inval: + # Code from module msvc-nothrow: ++ # Code from module nocrash: + # Code from module progname: ++ # Code from module snippet/_Noreturn: + # Code from module snippet/arg-nonnull: + # Code from module snippet/c++defs: + # Code from module snippet/warn-on-use: +@@ -5572,8 +5868,10 @@ + + + ++ # Code from module stdbool: + # Code from module stddef: + # Code from module stdio: ++ # Code from module stdlib: + # Code from module strerror: + # Code from module strerror-override: + # Code from module string: +@@ -12685,476 +12983,1067 @@ + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in +- x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; +- x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; +- x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; ++ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; ++ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; ++ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; ++ esac ++ else : ++ # compilation failed ++ lt_cv_dlopen_self=no ++ fi ++fi ++rm -fr conftest* ++ ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 ++$as_echo "$lt_cv_dlopen_self" >&6; } ++ ++ if test "x$lt_cv_dlopen_self" = xyes; then ++ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 ++$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } ++if ${lt_cv_dlopen_self_static+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test "$cross_compiling" = yes; then : ++ lt_cv_dlopen_self_static=cross ++else ++ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 ++ lt_status=$lt_dlunknown ++ cat > conftest.$ac_ext <<_LT_EOF ++#line $LINENO "configure" ++#include "confdefs.h" ++ ++#if HAVE_DLFCN_H ++#include ++#endif ++ ++#include ++ ++#ifdef RTLD_GLOBAL ++# define LT_DLGLOBAL RTLD_GLOBAL ++#else ++# ifdef DL_GLOBAL ++# define LT_DLGLOBAL DL_GLOBAL ++# else ++# define LT_DLGLOBAL 0 ++# endif ++#endif ++ ++/* We may have to define LT_DLLAZY_OR_NOW in the command line if we ++ find out it does not work in some platform. */ ++#ifndef LT_DLLAZY_OR_NOW ++# ifdef RTLD_LAZY ++# define LT_DLLAZY_OR_NOW RTLD_LAZY ++# else ++# ifdef DL_LAZY ++# define LT_DLLAZY_OR_NOW DL_LAZY ++# else ++# ifdef RTLD_NOW ++# define LT_DLLAZY_OR_NOW RTLD_NOW ++# else ++# ifdef DL_NOW ++# define LT_DLLAZY_OR_NOW DL_NOW ++# else ++# define LT_DLLAZY_OR_NOW 0 ++# endif ++# endif ++# endif ++# endif ++#endif ++ ++/* When -fvisbility=hidden is used, assume the code has been annotated ++ correspondingly for the symbols needed. */ ++#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) ++int fnord () __attribute__((visibility("default"))); ++#endif ++ ++int fnord () { return 42; } ++int main () ++{ ++ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); ++ int status = $lt_dlunknown; ++ ++ if (self) ++ { ++ if (dlsym (self,"fnord")) status = $lt_dlno_uscore; ++ else ++ { ++ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; ++ else puts (dlerror ()); ++ } ++ /* dlclose (self); */ ++ } ++ else ++ puts (dlerror ()); ++ ++ return status; ++} ++_LT_EOF ++ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then ++ (./conftest; exit; ) >&5 2>/dev/null ++ lt_status=$? ++ case x$lt_status in ++ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; ++ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; ++ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed +- lt_cv_dlopen_self=no ++ lt_cv_dlopen_self_static=no ++ fi ++fi ++rm -fr conftest* ++ ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 ++$as_echo "$lt_cv_dlopen_self_static" >&6; } ++ fi ++ ++ CPPFLAGS="$save_CPPFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++ LIBS="$save_LIBS" ++ ;; ++ esac ++ ++ case $lt_cv_dlopen_self in ++ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; ++ *) enable_dlopen_self=unknown ;; ++ esac ++ ++ case $lt_cv_dlopen_self_static in ++ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; ++ *) enable_dlopen_self_static=unknown ;; ++ esac ++fi ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++striplib= ++old_striplib= ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 ++$as_echo_n "checking whether stripping libraries is possible... " >&6; } ++if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then ++ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" ++ test -z "$striplib" && striplib="$STRIP --strip-unneeded" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++else ++# FIXME - insert some real tests, host_os isn't really good enough ++ case $host_os in ++ darwin*) ++ if test -n "$STRIP" ; then ++ striplib="$STRIP -x" ++ old_striplib="$STRIP -S" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ fi ++ ;; ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ;; ++ esac ++fi ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ # Report which library types will actually be built ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 ++$as_echo_n "checking if libtool supports shared libraries... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 ++$as_echo "$can_build_shared" >&6; } ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 ++$as_echo_n "checking whether to build shared libraries... " >&6; } ++ test "$can_build_shared" = "no" && enable_shared=no ++ ++ # On AIX, shared libraries and static libraries use the same namespace, and ++ # are all built from PIC. ++ case $host_os in ++ aix3*) ++ test "$enable_shared" = yes && enable_static=no ++ if test -n "$RANLIB"; then ++ archive_cmds="$archive_cmds~\$RANLIB \$lib" ++ postinstall_cmds='$RANLIB $lib' ++ fi ++ ;; ++ ++ aix[4-9]*) ++ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then ++ test "$enable_shared" = yes && enable_static=no ++ fi ++ ;; ++ esac ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 ++$as_echo "$enable_shared" >&6; } ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 ++$as_echo_n "checking whether to build static libraries... " >&6; } ++ # Make sure either enable_shared or enable_static is yes. ++ test "$enable_shared" = yes || enable_static=yes ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 ++$as_echo "$enable_static" >&6; } ++ ++ ++ ++ ++fi ++ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++ ++CC="$lt_save_CC" ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ac_config_commands="$ac_config_commands libtool" ++ ++ ++ ++ ++# Only expand once: ++ ++ ++ ++ ++ ++ ++ ++ LIBC_FATAL_STDERR_=1 ++ export LIBC_FATAL_STDERR_ ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 ++$as_echo_n "checking whether // is distinct from /... " >&6; } ++if ${gl_cv_double_slash_root+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test x"$cross_compiling" = xyes ; then ++ # When cross-compiling, there is no way to tell whether // is special ++ # short of a list of hosts. However, the only known hosts to date ++ # that have a distinct // are Apollo DomainOS (too old to port to), ++ # Cygwin, and z/OS. If anyone knows of another system for which // has ++ # special semantics and is distinct from /, please report it to ++ # . ++ case $host in ++ *-cygwin | i370-ibm-openedition) ++ gl_cv_double_slash_root=yes ;; ++ *) ++ # Be optimistic and assume that / and // are the same when we ++ # don't know. ++ gl_cv_double_slash_root='unknown, assuming no' ;; ++ esac ++ else ++ set x `ls -di / // 2>/dev/null` ++ if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then ++ gl_cv_double_slash_root=no ++ else ++ gl_cv_double_slash_root=yes ++ fi ++ fi ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 ++$as_echo "$gl_cv_double_slash_root" >&6; } ++ if test "$gl_cv_double_slash_root" = yes; then ++ ++$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h ++ ++ fi ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 ++$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } ++if ${gl_cv_have_include_next+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ rm -rf conftestd1a conftestd1b conftestd2 ++ mkdir conftestd1a conftestd1b conftestd2 ++ cat < conftestd1a/conftest.h ++#define DEFINED_IN_CONFTESTD1 ++#include_next ++#ifdef DEFINED_IN_CONFTESTD2 ++int foo; ++#else ++#error "include_next doesn't work" ++#endif ++EOF ++ cat < conftestd1b/conftest.h ++#define DEFINED_IN_CONFTESTD1 ++#include ++#include_next ++#ifdef DEFINED_IN_CONFTESTD2 ++int foo; ++#else ++#error "include_next doesn't work" ++#endif ++EOF ++ cat < conftestd2/conftest.h ++#ifndef DEFINED_IN_CONFTESTD1 ++#error "include_next test doesn't work" ++#endif ++#define DEFINED_IN_CONFTESTD2 ++EOF ++ gl_save_CPPFLAGS="$CPPFLAGS" ++ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_have_include_next=yes ++else ++ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_have_include_next=buggy ++else ++ gl_cv_have_include_next=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ CPPFLAGS="$gl_save_CPPFLAGS" ++ rm -rf conftestd1a conftestd1b conftestd2 ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 ++$as_echo "$gl_cv_have_include_next" >&6; } ++ PRAGMA_SYSTEM_HEADER= ++ if test $gl_cv_have_include_next = yes; then ++ INCLUDE_NEXT=include_next ++ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next ++ if test -n "$GCC"; then ++ PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' ++ fi ++ else ++ if test $gl_cv_have_include_next = buggy; then ++ INCLUDE_NEXT=include ++ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next ++ else ++ INCLUDE_NEXT=include ++ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include ++ fi + fi +-fi +-rm -fr conftest* + + +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +-$as_echo "$lt_cv_dlopen_self" >&6; } + +- if test "x$lt_cv_dlopen_self" = xyes; then +- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +-if ${lt_cv_dlopen_self_static+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 ++$as_echo_n "checking whether system header files limit the line length... " >&6; } ++if ${gl_cv_pragma_columns+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then : +- lt_cv_dlopen_self_static=cross +-else +- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 +- lt_status=$lt_dlunknown +- cat > conftest.$ac_ext <<_LT_EOF +-#line $LINENO "configure" +-#include "confdefs.h" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +-#if HAVE_DLFCN_H +-#include ++#ifdef __TANDEM ++choke me + #endif + +-#include ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "choke me" >/dev/null 2>&1; then : ++ gl_cv_pragma_columns=yes ++else ++ gl_cv_pragma_columns=no ++fi ++rm -f conftest* + +-#ifdef RTLD_GLOBAL +-# define LT_DLGLOBAL RTLD_GLOBAL +-#else +-# ifdef DL_GLOBAL +-# define LT_DLGLOBAL DL_GLOBAL +-# else +-# define LT_DLGLOBAL 0 +-# endif +-#endif + +-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we +- find out it does not work in some platform. */ +-#ifndef LT_DLLAZY_OR_NOW +-# ifdef RTLD_LAZY +-# define LT_DLLAZY_OR_NOW RTLD_LAZY +-# else +-# ifdef DL_LAZY +-# define LT_DLLAZY_OR_NOW DL_LAZY +-# else +-# ifdef RTLD_NOW +-# define LT_DLLAZY_OR_NOW RTLD_NOW +-# else +-# ifdef DL_NOW +-# define LT_DLLAZY_OR_NOW DL_NOW +-# else +-# define LT_DLLAZY_OR_NOW 0 +-# endif +-# endif +-# endif +-# endif +-#endif ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 ++$as_echo "$gl_cv_pragma_columns" >&6; } ++ if test $gl_cv_pragma_columns = yes; then ++ PRAGMA_COLUMNS="#pragma COLUMNS 10000" ++ else ++ PRAGMA_COLUMNS= ++ fi + +-/* When -fvisbility=hidden is used, assume the code has been annotated +- correspondingly for the symbols needed. */ +-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-int fnord () __attribute__((visibility("default"))); +-#endif + +-int fnord () { return 42; } +-int main () +-{ +- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +- int status = $lt_dlunknown; + +- if (self) +- { +- if (dlsym (self,"fnord")) status = $lt_dlno_uscore; +- else +- { +- if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; +- else puts (dlerror ()); +- } +- /* dlclose (self); */ +- } +- else +- puts (dlerror ()); + +- return status; +-} +-_LT_EOF +- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +- (eval $ac_link) 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then +- (./conftest; exit; ) >&5 2>/dev/null +- lt_status=$? +- case x$lt_status in +- x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; +- x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; +- x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; +- esac +- else : +- # compilation failed +- lt_cv_dlopen_self_static=no +- fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 ++$as_echo_n "checking for complete errno.h... " >&6; } ++if ${gl_cv_header_errno_h_complete+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#if !defined ETXTBSY ++booboo ++#endif ++#if !defined ENOMSG ++booboo ++#endif ++#if !defined EIDRM ++booboo ++#endif ++#if !defined ENOLINK ++booboo ++#endif ++#if !defined EPROTO ++booboo ++#endif ++#if !defined EMULTIHOP ++booboo ++#endif ++#if !defined EBADMSG ++booboo ++#endif ++#if !defined EOVERFLOW ++booboo ++#endif ++#if !defined ENOTSUP ++booboo ++#endif ++#if !defined ENETRESET ++booboo ++#endif ++#if !defined ECONNABORTED ++booboo ++#endif ++#if !defined ESTALE ++booboo ++#endif ++#if !defined EDQUOT ++booboo ++#endif ++#if !defined ECANCELED ++booboo ++#endif ++#if !defined EOWNERDEAD ++booboo ++#endif ++#if !defined ENOTRECOVERABLE ++booboo ++#endif ++#if !defined EILSEQ ++booboo ++#endif ++ ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "booboo" >/dev/null 2>&1; then : ++ gl_cv_header_errno_h_complete=no ++else ++ gl_cv_header_errno_h_complete=yes + fi +-rm -fr conftest* ++rm -f conftest* + + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +-$as_echo "$lt_cv_dlopen_self_static" >&6; } +- fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 ++$as_echo "$gl_cv_header_errno_h_complete" >&6; } ++ if test $gl_cv_header_errno_h_complete = yes; then ++ ERRNO_H='' ++ else ++ + +- CPPFLAGS="$save_CPPFLAGS" +- LDFLAGS="$save_LDFLAGS" +- LIBS="$save_LIBS" +- ;; +- esac + +- case $lt_cv_dlopen_self in +- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; +- *) enable_dlopen_self=unknown ;; +- esac + +- case $lt_cv_dlopen_self_static in +- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; +- *) enable_dlopen_self_static=unknown ;; +- esac +-fi + + + + ++ if test $gl_cv_have_include_next = yes; then ++ gl_cv_next_errno_h='<'errno.h'>' ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 ++$as_echo_n "checking absolute name of ... " >&6; } ++if ${gl_cv_next_errno_h+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ + + ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++_ACEOF ++ case "$host_os" in ++ aix*) gl_absname_cpp="$ac_cpp -C" ;; ++ *) gl_absname_cpp="$ac_cpp" ;; ++ esac + ++ case "$host_os" in ++ mingw*) ++ gl_dirsep_regex='[/\\]' ++ ;; ++ *) ++ gl_dirsep_regex='\/' ++ ;; ++ esac ++ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' ++ gl_header_literal_regex=`echo 'errno.h' \ ++ | sed -e "$gl_make_literal_regex_sed"` ++ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ ++ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ ++ s|^/[^/]|//&| ++ p ++ q ++ }' + ++ gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n "$gl_absolute_header_sed"` + ++ gl_header=$gl_cv_absolute_errno_h ++ gl_cv_next_errno_h='"'$gl_header'"' + + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 ++$as_echo "$gl_cv_next_errno_h" >&6; } ++ fi ++ NEXT_ERRNO_H=$gl_cv_next_errno_h + ++ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then ++ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' ++ gl_next_as_first_directive='<'errno.h'>' ++ else ++ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' ++ gl_next_as_first_directive=$gl_cv_next_errno_h ++ fi ++ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive + + + + ++ ERRNO_H='errno.h' ++ fi + +-striplib= +-old_striplib= +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +-$as_echo_n "checking whether stripping libraries is possible... " >&6; } +-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then +- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" +- test -z "$striplib" && striplib="$STRIP --strip-unneeded" +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } ++ if test -n "$ERRNO_H"; then ++ GL_GENERATE_ERRNO_H_TRUE= ++ GL_GENERATE_ERRNO_H_FALSE='#' + else +-# FIXME - insert some real tests, host_os isn't really good enough +- case $host_os in +- darwin*) +- if test -n "$STRIP" ; then +- striplib="$STRIP -x" +- old_striplib="$STRIP -S" +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- fi +- ;; +- *) +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- ;; +- esac ++ GL_GENERATE_ERRNO_H_TRUE='#' ++ GL_GENERATE_ERRNO_H_FALSE= + fi + + ++ if test -n "$ERRNO_H"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 ++$as_echo_n "checking for EMULTIHOP value... " >&6; } ++if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#include ++#ifdef EMULTIHOP ++yes ++#endif + ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "yes" >/dev/null 2>&1; then : ++ gl_cv_header_errno_h_EMULTIHOP=yes ++else ++ gl_cv_header_errno_h_EMULTIHOP=no ++fi ++rm -f conftest* + ++ if test $gl_cv_header_errno_h_EMULTIHOP = no; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#define _XOPEN_SOURCE_EXTENDED 1 ++#include ++#ifdef EMULTIHOP ++yes ++#endif + ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "yes" >/dev/null 2>&1; then : ++ gl_cv_header_errno_h_EMULTIHOP=hidden ++fi ++rm -f conftest* + ++ if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then ++ if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " ++#define _XOPEN_SOURCE_EXTENDED 1 ++#include ++/* The following two lines are a workaround against an autoconf-2.52 bug. */ ++#include ++#include ++"; then : + ++fi + ++ fi ++ fi + +- # Report which library types will actually be built +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +-$as_echo_n "checking if libtool supports shared libraries... " >&6; } +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +-$as_echo "$can_build_shared" >&6; } +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +-$as_echo_n "checking whether to build shared libraries... " >&6; } +- test "$can_build_shared" = "no" && enable_shared=no ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 ++$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } ++ case $gl_cv_header_errno_h_EMULTIHOP in ++ yes | no) ++ EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= ++ ;; ++ *) ++ EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" ++ ;; ++ esac + +- # On AIX, shared libraries and static libraries use the same namespace, and +- # are all built from PIC. +- case $host_os in +- aix3*) +- test "$enable_shared" = yes && enable_static=no +- if test -n "$RANLIB"; then +- archive_cmds="$archive_cmds~\$RANLIB \$lib" +- postinstall_cmds='$RANLIB $lib' +- fi +- ;; + +- aix[4-9]*) +- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then +- test "$enable_shared" = yes && enable_static=no +- fi +- ;; +- esac +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +-$as_echo "$enable_shared" >&6; } ++ fi + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +-$as_echo_n "checking whether to build static libraries... " >&6; } +- # Make sure either enable_shared or enable_static is yes. +- test "$enable_shared" = yes || enable_static=yes +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +-$as_echo "$enable_static" >&6; } + ++ if test -n "$ERRNO_H"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 ++$as_echo_n "checking for ENOLINK value... " >&6; } ++if ${gl_cv_header_errno_h_ENOLINK+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#include ++#ifdef ENOLINK ++yes ++#endif + ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "yes" >/dev/null 2>&1; then : ++ gl_cv_header_errno_h_ENOLINK=yes ++else ++ gl_cv_header_errno_h_ENOLINK=no + fi +-ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' +-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +-ac_compiler_gnu=$ac_cv_c_compiler_gnu +- +-CC="$lt_save_CC" ++rm -f conftest* + ++ if test $gl_cv_header_errno_h_ENOLINK = no; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#define _XOPEN_SOURCE_EXTENDED 1 ++#include ++#ifdef ENOLINK ++yes ++#endif + ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "yes" >/dev/null 2>&1; then : ++ gl_cv_header_errno_h_ENOLINK=hidden ++fi ++rm -f conftest* + ++ if test $gl_cv_header_errno_h_ENOLINK = hidden; then ++ if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " ++#define _XOPEN_SOURCE_EXTENDED 1 ++#include ++/* The following two lines are a workaround against an autoconf-2.52 bug. */ ++#include ++#include ++"; then : + ++fi + ++ fi ++ fi + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 ++$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } ++ case $gl_cv_header_errno_h_ENOLINK in ++ yes | no) ++ ENOLINK_HIDDEN=0; ENOLINK_VALUE= ++ ;; ++ *) ++ ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" ++ ;; ++ esac + + ++ fi + + ++ if test -n "$ERRNO_H"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 ++$as_echo_n "checking for EOVERFLOW value... " >&6; } ++if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#include ++#ifdef EOVERFLOW ++yes ++#endif + ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "yes" >/dev/null 2>&1; then : ++ gl_cv_header_errno_h_EOVERFLOW=yes ++else ++ gl_cv_header_errno_h_EOVERFLOW=no ++fi ++rm -f conftest* + +- ac_config_commands="$ac_config_commands libtool" ++ if test $gl_cv_header_errno_h_EOVERFLOW = no; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#define _XOPEN_SOURCE_EXTENDED 1 ++#include ++#ifdef EOVERFLOW ++yes ++#endif + ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "yes" >/dev/null 2>&1; then : ++ gl_cv_header_errno_h_EOVERFLOW=hidden ++fi ++rm -f conftest* + ++ if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then ++ if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " ++#define _XOPEN_SOURCE_EXTENDED 1 ++#include ++/* The following two lines are a workaround against an autoconf-2.52 bug. */ ++#include ++#include ++"; then : + +-# Only expand once: ++fi + ++ fi ++ fi + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 ++$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } ++ case $gl_cv_header_errno_h_EOVERFLOW in ++ yes | no) ++ EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= ++ ;; ++ *) ++ EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" ++ ;; ++ esac + + ++ fi + + ++ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" ++if test "x$ac_cv_have_decl_strerror_r" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi + +- LIBC_FATAL_STDERR_=1 +- export LIBC_FATAL_STDERR_ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_STRERROR_R $ac_have_decl ++_ACEOF + ++for ac_func in strerror_r ++do : ++ ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" ++if test "x$ac_cv_func_strerror_r" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_STRERROR_R 1 ++_ACEOF + ++fi ++done + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 +-$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } +-if ${gl_cv_have_include_next+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 ++$as_echo_n "checking whether strerror_r returns char *... " >&6; } ++if ${ac_cv_func_strerror_r_char_p+:} false; then : + $as_echo_n "(cached) " >&6 + else +- rm -rf conftestd1a conftestd1b conftestd2 +- mkdir conftestd1a conftestd1b conftestd2 +- cat < conftestd1a/conftest.h +-#define DEFINED_IN_CONFTESTD1 +-#include_next +-#ifdef DEFINED_IN_CONFTESTD2 +-int foo; +-#else +-#error "include_next doesn't work" +-#endif +-EOF +- cat < conftestd1b/conftest.h +-#define DEFINED_IN_CONFTESTD1 +-#include +-#include_next +-#ifdef DEFINED_IN_CONFTESTD2 +-int foo; +-#else +-#error "include_next doesn't work" +-#endif +-EOF +- cat < conftestd2/conftest.h +-#ifndef DEFINED_IN_CONFTESTD1 +-#error "include_next test doesn't work" +-#endif +-#define DEFINED_IN_CONFTESTD2 +-EOF +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ++ ac_cv_func_strerror_r_char_p=no ++ if test $ac_cv_have_decl_strerror_r = yes; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++$ac_includes_default ++int ++main () ++{ ++ ++ char buf[100]; ++ char x = *strerror_r (0, buf, sizeof buf); ++ char *p = strerror_r (0, buf, sizeof buf); ++ return !p || x; ++ ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- gl_cv_have_include_next=yes ++ ac_cv_func_strerror_r_char_p=yes ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ else ++ # strerror_r is not declared. Choose between ++ # systems that have relatively inaccessible declarations for the ++ # function. BeOS and DEC UNIX 4.0 fall in this category, but the ++ # former has a strerror_r that returns char*, while the latter ++ # has a strerror_r that returns `int'. ++ # This test should segfault on the DEC system. ++ if test "$cross_compiling" = yes; then : ++ : + else +- CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++$ac_includes_default ++ extern char *strerror_r (); ++int ++main () ++{ ++char buf[100]; ++ char x = *strerror_r (0, buf, sizeof buf); ++ return ! isalpha (x); ++ ; ++ return 0; ++} + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- gl_cv_have_include_next=buggy +-else +- gl_cv_have_include_next=no ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_func_strerror_r_char_p=yes + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi ++ ++ fi + + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CPPFLAGS="$gl_save_CPPFLAGS" +- rm -rf conftestd1a conftestd1b conftestd2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 ++$as_echo "$ac_cv_func_strerror_r_char_p" >&6; } ++if test $ac_cv_func_strerror_r_char_p = yes; then ++ ++$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 +-$as_echo "$gl_cv_have_include_next" >&6; } +- PRAGMA_SYSTEM_HEADER= +- if test $gl_cv_have_include_next = yes; then +- INCLUDE_NEXT=include_next +- INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next +- if test -n "$GCC"; then +- PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' +- fi +- else +- if test $gl_cv_have_include_next = buggy; then +- INCLUDE_NEXT=include +- INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next +- else +- INCLUDE_NEXT=include +- INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include +- fi +- fi ++ ++ ++ XGETTEXT_EXTRA_OPTIONS= ++ ++ ++ ++ ++ ++ GNULIB_CHDIR=0; ++ GNULIB_CHOWN=0; ++ GNULIB_CLOSE=0; ++ GNULIB_DUP=0; ++ GNULIB_DUP2=0; ++ GNULIB_DUP3=0; ++ GNULIB_ENVIRON=0; ++ GNULIB_EUIDACCESS=0; ++ GNULIB_FACCESSAT=0; ++ GNULIB_FCHDIR=0; ++ GNULIB_FCHOWNAT=0; ++ GNULIB_FDATASYNC=0; ++ GNULIB_FSYNC=0; ++ GNULIB_FTRUNCATE=0; ++ GNULIB_GETCWD=0; ++ GNULIB_GETDOMAINNAME=0; ++ GNULIB_GETDTABLESIZE=0; ++ GNULIB_GETGROUPS=0; ++ GNULIB_GETHOSTNAME=0; ++ GNULIB_GETLOGIN=0; ++ GNULIB_GETLOGIN_R=0; ++ GNULIB_GETPAGESIZE=0; ++ GNULIB_GETUSERSHELL=0; ++ GNULIB_GROUP_MEMBER=0; ++ GNULIB_ISATTY=0; ++ GNULIB_LCHOWN=0; ++ GNULIB_LINK=0; ++ GNULIB_LINKAT=0; ++ GNULIB_LSEEK=0; ++ GNULIB_PIPE=0; ++ GNULIB_PIPE2=0; ++ GNULIB_PREAD=0; ++ GNULIB_PWRITE=0; ++ GNULIB_READ=0; ++ GNULIB_READLINK=0; ++ GNULIB_READLINKAT=0; ++ GNULIB_RMDIR=0; ++ GNULIB_SETHOSTNAME=0; ++ GNULIB_SLEEP=0; ++ GNULIB_SYMLINK=0; ++ GNULIB_SYMLINKAT=0; ++ GNULIB_TTYNAME_R=0; ++ GNULIB_UNISTD_H_NONBLOCKING=0; ++ GNULIB_UNISTD_H_SIGPIPE=0; ++ GNULIB_UNLINK=0; ++ GNULIB_UNLINKAT=0; ++ GNULIB_USLEEP=0; ++ GNULIB_WRITE=0; ++ HAVE_CHOWN=1; ++ HAVE_DUP2=1; ++ HAVE_DUP3=1; ++ HAVE_EUIDACCESS=1; ++ HAVE_FACCESSAT=1; ++ HAVE_FCHDIR=1; ++ HAVE_FCHOWNAT=1; ++ HAVE_FDATASYNC=1; ++ HAVE_FSYNC=1; ++ HAVE_FTRUNCATE=1; ++ HAVE_GETDTABLESIZE=1; ++ HAVE_GETGROUPS=1; ++ HAVE_GETHOSTNAME=1; ++ HAVE_GETLOGIN=1; ++ HAVE_GETPAGESIZE=1; ++ HAVE_GROUP_MEMBER=1; ++ HAVE_LCHOWN=1; ++ HAVE_LINK=1; ++ HAVE_LINKAT=1; ++ HAVE_PIPE=1; ++ HAVE_PIPE2=1; ++ HAVE_PREAD=1; ++ HAVE_PWRITE=1; ++ HAVE_READLINK=1; ++ HAVE_READLINKAT=1; ++ HAVE_SETHOSTNAME=1; ++ HAVE_SLEEP=1; ++ HAVE_SYMLINK=1; ++ HAVE_SYMLINKAT=1; ++ HAVE_UNLINKAT=1; ++ HAVE_USLEEP=1; ++ HAVE_DECL_ENVIRON=1; ++ HAVE_DECL_FCHDIR=1; ++ HAVE_DECL_FDATASYNC=1; ++ HAVE_DECL_GETDOMAINNAME=1; ++ HAVE_DECL_GETLOGIN_R=1; ++ HAVE_DECL_GETPAGESIZE=1; ++ HAVE_DECL_GETUSERSHELL=1; ++ HAVE_DECL_SETHOSTNAME=1; ++ HAVE_DECL_TTYNAME_R=1; ++ HAVE_OS_H=0; ++ HAVE_SYS_PARAM_H=0; ++ REPLACE_CHOWN=0; ++ REPLACE_CLOSE=0; ++ REPLACE_DUP=0; ++ REPLACE_DUP2=0; ++ REPLACE_FCHOWNAT=0; ++ REPLACE_FTRUNCATE=0; ++ REPLACE_GETCWD=0; ++ REPLACE_GETDOMAINNAME=0; ++ REPLACE_GETDTABLESIZE=0; ++ REPLACE_GETLOGIN_R=0; ++ REPLACE_GETGROUPS=0; ++ REPLACE_GETPAGESIZE=0; ++ REPLACE_ISATTY=0; ++ REPLACE_LCHOWN=0; ++ REPLACE_LINK=0; ++ REPLACE_LINKAT=0; ++ REPLACE_LSEEK=0; ++ REPLACE_PREAD=0; ++ REPLACE_PWRITE=0; ++ REPLACE_READ=0; ++ REPLACE_READLINK=0; ++ REPLACE_READLINKAT=0; ++ REPLACE_RMDIR=0; ++ REPLACE_SLEEP=0; ++ REPLACE_SYMLINK=0; ++ REPLACE_SYMLINKAT=0; ++ REPLACE_TTYNAME_R=0; ++ REPLACE_UNLINK=0; ++ REPLACE_UNLINKAT=0; ++ REPLACE_USLEEP=0; ++ REPLACE_WRITE=0; ++ UNISTD_H_HAVE_WINSOCK2_H=0; ++ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; + + + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 +-$as_echo_n "checking whether system header files limit the line length... " >&6; } +-if ${gl_cv_pragma_columns+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + +-#ifdef __TANDEM +-choke me +-#endif + ++ ++ for ac_header in $gl_header_list ++do : ++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" ++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "choke me" >/dev/null 2>&1; then : +- gl_cv_pragma_columns=yes +-else +- gl_cv_pragma_columns=no ++ + fi +-rm -f conftest* ++ ++done ++ ++ + + +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 +-$as_echo "$gl_cv_pragma_columns" >&6; } +- if test $gl_cv_pragma_columns = yes; then +- PRAGMA_COLUMNS="#pragma COLUMNS 10000" +- else +- PRAGMA_COLUMNS= +- fi + + + + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 +-$as_echo_n "checking for complete errno.h... " >&6; } +-if ${gl_cv_header_errno_h_complete+:} false; then : +- $as_echo_n "(cached) " >&6 +-else + +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + +-#include +-#if !defined ETXTBSY +-booboo +-#endif +-#if !defined ENOMSG +-booboo +-#endif +-#if !defined EIDRM +-booboo +-#endif +-#if !defined ENOLINK +-booboo +-#endif +-#if !defined EPROTO +-booboo +-#endif +-#if !defined EMULTIHOP +-booboo +-#endif +-#if !defined EBADMSG +-booboo +-#endif +-#if !defined EOVERFLOW +-booboo +-#endif +-#if !defined ENOTSUP +-booboo +-#endif +-#if !defined ENETRESET +-booboo +-#endif +-#if !defined ECONNABORTED +-booboo +-#endif +-#if !defined ESTALE +-booboo +-#endif +-#if !defined EDQUOT +-booboo +-#endif +-#if !defined ECANCELED +-booboo +-#endif +-#if !defined EOWNERDEAD +-booboo +-#endif +-#if !defined ENOTRECOVERABLE +-booboo +-#endif +-#if !defined EILSEQ +-booboo +-#endif + +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "booboo" >/dev/null 2>&1; then : +- gl_cv_header_errno_h_complete=no +-else +- gl_cv_header_errno_h_complete=yes +-fi +-rm -f conftest* + + +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 +-$as_echo "$gl_cv_header_errno_h_complete" >&6; } +- if test $gl_cv_header_errno_h_complete = yes; then +- ERRNO_H='' +- else ++ ++ ++ : + + + +@@ -13164,19 +14053,22 @@ + + + if test $gl_cv_have_include_next = yes; then +- gl_cv_next_errno_h='<'errno.h'>' ++ gl_cv_next_getopt_h='<'getopt.h'>' + else +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +-$as_echo_n "checking absolute name of ... " >&6; } +-if ${gl_cv_next_errno_h+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 ++$as_echo_n "checking absolute name of ... " >&6; } ++if ${gl_cv_next_getopt_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + ++ if test $ac_cv_header_getopt_h = yes; then ++ ++ + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + _ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; +@@ -13192,7 +14084,7 @@ + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' +- gl_header_literal_regex=`echo 'errno.h' \ ++ gl_header_literal_regex=`echo 'getopt.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ +@@ -13201,376 +14093,849 @@ + q + }' + +- gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + +- gl_header=$gl_cv_absolute_errno_h +- gl_cv_next_errno_h='"'$gl_header'"' ++ gl_header=$gl_cv_absolute_getopt_h ++ gl_cv_next_getopt_h='"'$gl_header'"' ++ else ++ gl_cv_next_getopt_h='<'getopt.h'>' ++ fi + + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 +-$as_echo "$gl_cv_next_errno_h" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 ++$as_echo "$gl_cv_next_getopt_h" >&6; } + fi +- NEXT_ERRNO_H=$gl_cv_next_errno_h ++ NEXT_GETOPT_H=$gl_cv_next_getopt_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' +- gl_next_as_first_directive='<'errno.h'>' ++ gl_next_as_first_directive='<'getopt.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' +- gl_next_as_first_directive=$gl_cv_next_errno_h ++ gl_next_as_first_directive=$gl_cv_next_getopt_h + fi +- NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive ++ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive + + + + +- ERRNO_H='errno.h' ++ if test $ac_cv_header_getopt_h = yes; then ++ HAVE_GETOPT_H=1 ++ else ++ HAVE_GETOPT_H=0 + fi + +- if test -n "$ERRNO_H"; then +- GL_GENERATE_ERRNO_H_TRUE= +- GL_GENERATE_ERRNO_H_FALSE='#' ++ ++ gl_replace_getopt= ++ ++ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then ++ for ac_header in getopt.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" ++if test "x$ac_cv_header_getopt_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_GETOPT_H 1 ++_ACEOF ++ + else +- GL_GENERATE_ERRNO_H_TRUE='#' +- GL_GENERATE_ERRNO_H_FALSE= ++ gl_replace_getopt=yes ++fi ++ ++done ++ ++ fi ++ ++ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then ++ for ac_func in getopt_long_only ++do : ++ ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" ++if test "x$ac_cv_func_getopt_long_only" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_GETOPT_LONG_ONLY 1 ++_ACEOF ++ ++else ++ gl_replace_getopt=yes + fi ++done + ++ fi + +- if test -n "$ERRNO_H"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 +-$as_echo_n "checking for EMULTIHOP value... " >&6; } +-if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then : ++ if test -z "$gl_replace_getopt"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 ++$as_echo_n "checking whether getopt is POSIX compatible... " >&6; } ++if ${gl_cv_func_getopt_posix+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test $cross_compiling = no; then ++ if test "$cross_compiling" = yes; then : ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error $? "cannot run test program while cross compiling ++See \`config.log' for more details" "$LINENO" 5; } ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#ifdef EMULTIHOP +-yes +-#endif ++#include ++#include ++#include ++ ++int ++main () ++{ ++ static char program[] = "program"; ++ static char a[] = "-a"; ++ static char foo[] = "foo"; ++ static char bar[] = "bar"; ++ char *argv[] = { program, a, foo, bar, NULL }; ++ int c; ++ ++ c = getopt (4, argv, "ab"); ++ if (!(c == 'a')) ++ return 1; ++ c = getopt (4, argv, "ab"); ++ if (!(c == -1)) ++ return 2; ++ if (!(optind == 2)) ++ return 3; ++ return 0; ++} + + _ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : +- gl_cv_header_errno_h_EMULTIHOP=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_getopt_posix=maybe + else +- gl_cv_header_errno_h_EMULTIHOP=no ++ gl_cv_func_getopt_posix=no ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi +-rm -f conftest* + +- if test $gl_cv_header_errno_h_EMULTIHOP = no; then +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test $gl_cv_func_getopt_posix = maybe; then ++ if test "$cross_compiling" = yes; then : ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error $? "cannot run test program while cross compiling ++See \`config.log' for more details" "$LINENO" 5; } ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-#ifdef EMULTIHOP +-yes +-#endif ++#include ++#include ++#include ++ ++int ++main () ++{ ++ static char program[] = "program"; ++ static char donald[] = "donald"; ++ static char p[] = "-p"; ++ static char billy[] = "billy"; ++ static char duck[] = "duck"; ++ static char a[] = "-a"; ++ static char bar[] = "bar"; ++ char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; ++ int c; ++ ++ c = getopt (7, argv, "+abp:q:"); ++ if (!(c == -1)) ++ return 4; ++ if (!(strcmp (argv[0], "program") == 0)) ++ return 5; ++ if (!(strcmp (argv[1], "donald") == 0)) ++ return 6; ++ if (!(strcmp (argv[2], "-p") == 0)) ++ return 7; ++ if (!(strcmp (argv[3], "billy") == 0)) ++ return 8; ++ if (!(strcmp (argv[4], "duck") == 0)) ++ return 9; ++ if (!(strcmp (argv[5], "-a") == 0)) ++ return 10; ++ if (!(strcmp (argv[6], "bar") == 0)) ++ return 11; ++ if (!(optind == 1)) ++ return 12; ++ return 0; ++} + + _ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : +- gl_cv_header_errno_h_EMULTIHOP=hidden ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_getopt_posix=maybe ++else ++ gl_cv_func_getopt_posix=no ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi +-rm -f conftest* + +- if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then +- if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include ++ fi ++ if test $gl_cv_func_getopt_posix = maybe; then ++ if test "$cross_compiling" = yes; then : ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error $? "cannot run test program while cross compiling ++See \`config.log' for more details" "$LINENO" 5; } ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include + #include +-"; then : ++#include ++ ++int ++main () ++{ ++ static char program[] = "program"; ++ static char ab[] = "-ab"; ++ char *argv[3] = { program, ab, NULL }; ++ if (getopt (2, argv, "ab:") != 'a') ++ return 13; ++ if (getopt (2, argv, "ab:") != '?') ++ return 14; ++ if (optopt != 'b') ++ return 15; ++ if (optind != 2) ++ return 16; ++ return 0; ++} + ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_getopt_posix=yes ++else ++ gl_cv_func_getopt_posix=no ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + ++ fi ++ else ++ case "$host_os" in ++ darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; ++ *) gl_cv_func_getopt_posix="guessing yes";; ++ esac + fi +- fi + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 +-$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } +- case $gl_cv_header_errno_h_EMULTIHOP in +- yes | no) +- EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= +- ;; +- *) +- EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" +- ;; ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 ++$as_echo "$gl_cv_func_getopt_posix" >&6; } ++ case "$gl_cv_func_getopt_posix" in ++ *no) gl_replace_getopt=yes ;; + esac +- +- + fi + ++ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 ++$as_echo_n "checking for working GNU getopt function... " >&6; } ++if ${gl_cv_func_getopt_gnu+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the ++ # optstring is necessary for programs like m4 that have POSIX-mandated ++ # semantics for supporting options interspersed with files. ++ # Also, since getopt_long is a GNU extension, we require optind=0. ++ # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; ++ # so take care to revert to the correct (non-)export state. ++ gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' ++ case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" &5 +-$as_echo_n "checking for ENOLINK value... " >&6; } +-if ${gl_cv_header_errno_h_ENOLINK+:} false; then : +- $as_echo_n "(cached) " >&6 + else +- +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++#include ++ #include ++ #include + +-#include +-#ifdef ENOLINK +-yes ++#include ++#if defined __MACH__ && defined __APPLE__ ++/* Avoid a crash on Mac OS X. */ ++#include ++#include ++#include ++#include ++#include ++#include ++/* The exception port on which our thread listens. */ ++static mach_port_t our_exception_port; ++/* The main function of the thread listening for exceptions of type ++ EXC_BAD_ACCESS. */ ++static void * ++mach_exception_thread (void *arg) ++{ ++ /* Buffer for a message to be received. */ ++ struct { ++ mach_msg_header_t head; ++ mach_msg_body_t msgh_body; ++ char data[1024]; ++ } msg; ++ mach_msg_return_t retval; ++ /* Wait for a message on the exception port. */ ++ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), ++ our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); ++ if (retval != MACH_MSG_SUCCESS) ++ abort (); ++ exit (1); ++} ++static void ++nocrash_init (void) ++{ ++ mach_port_t self = mach_task_self (); ++ /* Allocate a port on which the thread shall listen for exceptions. */ ++ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) ++ == KERN_SUCCESS) { ++ /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ ++ if (mach_port_insert_right (self, our_exception_port, our_exception_port, ++ MACH_MSG_TYPE_MAKE_SEND) ++ == KERN_SUCCESS) { ++ /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting ++ for us. */ ++ exception_mask_t mask = EXC_MASK_BAD_ACCESS; ++ /* Create the thread listening on the exception port. */ ++ pthread_attr_t attr; ++ pthread_t thread; ++ if (pthread_attr_init (&attr) == 0 ++ && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 ++ && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { ++ pthread_attr_destroy (&attr); ++ /* Replace the exception port info for these exceptions with our own. ++ Note that we replace the exception port for the entire task, not only ++ for a particular thread. This has the effect that when our exception ++ port gets the message, the thread specific exception port has already ++ been asked, and we don't need to bother about it. ++ See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ ++ task_set_exception_ports (self, mask, our_exception_port, ++ EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); ++ } ++ } ++ } ++} ++#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ ++/* Avoid a crash on native Windows. */ ++#define WIN32_LEAN_AND_MEAN ++#include ++#include ++static LONG WINAPI ++exception_filter (EXCEPTION_POINTERS *ExceptionInfo) ++{ ++ switch (ExceptionInfo->ExceptionRecord->ExceptionCode) ++ { ++ case EXCEPTION_ACCESS_VIOLATION: ++ case EXCEPTION_IN_PAGE_ERROR: ++ case EXCEPTION_STACK_OVERFLOW: ++ case EXCEPTION_GUARD_PAGE: ++ case EXCEPTION_PRIV_INSTRUCTION: ++ case EXCEPTION_ILLEGAL_INSTRUCTION: ++ case EXCEPTION_DATATYPE_MISALIGNMENT: ++ case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: ++ case EXCEPTION_NONCONTINUABLE_EXCEPTION: ++ exit (1); ++ } ++ return EXCEPTION_CONTINUE_SEARCH; ++} ++static void ++nocrash_init (void) ++{ ++ SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); ++} ++#else ++/* Avoid a crash on POSIX systems. */ ++#include ++#include ++/* A POSIX signal handler. */ ++static void ++exception_handler (int sig) ++{ ++ _exit (1); ++} ++static void ++nocrash_init (void) ++{ ++#ifdef SIGSEGV ++ signal (SIGSEGV, exception_handler); ++#endif ++#ifdef SIGBUS ++ signal (SIGBUS, exception_handler); ++#endif ++} + #endif + +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : +- gl_cv_header_errno_h_ENOLINK=yes +-else +- gl_cv_header_errno_h_ENOLINK=no +-fi +-rm -f conftest* + +- if test $gl_cv_header_errno_h_ENOLINK = no; then +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ ++int ++main () ++{ + +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-#ifdef ENOLINK +-yes +-#endif ++ int result = 0; + +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : +- gl_cv_header_errno_h_ENOLINK=hidden +-fi +-rm -f conftest* ++ nocrash_init(); + +- if test $gl_cv_header_errno_h_ENOLINK = hidden; then +- if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +-"; then : ++ /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, ++ and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, ++ OSF/1 5.1, Solaris 10. */ ++ { ++ static char conftest[] = "conftest"; ++ static char plus[] = "-+"; ++ char *argv[3] = { conftest, plus, NULL }; ++ opterr = 0; ++ if (getopt (2, argv, "+a") != '?') ++ result |= 1; ++ } ++ /* This code succeeds on glibc 2.8, mingw, ++ and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, ++ IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ ++ { ++ static char program[] = "program"; ++ static char p[] = "-p"; ++ static char foo[] = "foo"; ++ static char bar[] = "bar"; ++ char *argv[] = { program, p, foo, bar, NULL }; ++ ++ optind = 1; ++ if (getopt (4, argv, "p::") != 'p') ++ result |= 2; ++ else if (optarg != NULL) ++ result |= 4; ++ else if (getopt (4, argv, "p::") != -1) ++ result |= 6; ++ else if (optind != 2) ++ result |= 8; ++ } ++ /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ ++ { ++ static char program[] = "program"; ++ static char foo[] = "foo"; ++ static char p[] = "-p"; ++ char *argv[] = { program, foo, p, NULL }; ++ optind = 0; ++ if (getopt (3, argv, "-p") != 1) ++ result |= 16; ++ else if (getopt (3, argv, "-p") != 'p') ++ result |= 16; ++ } ++ /* This code fails on glibc 2.11. */ ++ { ++ static char program[] = "program"; ++ static char b[] = "-b"; ++ static char a[] = "-a"; ++ char *argv[] = { program, b, a, NULL }; ++ optind = opterr = 0; ++ if (getopt (3, argv, "+:a:b") != 'b') ++ result |= 32; ++ else if (getopt (3, argv, "+:a:b") != ':') ++ result |= 32; ++ } ++ /* This code dumps core on glibc 2.14. */ ++ { ++ static char program[] = "program"; ++ static char w[] = "-W"; ++ static char dummy[] = "dummy"; ++ char *argv[] = { program, w, dummy, NULL }; ++ optind = opterr = 1; ++ if (getopt (3, argv, "W;") != 'W') ++ result |= 64; ++ } ++ return result; + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_getopt_gnu=yes ++else ++ gl_cv_func_getopt_gnu=no + fi +- +- fi +- fi +- ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 +-$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } +- case $gl_cv_header_errno_h_ENOLINK in +- yes | no) +- ENOLINK_HIDDEN=0; ENOLINK_VALUE= +- ;; +- *) +- ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" +- ;; +- esac +- +- +- fi + ++ case $gl_had_POSIXLY_CORRECT in ++ exported) ;; ++ yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; ++ *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; ++ esac + +- if test -n "$ERRNO_H"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 +-$as_echo_n "checking for EOVERFLOW value... " >&6; } +-if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then : ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 ++$as_echo "$gl_cv_func_getopt_gnu" >&6; } ++ if test "$gl_cv_func_getopt_gnu" != yes; then ++ gl_replace_getopt=yes ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5 ++$as_echo_n "checking for working GNU getopt_long function... " >&6; } ++if ${gl_cv_func_getopt_long_gnu+:} false; then : + $as_echo_n "(cached) " >&6 + else ++ if test "$cross_compiling" = yes; then : ++ case "$host_os" in ++ openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; ++ *) gl_cv_func_getopt_long_gnu="guessing yes";; ++ esac + +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++#include ++ #include ++ #include + +-#include +-#ifdef EOVERFLOW +-yes +-#endif ++int ++main () ++{ ++static const struct option long_options[] = ++ { ++ { "xtremely-",no_argument, NULL, 1003 }, ++ { "xtra", no_argument, NULL, 1001 }, ++ { "xtreme", no_argument, NULL, 1002 }, ++ { "xtremely", no_argument, NULL, 1003 }, ++ { NULL, 0, NULL, 0 } ++ }; ++ /* This code fails on OpenBSD 5.0. */ ++ { ++ static char program[] = "program"; ++ static char xtremel[] = "--xtremel"; ++ char *argv[] = { program, xtremel, NULL }; ++ int option_index; ++ optind = 1; opterr = 0; ++ if (getopt_long (2, argv, "", long_options, &option_index) != 1003) ++ return 1; ++ } ++ return 0; + ++ ; ++ return 0; ++} + _ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : +- gl_cv_header_errno_h_EOVERFLOW=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_getopt_long_gnu=yes + else +- gl_cv_header_errno_h_EOVERFLOW=no ++ gl_cv_func_getopt_long_gnu=no ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi +-rm -f conftest* +- +- if test $gl_cv_header_errno_h_EOVERFLOW = no; then +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ + +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-#ifdef EOVERFLOW +-yes +-#endif + +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : +- gl_cv_header_errno_h_EOVERFLOW=hidden + fi +-rm -f conftest* ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5 ++$as_echo "$gl_cv_func_getopt_long_gnu" >&6; } ++ case "$gl_cv_func_getopt_long_gnu" in ++ *yes) ;; ++ *) gl_replace_getopt=yes ;; ++ esac ++ fi ++ fi + +- if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then +- if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +-"; then : + +-fi + +- fi +- fi + +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 +-$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } +- case $gl_cv_header_errno_h_EOVERFLOW in +- yes | no) +- EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= +- ;; +- *) +- EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" +- ;; +- esac ++ ++ ++ REPLACE_GETOPT=0 ++ if test -n "$gl_replace_getopt"; then ++ REPLACE_GETOPT=1 ++ fi ++ ++ if test $REPLACE_GETOPT = 1; then ++ ++ GETOPT_H=getopt.h ++ ++$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h ++ + + + fi + + +-ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" +-if test "x$ac_cv_have_decl_strerror_r" = xyes; then : ++ ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" ++if test "x$ac_cv_have_decl_getenv" = xyes; then : + ac_have_decl=1 + else + ac_have_decl=0 + fi + + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRERROR_R $ac_have_decl ++#define HAVE_DECL_GETENV $ac_have_decl + _ACEOF + +-for ac_func in strerror_r ++ ++ ++ ++ ++ ++ for ac_func in $gl_func_list + do : +- ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" +-if test "x$ac_cv_func_strerror_r" = xyes; then : ++ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +-#define HAVE_STRERROR_R 1 ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF + + fi + done + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 +-$as_echo_n "checking whether strerror_r returns char *... " >&6; } +-if ${ac_cv_func_strerror_r_char_p+:} false; then : +- $as_echo_n "(cached) " >&6 +-else + +- ac_cv_func_strerror_r_char_p=no +- if test $ac_cv_have_decl_strerror_r = yes; then +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ + +- char buf[100]; +- char x = *strerror_r (0, buf, sizeof buf); +- char *p = strerror_r (0, buf, sizeof buf); +- return !p || x; + +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- ac_cv_func_strerror_r_char_p=yes +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- else +- # strerror_r is not declared. Choose between +- # systems that have relatively inaccessible declarations for the +- # function. BeOS and DEC UNIX 4.0 fall in this category, but the +- # former has a strerror_r that returns char*, while the latter +- # has a strerror_r that returns `int'. +- # This test should segfault on the DEC system. +- if test "$cross_compiling" = yes; then : +- : ++ ++ ++ ++ ++ ++ ++ ++ GNULIB__EXIT=0; ++ GNULIB_ATOLL=0; ++ GNULIB_CALLOC_POSIX=0; ++ GNULIB_CANONICALIZE_FILE_NAME=0; ++ GNULIB_GETLOADAVG=0; ++ GNULIB_GETSUBOPT=0; ++ GNULIB_GRANTPT=0; ++ GNULIB_MALLOC_POSIX=0; ++ GNULIB_MBTOWC=0; ++ GNULIB_MKDTEMP=0; ++ GNULIB_MKOSTEMP=0; ++ GNULIB_MKOSTEMPS=0; ++ GNULIB_MKSTEMP=0; ++ GNULIB_MKSTEMPS=0; ++ GNULIB_POSIX_OPENPT=0; ++ GNULIB_PTSNAME=0; ++ GNULIB_PTSNAME_R=0; ++ GNULIB_PUTENV=0; ++ GNULIB_QSORT_R=0; ++ GNULIB_RANDOM=0; ++ GNULIB_RANDOM_R=0; ++ GNULIB_REALLOC_POSIX=0; ++ GNULIB_REALPATH=0; ++ GNULIB_RPMATCH=0; ++ GNULIB_SECURE_GETENV=0; ++ GNULIB_SETENV=0; ++ GNULIB_STRTOD=0; ++ GNULIB_STRTOLL=0; ++ GNULIB_STRTOULL=0; ++ GNULIB_SYSTEM_POSIX=0; ++ GNULIB_UNLOCKPT=0; ++ GNULIB_UNSETENV=0; ++ GNULIB_WCTOMB=0; ++ HAVE__EXIT=1; ++ HAVE_ATOLL=1; ++ HAVE_CANONICALIZE_FILE_NAME=1; ++ HAVE_DECL_GETLOADAVG=1; ++ HAVE_GETSUBOPT=1; ++ HAVE_GRANTPT=1; ++ HAVE_MKDTEMP=1; ++ HAVE_MKOSTEMP=1; ++ HAVE_MKOSTEMPS=1; ++ HAVE_MKSTEMP=1; ++ HAVE_MKSTEMPS=1; ++ HAVE_POSIX_OPENPT=1; ++ HAVE_PTSNAME=1; ++ HAVE_PTSNAME_R=1; ++ HAVE_QSORT_R=1; ++ HAVE_RANDOM=1; ++ HAVE_RANDOM_H=1; ++ HAVE_RANDOM_R=1; ++ HAVE_REALPATH=1; ++ HAVE_RPMATCH=1; ++ HAVE_SECURE_GETENV=1; ++ HAVE_SETENV=1; ++ HAVE_DECL_SETENV=1; ++ HAVE_STRTOD=1; ++ HAVE_STRTOLL=1; ++ HAVE_STRTOULL=1; ++ HAVE_STRUCT_RANDOM_DATA=1; ++ HAVE_SYS_LOADAVG_H=0; ++ HAVE_UNLOCKPT=1; ++ HAVE_DECL_UNSETENV=1; ++ REPLACE_CALLOC=0; ++ REPLACE_CANONICALIZE_FILE_NAME=0; ++ REPLACE_MALLOC=0; ++ REPLACE_MBTOWC=0; ++ REPLACE_MKSTEMP=0; ++ REPLACE_PTSNAME=0; ++ REPLACE_PTSNAME_R=0; ++ REPLACE_PUTENV=0; ++ REPLACE_QSORT_R=0; ++ REPLACE_RANDOM_R=0; ++ REPLACE_REALLOC=0; ++ REPLACE_REALPATH=0; ++ REPLACE_SETENV=0; ++ REPLACE_STRTOD=0; ++ REPLACE_UNSETENV=0; ++ REPLACE_WCTOMB=0; ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 ++$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } ++if ${gl_cv_func_malloc_posix+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-$ac_includes_default +- extern char *strerror_r (); ++ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ + int + main () + { +-char buf[100]; +- char x = *strerror_r (0, buf, sizeof buf); +- return ! isalpha (x); ++#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ ++ choke me ++ #endif ++ + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- ac_cv_func_strerror_r_char_p=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_func_malloc_posix=yes ++else ++ gl_cv_func_malloc_posix=no + fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 ++$as_echo "$gl_cv_func_malloc_posix" >&6; } + +- fi + +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 +-$as_echo "$ac_cv_func_strerror_r_char_p" >&6; } +-if test $ac_cv_func_strerror_r_char_p = yes; then + +-$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h + +-fi + + +- XGETTEXT_EXTRA_OPTIONS= + + ++ : + + + + + ++ if test $ac_cv_func__set_invalid_parameter_handler = yes; then ++ HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 + +- for ac_func in $gl_func_list +-do : +- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +-if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF ++$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h ++ ++ else ++ HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 ++ fi ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 ++$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } ++if ${ac_cv_header_stdbool_h+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ #include + ++ #ifdef __cplusplus ++ typedef bool Bool; ++ #else ++ typedef _Bool Bool; ++ #ifndef bool ++ "error: bool is not defined" ++ #endif ++ #ifndef false ++ "error: false is not defined" ++ #endif ++ #if false ++ "error: false is not 0" ++ #endif ++ #ifndef true ++ "error: true is not defined" ++ #endif ++ #if true != 1 ++ "error: true is not 1" ++ #endif ++ #endif ++ ++ #ifndef __bool_true_false_are_defined ++ "error: __bool_true_false_are_defined is not defined" ++ #endif ++ ++ struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s; ++ ++ char a[true == 1 ? 1 : -1]; ++ char b[false == 0 ? 1 : -1]; ++ char c[__bool_true_false_are_defined == 1 ? 1 : -1]; ++ char d[(bool) 0.5 == true ? 1 : -1]; ++ /* See body of main program for 'e'. */ ++ char f[(Bool) 0.0 == false ? 1 : -1]; ++ char g[true]; ++ char h[sizeof (Bool)]; ++ char i[sizeof s.t]; ++ enum { j = false, k = true, l = false * true, m = true * 256 }; ++ /* The following fails for ++ HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ ++ Bool n[m]; ++ char o[sizeof n == m * sizeof n[0] ? 1 : -1]; ++ char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; ++ /* Catch a bug in an HP-UX C compiler. See ++ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html ++ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html ++ */ ++ Bool q = true; ++ Bool *pq = &q; ++ bool *qq = &q; ++ ++int ++main () ++{ ++ ++ bool e = &s; ++ *pq |= q; *pq |= ! q; ++ *qq |= q; *qq |= ! q; ++ /* Refer to every declared value, to avoid compiler optimizations. */ ++ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l ++ + !m + !n + !o + !p + !q + !pq + !qq); ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_header_stdbool_h=yes ++else ++ ac_cv_header_stdbool_h=no + fi +-done ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 ++$as_echo "$ac_cv_header_stdbool_h" >&6; } ++ ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" ++if test "x$ac_cv_type__Bool" = xyes; then : + ++cat >>confdefs.h <<_ACEOF ++#define HAVE__BOOL 1 ++_ACEOF + + ++fi + + + + REPLACE_NULL=0; ++ HAVE_MAX_ALIGN_T=1; + HAVE_WCHAR_T=1; + + +@@ -13778,212 +15143,72 @@ + REPLACE_STRERROR=0; + REPLACE_STRERROR_R=0; + REPLACE_STRNCAT=0; +- REPLACE_STRNDUP=0; +- REPLACE_STRNLEN=0; +- REPLACE_STRSIGNAL=0; +- REPLACE_STRTOK_R=0; +- UNDEFINE_STRTOK_R=0; +- +- +- REPLACE_STRERROR_0=0 +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5 +-$as_echo_n "checking whether strerror(0) succeeds... " >&6; } +-if ${gl_cv_func_strerror_0_works+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then : +- case "$host_os" in +- # Guess yes on glibc systems. +- *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; +- # If we don't know, assume the worst. +- *) gl_cv_func_strerror_0_works="guessing no" ;; +- esac +- +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- #include +- +-int +-main () +-{ +-int result = 0; +- char *str; +- errno = 0; +- str = strerror (0); +- if (!*str) result |= 1; +- if (errno) result |= 2; +- if (strstr (str, "nknown") || strstr (str, "ndefined")) +- result |= 4; +- return result; +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- gl_cv_func_strerror_0_works=yes +-else +- gl_cv_func_strerror_0_works=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5 +-$as_echo "$gl_cv_func_strerror_0_works" >&6; } +- case "$gl_cv_func_strerror_0_works" in +- *yes) ;; +- *) +- REPLACE_STRERROR_0=1 +- +-$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h +- +- ;; +- esac +- +- +- GNULIB_CHDIR=0; +- GNULIB_CHOWN=0; +- GNULIB_CLOSE=0; +- GNULIB_DUP=0; +- GNULIB_DUP2=0; +- GNULIB_DUP3=0; +- GNULIB_ENVIRON=0; +- GNULIB_EUIDACCESS=0; +- GNULIB_FACCESSAT=0; +- GNULIB_FCHDIR=0; +- GNULIB_FCHOWNAT=0; +- GNULIB_FDATASYNC=0; +- GNULIB_FSYNC=0; +- GNULIB_FTRUNCATE=0; +- GNULIB_GETCWD=0; +- GNULIB_GETDOMAINNAME=0; +- GNULIB_GETDTABLESIZE=0; +- GNULIB_GETGROUPS=0; +- GNULIB_GETHOSTNAME=0; +- GNULIB_GETLOGIN=0; +- GNULIB_GETLOGIN_R=0; +- GNULIB_GETPAGESIZE=0; +- GNULIB_GETUSERSHELL=0; +- GNULIB_GROUP_MEMBER=0; +- GNULIB_ISATTY=0; +- GNULIB_LCHOWN=0; +- GNULIB_LINK=0; +- GNULIB_LINKAT=0; +- GNULIB_LSEEK=0; +- GNULIB_PIPE=0; +- GNULIB_PIPE2=0; +- GNULIB_PREAD=0; +- GNULIB_PWRITE=0; +- GNULIB_READ=0; +- GNULIB_READLINK=0; +- GNULIB_READLINKAT=0; +- GNULIB_RMDIR=0; +- GNULIB_SETHOSTNAME=0; +- GNULIB_SLEEP=0; +- GNULIB_SYMLINK=0; +- GNULIB_SYMLINKAT=0; +- GNULIB_TTYNAME_R=0; +- GNULIB_UNISTD_H_NONBLOCKING=0; +- GNULIB_UNISTD_H_SIGPIPE=0; +- GNULIB_UNLINK=0; +- GNULIB_UNLINKAT=0; +- GNULIB_USLEEP=0; +- GNULIB_WRITE=0; +- HAVE_CHOWN=1; +- HAVE_DUP2=1; +- HAVE_DUP3=1; +- HAVE_EUIDACCESS=1; +- HAVE_FACCESSAT=1; +- HAVE_FCHDIR=1; +- HAVE_FCHOWNAT=1; +- HAVE_FDATASYNC=1; +- HAVE_FSYNC=1; +- HAVE_FTRUNCATE=1; +- HAVE_GETDTABLESIZE=1; +- HAVE_GETGROUPS=1; +- HAVE_GETHOSTNAME=1; +- HAVE_GETLOGIN=1; +- HAVE_GETPAGESIZE=1; +- HAVE_GROUP_MEMBER=1; +- HAVE_LCHOWN=1; +- HAVE_LINK=1; +- HAVE_LINKAT=1; +- HAVE_PIPE=1; +- HAVE_PIPE2=1; +- HAVE_PREAD=1; +- HAVE_PWRITE=1; +- HAVE_READLINK=1; +- HAVE_READLINKAT=1; +- HAVE_SETHOSTNAME=1; +- HAVE_SLEEP=1; +- HAVE_SYMLINK=1; +- HAVE_SYMLINKAT=1; +- HAVE_UNLINKAT=1; +- HAVE_USLEEP=1; +- HAVE_DECL_ENVIRON=1; +- HAVE_DECL_FCHDIR=1; +- HAVE_DECL_FDATASYNC=1; +- HAVE_DECL_GETDOMAINNAME=1; +- HAVE_DECL_GETLOGIN_R=1; +- HAVE_DECL_GETPAGESIZE=1; +- HAVE_DECL_GETUSERSHELL=1; +- HAVE_DECL_SETHOSTNAME=1; +- HAVE_DECL_TTYNAME_R=1; +- HAVE_OS_H=0; +- HAVE_SYS_PARAM_H=0; +- REPLACE_CHOWN=0; +- REPLACE_CLOSE=0; +- REPLACE_DUP=0; +- REPLACE_DUP2=0; +- REPLACE_FCHOWNAT=0; +- REPLACE_FTRUNCATE=0; +- REPLACE_GETCWD=0; +- REPLACE_GETDOMAINNAME=0; +- REPLACE_GETDTABLESIZE=0; +- REPLACE_GETLOGIN_R=0; +- REPLACE_GETGROUPS=0; +- REPLACE_GETPAGESIZE=0; +- REPLACE_ISATTY=0; +- REPLACE_LCHOWN=0; +- REPLACE_LINK=0; +- REPLACE_LINKAT=0; +- REPLACE_LSEEK=0; +- REPLACE_PREAD=0; +- REPLACE_PWRITE=0; +- REPLACE_READ=0; +- REPLACE_READLINK=0; +- REPLACE_RMDIR=0; +- REPLACE_SLEEP=0; +- REPLACE_SYMLINK=0; +- REPLACE_TTYNAME_R=0; +- REPLACE_UNLINK=0; +- REPLACE_UNLINKAT=0; +- REPLACE_USLEEP=0; +- REPLACE_WRITE=0; +- UNISTD_H_HAVE_WINSOCK2_H=0; +- UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; +- +- ++ REPLACE_STRNDUP=0; ++ REPLACE_STRNLEN=0; ++ REPLACE_STRSIGNAL=0; ++ REPLACE_STRTOK_R=0; ++ UNDEFINE_STRTOK_R=0; + + ++ REPLACE_STRERROR_0=0 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5 ++$as_echo_n "checking whether strerror(0) succeeds... " >&6; } ++if ${gl_cv_func_strerror_0_works+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test "$cross_compiling" = yes; then : ++ case "$host_os" in ++ # Guess yes on glibc systems. ++ *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; ++ # If we don't know, assume the worst. ++ *) gl_cv_func_strerror_0_works="guessing no" ;; ++ esac + ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++ #include + +- for ac_header in $gl_header_list +-do : +- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++int ++main () ++{ ++int result = 0; ++ char *str; ++ errno = 0; ++ str = strerror (0); ++ if (!*str) result |= 1; ++ if (errno) result |= 2; ++ if (strstr (str, "nknown") || strstr (str, "ndefined")) ++ result |= 4; ++ return result; ++ ; ++ return 0; ++} + _ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_strerror_0_works=yes ++else ++ gl_cv_func_strerror_0_works=no ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi ++ + + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5 ++$as_echo "$gl_cv_func_strerror_0_works" >&6; } ++ case "$gl_cv_func_strerror_0_works" in ++ *yes) ;; ++ *) ++ REPLACE_STRERROR_0=1 ++ ++$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h ++ ++ ;; ++ esac + +-done + + + +@@ -14288,120 +15513,380 @@ + + + +- gl_source_base='gl' ++ gl_source_base='gl' ++ ++ if test "x$datarootdir" = x; then ++ datarootdir='${datadir}' ++ ++ fi ++ if test "x$docdir" = x; then ++ docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' ++ ++ fi ++ if test "x$htmldir" = x; then ++ htmldir='${docdir}' ++ ++ fi ++ if test "x$dvidir" = x; then ++ dvidir='${docdir}' ++ ++ fi ++ if test "x$pdfdir" = x; then ++ pdfdir='${docdir}' ++ ++ fi ++ if test "x$psdir" = x; then ++ psdir='${docdir}' ++ ++ fi ++ if test "x$lispdir" = x; then ++ lispdir='${datarootdir}/emacs/site-lisp' ++ ++ fi ++ if test "x$localedir" = x; then ++ localedir='${datarootdir}/locale' ++ ++ fi ++ if test "x$runstatedir" = x; then ++ runstatedir='${localstatedir}/run' ++ ++ fi ++ ++ pkglibexecdir='${libexecdir}/${PACKAGE}' ++ ++ ++ ++ ++ ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 ++$as_echo_n "checking whether // is distinct from /... " >&6; } ++if ${gl_cv_double_slash_root+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test x"$cross_compiling" = xyes ; then ++ # When cross-compiling, there is no way to tell whether // is special ++ # short of a list of hosts. However, the only known hosts to date ++ # that have a distinct // are Apollo DomainOS (too old to port to), ++ # Cygwin, and z/OS. If anyone knows of another system for which // has ++ # special semantics and is distinct from /, please report it to ++ # . ++ case $host in ++ *-cygwin | i370-ibm-openedition) ++ gl_cv_double_slash_root=yes ;; ++ *) ++ # Be optimistic and assume that / and // are the same when we ++ # don't know. ++ gl_cv_double_slash_root='unknown, assuming no' ;; ++ esac ++ else ++ set x `ls -di / // 2>/dev/null` ++ if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then ++ gl_cv_double_slash_root=no ++ else ++ gl_cv_double_slash_root=yes ++ fi ++ fi ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 ++$as_echo "$gl_cv_double_slash_root" >&6; } ++ if test "$gl_cv_double_slash_root" = yes; then ++ ++$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h ++ ++ fi ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 ++$as_echo_n "checking for error_at_line... " >&6; } ++if ${ac_cv_lib_error_at_line+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int ++main () ++{ ++error_at_line (0, 0, "", 0, "an error occurred"); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_error_at_line=yes ++else ++ ac_cv_lib_error_at_line=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 ++$as_echo "$ac_cv_lib_error_at_line" >&6; } ++ ++ if test $ac_cv_lib_error_at_line = no; then ++ ++ ++ ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" ++ ++ ++ ++ : ++ ++ fi ++ ++ ++ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format" ++ ++ ++ ++ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format" ++ ++ ++ ++ ++ ++ ++ ++ if test $REPLACE_GETOPT = 1; then ++ ++ ++ ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" ++ ++ ++ ++ : ++ ++ ++ ++ ++ ++ ++ GNULIB_GL_UNISTD_H_GETOPT=1 ++ fi ++ ++ ++ ++$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h ++ ++ ++ ++ ++ ++ ++ ++ REPLACE_GETOPT=0 ++ if test -n "$gl_replace_getopt"; then ++ REPLACE_GETOPT=1 ++ fi ++ ++ if test $REPLACE_GETOPT = 1; then ++ ++ GETOPT_H=getopt.h ++ ++$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h ++ ++ ++ ++ fi ++ ++ if test $REPLACE_GETOPT = 1; then ++ ++ ++ ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" ++ ++ ++ ++ : ++ ++ ++ + +- if test "x$datarootdir" = x; then +- datarootdir='${datadir}' + +- fi +- if test "x$docdir" = x; then +- docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' + ++ GNULIB_GL_UNISTD_H_GETOPT=1 + fi +- if test "x$htmldir" = x; then +- htmldir='${docdir}' + +- fi +- if test "x$dvidir" = x; then +- dvidir='${docdir}' + +- fi +- if test "x$pdfdir" = x; then +- pdfdir='${docdir}' + +- fi +- if test "x$psdir" = x; then +- psdir='${docdir}' ++ : + +- fi +- if test "x$lispdir" = x; then +- lispdir='${datarootdir}/emacs/site-lisp' + +- fi +- if test "x$localedir" = x; then +- localedir='${datarootdir}/locale' + +- fi +- if test "x$runstatedir" = x; then +- runstatedir='${localstatedir}/run' + +- fi + +- pkglibexecdir='${libexecdir}/${PACKAGE}' + + + + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 +-$as_echo_n "checking for error_at_line... " >&6; } +-if ${ac_cv_lib_error_at_line+:} false; then : ++ ac_found=0 ++ ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include ++" ++if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl ++_ACEOF ++if test $ac_have_decl = 1; then : ++ ac_found=1 ++fi ++ ++ ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include ++" ++if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl ++_ACEOF ++if test $ac_have_decl = 1; then : ++ ac_found=1 ++fi ++ ++ ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include ++" ++if test "x$ac_cv_have_decl___argv" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL___ARGV $ac_have_decl ++_ACEOF ++if test $ac_have_decl = 1; then : ++ ac_found=1 ++fi ++ ++ ++ # Incur the cost of this test only if none of the above worked. ++ if test $ac_found = 0; then ++ # On OpenBSD 5.1, using the global __progname variable appears to be ++ # the only way to implement getprogname. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5 ++$as_echo_n "checking whether __progname is defined in default libraries... " >&6; } ++if ${gl_cv_var___progname+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ ++ gl_cv_var___progname= ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++extern char *__progname; + int + main () + { +-error_at_line (0, 0, "", 0, "an error occurred"); ++return *__progname; ++ + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_error_at_line=yes +-else +- ac_cv_lib_error_at_line=no ++ gl_cv_var___progname=yes ++ + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ++ ++ + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 +-$as_echo "$ac_cv_lib_error_at_line" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5 ++$as_echo "$gl_cv_var___progname" >&6; } ++ if test "$gl_cv_var___progname" = yes; then + +- if test $ac_cv_lib_error_at_line = no; then ++$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h + ++ fi ++ fi + + + + + + ++ if test $gl_cv_func_malloc_posix = yes; then + +- gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" ++$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h + ++ else ++ REPLACE_MALLOC=1 ++ fi + ++ if test $REPLACE_MALLOC = 1; then + +- : + +- fi + + +- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format" + + + +- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format" + ++ gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" + ++ fi + + + + +- : + ++ GNULIB_MALLOC_POSIX=1 + + + + +- if test $ac_cv_func__set_invalid_parameter_handler = yes; then +- HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 + +-$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h ++$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h ++ + +- else +- HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 +- fi + + + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then +@@ -14417,8 +15902,6 @@ + + fi + +- +- + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + + +@@ -14674,7 +16157,43 @@ + + + ++ # Define two additional variables used in the Makefile substitution. ++ ++ if test "$ac_cv_header_stdbool_h" = yes; then ++ STDBOOL_H='' ++ else ++ STDBOOL_H='stdbool.h' ++ fi ++ ++ if test -n "$STDBOOL_H"; then ++ GL_GENERATE_STDBOOL_H_TRUE= ++ GL_GENERATE_STDBOOL_H_FALSE='#' ++else ++ GL_GENERATE_STDBOOL_H_TRUE='#' ++ GL_GENERATE_STDBOOL_H_FALSE= ++fi ++ ++ ++ if test "$ac_cv_type__Bool" = yes; then ++ HAVE__BOOL=1 ++ else ++ HAVE__BOOL=0 ++ fi ++ ++ ++ ++ ++ + STDDEF_H= ++ ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include ++ ++" ++if test "x$ac_cv_type_max_align_t" = xyes; then : ++ ++else ++ HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h ++fi ++ + if test $gt_cv_c_wchar_t = no; then + HAVE_WCHAR_T=0 + STDDEF_H=stddef.h +@@ -14795,6 +16314,9 @@ + + + ++ $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h ++ ++ + + + +@@ -14867,6 +16389,48 @@ + + + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5 ++$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; } ++if ${gl_cv_func_printf_attribute_flavor+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ #define __STDC_FORMAT_MACROS 1 ++ #include ++ #include ++ /* For non-mingw systems, compilation will trivially succeed. ++ For mingw, compilation will succeed for older mingw (system ++ printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ ++ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \ ++ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) ++ extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; ++ #endif ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_func_printf_attribute_flavor=system ++else ++ gl_cv_func_printf_attribute_flavor=gnu ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5 ++$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; } ++ if test "$gl_cv_func_printf_attribute_flavor" = gnu; then ++ ++$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h ++ ++ fi ++ + GNULIB_FSCANF=1 + + +@@ -14949,6 +16513,127 @@ + + + ++ ++ ++ ++ ++ ++ if test $gl_cv_have_include_next = yes; then ++ gl_cv_next_stdlib_h='<'stdlib.h'>' ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 ++$as_echo_n "checking absolute name of ... " >&6; } ++if ${gl_cv_next_stdlib_h+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ++ ++ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++_ACEOF ++ case "$host_os" in ++ aix*) gl_absname_cpp="$ac_cpp -C" ;; ++ *) gl_absname_cpp="$ac_cpp" ;; ++ esac ++ ++ case "$host_os" in ++ mingw*) ++ gl_dirsep_regex='[/\\]' ++ ;; ++ *) ++ gl_dirsep_regex='\/' ++ ;; ++ esac ++ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' ++ gl_header_literal_regex=`echo 'stdlib.h' \ ++ | sed -e "$gl_make_literal_regex_sed"` ++ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ ++ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ ++ s|^/[^/]|//&| ++ p ++ q ++ }' ++ ++ gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n "$gl_absolute_header_sed"` ++ ++ gl_header=$gl_cv_absolute_stdlib_h ++ gl_cv_next_stdlib_h='"'$gl_header'"' ++ ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 ++$as_echo "$gl_cv_next_stdlib_h" >&6; } ++ fi ++ NEXT_STDLIB_H=$gl_cv_next_stdlib_h ++ ++ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then ++ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' ++ gl_next_as_first_directive='<'stdlib.h'>' ++ else ++ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' ++ gl_next_as_first_directive=$gl_cv_next_stdlib_h ++ fi ++ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive ++ ++ ++ ++ ++ ++ ++ for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do ++ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 ++$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } ++if eval \${$as_gl_Symbol+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++#if HAVE_SYS_LOADAVG_H ++# include ++#endif ++#if HAVE_RANDOM_H ++# include ++#endif ++ ++int ++main () ++{ ++#undef $gl_func ++ (void) $gl_func; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$as_gl_Symbol=yes" ++else ++ eval "$as_gl_Symbol=no" ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++ eval ac_cv_have_decl_$gl_func=yes ++fi ++ done ++ ++ ++ ++ ++ ++ ++ + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5 + $as_echo_n "checking for working strerror function... " >&6; } +@@ -15384,10 +17069,11 @@ + CFLAGS="$CFLAGS -W -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-void f (void) ++int f (void) + { + typedef struct { int a; int b; } s_t; + s_t s1 = { 0, }; ++ return s1.b; + } + + int +@@ -15456,17 +17142,19 @@ + + gl_manywarn_set= + for gl_manywarn_item in \ ++ -fno-common \ + -W \ + -Wabi \ + -Waddress \ + -Waggressive-loop-optimizations \ + -Wall \ +- -Warray-bounds \ + -Wattributes \ + -Wbad-function-cast \ ++ -Wbool-compare \ + -Wbuiltin-macro-redefined \ + -Wcast-align \ + -Wchar-subscripts \ ++ -Wchkp \ + -Wclobbered \ + -Wcomment \ + -Wcomments \ +@@ -15475,9 +17163,13 @@ + -Wdate-time \ + -Wdeprecated \ + -Wdeprecated-declarations \ ++ -Wdesignated-init \ + -Wdisabled-optimization \ ++ -Wdiscarded-array-qualifiers \ ++ -Wdiscarded-qualifiers \ + -Wdiv-by-zero \ + -Wdouble-promotion \ ++ -Wduplicated-cond \ + -Wempty-body \ + -Wendif-labels \ + -Wenum-compare \ +@@ -15486,22 +17178,31 @@ + -Wformat-extra-args \ + -Wformat-nonliteral \ + -Wformat-security \ ++ -Wformat-signedness \ + -Wformat-y2k \ + -Wformat-zero-length \ ++ -Wframe-address \ + -Wfree-nonheap-object \ ++ -Whsa \ ++ -Wignored-attributes \ + -Wignored-qualifiers \ + -Wimplicit \ + -Wimplicit-function-declaration \ + -Wimplicit-int \ ++ -Wincompatible-pointer-types \ + -Winit-self \ + -Winline \ ++ -Wint-conversion \ + -Wint-to-pointer-cast \ + -Winvalid-memory-model \ + -Winvalid-pch \ + -Wjump-misses-init \ ++ -Wlogical-not-parentheses \ + -Wlogical-op \ + -Wmain \ + -Wmaybe-uninitialized \ ++ -Wmemset-transposed-args \ ++ -Wmisleading-indentation \ + -Wmissing-braces \ + -Wmissing-declarations \ + -Wmissing-field-initializers \ +@@ -15512,6 +17213,9 @@ + -Wnarrowing \ + -Wnested-externs \ + -Wnonnull \ ++ -Wnonnull-compare \ ++ -Wnull-dereference \ ++ -Wodr \ + -Wold-style-declaration \ + -Wold-style-definition \ + -Wopenmp-simd \ +@@ -15527,8 +17231,13 @@ + -Wpragmas \ + -Wreturn-local-addr \ + -Wreturn-type \ ++ -Wscalar-storage-order \ + -Wsequence-point \ + -Wshadow \ ++ -Wshift-count-negative \ ++ -Wshift-count-overflow \ ++ -Wshift-negative-value \ ++ -Wsizeof-array-argument \ + -Wsizeof-pointer-memaccess \ + -Wstack-protector \ + -Wstrict-aliasing \ +@@ -15538,10 +17247,14 @@ + -Wsuggest-attribute=format \ + -Wsuggest-attribute=noreturn \ + -Wsuggest-attribute=pure \ ++ -Wsuggest-final-methods \ ++ -Wsuggest-final-types \ + -Wswitch \ ++ -Wswitch-bool \ + -Wswitch-default \ + -Wsync-nand \ + -Wsystem-headers \ ++ -Wtautological-compare \ + -Wtrampolines \ + -Wtrigraphs \ + -Wtype-limits \ +@@ -15570,9 +17283,12 @@ + gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" + done + +- # gcc --help=warnings outputs an unusual form for this option; list +- # it here so that the above 'comm' command doesn't report a false match. ++ # gcc --help=warnings outputs an unusual form for these options; list ++ # them here so that the above 'comm' command doesn't report a false match. ++ gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2" + gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc" ++ gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2" ++ gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2" + + # These are needed for older GCC versions. + if test -n "$GCC"; then +@@ -15929,6 +17645,10 @@ + as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then ++ as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff -urN libidn2-0.11.pristine/src/gl/basename-lgpl.c libidn2-0.11/src/gl/basename-lgpl.c +--- libidn2-0.11.pristine/src/gl/basename-lgpl.c 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/basename-lgpl.c 2016-11-24 21:38:50.541571129 +0100 +@@ -0,0 +1,75 @@ ++/* basename.c -- return the last element in a file name ++ ++ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2016 Free Software ++ Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#include ++ ++#include "dirname.h" ++ ++#include ++ ++/* Return the address of the last file name component of NAME. If ++ NAME has no relative file name components because it is a file ++ system root, return the empty string. */ ++ ++char * ++last_component (char const *name) ++{ ++ char const *base = name + FILE_SYSTEM_PREFIX_LEN (name); ++ char const *p; ++ bool saw_slash = false; ++ ++ while (ISSLASH (*base)) ++ base++; ++ ++ for (p = base; *p; p++) ++ { ++ if (ISSLASH (*p)) ++ saw_slash = true; ++ else if (saw_slash) ++ { ++ base = p; ++ saw_slash = false; ++ } ++ } ++ ++ return (char *) base; ++} ++ ++/* Return the length of the basename NAME. Typically NAME is the ++ value returned by base_name or last_component. Act like strlen ++ (NAME), except omit all trailing slashes. */ ++ ++size_t ++base_len (char const *name) ++{ ++ size_t len; ++ size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name); ++ ++ for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) ++ continue; ++ ++ if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1 ++ && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2]) ++ return 2; ++ ++ if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len ++ && len == prefix_len && ISSLASH (name[prefix_len])) ++ return prefix_len + 1; ++ ++ return len; ++} +diff -urN libidn2-0.11.pristine/src/gl/dirname.h libidn2-0.11/src/gl/dirname.h +--- libidn2-0.11.pristine/src/gl/dirname.h 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/dirname.h 2016-11-24 21:38:50.547571341 +0100 +@@ -0,0 +1,54 @@ ++/* Take file names apart into directory and base names. ++ ++ Copyright (C) 1998, 2001, 2003-2006, 2009-2016 Free Software Foundation, ++ Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#ifndef DIRNAME_H_ ++# define DIRNAME_H_ 1 ++ ++# include ++# include ++# include "dosname.h" ++ ++# ifndef DIRECTORY_SEPARATOR ++# define DIRECTORY_SEPARATOR '/' ++# endif ++ ++# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT ++# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 ++# endif ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++# if GNULIB_DIRNAME ++char *base_name (char const *file); ++char *dir_name (char const *file); ++# endif ++ ++char *mdir_name (char const *file); ++size_t base_len (char const *file) _GL_ATTRIBUTE_PURE; ++size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE; ++char *last_component (char const *file) _GL_ATTRIBUTE_PURE; ++ ++bool strip_trailing_slashes (char *file); ++ ++#ifdef __cplusplus ++} /* extern "C" */ ++#endif ++ ++#endif /* not DIRNAME_H_ */ +diff -urN libidn2-0.11.pristine/src/gl/dirname-lgpl.c libidn2-0.11/src/gl/dirname-lgpl.c +--- libidn2-0.11.pristine/src/gl/dirname-lgpl.c 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/dirname-lgpl.c 2016-11-24 21:38:50.544571236 +0100 +@@ -0,0 +1,86 @@ ++/* dirname.c -- return all but the last element in a file name ++ ++ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2016 Free Software ++ Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#include ++ ++#include "dirname.h" ++ ++#include ++#include ++ ++/* Return the length of the prefix of FILE that will be used by ++ dir_name. If FILE is in the working directory, this returns zero ++ even though 'dir_name (FILE)' will return ".". Works properly even ++ if there are trailing slashes (by effectively ignoring them). */ ++ ++size_t ++dir_len (char const *file) ++{ ++ size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file); ++ size_t length; ++ ++ /* Advance prefix_length beyond important leading slashes. */ ++ prefix_length += (prefix_length != 0 ++ ? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE ++ && ISSLASH (file[prefix_length])) ++ : (ISSLASH (file[0]) ++ ? ((DOUBLE_SLASH_IS_DISTINCT_ROOT ++ && ISSLASH (file[1]) && ! ISSLASH (file[2]) ++ ? 2 : 1)) ++ : 0)); ++ ++ /* Strip the basename and any redundant slashes before it. */ ++ for (length = last_component (file) - file; ++ prefix_length < length; length--) ++ if (! ISSLASH (file[length - 1])) ++ break; ++ return length; ++} ++ ++ ++/* In general, we can't use the builtin 'dirname' function if available, ++ since it has different meanings in different environments. ++ In some environments the builtin 'dirname' modifies its argument. ++ ++ Return the leading directories part of FILE, allocated with malloc. ++ Works properly even if there are trailing slashes (by effectively ++ ignoring them). Return NULL on failure. ++ ++ If lstat (FILE) would succeed, then { chdir (dir_name (FILE)); ++ lstat (base_name (FILE)); } will access the same file. Likewise, ++ if the sequence { chdir (dir_name (FILE)); ++ rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE ++ to "foo" in the same directory FILE was in. */ ++ ++char * ++mdir_name (char const *file) ++{ ++ size_t length = dir_len (file); ++ bool append_dot = (length == 0 ++ || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE ++ && length == FILE_SYSTEM_PREFIX_LEN (file) ++ && file[2] != '\0' && ! ISSLASH (file[2]))); ++ char *dir = malloc (length + append_dot + 1); ++ if (!dir) ++ return NULL; ++ memcpy (dir, file, length); ++ if (append_dot) ++ dir[length++] = '.'; ++ dir[length] = '\0'; ++ return dir; ++} +diff -urN libidn2-0.11.pristine/src/gl/dosname.h libidn2-0.11/src/gl/dosname.h +--- libidn2-0.11.pristine/src/gl/dosname.h 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/dosname.h 2016-11-24 21:38:50.550571446 +0100 +@@ -0,0 +1,53 @@ ++/* File names on MS-DOS/Windows systems. ++ ++ Copyright (C) 2000-2001, 2004-2006, 2009-2016 Free Software Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . ++ ++ From Paul Eggert and Jim Meyering. */ ++ ++#ifndef _DOSNAME_H ++#define _DOSNAME_H ++ ++#if (defined _WIN32 || defined __WIN32__ || \ ++ defined __MSDOS__ || defined __CYGWIN__ || \ ++ defined __EMX__ || defined __DJGPP__) ++ /* This internal macro assumes ASCII, but all hosts that support drive ++ letters use ASCII. */ ++# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \ ++ <= 'z' - 'a') ++# define FILE_SYSTEM_PREFIX_LEN(Filename) \ ++ (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0) ++# ifndef __CYGWIN__ ++# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1 ++# endif ++# define ISSLASH(C) ((C) == '/' || (C) == '\\') ++#else ++# define FILE_SYSTEM_PREFIX_LEN(Filename) 0 ++# define ISSLASH(C) ((C) == '/') ++#endif ++ ++#ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE ++# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 ++#endif ++ ++#if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE ++# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)]) ++# else ++# define IS_ABSOLUTE_FILE_NAME(F) \ ++ (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0) ++#endif ++#define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F)) ++ ++#endif /* DOSNAME_H_ */ +diff -urN libidn2-0.11.pristine/src/gl/errno.in.h libidn2-0.11/src/gl/errno.in.h +--- libidn2-0.11.pristine/src/gl/errno.in.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/errno.in.h 2016-11-24 21:38:50.620573902 +0100 +@@ -1,6 +1,6 @@ + /* A POSIX-like . + +- Copyright (C) 2008-2014 Free Software Foundation, Inc. ++ Copyright (C) 2008-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +diff -urN libidn2-0.11.pristine/src/gl/error.c libidn2-0.11/src/gl/error.c +--- libidn2-0.11.pristine/src/gl/error.c 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/error.c 2016-11-24 21:38:50.624574042 +0100 +@@ -1,5 +1,5 @@ + /* Error handler for noninteractive utilities +- Copyright (C) 1990-1998, 2000-2007, 2009-2014 Free Software Foundation, Inc. ++ Copyright (C) 1990-1998, 2000-2007, 2009-2016 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + This program is free software: you can redistribute it and/or modify +@@ -42,6 +42,8 @@ + # define USE_UNLOCKED_IO 0 + # define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b) + # define _GL_ARG_NONNULL(a) ++#else ++# include "getprogname.h" + #endif + + #if USE_UNLOCKED_IO +@@ -113,9 +115,7 @@ + # endif + # endif + +-/* The calling program should define program_name and set it to the +- name of the executing program. */ +-extern char *program_name; ++#define program_name getprogname () + + # if HAVE_STRERROR_R || defined strerror_r + # define __strerror_r strerror_r +@@ -379,10 +379,10 @@ + } + + #if _LIBC +- __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ", ++ __fxprintf (NULL, file_name != NULL ? "%s:%u: " : " ", + file_name, line_number); + #else +- fprintf (stderr, file_name != NULL ? "%s:%d: " : " ", ++ fprintf (stderr, file_name != NULL ? "%s:%u: " : " ", + file_name, line_number); + #endif + +diff -urN libidn2-0.11.pristine/src/gl/error.h libidn2-0.11/src/gl/error.h +--- libidn2-0.11.pristine/src/gl/error.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/error.h 2016-11-24 21:38:50.628574182 +0100 +@@ -1,5 +1,5 @@ + /* Declaration for error-reporting function +- Copyright (C) 1995-1997, 2003, 2006, 2008-2014 Free Software Foundation, ++ Copyright (C) 1995-1997, 2003, 2006, 2008-2016 Free Software Foundation, + Inc. + This file is part of the GNU C Library. + +@@ -31,6 +31,16 @@ + # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ + #endif + ++/* On mingw, the flavor of printf depends on whether the extensions module ++ * is in use; the check for determines the witness macro. */ ++#ifndef _GL_ATTRIBUTE_SPEC_PRINTF ++# if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU ++# define _GL_ATTRIBUTE_SPEC_PRINTF __gnu_printf__ ++# else ++# define _GL_ATTRIBUTE_SPEC_PRINTF __printf__ ++# endif ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -40,11 +50,11 @@ + If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */ + + extern void error (int __status, int __errnum, const char *__format, ...) +- _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4)); ++ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 3, 4)); + + extern void error_at_line (int __status, int __errnum, const char *__fname, + unsigned int __lineno, const char *__format, ...) +- _GL_ATTRIBUTE_FORMAT ((__printf__, 5, 6)); ++ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 5, 6)); + + /* If NULL, error will flush stdout, then print on stderr the program + name, a colon and a space. Otherwise, error will call this +diff -urN libidn2-0.11.pristine/src/gl/getopt1.c libidn2-0.11/src/gl/getopt1.c +--- libidn2-0.11.pristine/src/gl/getopt1.c 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/getopt1.c 2016-11-24 21:38:50.560571796 +0100 +@@ -0,0 +1,170 @@ ++/* getopt_long and getopt_long_only entry points for GNU getopt. ++ Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2016 Free Software ++ Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#ifdef _LIBC ++# include ++#else ++# include ++# include "getopt.h" ++#endif ++#include "getopt_int.h" ++ ++#include ++ ++/* This needs to come after some library #include ++ to get __GNU_LIBRARY__ defined. */ ++#ifdef __GNU_LIBRARY__ ++#include ++#endif ++ ++#ifndef NULL ++#define NULL 0 ++#endif ++ ++int ++getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, ++ const struct option *long_options, int *opt_index) ++{ ++ return _getopt_internal (argc, (char **) argv, options, long_options, ++ opt_index, 0, 0); ++} ++ ++int ++_getopt_long_r (int argc, char **argv, const char *options, ++ const struct option *long_options, int *opt_index, ++ struct _getopt_data *d) ++{ ++ return _getopt_internal_r (argc, argv, options, long_options, opt_index, ++ 0, d, 0); ++} ++ ++/* Like getopt_long, but '-' as well as '--' can indicate a long option. ++ If an option that starts with '-' (not '--') doesn't match a long option, ++ but does match a short option, it is parsed as a short option ++ instead. */ ++ ++int ++getopt_long_only (int argc, char *__getopt_argv_const *argv, ++ const char *options, ++ const struct option *long_options, int *opt_index) ++{ ++ return _getopt_internal (argc, (char **) argv, options, long_options, ++ opt_index, 1, 0); ++} ++ ++int ++_getopt_long_only_r (int argc, char **argv, const char *options, ++ const struct option *long_options, int *opt_index, ++ struct _getopt_data *d) ++{ ++ return _getopt_internal_r (argc, argv, options, long_options, opt_index, ++ 1, d, 0); ++} ++ ++ ++#ifdef TEST ++ ++#include ++ ++int ++main (int argc, char **argv) ++{ ++ int c; ++ int digit_optind = 0; ++ ++ while (1) ++ { ++ int this_option_optind = optind ? optind : 1; ++ int option_index = 0; ++ static const struct option long_options[] = ++ { ++ {"add", 1, 0, 0}, ++ {"append", 0, 0, 0}, ++ {"delete", 1, 0, 0}, ++ {"verbose", 0, 0, 0}, ++ {"create", 0, 0, 0}, ++ {"file", 1, 0, 0}, ++ {0, 0, 0, 0} ++ }; ++ ++ c = getopt_long (argc, argv, "abc:d:0123456789", ++ long_options, &option_index); ++ if (c == -1) ++ break; ++ ++ switch (c) ++ { ++ case 0: ++ printf ("option %s", long_options[option_index].name); ++ if (optarg) ++ printf (" with arg %s", optarg); ++ printf ("\n"); ++ break; ++ ++ case '0': ++ case '1': ++ case '2': ++ case '3': ++ case '4': ++ case '5': ++ case '6': ++ case '7': ++ case '8': ++ case '9': ++ if (digit_optind != 0 && digit_optind != this_option_optind) ++ printf ("digits occur in two different argv-elements.\n"); ++ digit_optind = this_option_optind; ++ printf ("option %c\n", c); ++ break; ++ ++ case 'a': ++ printf ("option a\n"); ++ break; ++ ++ case 'b': ++ printf ("option b\n"); ++ break; ++ ++ case 'c': ++ printf ("option c with value '%s'\n", optarg); ++ break; ++ ++ case 'd': ++ printf ("option d with value '%s'\n", optarg); ++ break; ++ ++ case '?': ++ break; ++ ++ default: ++ printf ("?? getopt returned character code 0%o ??\n", c); ++ } ++ } ++ ++ if (optind < argc) ++ { ++ printf ("non-option ARGV-elements: "); ++ while (optind < argc) ++ printf ("%s ", argv[optind++]); ++ printf ("\n"); ++ } ++ ++ exit (0); ++} ++ ++#endif /* TEST */ +diff -urN libidn2-0.11.pristine/src/gl/getopt.c libidn2-0.11/src/gl/getopt.c +--- libidn2-0.11.pristine/src/gl/getopt.c 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/getopt.c 2016-11-24 21:38:50.554571586 +0100 +@@ -0,0 +1,1275 @@ ++/* Getopt for GNU. ++ NOTE: getopt is part of the C library, so if you don't know what ++ "Keep this file name-space clean" means, talk to drepper@gnu.org ++ before changing it! ++ Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2016 Free Software ++ Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#ifndef _LIBC ++# include ++#endif ++ ++#include "getopt.h" ++ ++#include ++#include ++#include ++#include ++ ++#ifdef _LIBC ++# include ++#else ++# include "gettext.h" ++# define _(msgid) gettext (msgid) ++#endif ++ ++#if defined _LIBC && defined USE_IN_LIBIO ++# include ++#endif ++ ++/* This version of 'getopt' appears to the caller like standard Unix 'getopt' ++ but it behaves differently for the user, since it allows the user ++ to intersperse the options with the other arguments. ++ ++ As 'getopt_long' works, it permutes the elements of ARGV so that, ++ when it is done, all the options precede everything else. Thus ++ all application programs are extended to handle flexible argument order. ++ ++ Using 'getopt' or setting the environment variable POSIXLY_CORRECT ++ disables permutation. ++ Then the behavior is completely standard. ++ ++ GNU application programs can use a third alternative mode in which ++ they can distinguish the relative order of options and other arguments. */ ++ ++#include "getopt_int.h" ++ ++/* For communication from 'getopt' to the caller. ++ When 'getopt' finds an option that takes an argument, ++ the argument value is returned here. ++ Also, when 'ordering' is RETURN_IN_ORDER, ++ each non-option ARGV-element is returned here. */ ++ ++char *optarg; ++ ++/* Index in ARGV of the next element to be scanned. ++ This is used for communication to and from the caller ++ and for communication between successive calls to 'getopt'. ++ ++ On entry to 'getopt', zero means this is the first call; initialize. ++ ++ When 'getopt' returns -1, this is the index of the first of the ++ non-option elements that the caller should itself scan. ++ ++ Otherwise, 'optind' communicates from one call to the next ++ how much of ARGV has been scanned so far. */ ++ ++/* 1003.2 says this must be 1 before any call. */ ++int optind = 1; ++ ++/* Callers store zero here to inhibit the error message ++ for unrecognized options. */ ++ ++int opterr = 1; ++ ++/* Set to an option character which was unrecognized. ++ This must be initialized on some systems to avoid linking in the ++ system's own getopt implementation. */ ++ ++int optopt = '?'; ++ ++/* Keep a global copy of all internal members of getopt_data. */ ++ ++static struct _getopt_data getopt_data; ++ ++ ++#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV ++extern char *getenv (); ++#endif ++ ++#ifdef _LIBC ++/* Stored original parameters. ++ XXX This is no good solution. We should rather copy the args so ++ that we can compare them later. But we must not use malloc(3). */ ++extern int __libc_argc; ++extern char **__libc_argv; ++ ++/* Bash 2.0 gives us an environment variable containing flags ++ indicating ARGV elements that should not be considered arguments. */ ++ ++# ifdef USE_NONOPTION_FLAGS ++/* Defined in getopt_init.c */ ++extern char *__getopt_nonoption_flags; ++# endif ++ ++# ifdef USE_NONOPTION_FLAGS ++# define SWAP_FLAGS(ch1, ch2) \ ++ if (d->__nonoption_flags_len > 0) \ ++ { \ ++ char __tmp = __getopt_nonoption_flags[ch1]; \ ++ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ ++ __getopt_nonoption_flags[ch2] = __tmp; \ ++ } ++# else ++# define SWAP_FLAGS(ch1, ch2) ++# endif ++#else /* !_LIBC */ ++# define SWAP_FLAGS(ch1, ch2) ++#endif /* _LIBC */ ++ ++/* Exchange two adjacent subsequences of ARGV. ++ One subsequence is elements [first_nonopt,last_nonopt) ++ which contains all the non-options that have been skipped so far. ++ The other is elements [last_nonopt,optind), which contains all ++ the options processed since those non-options were skipped. ++ ++ 'first_nonopt' and 'last_nonopt' are relocated so that they describe ++ the new indices of the non-options in ARGV after they are moved. */ ++ ++static void ++exchange (char **argv, struct _getopt_data *d) ++{ ++ int bottom = d->__first_nonopt; ++ int middle = d->__last_nonopt; ++ int top = d->optind; ++ char *tem; ++ ++ /* Exchange the shorter segment with the far end of the longer segment. ++ That puts the shorter segment into the right place. ++ It leaves the longer segment in the right place overall, ++ but it consists of two parts that need to be swapped next. */ ++ ++#if defined _LIBC && defined USE_NONOPTION_FLAGS ++ /* First make sure the handling of the '__getopt_nonoption_flags' ++ string can work normally. Our top argument must be in the range ++ of the string. */ ++ if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) ++ { ++ /* We must extend the array. The user plays games with us and ++ presents new arguments. */ ++ char *new_str = malloc (top + 1); ++ if (new_str == NULL) ++ d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; ++ else ++ { ++ memset (__mempcpy (new_str, __getopt_nonoption_flags, ++ d->__nonoption_flags_max_len), ++ '\0', top + 1 - d->__nonoption_flags_max_len); ++ d->__nonoption_flags_max_len = top + 1; ++ __getopt_nonoption_flags = new_str; ++ } ++ } ++#endif ++ ++ while (top > middle && middle > bottom) ++ { ++ if (top - middle > middle - bottom) ++ { ++ /* Bottom segment is the short one. */ ++ int len = middle - bottom; ++ register int i; ++ ++ /* Swap it with the top part of the top segment. */ ++ for (i = 0; i < len; i++) ++ { ++ tem = argv[bottom + i]; ++ argv[bottom + i] = argv[top - (middle - bottom) + i]; ++ argv[top - (middle - bottom) + i] = tem; ++ SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); ++ } ++ /* Exclude the moved bottom segment from further swapping. */ ++ top -= len; ++ } ++ else ++ { ++ /* Top segment is the short one. */ ++ int len = top - middle; ++ register int i; ++ ++ /* Swap it with the bottom part of the bottom segment. */ ++ for (i = 0; i < len; i++) ++ { ++ tem = argv[bottom + i]; ++ argv[bottom + i] = argv[middle + i]; ++ argv[middle + i] = tem; ++ SWAP_FLAGS (bottom + i, middle + i); ++ } ++ /* Exclude the moved top segment from further swapping. */ ++ bottom += len; ++ } ++ } ++ ++ /* Update records for the slots the non-options now occupy. */ ++ ++ d->__first_nonopt += (d->optind - d->__last_nonopt); ++ d->__last_nonopt = d->optind; ++} ++ ++/* Initialize the internal data when the first call is made. */ ++ ++static const char * ++_getopt_initialize (int argc _GL_UNUSED, ++ char **argv _GL_UNUSED, const char *optstring, ++ struct _getopt_data *d, int posixly_correct) ++{ ++ /* Start processing options with ARGV-element 1 (since ARGV-element 0 ++ is the program name); the sequence of previously skipped ++ non-option ARGV-elements is empty. */ ++ ++ d->__first_nonopt = d->__last_nonopt = d->optind; ++ ++ d->__nextchar = NULL; ++ ++ d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); ++ ++ /* Determine how to handle the ordering of options and nonoptions. */ ++ ++ if (optstring[0] == '-') ++ { ++ d->__ordering = RETURN_IN_ORDER; ++ ++optstring; ++ } ++ else if (optstring[0] == '+') ++ { ++ d->__ordering = REQUIRE_ORDER; ++ ++optstring; ++ } ++ else if (d->__posixly_correct) ++ d->__ordering = REQUIRE_ORDER; ++ else ++ d->__ordering = PERMUTE; ++ ++#if defined _LIBC && defined USE_NONOPTION_FLAGS ++ if (!d->__posixly_correct ++ && argc == __libc_argc && argv == __libc_argv) ++ { ++ if (d->__nonoption_flags_max_len == 0) ++ { ++ if (__getopt_nonoption_flags == NULL ++ || __getopt_nonoption_flags[0] == '\0') ++ d->__nonoption_flags_max_len = -1; ++ else ++ { ++ const char *orig_str = __getopt_nonoption_flags; ++ int len = d->__nonoption_flags_max_len = strlen (orig_str); ++ if (d->__nonoption_flags_max_len < argc) ++ d->__nonoption_flags_max_len = argc; ++ __getopt_nonoption_flags = ++ (char *) malloc (d->__nonoption_flags_max_len); ++ if (__getopt_nonoption_flags == NULL) ++ d->__nonoption_flags_max_len = -1; ++ else ++ memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), ++ '\0', d->__nonoption_flags_max_len - len); ++ } ++ } ++ d->__nonoption_flags_len = d->__nonoption_flags_max_len; ++ } ++ else ++ d->__nonoption_flags_len = 0; ++#endif ++ ++ return optstring; ++} ++ ++/* Scan elements of ARGV (whose length is ARGC) for option characters ++ given in OPTSTRING. ++ ++ If an element of ARGV starts with '-', and is not exactly "-" or "--", ++ then it is an option element. The characters of this element ++ (aside from the initial '-') are option characters. If 'getopt' ++ is called repeatedly, it returns successively each of the option characters ++ from each of the option elements. ++ ++ If 'getopt' finds another option character, it returns that character, ++ updating 'optind' and 'nextchar' so that the next call to 'getopt' can ++ resume the scan with the following option character or ARGV-element. ++ ++ If there are no more option characters, 'getopt' returns -1. ++ Then 'optind' is the index in ARGV of the first ARGV-element ++ that is not an option. (The ARGV-elements have been permuted ++ so that those that are not options now come last.) ++ ++ OPTSTRING is a string containing the legitimate option characters. ++ If an option character is seen that is not listed in OPTSTRING, ++ return '?' after printing an error message. If you set 'opterr' to ++ zero, the error message is suppressed but we still return '?'. ++ ++ If a char in OPTSTRING is followed by a colon, that means it wants an arg, ++ so the following text in the same ARGV-element, or the text of the following ++ ARGV-element, is returned in 'optarg'. Two colons mean an option that ++ wants an optional arg; if there is text in the current ARGV-element, ++ it is returned in 'optarg', otherwise 'optarg' is set to zero. ++ ++ If OPTSTRING starts with '-' or '+', it requests different methods of ++ handling the non-option ARGV-elements. ++ See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. ++ ++ Long-named options begin with '--' instead of '-'. ++ Their names may be abbreviated as long as the abbreviation is unique ++ or is an exact match for some defined option. If they have an ++ argument, it follows the option name in the same ARGV-element, separated ++ from the option name by a '=', or else the in next ARGV-element. ++ When 'getopt' finds a long-named option, it returns 0 if that option's ++ 'flag' field is nonzero, the value of the option's 'val' field ++ if the 'flag' field is zero. ++ ++ The elements of ARGV aren't really const, because we permute them. ++ But we pretend they're const in the prototype to be compatible ++ with other systems. ++ ++ LONGOPTS is a vector of 'struct option' terminated by an ++ element containing a name which is zero. ++ ++ LONGIND returns the index in LONGOPT of the long-named option found. ++ It is only valid when a long-named option has been found by the most ++ recent call. ++ ++ If LONG_ONLY is nonzero, '-' as well as '--' can introduce ++ long-named options. */ ++ ++int ++_getopt_internal_r (int argc, char **argv, const char *optstring, ++ const struct option *longopts, int *longind, ++ int long_only, struct _getopt_data *d, int posixly_correct) ++{ ++ int print_errors = d->opterr; ++ ++ if (argc < 1) ++ return -1; ++ ++ d->optarg = NULL; ++ ++ if (d->optind == 0 || !d->__initialized) ++ { ++ if (d->optind == 0) ++ d->optind = 1; /* Don't scan ARGV[0], the program name. */ ++ optstring = _getopt_initialize (argc, argv, optstring, d, ++ posixly_correct); ++ d->__initialized = 1; ++ } ++ else if (optstring[0] == '-' || optstring[0] == '+') ++ optstring++; ++ if (optstring[0] == ':') ++ print_errors = 0; ++ ++ /* Test whether ARGV[optind] points to a non-option argument. ++ Either it does not have option syntax, or there is an environment flag ++ from the shell indicating it is not an option. The later information ++ is only used when the used in the GNU libc. */ ++#if defined _LIBC && defined USE_NONOPTION_FLAGS ++# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ ++ || (d->optind < d->__nonoption_flags_len \ ++ && __getopt_nonoption_flags[d->optind] == '1')) ++#else ++# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') ++#endif ++ ++ if (d->__nextchar == NULL || *d->__nextchar == '\0') ++ { ++ /* Advance to the next ARGV-element. */ ++ ++ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been ++ moved back by the user (who may also have changed the arguments). */ ++ if (d->__last_nonopt > d->optind) ++ d->__last_nonopt = d->optind; ++ if (d->__first_nonopt > d->optind) ++ d->__first_nonopt = d->optind; ++ ++ if (d->__ordering == PERMUTE) ++ { ++ /* If we have just processed some options following some non-options, ++ exchange them so that the options come first. */ ++ ++ if (d->__first_nonopt != d->__last_nonopt ++ && d->__last_nonopt != d->optind) ++ exchange ((char **) argv, d); ++ else if (d->__last_nonopt != d->optind) ++ d->__first_nonopt = d->optind; ++ ++ /* Skip any additional non-options ++ and extend the range of non-options previously skipped. */ ++ ++ while (d->optind < argc && NONOPTION_P) ++ d->optind++; ++ d->__last_nonopt = d->optind; ++ } ++ ++ /* The special ARGV-element '--' means premature end of options. ++ Skip it like a null option, ++ then exchange with previous non-options as if it were an option, ++ then skip everything else like a non-option. */ ++ ++ if (d->optind != argc && !strcmp (argv[d->optind], "--")) ++ { ++ d->optind++; ++ ++ if (d->__first_nonopt != d->__last_nonopt ++ && d->__last_nonopt != d->optind) ++ exchange ((char **) argv, d); ++ else if (d->__first_nonopt == d->__last_nonopt) ++ d->__first_nonopt = d->optind; ++ d->__last_nonopt = argc; ++ ++ d->optind = argc; ++ } ++ ++ /* If we have done all the ARGV-elements, stop the scan ++ and back over any non-options that we skipped and permuted. */ ++ ++ if (d->optind == argc) ++ { ++ /* Set the next-arg-index to point at the non-options ++ that we previously skipped, so the caller will digest them. */ ++ if (d->__first_nonopt != d->__last_nonopt) ++ d->optind = d->__first_nonopt; ++ return -1; ++ } ++ ++ /* If we have come to a non-option and did not permute it, ++ either stop the scan or describe it to the caller and pass it by. */ ++ ++ if (NONOPTION_P) ++ { ++ if (d->__ordering == REQUIRE_ORDER) ++ return -1; ++ d->optarg = argv[d->optind++]; ++ return 1; ++ } ++ ++ /* We have found another option-ARGV-element. ++ Skip the initial punctuation. */ ++ ++ d->__nextchar = (argv[d->optind] + 1 ++ + (longopts != NULL && argv[d->optind][1] == '-')); ++ } ++ ++ /* Decode the current option-ARGV-element. */ ++ ++ /* Check whether the ARGV-element is a long option. ++ ++ If long_only and the ARGV-element has the form "-f", where f is ++ a valid short option, don't consider it an abbreviated form of ++ a long option that starts with f. Otherwise there would be no ++ way to give the -f short option. ++ ++ On the other hand, if there's a long option "fubar" and ++ the ARGV-element is "-fu", do consider that an abbreviation of ++ the long option, just like "--fu", and not "-f" with arg "u". ++ ++ This distinction seems to be the most useful approach. */ ++ ++ if (longopts != NULL ++ && (argv[d->optind][1] == '-' ++ || (long_only && (argv[d->optind][2] ++ || !strchr (optstring, argv[d->optind][1]))))) ++ { ++ char *nameend; ++ unsigned int namelen; ++ const struct option *p; ++ const struct option *pfound = NULL; ++ struct option_list ++ { ++ const struct option *p; ++ struct option_list *next; ++ } *ambig_list = NULL; ++#ifdef _LIBC ++/* malloc() not used for _LIBC to simplify failure messages. */ ++# define free_option_list(l) ++#else ++# define free_option_list(l) \ ++ while (l != NULL) \ ++ { \ ++ struct option_list *pn = l->next; \ ++ free (l); \ ++ l = pn; \ ++ } ++#endif ++ int exact = 0; ++ int ambig = 0; ++ int indfound = -1; ++ int option_index; ++ ++ for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) ++ /* Do nothing. */ ; ++ namelen = nameend - d->__nextchar; ++ ++ /* Test all long options for either exact match ++ or abbreviated matches. */ ++ for (p = longopts, option_index = 0; p->name; p++, option_index++) ++ if (!strncmp (p->name, d->__nextchar, namelen)) ++ { ++ if (namelen == (unsigned int) strlen (p->name)) ++ { ++ /* Exact match found. */ ++ pfound = p; ++ indfound = option_index; ++ exact = 1; ++ break; ++ } ++ else if (pfound == NULL) ++ { ++ /* First nonexact match found. */ ++ pfound = p; ++ indfound = option_index; ++ } ++ else if (ambig) ++ ; /* Taking simpler path to handling ambiguities. */ ++ else if (long_only ++ || pfound->has_arg != p->has_arg ++ || pfound->flag != p->flag ++ || pfound->val != p->val) ++ { ++ /* Second or later nonexact match found. */ ++#ifdef _LIBC ++ struct option_list *newp = alloca (sizeof (*newp)); ++#else ++ struct option_list *newp = malloc (sizeof (*newp)); ++ if (newp == NULL) ++ { ++ free_option_list (ambig_list); ++ ambig_list = NULL; ++ ambig = 1; /* Use simpler fallback message. */ ++ } ++ else ++#endif ++ { ++ newp->p = p; ++ newp->next = ambig_list; ++ ambig_list = newp; ++ } ++ } ++ } ++ ++ if ((ambig || ambig_list) && !exact) ++ { ++ if (print_errors && ambig_list) ++ { ++ struct option_list first; ++ first.p = pfound; ++ first.next = ambig_list; ++ ambig_list = &first; ++ ++#if defined _LIBC && defined USE_IN_LIBIO ++ char *buf = NULL; ++ size_t buflen = 0; ++ ++ FILE *fp = open_memstream (&buf, &buflen); ++ if (fp != NULL) ++ { ++ fprintf (fp, ++ _("%s: option '%s' is ambiguous; possibilities:"), ++ argv[0], argv[d->optind]); ++ ++ do ++ { ++ fprintf (fp, " '--%s'", ambig_list->p->name); ++ ambig_list = ambig_list->next; ++ } ++ while (ambig_list != NULL); ++ ++ fputc_unlocked ('\n', fp); ++ ++ if (__builtin_expect (fclose (fp) != EOF, 1)) ++ { ++ _IO_flockfile (stderr); ++ ++ int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ++ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; ++ ++ __fxprintf (NULL, "%s", buf); ++ ++ ((_IO_FILE *) stderr)->_flags2 = old_flags2; ++ _IO_funlockfile (stderr); ++ ++ free (buf); ++ } ++ } ++#else ++ fprintf (stderr, ++ _("%s: option '%s' is ambiguous; possibilities:"), ++ argv[0], argv[d->optind]); ++ do ++ { ++ fprintf (stderr, " '--%s'", ambig_list->p->name); ++ ambig_list = ambig_list->next; ++ } ++ while (ambig_list != NULL); ++ ++ fputc ('\n', stderr); ++#endif ++ } ++ else if (print_errors && ambig) ++ { ++ fprintf (stderr, ++ _("%s: option '%s' is ambiguous\n"), ++ argv[0], argv[d->optind]); ++ } ++ d->__nextchar += strlen (d->__nextchar); ++ d->optind++; ++ d->optopt = 0; ++ free_option_list (ambig_list); ++ return '?'; ++ } ++ ++ free_option_list (ambig_list); ++ ++ if (pfound != NULL) ++ { ++ option_index = indfound; ++ d->optind++; ++ if (*nameend) ++ { ++ /* Don't test has_arg with >, because some C compilers don't ++ allow it to be used on enums. */ ++ if (pfound->has_arg) ++ d->optarg = nameend + 1; ++ else ++ { ++ if (print_errors) ++ { ++#if defined _LIBC && defined USE_IN_LIBIO ++ char *buf; ++ int n; ++#endif ++ ++ if (argv[d->optind - 1][1] == '-') ++ { ++ /* --option */ ++#if defined _LIBC && defined USE_IN_LIBIO ++ n = __asprintf (&buf, _("\ ++%s: option '--%s' doesn't allow an argument\n"), ++ argv[0], pfound->name); ++#else ++ fprintf (stderr, _("\ ++%s: option '--%s' doesn't allow an argument\n"), ++ argv[0], pfound->name); ++#endif ++ } ++ else ++ { ++ /* +option or -option */ ++#if defined _LIBC && defined USE_IN_LIBIO ++ n = __asprintf (&buf, _("\ ++%s: option '%c%s' doesn't allow an argument\n"), ++ argv[0], argv[d->optind - 1][0], ++ pfound->name); ++#else ++ fprintf (stderr, _("\ ++%s: option '%c%s' doesn't allow an argument\n"), ++ argv[0], argv[d->optind - 1][0], ++ pfound->name); ++#endif ++ } ++ ++#if defined _LIBC && defined USE_IN_LIBIO ++ if (n >= 0) ++ { ++ _IO_flockfile (stderr); ++ ++ int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ++ ((_IO_FILE *) stderr)->_flags2 ++ |= _IO_FLAGS2_NOTCANCEL; ++ ++ __fxprintf (NULL, "%s", buf); ++ ++ ((_IO_FILE *) stderr)->_flags2 = old_flags2; ++ _IO_funlockfile (stderr); ++ ++ free (buf); ++ } ++#endif ++ } ++ ++ d->__nextchar += strlen (d->__nextchar); ++ ++ d->optopt = pfound->val; ++ return '?'; ++ } ++ } ++ else if (pfound->has_arg == 1) ++ { ++ if (d->optind < argc) ++ d->optarg = argv[d->optind++]; ++ else ++ { ++ if (print_errors) ++ { ++#if defined _LIBC && defined USE_IN_LIBIO ++ char *buf; ++ ++ if (__asprintf (&buf, _("\ ++%s: option '--%s' requires an argument\n"), ++ argv[0], pfound->name) >= 0) ++ { ++ _IO_flockfile (stderr); ++ ++ int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ++ ((_IO_FILE *) stderr)->_flags2 ++ |= _IO_FLAGS2_NOTCANCEL; ++ ++ __fxprintf (NULL, "%s", buf); ++ ++ ((_IO_FILE *) stderr)->_flags2 = old_flags2; ++ _IO_funlockfile (stderr); ++ ++ free (buf); ++ } ++#else ++ fprintf (stderr, ++ _("%s: option '--%s' requires an argument\n"), ++ argv[0], pfound->name); ++#endif ++ } ++ d->__nextchar += strlen (d->__nextchar); ++ d->optopt = pfound->val; ++ return optstring[0] == ':' ? ':' : '?'; ++ } ++ } ++ d->__nextchar += strlen (d->__nextchar); ++ if (longind != NULL) ++ *longind = option_index; ++ if (pfound->flag) ++ { ++ *(pfound->flag) = pfound->val; ++ return 0; ++ } ++ return pfound->val; ++ } ++ ++ /* Can't find it as a long option. If this is not getopt_long_only, ++ or the option starts with '--' or is not a valid short ++ option, then it's an error. ++ Otherwise interpret it as a short option. */ ++ if (!long_only || argv[d->optind][1] == '-' ++ || strchr (optstring, *d->__nextchar) == NULL) ++ { ++ if (print_errors) ++ { ++#if defined _LIBC && defined USE_IN_LIBIO ++ char *buf; ++ int n; ++#endif ++ ++ if (argv[d->optind][1] == '-') ++ { ++ /* --option */ ++#if defined _LIBC && defined USE_IN_LIBIO ++ n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), ++ argv[0], d->__nextchar); ++#else ++ fprintf (stderr, _("%s: unrecognized option '--%s'\n"), ++ argv[0], d->__nextchar); ++#endif ++ } ++ else ++ { ++ /* +option or -option */ ++#if defined _LIBC && defined USE_IN_LIBIO ++ n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), ++ argv[0], argv[d->optind][0], d->__nextchar); ++#else ++ fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), ++ argv[0], argv[d->optind][0], d->__nextchar); ++#endif ++ } ++ ++#if defined _LIBC && defined USE_IN_LIBIO ++ if (n >= 0) ++ { ++ _IO_flockfile (stderr); ++ ++ int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ++ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; ++ ++ __fxprintf (NULL, "%s", buf); ++ ++ ((_IO_FILE *) stderr)->_flags2 = old_flags2; ++ _IO_funlockfile (stderr); ++ ++ free (buf); ++ } ++#endif ++ } ++ d->__nextchar = (char *) ""; ++ d->optind++; ++ d->optopt = 0; ++ return '?'; ++ } ++ } ++ ++ /* Look at and handle the next short option-character. */ ++ ++ { ++ char c = *d->__nextchar++; ++ const char *temp = strchr (optstring, c); ++ ++ /* Increment 'optind' when we start to process its last character. */ ++ if (*d->__nextchar == '\0') ++ ++d->optind; ++ ++ if (temp == NULL || c == ':' || c == ';') ++ { ++ if (print_errors) ++ { ++#if defined _LIBC && defined USE_IN_LIBIO ++ char *buf; ++ int n; ++#endif ++ ++#if defined _LIBC && defined USE_IN_LIBIO ++ n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), ++ argv[0], c); ++#else ++ fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); ++#endif ++ ++#if defined _LIBC && defined USE_IN_LIBIO ++ if (n >= 0) ++ { ++ _IO_flockfile (stderr); ++ ++ int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ++ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; ++ ++ __fxprintf (NULL, "%s", buf); ++ ++ ((_IO_FILE *) stderr)->_flags2 = old_flags2; ++ _IO_funlockfile (stderr); ++ ++ free (buf); ++ } ++#endif ++ } ++ d->optopt = c; ++ return '?'; ++ } ++ /* Convenience. Treat POSIX -W foo same as long option --foo */ ++ if (temp[0] == 'W' && temp[1] == ';') ++ { ++ char *nameend; ++ const struct option *p; ++ const struct option *pfound = NULL; ++ int exact = 0; ++ int ambig = 0; ++ int indfound = 0; ++ int option_index; ++ ++ if (longopts == NULL) ++ goto no_longs; ++ ++ /* This is an option that requires an argument. */ ++ if (*d->__nextchar != '\0') ++ { ++ d->optarg = d->__nextchar; ++ /* If we end this ARGV-element by taking the rest as an arg, ++ we must advance to the next element now. */ ++ d->optind++; ++ } ++ else if (d->optind == argc) ++ { ++ if (print_errors) ++ { ++#if defined _LIBC && defined USE_IN_LIBIO ++ char *buf; ++ ++ if (__asprintf (&buf, ++ _("%s: option requires an argument -- '%c'\n"), ++ argv[0], c) >= 0) ++ { ++ _IO_flockfile (stderr); ++ ++ int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ++ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; ++ ++ __fxprintf (NULL, "%s", buf); ++ ++ ((_IO_FILE *) stderr)->_flags2 = old_flags2; ++ _IO_funlockfile (stderr); ++ ++ free (buf); ++ } ++#else ++ fprintf (stderr, ++ _("%s: option requires an argument -- '%c'\n"), ++ argv[0], c); ++#endif ++ } ++ d->optopt = c; ++ if (optstring[0] == ':') ++ c = ':'; ++ else ++ c = '?'; ++ return c; ++ } ++ else ++ /* We already incremented 'd->optind' once; ++ increment it again when taking next ARGV-elt as argument. */ ++ d->optarg = argv[d->optind++]; ++ ++ /* optarg is now the argument, see if it's in the ++ table of longopts. */ ++ ++ for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; ++ nameend++) ++ /* Do nothing. */ ; ++ ++ /* Test all long options for either exact match ++ or abbreviated matches. */ ++ for (p = longopts, option_index = 0; p->name; p++, option_index++) ++ if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) ++ { ++ if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) ++ { ++ /* Exact match found. */ ++ pfound = p; ++ indfound = option_index; ++ exact = 1; ++ break; ++ } ++ else if (pfound == NULL) ++ { ++ /* First nonexact match found. */ ++ pfound = p; ++ indfound = option_index; ++ } ++ else if (long_only ++ || pfound->has_arg != p->has_arg ++ || pfound->flag != p->flag ++ || pfound->val != p->val) ++ /* Second or later nonexact match found. */ ++ ambig = 1; ++ } ++ if (ambig && !exact) ++ { ++ if (print_errors) ++ { ++#if defined _LIBC && defined USE_IN_LIBIO ++ char *buf; ++ ++ if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), ++ argv[0], d->optarg) >= 0) ++ { ++ _IO_flockfile (stderr); ++ ++ int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ++ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; ++ ++ __fxprintf (NULL, "%s", buf); ++ ++ ((_IO_FILE *) stderr)->_flags2 = old_flags2; ++ _IO_funlockfile (stderr); ++ ++ free (buf); ++ } ++#else ++ fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), ++ argv[0], d->optarg); ++#endif ++ } ++ d->__nextchar += strlen (d->__nextchar); ++ d->optind++; ++ return '?'; ++ } ++ if (pfound != NULL) ++ { ++ option_index = indfound; ++ if (*nameend) ++ { ++ /* Don't test has_arg with >, because some C compilers don't ++ allow it to be used on enums. */ ++ if (pfound->has_arg) ++ d->optarg = nameend + 1; ++ else ++ { ++ if (print_errors) ++ { ++#if defined _LIBC && defined USE_IN_LIBIO ++ char *buf; ++ ++ if (__asprintf (&buf, _("\ ++%s: option '-W %s' doesn't allow an argument\n"), ++ argv[0], pfound->name) >= 0) ++ { ++ _IO_flockfile (stderr); ++ ++ int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ++ ((_IO_FILE *) stderr)->_flags2 ++ |= _IO_FLAGS2_NOTCANCEL; ++ ++ __fxprintf (NULL, "%s", buf); ++ ++ ((_IO_FILE *) stderr)->_flags2 = old_flags2; ++ _IO_funlockfile (stderr); ++ ++ free (buf); ++ } ++#else ++ fprintf (stderr, _("\ ++%s: option '-W %s' doesn't allow an argument\n"), ++ argv[0], pfound->name); ++#endif ++ } ++ ++ d->__nextchar += strlen (d->__nextchar); ++ return '?'; ++ } ++ } ++ else if (pfound->has_arg == 1) ++ { ++ if (d->optind < argc) ++ d->optarg = argv[d->optind++]; ++ else ++ { ++ if (print_errors) ++ { ++#if defined _LIBC && defined USE_IN_LIBIO ++ char *buf; ++ ++ if (__asprintf (&buf, _("\ ++%s: option '-W %s' requires an argument\n"), ++ argv[0], pfound->name) >= 0) ++ { ++ _IO_flockfile (stderr); ++ ++ int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ++ ((_IO_FILE *) stderr)->_flags2 ++ |= _IO_FLAGS2_NOTCANCEL; ++ ++ __fxprintf (NULL, "%s", buf); ++ ++ ((_IO_FILE *) stderr)->_flags2 = old_flags2; ++ _IO_funlockfile (stderr); ++ ++ free (buf); ++ } ++#else ++ fprintf (stderr, _("\ ++%s: option '-W %s' requires an argument\n"), ++ argv[0], pfound->name); ++#endif ++ } ++ d->__nextchar += strlen (d->__nextchar); ++ return optstring[0] == ':' ? ':' : '?'; ++ } ++ } ++ else ++ d->optarg = NULL; ++ d->__nextchar += strlen (d->__nextchar); ++ if (longind != NULL) ++ *longind = option_index; ++ if (pfound->flag) ++ { ++ *(pfound->flag) = pfound->val; ++ return 0; ++ } ++ return pfound->val; ++ } ++ ++ no_longs: ++ d->__nextchar = NULL; ++ return 'W'; /* Let the application handle it. */ ++ } ++ if (temp[1] == ':') ++ { ++ if (temp[2] == ':') ++ { ++ /* This is an option that accepts an argument optionally. */ ++ if (*d->__nextchar != '\0') ++ { ++ d->optarg = d->__nextchar; ++ d->optind++; ++ } ++ else ++ d->optarg = NULL; ++ d->__nextchar = NULL; ++ } ++ else ++ { ++ /* This is an option that requires an argument. */ ++ if (*d->__nextchar != '\0') ++ { ++ d->optarg = d->__nextchar; ++ /* If we end this ARGV-element by taking the rest as an arg, ++ we must advance to the next element now. */ ++ d->optind++; ++ } ++ else if (d->optind == argc) ++ { ++ if (print_errors) ++ { ++#if defined _LIBC && defined USE_IN_LIBIO ++ char *buf; ++ ++ if (__asprintf (&buf, _("\ ++%s: option requires an argument -- '%c'\n"), ++ argv[0], c) >= 0) ++ { ++ _IO_flockfile (stderr); ++ ++ int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ++ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; ++ ++ __fxprintf (NULL, "%s", buf); ++ ++ ((_IO_FILE *) stderr)->_flags2 = old_flags2; ++ _IO_funlockfile (stderr); ++ ++ free (buf); ++ } ++#else ++ fprintf (stderr, ++ _("%s: option requires an argument -- '%c'\n"), ++ argv[0], c); ++#endif ++ } ++ d->optopt = c; ++ if (optstring[0] == ':') ++ c = ':'; ++ else ++ c = '?'; ++ } ++ else ++ /* We already incremented 'optind' once; ++ increment it again when taking next ARGV-elt as argument. */ ++ d->optarg = argv[d->optind++]; ++ d->__nextchar = NULL; ++ } ++ } ++ return c; ++ } ++} ++ ++int ++_getopt_internal (int argc, char **argv, const char *optstring, ++ const struct option *longopts, int *longind, int long_only, ++ int posixly_correct) ++{ ++ int result; ++ ++ getopt_data.optind = optind; ++ getopt_data.opterr = opterr; ++ ++ result = _getopt_internal_r (argc, argv, optstring, longopts, ++ longind, long_only, &getopt_data, ++ posixly_correct); ++ ++ optind = getopt_data.optind; ++ optarg = getopt_data.optarg; ++ optopt = getopt_data.optopt; ++ ++ return result; ++} ++ ++/* glibc gets a LSB-compliant getopt. ++ Standalone applications get a POSIX-compliant getopt. */ ++#if _LIBC ++enum { POSIXLY_CORRECT = 0 }; ++#else ++enum { POSIXLY_CORRECT = 1 }; ++#endif ++ ++int ++getopt (int argc, char *const *argv, const char *optstring) ++{ ++ return _getopt_internal (argc, (char **) argv, optstring, ++ (const struct option *) 0, ++ (int *) 0, ++ 0, POSIXLY_CORRECT); ++} ++ ++#ifdef _LIBC ++int ++__posix_getopt (int argc, char *const *argv, const char *optstring) ++{ ++ return _getopt_internal (argc, argv, optstring, ++ (const struct option *) 0, ++ (int *) 0, ++ 0, 1); ++} ++#endif ++ ++ ++#ifdef TEST ++ ++/* Compile with -DTEST to make an executable for use in testing ++ the above definition of 'getopt'. */ ++ ++int ++main (int argc, char **argv) ++{ ++ int c; ++ int digit_optind = 0; ++ ++ while (1) ++ { ++ int this_option_optind = optind ? optind : 1; ++ ++ c = getopt (argc, argv, "abc:d:0123456789"); ++ if (c == -1) ++ break; ++ ++ switch (c) ++ { ++ case '0': ++ case '1': ++ case '2': ++ case '3': ++ case '4': ++ case '5': ++ case '6': ++ case '7': ++ case '8': ++ case '9': ++ if (digit_optind != 0 && digit_optind != this_option_optind) ++ printf ("digits occur in two different argv-elements.\n"); ++ digit_optind = this_option_optind; ++ printf ("option %c\n", c); ++ break; ++ ++ case 'a': ++ printf ("option a\n"); ++ break; ++ ++ case 'b': ++ printf ("option b\n"); ++ break; ++ ++ case 'c': ++ printf ("option c with value '%s'\n", optarg); ++ break; ++ ++ case '?': ++ break; ++ ++ default: ++ printf ("?? getopt returned character code 0%o ??\n", c); ++ } ++ } ++ ++ if (optind < argc) ++ { ++ printf ("non-option ARGV-elements: "); ++ while (optind < argc) ++ printf ("%s ", argv[optind++]); ++ printf ("\n"); ++ } ++ ++ exit (0); ++} ++ ++#endif /* TEST */ +diff -urN libidn2-0.11.pristine/src/gl/getopt.in.h libidn2-0.11/src/gl/getopt.in.h +--- libidn2-0.11.pristine/src/gl/getopt.in.h 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/getopt.in.h 2016-11-24 21:38:50.557571691 +0100 +@@ -0,0 +1,255 @@ ++/* Declarations for getopt. ++ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2016 Free Software ++ Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#ifndef _@GUARD_PREFIX@_GETOPT_H ++ ++#if __GNUC__ >= 3 ++@PRAGMA_SYSTEM_HEADER@ ++#endif ++@PRAGMA_COLUMNS@ ++ ++/* The include_next requires a split double-inclusion guard. We must ++ also inform the replacement unistd.h to not recursively use ++ ; our definitions will be present soon enough. */ ++#if @HAVE_GETOPT_H@ ++# define _GL_SYSTEM_GETOPT ++# @INCLUDE_NEXT@ @NEXT_GETOPT_H@ ++# undef _GL_SYSTEM_GETOPT ++#endif ++ ++#ifndef _@GUARD_PREFIX@_GETOPT_H ++ ++#ifndef __need_getopt ++# define _@GUARD_PREFIX@_GETOPT_H 1 ++#endif ++ ++/* Standalone applications should #define __GETOPT_PREFIX to an ++ identifier that prefixes the external functions and variables ++ defined in this header. When this happens, include the ++ headers that might declare getopt so that they will not cause ++ confusion if included after this file (if the system had , ++ we have already included it). Then systematically rename ++ identifiers so that they do not collide with the system functions ++ and variables. Renaming avoids problems with some compilers and ++ linkers. */ ++#if defined __GETOPT_PREFIX && !defined __need_getopt ++# if !@HAVE_GETOPT_H@ ++# define __need_system_stdlib_h ++# include ++# undef __need_system_stdlib_h ++# include ++# include ++# endif ++# undef __need_getopt ++# undef getopt ++# undef getopt_long ++# undef getopt_long_only ++# undef optarg ++# undef opterr ++# undef optind ++# undef optopt ++# undef option ++# define __GETOPT_CONCAT(x, y) x ## y ++# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) ++# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) ++# define getopt __GETOPT_ID (getopt) ++# define getopt_long __GETOPT_ID (getopt_long) ++# define getopt_long_only __GETOPT_ID (getopt_long_only) ++# define optarg __GETOPT_ID (optarg) ++# define opterr __GETOPT_ID (opterr) ++# define optind __GETOPT_ID (optind) ++# define optopt __GETOPT_ID (optopt) ++# define option __GETOPT_ID (option) ++# define _getopt_internal __GETOPT_ID (getopt_internal) ++#endif ++ ++/* Standalone applications get correct prototypes for getopt_long and ++ getopt_long_only; they declare "char **argv". libc uses prototypes ++ with "char *const *argv" that are incorrect because getopt_long and ++ getopt_long_only can permute argv; this is required for backward ++ compatibility (e.g., for LSB 2.0.1). ++ ++ This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt', ++ but it caused redefinition warnings if both unistd.h and getopt.h were ++ included, since unistd.h includes getopt.h having previously defined ++ __need_getopt. ++ ++ The only place where __getopt_argv_const is used is in definitions ++ of getopt_long and getopt_long_only below, but these are visible ++ only if __need_getopt is not defined, so it is quite safe to rewrite ++ the conditional as follows: ++*/ ++#if !defined __need_getopt ++# if defined __GETOPT_PREFIX ++# define __getopt_argv_const /* empty */ ++# else ++# define __getopt_argv_const const ++# endif ++#endif ++ ++/* If __GNU_LIBRARY__ is not already defined, either we are being used ++ standalone, or this is the first header included in the source file. ++ If we are being used with glibc, we need to include , but ++ that does not exist if we are standalone. So: if __GNU_LIBRARY__ is ++ not defined, include , which will pull in for us ++ if it's from glibc. (Why ctype.h? It's guaranteed to exist and it ++ doesn't flood the namespace with stuff the way some other headers do.) */ ++#if !defined __GNU_LIBRARY__ ++# include ++#endif ++ ++#ifndef __THROW ++# ifndef __GNUC_PREREQ ++# define __GNUC_PREREQ(maj, min) (0) ++# endif ++# if defined __cplusplus && __GNUC_PREREQ (2,8) ++# define __THROW throw () ++# else ++# define __THROW ++# endif ++#endif ++ ++/* The definition of _GL_ARG_NONNULL is copied here. */ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* For communication from 'getopt' to the caller. ++ When 'getopt' finds an option that takes an argument, ++ the argument value is returned here. ++ Also, when 'ordering' is RETURN_IN_ORDER, ++ each non-option ARGV-element is returned here. */ ++ ++extern char *optarg; ++ ++/* Index in ARGV of the next element to be scanned. ++ This is used for communication to and from the caller ++ and for communication between successive calls to 'getopt'. ++ ++ On entry to 'getopt', zero means this is the first call; initialize. ++ ++ When 'getopt' returns -1, this is the index of the first of the ++ non-option elements that the caller should itself scan. ++ ++ Otherwise, 'optind' communicates from one call to the next ++ how much of ARGV has been scanned so far. */ ++ ++extern int optind; ++ ++/* Callers store zero here to inhibit the error message 'getopt' prints ++ for unrecognized options. */ ++ ++extern int opterr; ++ ++/* Set to an option character which was unrecognized. */ ++ ++extern int optopt; ++ ++#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 ++ of 'struct option' terminated by an element containing a name which is ++ zero. ++ ++ The field 'has_arg' is: ++ no_argument (or 0) if the option does not take an argument, ++ required_argument (or 1) if the option requires an argument, ++ optional_argument (or 2) if the option takes an optional argument. ++ ++ If the field 'flag' is not NULL, it points to a variable that is set ++ to the value given in the field 'val' when the option is found, but ++ left unchanged if the option is not found. ++ ++ To have a long-named option do something other than set an 'int' to ++ a compiled-in constant, such as set a value from 'optarg', set the ++ option's 'flag' field to zero and its 'val' field to a nonzero ++ value (the equivalent single-letter option character, if there is ++ one). For long options that have a zero 'flag' field, 'getopt' ++ returns the contents of the 'val' field. */ ++ ++# if !GNULIB_defined_struct_option ++struct option ++{ ++ const char *name; ++ /* has_arg can't be an enum because some compilers complain about ++ type mismatches in all the code that assumes it is an int. */ ++ int has_arg; ++ int *flag; ++ int val; ++}; ++# define GNULIB_defined_struct_option 1 ++# endif ++ ++/* Names for the values of the 'has_arg' field of 'struct option'. */ ++ ++# define no_argument 0 ++# define required_argument 1 ++# define optional_argument 2 ++#endif /* need getopt */ ++ ++ ++/* Get definitions and prototypes for functions to process the ++ arguments in ARGV (ARGC of them, minus the program name) for ++ options given in OPTS. ++ ++ Return the option character from OPTS just read. Return -1 when ++ there are no more options. For unrecognized options, or options ++ missing arguments, 'optopt' is set to the option letter, and '?' is ++ returned. ++ ++ The OPTS string is a list of characters which are recognized option ++ letters, optionally followed by colons, specifying that that letter ++ takes an argument, to be placed in 'optarg'. ++ ++ If a letter in OPTS is followed by two colons, its argument is ++ optional. This behavior is specific to the GNU 'getopt'. ++ ++ The argument '--' causes premature termination of argument ++ scanning, explicitly telling 'getopt' that there are no more ++ options. ++ ++ If OPTS begins with '-', then non-option arguments are treated as ++ arguments to the option '\1'. This behavior is specific to the GNU ++ 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in ++ the environment, then do not permute arguments. */ ++ ++extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) ++ __THROW _GL_ARG_NONNULL ((2, 3)); ++ ++#ifndef __need_getopt ++extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, ++ const char *__shortopts, ++ const struct option *__longopts, int *__longind) ++ __THROW _GL_ARG_NONNULL ((2, 3)); ++extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, ++ const char *__shortopts, ++ const struct option *__longopts, int *__longind) ++ __THROW _GL_ARG_NONNULL ((2, 3)); ++ ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++/* Make sure we later can get all the definitions and declarations. */ ++#undef __need_getopt ++ ++#endif /* _@GUARD_PREFIX@_GETOPT_H */ ++#endif /* _@GUARD_PREFIX@_GETOPT_H */ +diff -urN libidn2-0.11.pristine/src/gl/getopt_int.h libidn2-0.11/src/gl/getopt_int.h +--- libidn2-0.11.pristine/src/gl/getopt_int.h 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/getopt_int.h 2016-11-24 21:38:50.563571901 +0100 +@@ -0,0 +1,135 @@ ++/* Internal declarations for getopt. ++ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2016 Free Software ++ Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#ifndef _GETOPT_INT_H ++#define _GETOPT_INT_H 1 ++ ++#include ++ ++extern int _getopt_internal (int ___argc, char **___argv, ++ const char *__shortopts, ++ const struct option *__longopts, int *__longind, ++ int __long_only, int __posixly_correct); ++ ++ ++/* Reentrant versions which can handle parsing multiple argument ++ vectors at the same time. */ ++ ++/* Describe how to deal with options that follow non-option ARGV-elements. ++ ++ If the caller did not specify anything, ++ the default is REQUIRE_ORDER if the environment variable ++ POSIXLY_CORRECT is defined, PERMUTE otherwise. ++ ++ REQUIRE_ORDER means don't recognize them as options; ++ stop option processing when the first non-option is seen. ++ This is what Unix does. ++ This mode of operation is selected by either setting the environment ++ variable POSIXLY_CORRECT, or using '+' as the first character ++ of the list of option characters, or by calling getopt. ++ ++ PERMUTE is the default. We permute the contents of ARGV as we ++ scan, so that eventually all the non-options are at the end. ++ This allows options to be given in any order, even with programs ++ that were not written to expect this. ++ ++ RETURN_IN_ORDER is an option available to programs that were ++ written to expect options and other ARGV-elements in any order ++ and that care about the ordering of the two. We describe each ++ non-option ARGV-element as if it were the argument of an option ++ with character code 1. Using '-' as the first character of the ++ list of option characters selects this mode of operation. ++ ++ The special argument '--' forces an end of option-scanning regardless ++ of the value of 'ordering'. In the case of RETURN_IN_ORDER, only ++ '--' can cause 'getopt' to return -1 with 'optind' != ARGC. */ ++ ++enum __ord ++ { ++ REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER ++ }; ++ ++/* Data type for reentrant functions. */ ++struct _getopt_data ++{ ++ /* These have exactly the same meaning as the corresponding global ++ variables, except that they are used for the reentrant ++ versions of getopt. */ ++ int optind; ++ int opterr; ++ int optopt; ++ char *optarg; ++ ++ /* Internal members. */ ++ ++ /* True if the internal members have been initialized. */ ++ int __initialized; ++ ++ /* The next char to be scanned in the option-element ++ in which the last option character we returned was found. ++ This allows us to pick up the scan where we left off. ++ ++ If this is zero, or a null string, it means resume the scan ++ by advancing to the next ARGV-element. */ ++ char *__nextchar; ++ ++ /* See __ord above. */ ++ enum __ord __ordering; ++ ++ /* If the POSIXLY_CORRECT environment variable is set ++ or getopt was called. */ ++ int __posixly_correct; ++ ++ ++ /* Handle permutation of arguments. */ ++ ++ /* Describe the part of ARGV that contains non-options that have ++ been skipped. 'first_nonopt' is the index in ARGV of the first ++ of them; 'last_nonopt' is the index after the last of them. */ ++ ++ int __first_nonopt; ++ int __last_nonopt; ++ ++#if defined _LIBC && defined USE_NONOPTION_FLAGS ++ int __nonoption_flags_max_len; ++ int __nonoption_flags_len; ++#endif ++}; ++ ++/* The initializer is necessary to set OPTIND and OPTERR to their ++ default values and to clear the initialization flag. */ ++#define _GETOPT_DATA_INITIALIZER { 1, 1 } ++ ++extern int _getopt_internal_r (int ___argc, char **___argv, ++ const char *__shortopts, ++ const struct option *__longopts, int *__longind, ++ int __long_only, struct _getopt_data *__data, ++ int __posixly_correct); ++ ++extern int _getopt_long_r (int ___argc, char **___argv, ++ const char *__shortopts, ++ const struct option *__longopts, int *__longind, ++ struct _getopt_data *__data); ++ ++extern int _getopt_long_only_r (int ___argc, char **___argv, ++ const char *__shortopts, ++ const struct option *__longopts, ++ int *__longind, ++ struct _getopt_data *__data); ++ ++#endif /* getopt_int.h */ +diff -urN libidn2-0.11.pristine/src/gl/getprogname.c libidn2-0.11/src/gl/getprogname.c +--- libidn2-0.11.pristine/src/gl/getprogname.c 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/getprogname.c 2016-11-24 21:38:50.567572041 +0100 +@@ -0,0 +1,151 @@ ++/* Program name management. ++ Copyright (C) 2016 Free Software Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#include ++ ++/* Specification. */ ++#include "getprogname.h" ++ ++#include /* get program_invocation_name declaration */ ++#include /* get __argv declaration */ ++ ++#ifdef _AIX ++# include ++# include ++# include ++#endif ++ ++#ifdef __MVS__ ++# ifndef _OPEN_SYS ++# define _OPEN_SYS ++# endif ++# include ++# include ++#endif ++ ++#ifdef __hpux ++# include ++# include ++# include ++# include ++#endif ++ ++#include "dirname.h" ++ ++#ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */ ++char const * ++getprogname (void) ++{ ++# if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME /* glibc, BeOS */ ++ /* https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html */ ++ return program_invocation_short_name; ++# elif HAVE_DECL_PROGRAM_INVOCATION_NAME /* glibc, BeOS */ ++ /* https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html */ ++ return last_component (program_invocation_name); ++# elif HAVE_GETEXECNAME /* Solaris */ ++ /* http://docs.oracle.com/cd/E19253-01/816-5168/6mbb3hrb1/index.html */ ++ const char *p = getexecname (); ++ if (!p) ++ p = "?"; ++ return last_component (p); ++# elif HAVE_DECL___ARGV /* mingw, MSVC */ ++ /* https://msdn.microsoft.com/en-us/library/dn727674.aspx */ ++ const char *p = __argv && __argv[0] ? __argv[0] : "?"; ++ return last_component (p); ++# elif HAVE_VAR___PROGNAME /* OpenBSD, QNX */ ++ /* http://man.openbsd.org/style.9 */ ++ /* http://www.qnx.de/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.neutrino_lib_ref%2Fp%2F__progname.html */ ++ /* Be careful to declare this only when we absolutely need it ++ (OpenBSD 5.1), rather than when it's available. Otherwise, ++ its mere declaration makes program_invocation_short_name ++ malfunction (have zero length) with Fedora 25's glibc. */ ++ extern char *__progname; ++ const char *p = __progname; ++ return p && p[0] ? p : "?"; ++# elif _AIX /* AIX */ ++ /* Idea by Bastien ROUCARIÈS, ++ http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00095.html ++ Reference: http:// ++ ibm.biz/knowctr#ssw_aix_53/com.ibm.aix.basetechref/doc/basetrf1/getprocs.htm ++ */ ++ static char *p; ++ static int first = 1; ++ if (first) ++ { ++ first = 0; ++ pid_t pid = getpid (); ++ struct procentry64 procs; ++ p = (0 < getprocs64 (&procs, sizeof procs, NULL, 0, &pid, 1) ++ ? strdup (procs.pi_comm) ++ : NULL); ++ if (!p) ++ p = "?"; ++ } ++ return p; ++# elif defined __hpux ++ static char *p; ++ static int first = 1; ++ if (first) ++ { ++ first = 0; ++ pid_t pid = getpid (); ++ struct pst_status status; ++ p = (0 < pstat_getproc (&status, sizeof status, 0, pid) ++ ? strdup (status.pst_ucomm) ++ : NULL); ++ if (!p) ++ p = "?"; ++ } ++ return p; ++# elif __MVS__ /* z/OS */ ++ /* https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00/rtwgetp.htm */ ++ static char *p = "?"; ++ static int first = 1; ++ if (first) ++ { ++ pid_t pid = getpid (); ++ int token; ++ W_PSPROC buf; ++ first = 0; ++ memset (&buf, 0, sizeof(buf)); ++ buf.ps_cmdptr = (char *) malloc (buf.ps_cmdlen = PS_CMDBLEN_LONG); ++ buf.ps_conttyptr = (char *) malloc (buf.ps_conttylen = PS_CONTTYBLEN); ++ buf.ps_pathptr = (char *) malloc (buf.ps_pathlen = PS_PATHBLEN); ++ if (buf.ps_cmdptr && buf.ps_conttyptr && buf.ps_pathptr) ++ { ++ for (token = 0; token >= 0; ++ token = w_getpsent (token, &buf, sizeof(buf))) ++ { ++ if (token > 0 && buf.ps_pid == pid) ++ { ++ char *s = strdup (last_component (buf.ps_pathptr)); ++ if (s) ++ p = s; ++ break; ++ } ++ } ++ } ++ free (buf.ps_cmdptr); ++ free (buf.ps_conttyptr); ++ free (buf.ps_pathptr); ++ } ++ return p; ++# else ++# error "getprogname module not ported to this OS" ++# endif ++} ++ ++#endif +diff -urN libidn2-0.11.pristine/src/gl/getprogname.h libidn2-0.11/src/gl/getprogname.h +--- libidn2-0.11.pristine/src/gl/getprogname.h 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/getprogname.h 2016-11-24 21:38:50.569572112 +0100 +@@ -0,0 +1,40 @@ ++/* Program name management. ++ Copyright (C) 2016 Free Software Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#ifndef _GL_GETPROGNAME_H ++#define _GL_GETPROGNAME_H ++ ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* Return the base name of the executing program. ++ On native Windows this will usually end in ".exe" or ".EXE". */ ++#ifndef HAVE_GETPROGNAME ++extern char const *getprogname (void) ++# ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME ++ _GL_ATTRIBUTE_PURE ++# endif ++ ; ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff -urN libidn2-0.11.pristine/src/gl/gettext.h libidn2-0.11/src/gl/gettext.h +--- libidn2-0.11.pristine/src/gl/gettext.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/gettext.h 2016-11-24 21:38:50.632574322 +0100 +@@ -1,5 +1,5 @@ + /* Convenience header for conditional use of GNU . +- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2014 Free Software ++ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software + Foundation, Inc. + + This program is free software; you can redistribute it and/or modify +@@ -225,15 +225,17 @@ + if (msg_ctxt_id != NULL) + #endif + { ++ int found_translation; + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcgettext (domain, msg_ctxt_id, category); ++ found_translation = (translation != msg_ctxt_id); + #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + if (msg_ctxt_id != buf) + free (msg_ctxt_id); + #endif +- if (translation != msg_ctxt_id) ++ if (found_translation) + return translation; + } + return msgid; +@@ -271,15 +273,17 @@ + if (msg_ctxt_id != NULL) + #endif + { ++ int found_translation; + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); ++ found_translation = !(translation == msg_ctxt_id || translation == msgid_plural); + #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + if (msg_ctxt_id != buf) + free (msg_ctxt_id); + #endif +- if (!(translation == msg_ctxt_id || translation == msgid_plural)) ++ if (found_translation) + return translation; + } + return (n == 1 ? msgid : msgid_plural); +diff -urN libidn2-0.11.pristine/src/gl/intprops.h libidn2-0.11/src/gl/intprops.h +--- libidn2-0.11.pristine/src/gl/intprops.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/intprops.h 2016-11-24 21:38:50.637574497 +0100 +@@ -1,10 +1,10 @@ + /* intprops.h -- properties of integer types + +- Copyright (C) 2001-2005, 2009-2014 Free Software Foundation, Inc. ++ Copyright (C) 2001-2016 Free Software Foundation, Inc. + +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 3 of the License, or ++ This program is free software: you can redistribute it and/or modify it ++ under the terms of the GNU General Public License as published ++ by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, +@@ -21,9 +21,13 @@ + #define _GL_INTPROPS_H + + #include ++#include + +-/* Return an integer value, converted to the same type as the integer +- expression E after integer type promotion. V is the unconverted value. */ ++#ifndef __has_builtin ++# define __has_builtin(x) 0 ++#endif ++ ++/* Return a value with the common real type of E and V and the value of V. */ + #define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) + + /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see +@@ -37,59 +41,72 @@ + an integer. */ + #define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) + +-/* True if negative values of the signed integer type T use two's +- complement, ones' complement, or signed magnitude representation, +- respectively. Much GNU code assumes two's complement, but some +- people like to be portable to all possible C hosts. */ +-#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) +-#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) +-#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) +- +-/* True if the signed integer expression E uses two's complement. */ +-#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1) +- +-/* True if the arithmetic type T is signed. */ ++/* True if the real type T is signed. */ + #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + +-/* Return 1 if the integer expression E, after integer promotion, has +- a signed type. */ +-#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) ++/* Return 1 if the real expression E, after promotion, has a ++ signed or floating type. */ ++#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) + + +-/* Minimum and maximum values for integer types and expressions. These +- macros have undefined behavior if T is signed and has padding bits. +- If this is a problem for you, please let us know how to fix it for +- your host. */ ++/* Minimum and maximum values for integer types and expressions. */ ++ ++/* The width in bits of the integer type or expression T. ++ Padding bits are not supported; this is checked at compile-time below. */ ++#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) + + /* The maximum and minimum values for the integer type T. */ +-#define TYPE_MINIMUM(t) \ +- ((t) (! TYPE_SIGNED (t) \ +- ? (t) 0 \ +- : TYPE_SIGNED_MAGNITUDE (t) \ +- ? ~ (t) 0 \ +- : ~ TYPE_MAXIMUM (t))) ++#define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) + #define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ +- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) ++ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) + + /* The maximum and minimum values for the type of the expression E, + after integer promotion. E should not have side effects. */ + #define _GL_INT_MINIMUM(e) \ +- (_GL_INT_SIGNED (e) \ +- ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \ ++ (EXPR_SIGNED (e) \ ++ ? ~ _GL_SIGNED_INT_MAXIMUM (e) \ + : _GL_INT_CONVERT (e, 0)) + #define _GL_INT_MAXIMUM(e) \ +- (_GL_INT_SIGNED (e) \ ++ (EXPR_SIGNED (e) \ + ? _GL_SIGNED_INT_MAXIMUM (e) \ + : _GL_INT_NEGATE_CONVERT (e, 1)) + #define _GL_SIGNED_INT_MAXIMUM(e) \ +- (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) ++ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1) ++ ++/* Work around OpenVMS incompatibility with C99. */ ++#if !defined LLONG_MAX && defined __INT64_MAX ++# define LLONG_MAX __INT64_MAX ++# define LLONG_MIN __INT64_MIN ++#endif + ++/* This include file assumes that signed types are two's complement without ++ padding bits; the above macros have undefined behavior otherwise. ++ If this is a problem for you, please let us know how to fix it for your host. ++ As a sanity check, test the assumption for some signed types that ++ bounds. */ ++verify (TYPE_MINIMUM (signed char) == SCHAR_MIN); ++verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX); ++verify (TYPE_MINIMUM (short int) == SHRT_MIN); ++verify (TYPE_MAXIMUM (short int) == SHRT_MAX); ++verify (TYPE_MINIMUM (int) == INT_MIN); ++verify (TYPE_MAXIMUM (int) == INT_MAX); ++verify (TYPE_MINIMUM (long int) == LONG_MIN); ++verify (TYPE_MAXIMUM (long int) == LONG_MAX); ++#ifdef LLONG_MAX ++verify (TYPE_MINIMUM (long long int) == LLONG_MIN); ++verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); ++#endif ++/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */ ++#ifdef UINT_WIDTH ++verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH); ++#endif + +-/* Return 1 if the __typeof__ keyword works. This could be done by ++/* Does the __typeof__ keyword work? This could be done by + 'configure', but for now it's easier to do it by hand. */ +-#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ ++#if (2 <= __GNUC__ \ ++ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ + || (0x5110 <= __SUNPRO_C && !__STDC__)) + # define _GL_HAVE___TYPEOF__ 1 + #else +@@ -118,8 +135,7 @@ + signed, this macro may overestimate the true bound by one byte when + applied to unsigned types of size 2, 4, 16, ... bytes. */ + #define INT_STRLEN_BOUND(t) \ +- (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ +- - _GL_SIGNED_TYPE_OR_EXPR (t)) \ ++ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \ + + _GL_SIGNED_TYPE_OR_EXPR (t)) + + /* Bound on buffer size needed to represent an integer type or expression T, +@@ -224,24 +240,40 @@ + ? (a) < (min) >> (b) \ + : (max) >> (b) < (a)) + ++/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ ++#define _GL_HAS_BUILTIN_OVERFLOW \ ++ (5 <= __GNUC__ || __has_builtin (__builtin_add_overflow)) ++ ++/* True if __builtin_add_overflow_p (A, B, C) works. */ ++#define _GL_HAS_BUILTIN_OVERFLOW_P \ ++ (7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p)) + + /* The _GL*_OVERFLOW macros have the same restrictions as the + *_RANGE_OVERFLOW macros, except that they do not assume that operands + (e.g., A and B) have the same type as MIN and MAX. Instead, they assume + that the result (e.g., A + B) has that type. */ +-#define _GL_ADD_OVERFLOW(a, b, min, max) \ +- ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ +- : (a) < 0 ? (b) <= (a) + (b) \ +- : (b) < 0 ? (a) <= (a) + (b) \ +- : (a) + (b) < (b)) +-#define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ +- ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \ +- : (a) < 0 ? 1 \ +- : (b) < 0 ? (a) - (b) <= (a) \ +- : (a) < (b)) +-#define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ +- (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \ +- || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) ++#if _GL_HAS_BUILTIN_OVERFLOW_P ++# define _GL_ADD_OVERFLOW(a, b, min, max) \ ++ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0) ++# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ ++ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0) ++# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ ++ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0) ++#else ++# define _GL_ADD_OVERFLOW(a, b, min, max) \ ++ ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ ++ : (a) < 0 ? (b) <= (a) + (b) \ ++ : (b) < 0 ? (a) <= (a) + (b) \ ++ : (a) + (b) < (b)) ++# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ ++ ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \ ++ : (a) < 0 ? 1 \ ++ : (b) < 0 ? (a) - (b) <= (a) \ ++ : (a) < (b)) ++# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ ++ (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \ ++ || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) ++#endif + #define _GL_DIVIDE_OVERFLOW(a, b, min, max) \ + ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ + : (a) < 0 ? (b) <= (a) + (b) - 1 \ +@@ -263,22 +295,29 @@ + : (a) % - (b)) \ + == 0) + +- +-/* Integer overflow checks. ++/* Check for integer overflow, and report low order bits of answer. + + The INT__OVERFLOW macros return 1 if the corresponding C operators + might not yield numerically correct answers due to arithmetic overflow. +- They work correctly on all known practical hosts, and do not rely ++ The INT__WRAPV macros also store the low-order bits of the answer. ++ These macros work correctly on all known practical hosts, and do not rely + on undefined behavior due to signed arithmetic overflow. + +- Example usage: ++ Example usage, assuming A and B are long int: + +- long int i = ...; +- long int j = ...; +- if (INT_MULTIPLY_OVERFLOW (i, j)) +- printf ("multiply would overflow"); ++ if (INT_MULTIPLY_OVERFLOW (a, b)) ++ printf ("result would overflow\n"); + else +- printf ("product is %ld", i * j); ++ printf ("result is %ld (no overflow)\n", a * b); ++ ++ Example usage with WRAPV flavor: ++ ++ long int result; ++ bool overflow = INT_MULTIPLY_WRAPV (a, b, &result); ++ printf ("result is %ld (%s)\n", result, ++ overflow ? "after overflow" : "no overflow"); ++ ++ Restrictions on these macros: + + These macros do not check for all possible numerical problems or + undefined or unspecified behavior: they do not check for division +@@ -287,6 +326,9 @@ + These macros may evaluate their arguments zero or multiple times, so the + arguments should not have side effects. + ++ The WRAPV macros are not constant expressions. They support only ++ +, binary -, and *. The result type must be signed. ++ + These macros are tuned for their last argument being a constant. + + Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B, +@@ -296,8 +338,12 @@ + _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) + #define INT_SUBTRACT_OVERFLOW(a, b) \ + _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) +-#define INT_NEGATE_OVERFLOW(a) \ +- INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) ++#if _GL_HAS_BUILTIN_OVERFLOW_P ++# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a) ++#else ++# define INT_NEGATE_OVERFLOW(a) \ ++ INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) ++#endif + #define INT_MULTIPLY_OVERFLOW(a, b) \ + _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW) + #define INT_DIVIDE_OVERFLOW(a, b) \ +@@ -317,4 +363,102 @@ + _GL_INT_MINIMUM (0 * (b) + (a)), \ + _GL_INT_MAXIMUM (0 * (b) + (a))) + ++/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R. ++ Return 1 if the result overflows. See above for restrictions. */ ++#define INT_ADD_WRAPV(a, b, r) \ ++ _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW) ++#define INT_SUBTRACT_WRAPV(a, b, r) \ ++ _GL_INT_OP_WRAPV (a, b, r, -, __builtin_sub_overflow, INT_SUBTRACT_OVERFLOW) ++#define INT_MULTIPLY_WRAPV(a, b, r) \ ++ _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW) ++ ++/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: ++ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 ++ https://llvm.org/bugs/show_bug.cgi?id=25390 ++ For now, assume all versions of GCC-like compilers generate bogus ++ warnings for _Generic. This matters only for older compilers that ++ lack __builtin_add_overflow. */ ++#if __GNUC__ ++# define _GL__GENERIC_BOGUS 1 ++#else ++# define _GL__GENERIC_BOGUS 0 ++#endif ++ ++/* Store the low-order bits of A B into *R, where OP specifies ++ the operation. BUILTIN is the builtin operation, and OVERFLOW the ++ overflow predicate. Return 1 if the result overflows. See above ++ for restrictions. */ ++#if _GL_HAS_BUILTIN_OVERFLOW ++# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) ++#elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS ++# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ ++ (_Generic \ ++ (*(r), \ ++ signed char: \ ++ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ ++ signed char, SCHAR_MIN, SCHAR_MAX), \ ++ short int: \ ++ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ ++ short int, SHRT_MIN, SHRT_MAX), \ ++ int: \ ++ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ ++ int, INT_MIN, INT_MAX), \ ++ long int: \ ++ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ ++ long int, LONG_MIN, LONG_MAX), \ ++ long long int: \ ++ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ ++ long long int, LLONG_MIN, LLONG_MAX))) ++#else ++# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ ++ (sizeof *(r) == sizeof (signed char) \ ++ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ ++ signed char, SCHAR_MIN, SCHAR_MAX) \ ++ : sizeof *(r) == sizeof (short int) \ ++ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ ++ short int, SHRT_MIN, SHRT_MAX) \ ++ : sizeof *(r) == sizeof (int) \ ++ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ ++ int, INT_MIN, INT_MAX) \ ++ : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) ++# ifdef LLONG_MAX ++# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ ++ (sizeof *(r) == sizeof (long int) \ ++ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ ++ long int, LONG_MIN, LONG_MAX) \ ++ : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ ++ long long int, LLONG_MIN, LLONG_MAX)) ++# else ++# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ ++ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ ++ long int, LONG_MIN, LONG_MAX) ++# endif ++#endif ++ ++/* Store the low-order bits of A B into *R, where the operation ++ is given by OP. Use the unsigned type UT for calculation to avoid ++ overflow problems. *R's type is T, with extremal values TMIN and ++ TMAX. T must be a signed integer type. Return 1 if the result ++ overflows. */ ++#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \ ++ (sizeof ((a) op (b)) < sizeof (t) \ ++ ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \ ++ : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax)) ++#define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \ ++ ((overflow (a, b) \ ++ || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \ ++ || (tmax) < ((a) op (b))) \ ++ ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \ ++ : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0)) ++ ++/* Return A B, where the operation is given by OP. Use the ++ unsigned type UT for calculation to avoid overflow problems. ++ Convert the result to type T without overflow by subtracting TMIN ++ from large values before converting, and adding it afterwards. ++ Compilers can optimize all the operations except OP. */ ++#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t, tmin, tmax) \ ++ (((ut) (a) op (ut) (b)) <= (tmax) \ ++ ? (t) ((ut) (a) op (ut) (b)) \ ++ : ((t) (((ut) (a) op (ut) (b)) - (tmin)) + (tmin))) ++ + #endif /* _GL_INTPROPS_H */ +diff -urN libidn2-0.11.pristine/src/gl/m4/00gnulib.m4 libidn2-0.11/src/gl/m4/00gnulib.m4 +--- libidn2-0.11.pristine/src/gl/m4/00gnulib.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/00gnulib.m4 2016-11-24 21:38:50.640574602 +0100 +@@ -1,5 +1,5 @@ + # 00gnulib.m4 serial 3 +-dnl Copyright (C) 2009-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/absolute-header.m4 libidn2-0.11/src/gl/m4/absolute-header.m4 +--- libidn2-0.11.pristine/src/gl/m4/absolute-header.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/absolute-header.m4 2016-11-24 21:38:50.643574707 +0100 +@@ -1,5 +1,5 @@ + # absolute-header.m4 serial 16 +-dnl Copyright (C) 2006-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2006-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/configmake.m4 libidn2-0.11/src/gl/m4/configmake.m4 +--- libidn2-0.11.pristine/src/gl/m4/configmake.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/configmake.m4 2016-11-24 21:38:50.646574814 +0100 +@@ -1,5 +1,5 @@ + # configmake.m4 serial 2 +-dnl Copyright (C) 2010-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2010-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/dirname.m4 libidn2-0.11/src/gl/m4/dirname.m4 +--- libidn2-0.11.pristine/src/gl/m4/dirname.m4 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/dirname.m4 2016-11-24 21:38:50.572572218 +0100 +@@ -0,0 +1,19 @@ ++#serial 10 -*- autoconf -*- ++dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++AC_DEFUN([gl_DIRNAME], ++[ ++ AC_REQUIRE([gl_DIRNAME_LGPL]) ++]) ++ ++AC_DEFUN([gl_DIRNAME_LGPL], ++[ ++ dnl Prerequisites of lib/dirname.h. ++ AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) ++ ++ dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c, ++ dnl lib/stripslash.c. ++]) +diff -urN libidn2-0.11.pristine/src/gl/m4/double-slash-root.m4 libidn2-0.11/src/gl/m4/double-slash-root.m4 +--- libidn2-0.11.pristine/src/gl/m4/double-slash-root.m4 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/double-slash-root.m4 2016-11-24 21:38:50.574572288 +0100 +@@ -0,0 +1,38 @@ ++# double-slash-root.m4 serial 4 -*- Autoconf -*- ++dnl Copyright (C) 2006, 2008-2016 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++AC_DEFUN([gl_DOUBLE_SLASH_ROOT], ++[ ++ AC_REQUIRE([AC_CANONICAL_HOST]) ++ AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root], ++ [ if test x"$cross_compiling" = xyes ; then ++ # When cross-compiling, there is no way to tell whether // is special ++ # short of a list of hosts. However, the only known hosts to date ++ # that have a distinct // are Apollo DomainOS (too old to port to), ++ # Cygwin, and z/OS. If anyone knows of another system for which // has ++ # special semantics and is distinct from /, please report it to ++ # . ++ case $host in ++ *-cygwin | i370-ibm-openedition) ++ gl_cv_double_slash_root=yes ;; ++ *) ++ # Be optimistic and assume that / and // are the same when we ++ # don't know. ++ gl_cv_double_slash_root='unknown, assuming no' ;; ++ esac ++ else ++ set x `ls -di / // 2>/dev/null` ++ if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then ++ gl_cv_double_slash_root=no ++ else ++ gl_cv_double_slash_root=yes ++ fi ++ fi]) ++ if test "$gl_cv_double_slash_root" = yes; then ++ AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1], ++ [Define to 1 if // is a file system root distinct from /.]) ++ fi ++]) +diff -urN libidn2-0.11.pristine/src/gl/m4/errno_h.m4 libidn2-0.11/src/gl/m4/errno_h.m4 +--- libidn2-0.11.pristine/src/gl/m4/errno_h.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/errno_h.m4 2016-11-24 21:38:50.649574919 +0100 +@@ -1,5 +1,5 @@ + # errno_h.m4 serial 12 +-dnl Copyright (C) 2004, 2006, 2008-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2004, 2006, 2008-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/error.m4 libidn2-0.11/src/gl/m4/error.m4 +--- libidn2-0.11.pristine/src/gl/m4/error.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/error.m4 2016-11-24 21:38:50.653575059 +0100 +@@ -1,6 +1,6 @@ + #serial 14 + +-# Copyright (C) 1996-1998, 2001-2004, 2009-2014 Free Software Foundation, Inc. ++# Copyright (C) 1996-1998, 2001-2004, 2009-2016 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +diff -urN libidn2-0.11.pristine/src/gl/m4/extensions.m4 libidn2-0.11/src/gl/m4/extensions.m4 +--- libidn2-0.11.pristine/src/gl/m4/extensions.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/extensions.m4 2016-11-24 21:38:50.656575164 +0100 +@@ -1,7 +1,7 @@ +-# serial 13 -*- Autoconf -*- ++# serial 15 -*- Autoconf -*- + # Enable extensions on systems that normally disable them. + +-# Copyright (C) 2003, 2006-2014 Free Software Foundation, Inc. ++# Copyright (C) 2003, 2006-2016 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -60,7 +60,7 @@ + #ifndef _ALL_SOURCE + # undef _ALL_SOURCE + #endif +-/* Enable general extensions on OS X. */ ++/* Enable general extensions on macOS. */ + #ifndef _DARWIN_C_SOURCE + # undef _DARWIN_C_SOURCE + #endif +@@ -72,6 +72,34 @@ + #ifndef _POSIX_PTHREAD_SEMANTICS + # undef _POSIX_PTHREAD_SEMANTICS + #endif ++/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ ++#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ ++# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ ++#endif ++/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ ++#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ ++# undef __STDC_WANT_IEC_60559_BFP_EXT__ ++#endif ++/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ ++#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ ++# undef __STDC_WANT_IEC_60559_DFP_EXT__ ++#endif ++/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ ++#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ ++# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ ++#endif ++/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ ++#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ ++# undef __STDC_WANT_IEC_60559_TYPES_EXT__ ++#endif ++/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ ++#ifndef __STDC_WANT_LIB_EXT2__ ++# undef __STDC_WANT_LIB_EXT2__ ++#endif ++/* Enable extensions specified by ISO/IEC 24747:2009. */ ++#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ ++# undef __STDC_WANT_MATH_SPEC_FUNCS__ ++#endif + /* Enable extensions on HP NonStop. */ + #ifndef _TANDEM_SOURCE + # undef _TANDEM_SOURCE +@@ -101,6 +129,13 @@ + AC_DEFINE([_DARWIN_C_SOURCE]) + AC_DEFINE([_GNU_SOURCE]) + AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) ++ AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__]) ++ AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__]) ++ AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__]) ++ AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__]) ++ AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__]) ++ AC_DEFINE([__STDC_WANT_LIB_EXT2__]) ++ AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__]) + AC_DEFINE([_TANDEM_SOURCE]) + AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], + [ac_cv_should_define__xopen_source], +diff -urN libidn2-0.11.pristine/src/gl/m4/extern-inline.m4 libidn2-0.11/src/gl/m4/extern-inline.m4 +--- libidn2-0.11.pristine/src/gl/m4/extern-inline.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/extern-inline.m4 2016-11-24 21:38:50.659575269 +0100 +@@ -1,6 +1,6 @@ + dnl 'extern inline' a la ISO C99. + +-dnl Copyright 2012-2014 Free Software Foundation, Inc. ++dnl Copyright 2012-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +@@ -54,6 +54,7 @@ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ ++ && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) + # define _GL_INLINE inline +@@ -74,17 +75,19 @@ + # define _GL_EXTERN_INLINE static _GL_UNUSED + #endif + +-#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) ++/* In GCC 4.6 (inclusive) to 5.1 (exclusive), ++ suppress bogus "no previous prototype for 'FOO'" ++ and "no previous declaration for 'FOO'" diagnostics, ++ when FOO is an inline function in the header; see ++ and ++ . */ ++#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ + # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ + # define _GL_INLINE_HEADER_CONST_PRAGMA + # else + # define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") + # endif +- /* Suppress GCC's bogus "no previous prototype for 'FOO'" +- and "no previous declaration for 'FOO'" diagnostics, +- when FOO is an inline function in the header; see +- . */ + # define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ +diff -urN libidn2-0.11.pristine/src/gl/m4/getopt.m4 libidn2-0.11/src/gl/m4/getopt.m4 +--- libidn2-0.11.pristine/src/gl/m4/getopt.m4 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/getopt.m4 2016-11-24 21:38:50.576572358 +0100 +@@ -0,0 +1,368 @@ ++# getopt.m4 serial 44 ++dnl Copyright (C) 2002-2006, 2008-2016 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++# Request a POSIX compliant getopt function. ++AC_DEFUN([gl_FUNC_GETOPT_POSIX], ++[ ++ m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX]) ++ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) ++ AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) ++ dnl Other modules can request the gnulib implementation of the getopt ++ dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS. ++ dnl argp.m4 does this. ++ m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [ ++ REPLACE_GETOPT=1 ++ ], [ ++ REPLACE_GETOPT=0 ++ if test -n "$gl_replace_getopt"; then ++ REPLACE_GETOPT=1 ++ fi ++ ]) ++ if test $REPLACE_GETOPT = 1; then ++ dnl Arrange for getopt.h to be created. ++ gl_GETOPT_SUBSTITUTE_HEADER ++ fi ++]) ++ ++# Request a POSIX compliant getopt function with GNU extensions (such as ++# options with optional arguments) and the functions getopt_long, ++# getopt_long_only. ++AC_DEFUN([gl_FUNC_GETOPT_GNU], ++[ ++ m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) ++ ++ AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) ++]) ++ ++# Determine whether to replace the entire getopt facility. ++AC_DEFUN([gl_GETOPT_CHECK_HEADERS], ++[ ++ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles ++ AC_REQUIRE([AC_PROG_AWK]) dnl for awk that supports ENVIRON ++ ++ dnl Persuade Solaris to declare optarg, optind, opterr, optopt. ++ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) ++ ++ gl_CHECK_NEXT_HEADERS([getopt.h]) ++ if test $ac_cv_header_getopt_h = yes; then ++ HAVE_GETOPT_H=1 ++ else ++ HAVE_GETOPT_H=0 ++ fi ++ AC_SUBST([HAVE_GETOPT_H]) ++ ++ gl_replace_getopt= ++ ++ dnl Test whether is available. ++ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then ++ AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes]) ++ fi ++ ++ dnl Test whether the function getopt_long is available. ++ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then ++ AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes]) ++ fi ++ ++ dnl POSIX 2008 does not specify leading '+' behavior, but see ++ dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on ++ dnl the next version of POSIX. For now, we only guarantee leading '+' ++ dnl behavior with getopt-gnu. ++ if test -z "$gl_replace_getopt"; then ++ AC_CACHE_CHECK([whether getopt is POSIX compatible], ++ [gl_cv_func_getopt_posix], ++ [ ++ dnl Merging these three different test programs into a single one ++ dnl would require a reset mechanism. On BSD systems, it can be done ++ dnl through 'optreset'; on some others (glibc), it can be done by ++ dnl setting 'optind' to 0; on others again (HP-UX, IRIX, OSF/1, ++ dnl Solaris 9, musl libc), there is no such mechanism. ++ if test $cross_compiling = no; then ++ dnl Sanity check. Succeeds everywhere (except on MSVC, ++ dnl which lacks and getopt() entirely). ++ AC_RUN_IFELSE( ++ [AC_LANG_SOURCE([[ ++#include ++#include ++#include ++ ++int ++main () ++{ ++ static char program[] = "program"; ++ static char a[] = "-a"; ++ static char foo[] = "foo"; ++ static char bar[] = "bar"; ++ char *argv[] = { program, a, foo, bar, NULL }; ++ int c; ++ ++ c = getopt (4, argv, "ab"); ++ if (!(c == 'a')) ++ return 1; ++ c = getopt (4, argv, "ab"); ++ if (!(c == -1)) ++ return 2; ++ if (!(optind == 2)) ++ return 3; ++ return 0; ++} ++]])], ++ [gl_cv_func_getopt_posix=maybe], ++ [gl_cv_func_getopt_posix=no]) ++ if test $gl_cv_func_getopt_posix = maybe; then ++ dnl Sanity check with '+'. Succeeds everywhere (except on MSVC, ++ dnl which lacks and getopt() entirely). ++ AC_RUN_IFELSE( ++ [AC_LANG_SOURCE([[ ++#include ++#include ++#include ++ ++int ++main () ++{ ++ static char program[] = "program"; ++ static char donald[] = "donald"; ++ static char p[] = "-p"; ++ static char billy[] = "billy"; ++ static char duck[] = "duck"; ++ static char a[] = "-a"; ++ static char bar[] = "bar"; ++ char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; ++ int c; ++ ++ c = getopt (7, argv, "+abp:q:"); ++ if (!(c == -1)) ++ return 4; ++ if (!(strcmp (argv[0], "program") == 0)) ++ return 5; ++ if (!(strcmp (argv[1], "donald") == 0)) ++ return 6; ++ if (!(strcmp (argv[2], "-p") == 0)) ++ return 7; ++ if (!(strcmp (argv[3], "billy") == 0)) ++ return 8; ++ if (!(strcmp (argv[4], "duck") == 0)) ++ return 9; ++ if (!(strcmp (argv[5], "-a") == 0)) ++ return 10; ++ if (!(strcmp (argv[6], "bar") == 0)) ++ return 11; ++ if (!(optind == 1)) ++ return 12; ++ return 0; ++} ++]])], ++ [gl_cv_func_getopt_posix=maybe], ++ [gl_cv_func_getopt_posix=no]) ++ fi ++ if test $gl_cv_func_getopt_posix = maybe; then ++ dnl Detect Mac OS X 10.5, AIX 7.1, mingw bug. ++ AC_RUN_IFELSE( ++ [AC_LANG_SOURCE([[ ++#include ++#include ++#include ++ ++int ++main () ++{ ++ static char program[] = "program"; ++ static char ab[] = "-ab"; ++ char *argv[3] = { program, ab, NULL }; ++ if (getopt (2, argv, "ab:") != 'a') ++ return 13; ++ if (getopt (2, argv, "ab:") != '?') ++ return 14; ++ if (optopt != 'b') ++ return 15; ++ if (optind != 2) ++ return 16; ++ return 0; ++} ++]])], ++ [gl_cv_func_getopt_posix=yes], ++ [gl_cv_func_getopt_posix=no]) ++ fi ++ else ++ case "$host_os" in ++ darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; ++ *) gl_cv_func_getopt_posix="guessing yes";; ++ esac ++ fi ++ ]) ++ case "$gl_cv_func_getopt_posix" in ++ *no) gl_replace_getopt=yes ;; ++ esac ++ fi ++ ++ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then ++ AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu], ++ [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the ++ # optstring is necessary for programs like m4 that have POSIX-mandated ++ # semantics for supporting options interspersed with files. ++ # Also, since getopt_long is a GNU extension, we require optind=0. ++ # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; ++ # so take care to revert to the correct (non-)export state. ++dnl GNU Coding Standards currently allow awk but not env; besides, env ++dnl is ambiguous with environment values that contain newlines. ++ gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' ++ case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" ++ #include ++ #include ++ ]GL_NOCRASH[ ++ ]], [[ ++ int result = 0; ++ ++ nocrash_init(); ++ ++ /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, ++ and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, ++ OSF/1 5.1, Solaris 10. */ ++ { ++ static char conftest[] = "conftest"; ++ static char plus[] = "-+"; ++ char *argv[3] = { conftest, plus, NULL }; ++ opterr = 0; ++ if (getopt (2, argv, "+a") != '?') ++ result |= 1; ++ } ++ /* This code succeeds on glibc 2.8, mingw, ++ and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, ++ IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ ++ { ++ static char program[] = "program"; ++ static char p[] = "-p"; ++ static char foo[] = "foo"; ++ static char bar[] = "bar"; ++ char *argv[] = { program, p, foo, bar, NULL }; ++ ++ optind = 1; ++ if (getopt (4, argv, "p::") != 'p') ++ result |= 2; ++ else if (optarg != NULL) ++ result |= 4; ++ else if (getopt (4, argv, "p::") != -1) ++ result |= 6; ++ else if (optind != 2) ++ result |= 8; ++ } ++ /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ ++ { ++ static char program[] = "program"; ++ static char foo[] = "foo"; ++ static char p[] = "-p"; ++ char *argv[] = { program, foo, p, NULL }; ++ optind = 0; ++ if (getopt (3, argv, "-p") != 1) ++ result |= 16; ++ else if (getopt (3, argv, "-p") != 'p') ++ result |= 16; ++ } ++ /* This code fails on glibc 2.11. */ ++ { ++ static char program[] = "program"; ++ static char b[] = "-b"; ++ static char a[] = "-a"; ++ char *argv[] = { program, b, a, NULL }; ++ optind = opterr = 0; ++ if (getopt (3, argv, "+:a:b") != 'b') ++ result |= 32; ++ else if (getopt (3, argv, "+:a:b") != ':') ++ result |= 32; ++ } ++ /* This code dumps core on glibc 2.14. */ ++ { ++ static char program[] = "program"; ++ static char w[] = "-W"; ++ static char dummy[] = "dummy"; ++ char *argv[] = { program, w, dummy, NULL }; ++ optind = opterr = 1; ++ if (getopt (3, argv, "W;") != 'W') ++ result |= 64; ++ } ++ return result; ++ ]])], ++ [gl_cv_func_getopt_gnu=yes], ++ [gl_cv_func_getopt_gnu=no], ++ [dnl Cross compiling. Assume the worst, even on glibc platforms. ++ gl_cv_func_getopt_gnu="guessing no" ++ ]) ++ case $gl_had_POSIXLY_CORRECT in ++ exported) ;; ++ yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;; ++ *) AS_UNSET([POSIXLY_CORRECT]) ;; ++ esac ++ ]) ++ if test "$gl_cv_func_getopt_gnu" != yes; then ++ gl_replace_getopt=yes ++ else ++ AC_CACHE_CHECK([for working GNU getopt_long function], ++ [gl_cv_func_getopt_long_gnu], ++ [AC_RUN_IFELSE( ++ [AC_LANG_PROGRAM( ++ [[#include ++ #include ++ #include ++ ]], ++ [[static const struct option long_options[] = ++ { ++ { "xtremely-",no_argument, NULL, 1003 }, ++ { "xtra", no_argument, NULL, 1001 }, ++ { "xtreme", no_argument, NULL, 1002 }, ++ { "xtremely", no_argument, NULL, 1003 }, ++ { NULL, 0, NULL, 0 } ++ }; ++ /* This code fails on OpenBSD 5.0. */ ++ { ++ static char program[] = "program"; ++ static char xtremel[] = "--xtremel"; ++ char *argv[] = { program, xtremel, NULL }; ++ int option_index; ++ optind = 1; opterr = 0; ++ if (getopt_long (2, argv, "", long_options, &option_index) != 1003) ++ return 1; ++ } ++ return 0; ++ ]])], ++ [gl_cv_func_getopt_long_gnu=yes], ++ [gl_cv_func_getopt_long_gnu=no], ++ [dnl Cross compiling. Guess no on OpenBSD, yes otherwise. ++ case "$host_os" in ++ openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; ++ *) gl_cv_func_getopt_long_gnu="guessing yes";; ++ esac ++ ]) ++ ]) ++ case "$gl_cv_func_getopt_long_gnu" in ++ *yes) ;; ++ *) gl_replace_getopt=yes ;; ++ esac ++ fi ++ fi ++]) ++ ++AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], ++[ ++ GETOPT_H=getopt.h ++ AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], ++ [Define to rpl_ if the getopt replacement functions and variables ++ should be used.]) ++ AC_SUBST([GETOPT_H]) ++]) ++ ++# Prerequisites of lib/getopt*. ++AC_DEFUN([gl_PREREQ_GETOPT], ++[ ++ AC_CHECK_DECLS_ONCE([getenv]) ++]) +diff -urN libidn2-0.11.pristine/src/gl/m4/getprogname.m4 libidn2-0.11/src/gl/m4/getprogname.m4 +--- libidn2-0.11.pristine/src/gl/m4/getprogname.m4 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/getprogname.m4 2016-11-24 21:38:50.579572463 +0100 +@@ -0,0 +1,43 @@ ++# getprogname.m4 - check for getprogname or replacements for it ++ ++# Copyright (C) 2016 Free Software Foundation, Inc. ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# serial 4 ++ ++AC_DEFUN([gl_FUNC_GETPROGNAME], ++[ ++ AC_CHECK_FUNCS_ONCE([getprogname getexecname]) ++ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) ++ ac_found=0 ++ AC_CHECK_DECLS([program_invocation_name], [ac_found=1], [], ++ [#include ]) ++ AC_CHECK_DECLS([program_invocation_short_name], [ac_found=1], [], ++ [#include ]) ++ AC_CHECK_DECLS([__argv], [ac_found=1], [], [#include ]) ++ ++ # Incur the cost of this test only if none of the above worked. ++ if test $ac_found = 0; then ++ # On OpenBSD 5.1, using the global __progname variable appears to be ++ # the only way to implement getprogname. ++ AC_CACHE_CHECK([whether __progname is defined in default libraries], ++ [gl_cv_var___progname], ++ [ ++ gl_cv_var___progname= ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM( ++ [[extern char *__progname;]], ++ [[return *__progname;]] ++ )], ++ [gl_cv_var___progname=yes] ++ ) ++ ] ++ ) ++ if test "$gl_cv_var___progname" = yes; then ++ AC_DEFINE([HAVE_VAR___PROGNAME], 1, ++ [Define if you have a global __progname variable]) ++ fi ++ fi ++]) +diff -urN libidn2-0.11.pristine/src/gl/m4/gnulib-cache.m4 libidn2-0.11/src/gl/m4/gnulib-cache.m4 +--- libidn2-0.11.pristine/src/gl/m4/gnulib-cache.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/gnulib-cache.m4 2016-11-24 21:38:51.710612138 +0100 +@@ -1,4 +1,4 @@ +-# Copyright (C) 2002-2014 Free Software Foundation, Inc. ++# Copyright (C) 2002-2016 Free Software Foundation, Inc. + # + # This file is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -27,13 +27,14 @@ + + + # Specification in the form of a command-line invocation: +-# gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=../build-aux --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files configmake error gettext-h manywarnings progname version-etc ++# gnulib-tool --import --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=../build-aux --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files configmake error getopt-gnu gettext-h manywarnings progname version-etc + + # Specification in the form of a few gnulib-tool.m4 macro invocations: + gl_LOCAL_DIR([]) + gl_MODULES([ + configmake + error ++ getopt-gnu + gettext-h + manywarnings + progname +diff -urN libidn2-0.11.pristine/src/gl/m4/gnulib-common.m4 libidn2-0.11/src/gl/m4/gnulib-common.m4 +--- libidn2-0.11.pristine/src/gl/m4/gnulib-common.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/gnulib-common.m4 2016-11-24 21:38:50.662575374 +0100 +@@ -1,5 +1,5 @@ + # gnulib-common.m4 serial 36 +-dnl Copyright (C) 2007-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2007-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +@@ -253,9 +253,10 @@ + [ + dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler + dnl as "cc", and GCC as "gcc". They have different object file formats and +- dnl library formats. In particular, the GNU binutils programs ar, ranlib ++ dnl library formats. In particular, the GNU binutils programs ar and ranlib + dnl produce libraries that work only with gcc, not with cc. + AC_REQUIRE([AC_PROG_CC]) ++ AC_BEFORE([$0], [AM_PROG_AR]) + AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], + [ + AC_EGREP_CPP([Amsterdam], +@@ -267,25 +268,37 @@ + [gl_cv_c_amsterdam_compiler=yes], + [gl_cv_c_amsterdam_compiler=no]) + ]) +- if test -z "$AR"; then +- if test $gl_cv_c_amsterdam_compiler = yes; then ++ ++ dnl Don't compete with AM_PROG_AR's decision about AR/ARFLAGS if we are not ++ dnl building with __ACK__. ++ if test $gl_cv_c_amsterdam_compiler = yes; then ++ if test -z "$AR"; then + AR='cc -c.a' +- if test -z "$ARFLAGS"; then +- ARFLAGS='-o' +- fi +- else +- dnl Use the Automake-documented default values for AR and ARFLAGS, +- dnl but prefer ${host}-ar over ar (useful for cross-compiling). +- AC_CHECK_TOOL([AR], [ar], [ar]) +- if test -z "$ARFLAGS"; then +- ARFLAGS='cru' +- fi + fi +- else + if test -z "$ARFLAGS"; then +- ARFLAGS='cru' ++ ARFLAGS='-o' + fi ++ else ++ dnl AM_PROG_AR was added in automake v1.11.2. AM_PROG_AR does not AC_SUBST ++ dnl ARFLAGS variable (it is filed into Makefile.in directly by automake ++ dnl script on-demand, if not specified by ./configure of course). ++ dnl Don't AC_REQUIRE the AM_PROG_AR otherwise the code for __ACK__ above ++ dnl will be ignored. Also, pay attention to call AM_PROG_AR in else block ++ dnl because AM_PROG_AR is written so it could re-set AR variable even for ++ dnl __ACK__. It may seem like its easier to avoid calling the macro here, ++ dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good ++ dnl default value and automake should usually know them). ++ m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [:]) ++ fi ++ ++ dnl In case the code above has not helped with setting AR/ARFLAGS, use ++ dnl Automake-documented default values for AR and ARFLAGS, but prefer ++ dnl ${host}-ar over ar (useful for cross-compiling). ++ AC_CHECK_TOOL([AR], [ar], [ar]) ++ if test -z "$ARFLAGS"; then ++ ARFLAGS='cr' + fi ++ + AC_SUBST([AR]) + AC_SUBST([ARFLAGS]) + if test -z "$RANLIB"; then +diff -urN libidn2-0.11.pristine/src/gl/m4/gnulib-comp.m4 libidn2-0.11/src/gl/m4/gnulib-comp.m4 +--- libidn2-0.11.pristine/src/gl/m4/gnulib-comp.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/gnulib-comp.m4 2016-11-24 21:38:52.010622662 +0100 +@@ -1,5 +1,5 @@ + # DO NOT EDIT! GENERATED AUTOMATICALLY! +-# Copyright (C) 2002-2014 Free Software Foundation, Inc. ++# Copyright (C) 2002-2016 Free Software Foundation, Inc. + # + # This file is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -37,21 +37,33 @@ + m4_pattern_allow([^gl_ES$])dnl a valid locale name + m4_pattern_allow([^gl_LIBOBJS$])dnl a variable + m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable ++ ++ # Pre-early section. ++ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([gl_PROG_AR_RANLIB]) ++ + # Code from module absolute-header: + # Code from module configmake: ++ # Code from module dirname-lgpl: ++ # Code from module dosname: ++ # Code from module double-slash-root: + # Code from module errno: + # Code from module error: + # Code from module extensions: +- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + # Code from module extern-inline: ++ # Code from module getopt-gnu: ++ # Code from module getopt-posix: ++ # Code from module getprogname: + # Code from module gettext-h: + # Code from module include_next: + # Code from module intprops: ++ # Code from module malloc-posix: + # Code from module manywarnings: + # Code from module msvc-inval: + # Code from module msvc-nothrow: ++ # Code from module nocrash: + # Code from module progname: ++ # Code from module snippet/_Noreturn: + # Code from module snippet/arg-nonnull: + # Code from module snippet/c++defs: + # Code from module snippet/warn-on-use: +@@ -62,8 +74,10 @@ + dnl gl_PROG_CC_C99 arranges for this. With older Autoconf gl_PROG_CC_C99 + dnl shouldn't hurt, though installers are on their own to set c99 mode. + gl_PROG_CC_C99 ++ # Code from module stdbool: + # Code from module stddef: + # Code from module stdio: ++ # Code from module stdlib: + # Code from module strerror: + # Code from module strerror-override: + # Code from module string: +@@ -89,6 +103,8 @@ + gl_COMMON + gl_source_base='gl' + gl_CONFIGMAKE_PREP ++ gl_DIRNAME_LGPL ++ gl_DOUBLE_SLASH_ROOT + gl_HEADER_ERRNO_H + gl_ERROR + if test $ac_cv_lib_error_at_line = no; then +@@ -99,13 +115,38 @@ + [AM_][XGETTEXT_OPTION([--flag=error:3:c-format]) + AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])]) + AC_REQUIRE([gl_EXTERN_INLINE]) ++ gl_FUNC_GETOPT_GNU ++ if test $REPLACE_GETOPT = 1; then ++ AC_LIBOBJ([getopt]) ++ AC_LIBOBJ([getopt1]) ++ gl_PREREQ_GETOPT ++ dnl Arrange for unistd.h to include getopt.h. ++ GNULIB_GL_UNISTD_H_GETOPT=1 ++ fi ++ AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) ++ gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) ++ gl_FUNC_GETOPT_POSIX ++ if test $REPLACE_GETOPT = 1; then ++ AC_LIBOBJ([getopt]) ++ AC_LIBOBJ([getopt1]) ++ gl_PREREQ_GETOPT ++ dnl Arrange for unistd.h to include getopt.h. ++ GNULIB_GL_UNISTD_H_GETOPT=1 ++ fi ++ AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) ++ gl_FUNC_GETPROGNAME + AC_SUBST([LIBINTL]) + AC_SUBST([LTLIBINTL]) +- gl_MSVC_INVAL ++ gl_FUNC_MALLOC_POSIX ++ if test $REPLACE_MALLOC = 1; then ++ AC_LIBOBJ([malloc]) ++ fi ++ gl_STDLIB_MODULE_INDICATOR([malloc-posix]) ++ AC_REQUIRE([gl_MSVC_INVAL]) + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + AC_LIBOBJ([msvc-inval]) + fi +- gl_MSVC_NOTHROW ++ AC_REQUIRE([gl_MSVC_NOTHROW]) + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + AC_LIBOBJ([msvc-nothrow]) + fi +@@ -113,8 +154,10 @@ + AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include ]) + gt_TYPE_SSIZE_T + gl_STDARG_H ++ AM_STDBOOL_H + gl_STDDEF_H + gl_STDIO_H ++ gl_STDLIB_H + gl_FUNC_STRERROR + if test $REPLACE_STRERROR = 1; then + AC_LIBOBJ([strerror]) +@@ -268,14 +311,26 @@ + # This macro records the list of files which have been installed by + # gnulib-tool and may be removed by future gnulib-tool invocations. + AC_DEFUN([gl_FILE_LIST], [ ++ build-aux/snippet/_Noreturn.h + build-aux/snippet/arg-nonnull.h + build-aux/snippet/c++defs.h + build-aux/snippet/warn-on-use.h ++ lib/basename-lgpl.c ++ lib/dirname-lgpl.c ++ lib/dirname.h ++ lib/dosname.h + lib/errno.in.h + lib/error.c + lib/error.h ++ lib/getopt.c ++ lib/getopt.in.h ++ lib/getopt1.c ++ lib/getopt_int.h ++ lib/getprogname.c ++ lib/getprogname.h + lib/gettext.h + lib/intprops.h ++ lib/malloc.c + lib/msvc-inval.c + lib/msvc-inval.h + lib/msvc-nothrow.c +@@ -283,12 +338,15 @@ + lib/progname.c + lib/progname.h + lib/stdarg.in.h ++ lib/stdbool.in.h + lib/stddef.in.h + lib/stdio.in.h ++ lib/stdlib.in.h + lib/strerror-override.c + lib/strerror-override.h + lib/strerror.c + lib/string.in.h ++ lib/stripslash.c + lib/sys_types.in.h + lib/unistd.c + lib/unistd.in.h +@@ -298,21 +356,29 @@ + m4/00gnulib.m4 + m4/absolute-header.m4 + m4/configmake.m4 ++ m4/dirname.m4 ++ m4/double-slash-root.m4 + m4/errno_h.m4 + m4/error.m4 + m4/extensions.m4 + m4/extern-inline.m4 ++ m4/getopt.m4 ++ m4/getprogname.m4 + m4/gnulib-common.m4 + m4/include_next.m4 ++ m4/malloc.m4 + m4/manywarnings.m4 + m4/msvc-inval.m4 + m4/msvc-nothrow.m4 ++ m4/nocrash.m4 + m4/off_t.m4 + m4/onceonly.m4 + m4/ssize_t.m4 + m4/stdarg.m4 ++ m4/stdbool.m4 + m4/stddef_h.m4 + m4/stdio_h.m4 ++ m4/stdlib_h.m4 + m4/strerror.m4 + m4/string_h.m4 + m4/sys_socket_h.m4 +diff -urN libidn2-0.11.pristine/src/gl/m4/gnulib-tool.m4 libidn2-0.11/src/gl/m4/gnulib-tool.m4 +--- libidn2-0.11.pristine/src/gl/m4/gnulib-tool.m4 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/gnulib-tool.m4 2016-11-24 21:38:50.581572533 +0100 +@@ -0,0 +1,57 @@ ++# gnulib-tool.m4 serial 2 ++dnl Copyright (C) 2004-2005, 2009-2016 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++dnl The following macros need not be invoked explicitly. ++dnl Invoking them does nothing except to declare default arguments ++dnl for "gnulib-tool --import". ++ ++dnl Usage: gl_LOCAL_DIR([DIR]) ++AC_DEFUN([gl_LOCAL_DIR], []) ++ ++dnl Usage: gl_MODULES([module1 module2 ...]) ++AC_DEFUN([gl_MODULES], []) ++ ++dnl Usage: gl_AVOID([module1 module2 ...]) ++AC_DEFUN([gl_AVOID], []) ++ ++dnl Usage: gl_SOURCE_BASE([DIR]) ++AC_DEFUN([gl_SOURCE_BASE], []) ++ ++dnl Usage: gl_M4_BASE([DIR]) ++AC_DEFUN([gl_M4_BASE], []) ++ ++dnl Usage: gl_PO_BASE([DIR]) ++AC_DEFUN([gl_PO_BASE], []) ++ ++dnl Usage: gl_DOC_BASE([DIR]) ++AC_DEFUN([gl_DOC_BASE], []) ++ ++dnl Usage: gl_TESTS_BASE([DIR]) ++AC_DEFUN([gl_TESTS_BASE], []) ++ ++dnl Usage: gl_WITH_TESTS ++AC_DEFUN([gl_WITH_TESTS], []) ++ ++dnl Usage: gl_LIB([LIBNAME]) ++AC_DEFUN([gl_LIB], []) ++ ++dnl Usage: gl_LGPL or gl_LGPL([VERSION]) ++AC_DEFUN([gl_LGPL], []) ++ ++dnl Usage: gl_MAKEFILE_NAME([FILENAME]) ++AC_DEFUN([gl_MAKEFILE_NAME], []) ++ ++dnl Usage: gl_LIBTOOL ++AC_DEFUN([gl_LIBTOOL], []) ++ ++dnl Usage: gl_MACRO_PREFIX([PREFIX]) ++AC_DEFUN([gl_MACRO_PREFIX], []) ++ ++dnl Usage: gl_PO_DOMAIN([DOMAIN]) ++AC_DEFUN([gl_PO_DOMAIN], []) ++ ++dnl Usage: gl_VC_FILES([BOOLEAN]) ++AC_DEFUN([gl_VC_FILES], []) +diff -urN libidn2-0.11.pristine/src/gl/m4/include_next.m4 libidn2-0.11/src/gl/m4/include_next.m4 +--- libidn2-0.11.pristine/src/gl/m4/include_next.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/include_next.m4 2016-11-24 21:38:50.665575479 +0100 +@@ -1,5 +1,5 @@ + # include_next.m4 serial 23 +-dnl Copyright (C) 2006-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2006-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/malloc.m4 libidn2-0.11/src/gl/m4/malloc.m4 +--- libidn2-0.11.pristine/src/gl/m4/malloc.m4 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/malloc.m4 2016-11-24 21:38:50.583572603 +0100 +@@ -0,0 +1,101 @@ ++# malloc.m4 serial 15 ++dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++m4_version_prereq([2.70], [] ,[ ++ ++# This is adapted with modifications from upstream Autoconf here: ++# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c ++AC_DEFUN([_AC_FUNC_MALLOC_IF], ++[ ++ AC_REQUIRE([AC_HEADER_STDC])dnl ++ AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles ++ AC_CHECK_HEADERS([stdlib.h]) ++ AC_CACHE_CHECK([for GNU libc compatible malloc], ++ [ac_cv_func_malloc_0_nonnull], ++ [AC_RUN_IFELSE( ++ [AC_LANG_PROGRAM( ++ [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H ++ # include ++ #else ++ char *malloc (); ++ #endif ++ ]], ++ [[char *p = malloc (0); ++ int result = !p; ++ free (p); ++ return result;]]) ++ ], ++ [ac_cv_func_malloc_0_nonnull=yes], ++ [ac_cv_func_malloc_0_nonnull=no], ++ [case "$host_os" in ++ # Guess yes on platforms where we know the result. ++ *-gnu* | freebsd* | netbsd* | openbsd* \ ++ | hpux* | solaris* | cygwin* | mingw*) ++ ac_cv_func_malloc_0_nonnull=yes ;; ++ # If we don't know, assume the worst. ++ *) ac_cv_func_malloc_0_nonnull=no ;; ++ esac ++ ]) ++ ]) ++ AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2]) ++])# _AC_FUNC_MALLOC_IF ++ ++]) ++ ++# gl_FUNC_MALLOC_GNU ++# ------------------ ++# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if ++# it is not. ++AC_DEFUN([gl_FUNC_MALLOC_GNU], ++[ ++ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) ++ dnl _AC_FUNC_MALLOC_IF is defined in Autoconf. ++ _AC_FUNC_MALLOC_IF( ++ [AC_DEFINE([HAVE_MALLOC_GNU], [1], ++ [Define to 1 if your system has a GNU libc compatible 'malloc' ++ function, and to 0 otherwise.])], ++ [AC_DEFINE([HAVE_MALLOC_GNU], [0]) ++ REPLACE_MALLOC=1 ++ ]) ++]) ++ ++# gl_FUNC_MALLOC_POSIX ++# -------------------- ++# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it ++# fails), and replace malloc if it is not. ++AC_DEFUN([gl_FUNC_MALLOC_POSIX], ++[ ++ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) ++ AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) ++ if test $gl_cv_func_malloc_posix = yes; then ++ AC_DEFINE([HAVE_MALLOC_POSIX], [1], ++ [Define if the 'malloc' function is POSIX compliant.]) ++ else ++ REPLACE_MALLOC=1 ++ fi ++]) ++ ++# Test whether malloc, realloc, calloc are POSIX compliant, ++# Set gl_cv_func_malloc_posix to yes or no accordingly. ++AC_DEFUN([gl_CHECK_MALLOC_POSIX], ++[ ++ AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant], ++ [gl_cv_func_malloc_posix], ++ [ ++ dnl It is too dangerous to try to allocate a large amount of memory: ++ dnl some systems go to their knees when you do that. So assume that ++ dnl all Unix implementations of the function are POSIX compliant. ++ AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM( ++ [[]], ++ [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ ++ choke me ++ #endif ++ ]])], ++ [gl_cv_func_malloc_posix=yes], ++ [gl_cv_func_malloc_posix=no]) ++ ]) ++]) +diff -urN libidn2-0.11.pristine/src/gl/m4/manywarnings.m4 libidn2-0.11/src/gl/m4/manywarnings.m4 +--- libidn2-0.11.pristine/src/gl/m4/manywarnings.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/manywarnings.m4 2016-11-24 21:38:50.669575620 +0100 +@@ -1,5 +1,5 @@ +-# manywarnings.m4 serial 7 +-dnl Copyright (C) 2008-2014 Free Software Foundation, Inc. ++# manywarnings.m4 serial 8 ++dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +@@ -62,10 +62,11 @@ + CFLAGS="$CFLAGS -W -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( +- [[void f (void) ++ [[int f (void) + { + typedef struct { int a; int b; } s_t; + s_t s1 = { 0, }; ++ return s1.b; + } + ]], + [[]])], +@@ -103,17 +104,19 @@ + + gl_manywarn_set= + for gl_manywarn_item in \ ++ -fno-common \ + -W \ + -Wabi \ + -Waddress \ + -Waggressive-loop-optimizations \ + -Wall \ +- -Warray-bounds \ + -Wattributes \ + -Wbad-function-cast \ ++ -Wbool-compare \ + -Wbuiltin-macro-redefined \ + -Wcast-align \ + -Wchar-subscripts \ ++ -Wchkp \ + -Wclobbered \ + -Wcomment \ + -Wcomments \ +@@ -122,9 +125,13 @@ + -Wdate-time \ + -Wdeprecated \ + -Wdeprecated-declarations \ ++ -Wdesignated-init \ + -Wdisabled-optimization \ ++ -Wdiscarded-array-qualifiers \ ++ -Wdiscarded-qualifiers \ + -Wdiv-by-zero \ + -Wdouble-promotion \ ++ -Wduplicated-cond \ + -Wempty-body \ + -Wendif-labels \ + -Wenum-compare \ +@@ -133,22 +140,31 @@ + -Wformat-extra-args \ + -Wformat-nonliteral \ + -Wformat-security \ ++ -Wformat-signedness \ + -Wformat-y2k \ + -Wformat-zero-length \ ++ -Wframe-address \ + -Wfree-nonheap-object \ ++ -Whsa \ ++ -Wignored-attributes \ + -Wignored-qualifiers \ + -Wimplicit \ + -Wimplicit-function-declaration \ + -Wimplicit-int \ ++ -Wincompatible-pointer-types \ + -Winit-self \ + -Winline \ ++ -Wint-conversion \ + -Wint-to-pointer-cast \ + -Winvalid-memory-model \ + -Winvalid-pch \ + -Wjump-misses-init \ ++ -Wlogical-not-parentheses \ + -Wlogical-op \ + -Wmain \ + -Wmaybe-uninitialized \ ++ -Wmemset-transposed-args \ ++ -Wmisleading-indentation \ + -Wmissing-braces \ + -Wmissing-declarations \ + -Wmissing-field-initializers \ +@@ -159,6 +175,9 @@ + -Wnarrowing \ + -Wnested-externs \ + -Wnonnull \ ++ -Wnonnull-compare \ ++ -Wnull-dereference \ ++ -Wodr \ + -Wold-style-declaration \ + -Wold-style-definition \ + -Wopenmp-simd \ +@@ -174,8 +193,13 @@ + -Wpragmas \ + -Wreturn-local-addr \ + -Wreturn-type \ ++ -Wscalar-storage-order \ + -Wsequence-point \ + -Wshadow \ ++ -Wshift-count-negative \ ++ -Wshift-count-overflow \ ++ -Wshift-negative-value \ ++ -Wsizeof-array-argument \ + -Wsizeof-pointer-memaccess \ + -Wstack-protector \ + -Wstrict-aliasing \ +@@ -185,10 +209,14 @@ + -Wsuggest-attribute=format \ + -Wsuggest-attribute=noreturn \ + -Wsuggest-attribute=pure \ ++ -Wsuggest-final-methods \ ++ -Wsuggest-final-types \ + -Wswitch \ ++ -Wswitch-bool \ + -Wswitch-default \ + -Wsync-nand \ + -Wsystem-headers \ ++ -Wtautological-compare \ + -Wtrampolines \ + -Wtrigraphs \ + -Wtype-limits \ +@@ -217,9 +245,12 @@ + gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" + done + +- # gcc --help=warnings outputs an unusual form for this option; list +- # it here so that the above 'comm' command doesn't report a false match. ++ # gcc --help=warnings outputs an unusual form for these options; list ++ # them here so that the above 'comm' command doesn't report a false match. ++ gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2" + gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc" ++ gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2" ++ gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2" + + # These are needed for older GCC versions. + if test -n "$GCC"; then +diff -urN libidn2-0.11.pristine/src/gl/m4/msvc-inval.m4 libidn2-0.11/src/gl/m4/msvc-inval.m4 +--- libidn2-0.11.pristine/src/gl/m4/msvc-inval.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/msvc-inval.m4 2016-11-24 21:38:50.672575726 +0100 +@@ -1,5 +1,5 @@ + # msvc-inval.m4 serial 1 +-dnl Copyright (C) 2011-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/msvc-nothrow.m4 libidn2-0.11/src/gl/m4/msvc-nothrow.m4 +--- libidn2-0.11.pristine/src/gl/m4/msvc-nothrow.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/msvc-nothrow.m4 2016-11-24 21:38:50.676575866 +0100 +@@ -1,5 +1,5 @@ + # msvc-nothrow.m4 serial 1 +-dnl Copyright (C) 2011-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/nocrash.m4 libidn2-0.11/src/gl/m4/nocrash.m4 +--- libidn2-0.11.pristine/src/gl/m4/nocrash.m4 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/nocrash.m4 2016-11-24 21:38:50.585572673 +0100 +@@ -0,0 +1,131 @@ ++# nocrash.m4 serial 4 ++dnl Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++dnl Based on libsigsegv, from Bruno Haible and Paolo Bonzini. ++ ++AC_PREREQ([2.13]) ++ ++dnl Expands to some code for use in .c programs that will cause the configure ++dnl test to exit instead of crashing. This is useful to avoid triggering ++dnl action from a background debugger and to avoid core dumps. ++dnl Usage: ... ++dnl ]GL_NOCRASH[ ++dnl ... ++dnl int main() { nocrash_init(); ... } ++AC_DEFUN([GL_NOCRASH],[[ ++#include ++#if defined __MACH__ && defined __APPLE__ ++/* Avoid a crash on Mac OS X. */ ++#include ++#include ++#include ++#include ++#include ++#include ++/* The exception port on which our thread listens. */ ++static mach_port_t our_exception_port; ++/* The main function of the thread listening for exceptions of type ++ EXC_BAD_ACCESS. */ ++static void * ++mach_exception_thread (void *arg) ++{ ++ /* Buffer for a message to be received. */ ++ struct { ++ mach_msg_header_t head; ++ mach_msg_body_t msgh_body; ++ char data[1024]; ++ } msg; ++ mach_msg_return_t retval; ++ /* Wait for a message on the exception port. */ ++ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), ++ our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); ++ if (retval != MACH_MSG_SUCCESS) ++ abort (); ++ exit (1); ++} ++static void ++nocrash_init (void) ++{ ++ mach_port_t self = mach_task_self (); ++ /* Allocate a port on which the thread shall listen for exceptions. */ ++ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) ++ == KERN_SUCCESS) { ++ /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ ++ if (mach_port_insert_right (self, our_exception_port, our_exception_port, ++ MACH_MSG_TYPE_MAKE_SEND) ++ == KERN_SUCCESS) { ++ /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting ++ for us. */ ++ exception_mask_t mask = EXC_MASK_BAD_ACCESS; ++ /* Create the thread listening on the exception port. */ ++ pthread_attr_t attr; ++ pthread_t thread; ++ if (pthread_attr_init (&attr) == 0 ++ && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 ++ && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { ++ pthread_attr_destroy (&attr); ++ /* Replace the exception port info for these exceptions with our own. ++ Note that we replace the exception port for the entire task, not only ++ for a particular thread. This has the effect that when our exception ++ port gets the message, the thread specific exception port has already ++ been asked, and we don't need to bother about it. ++ See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ ++ task_set_exception_ports (self, mask, our_exception_port, ++ EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); ++ } ++ } ++ } ++} ++#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ ++/* Avoid a crash on native Windows. */ ++#define WIN32_LEAN_AND_MEAN ++#include ++#include ++static LONG WINAPI ++exception_filter (EXCEPTION_POINTERS *ExceptionInfo) ++{ ++ switch (ExceptionInfo->ExceptionRecord->ExceptionCode) ++ { ++ case EXCEPTION_ACCESS_VIOLATION: ++ case EXCEPTION_IN_PAGE_ERROR: ++ case EXCEPTION_STACK_OVERFLOW: ++ case EXCEPTION_GUARD_PAGE: ++ case EXCEPTION_PRIV_INSTRUCTION: ++ case EXCEPTION_ILLEGAL_INSTRUCTION: ++ case EXCEPTION_DATATYPE_MISALIGNMENT: ++ case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: ++ case EXCEPTION_NONCONTINUABLE_EXCEPTION: ++ exit (1); ++ } ++ return EXCEPTION_CONTINUE_SEARCH; ++} ++static void ++nocrash_init (void) ++{ ++ SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); ++} ++#else ++/* Avoid a crash on POSIX systems. */ ++#include ++#include ++/* A POSIX signal handler. */ ++static void ++exception_handler (int sig) ++{ ++ _exit (1); ++} ++static void ++nocrash_init (void) ++{ ++#ifdef SIGSEGV ++ signal (SIGSEGV, exception_handler); ++#endif ++#ifdef SIGBUS ++ signal (SIGBUS, exception_handler); ++#endif ++} ++#endif ++]]) +diff -urN libidn2-0.11.pristine/src/gl/m4/off_t.m4 libidn2-0.11/src/gl/m4/off_t.m4 +--- libidn2-0.11.pristine/src/gl/m4/off_t.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/off_t.m4 2016-11-24 21:38:50.679575971 +0100 +@@ -1,5 +1,5 @@ + # off_t.m4 serial 1 +-dnl Copyright (C) 2012-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2012-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/onceonly.m4 libidn2-0.11/src/gl/m4/onceonly.m4 +--- libidn2-0.11.pristine/src/gl/m4/onceonly.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/onceonly.m4 2016-11-24 21:38:50.682576076 +0100 +@@ -1,5 +1,5 @@ + # onceonly.m4 serial 9 +-dnl Copyright (C) 2002-2003, 2005-2006, 2008-2014 Free Software Foundation, ++dnl Copyright (C) 2002-2003, 2005-2006, 2008-2016 Free Software Foundation, + dnl Inc. + dnl + dnl This file is free software; you can redistribute it and/or modify +diff -urN libidn2-0.11.pristine/src/gl/m4/ssize_t.m4 libidn2-0.11/src/gl/m4/ssize_t.m4 +--- libidn2-0.11.pristine/src/gl/m4/ssize_t.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/ssize_t.m4 2016-11-24 21:38:50.686576216 +0100 +@@ -1,5 +1,5 @@ + # ssize_t.m4 serial 5 (gettext-0.18.2) +-dnl Copyright (C) 2001-2003, 2006, 2010-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2001-2003, 2006, 2010-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/stdarg.m4 libidn2-0.11/src/gl/m4/stdarg.m4 +--- libidn2-0.11.pristine/src/gl/m4/stdarg.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/stdarg.m4 2016-11-24 21:38:50.689576321 +0100 +@@ -1,5 +1,5 @@ + # stdarg.m4 serial 6 +-dnl Copyright (C) 2006, 2008-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2006, 2008-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/stdbool.m4 libidn2-0.11/src/gl/m4/stdbool.m4 +--- libidn2-0.11.pristine/src/gl/m4/stdbool.m4 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/stdbool.m4 2016-11-24 21:38:50.587572743 +0100 +@@ -0,0 +1,108 @@ ++# Check for stdbool.h that conforms to C99. ++ ++dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++#serial 7 ++ ++# Prepare for substituting if it is not supported. ++ ++AC_DEFUN([AM_STDBOOL_H], ++[ ++ AC_REQUIRE([AC_CHECK_HEADER_STDBOOL]) ++ ++ # Define two additional variables used in the Makefile substitution. ++ ++ if test "$ac_cv_header_stdbool_h" = yes; then ++ STDBOOL_H='' ++ else ++ STDBOOL_H='stdbool.h' ++ fi ++ AC_SUBST([STDBOOL_H]) ++ AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"]) ++ ++ if test "$ac_cv_type__Bool" = yes; then ++ HAVE__BOOL=1 ++ else ++ HAVE__BOOL=0 ++ fi ++ AC_SUBST([HAVE__BOOL]) ++]) ++ ++# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. ++AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) ++ ++# This version of the macro is needed in autoconf <= 2.68. ++ ++AC_DEFUN([AC_CHECK_HEADER_STDBOOL], ++ [AC_CACHE_CHECK([for stdbool.h that conforms to C99], ++ [ac_cv_header_stdbool_h], ++ [AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM( ++ [[ ++ #include ++ ++ #ifdef __cplusplus ++ typedef bool Bool; ++ #else ++ typedef _Bool Bool; ++ #ifndef bool ++ "error: bool is not defined" ++ #endif ++ #ifndef false ++ "error: false is not defined" ++ #endif ++ #if false ++ "error: false is not 0" ++ #endif ++ #ifndef true ++ "error: true is not defined" ++ #endif ++ #if true != 1 ++ "error: true is not 1" ++ #endif ++ #endif ++ ++ #ifndef __bool_true_false_are_defined ++ "error: __bool_true_false_are_defined is not defined" ++ #endif ++ ++ struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s; ++ ++ char a[true == 1 ? 1 : -1]; ++ char b[false == 0 ? 1 : -1]; ++ char c[__bool_true_false_are_defined == 1 ? 1 : -1]; ++ char d[(bool) 0.5 == true ? 1 : -1]; ++ /* See body of main program for 'e'. */ ++ char f[(Bool) 0.0 == false ? 1 : -1]; ++ char g[true]; ++ char h[sizeof (Bool)]; ++ char i[sizeof s.t]; ++ enum { j = false, k = true, l = false * true, m = true * 256 }; ++ /* The following fails for ++ HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ ++ Bool n[m]; ++ char o[sizeof n == m * sizeof n[0] ? 1 : -1]; ++ char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; ++ /* Catch a bug in an HP-UX C compiler. See ++ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html ++ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html ++ */ ++ Bool q = true; ++ Bool *pq = &q; ++ bool *qq = &q; ++ ]], ++ [[ ++ bool e = &s; ++ *pq |= q; *pq |= ! q; ++ *qq |= q; *qq |= ! q; ++ /* Refer to every declared value, to avoid compiler optimizations. */ ++ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l ++ + !m + !n + !o + !p + !q + !pq + !qq); ++ ]])], ++ [ac_cv_header_stdbool_h=yes], ++ [ac_cv_header_stdbool_h=no])]) ++ AC_CHECK_TYPES([_Bool]) ++]) +diff -urN libidn2-0.11.pristine/src/gl/m4/stddef_h.m4 libidn2-0.11/src/gl/m4/stddef_h.m4 +--- libidn2-0.11.pristine/src/gl/m4/stddef_h.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/stddef_h.m4 2016-11-24 21:38:50.692576426 +0100 +@@ -1,6 +1,6 @@ +-dnl A placeholder for POSIX 2008 , for platforms that have issues. +-# stddef_h.m4 serial 4 +-dnl Copyright (C) 2009-2014 Free Software Foundation, Inc. ++dnl A placeholder for , for platforms that have issues. ++# stddef_h.m4 serial 5 ++dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +@@ -10,6 +10,9 @@ + AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) + STDDEF_H= ++ AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h], ++ [[#include ++ ]]) + if test $gt_cv_c_wchar_t = no; then + HAVE_WCHAR_T=0 + STDDEF_H=stddef.h +@@ -43,5 +46,6 @@ + [ + dnl Assume proper GNU behavior unless another module says otherwise. + REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) ++ HAVE_MAX_ALIGN_T=1; AC_SUBST([HAVE_MAX_ALIGN_T]) + HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) + ]) +diff -urN libidn2-0.11.pristine/src/gl/m4/stdio_h.m4 libidn2-0.11/src/gl/m4/stdio_h.m4 +--- libidn2-0.11.pristine/src/gl/m4/stdio_h.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/stdio_h.m4 2016-11-24 21:38:50.696576568 +0100 +@@ -1,14 +1,45 @@ +-# stdio_h.m4 serial 43 +-dnl Copyright (C) 2007-2014 Free Software Foundation, Inc. ++# stdio_h.m4 serial 48 ++dnl Copyright (C) 2007-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + AC_DEFUN([gl_STDIO_H], + [ ++ AH_VERBATIM([MINGW_ANSI_STDIO], ++[/* Use GNU style printf and scanf. */ ++#ifndef __USE_MINGW_ANSI_STDIO ++# undef __USE_MINGW_ANSI_STDIO ++#endif ++]) ++ AC_DEFINE([__USE_MINGW_ANSI_STDIO]) + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + gl_NEXT_HEADERS([stdio.h]) + ++ dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and ++ dnl inttypes.h behave like gnu instead of system; we must give our ++ dnl printf wrapper the right attribute to match. ++ AC_CACHE_CHECK([which flavor of printf attribute matches inttypes macros], ++ [gl_cv_func_printf_attribute_flavor], ++ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++ #define __STDC_FORMAT_MACROS 1 ++ #include ++ #include ++ /* For non-mingw systems, compilation will trivially succeed. ++ For mingw, compilation will succeed for older mingw (system ++ printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ ++ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \ ++ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) ++ extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; ++ #endif ++ ]])], [gl_cv_func_printf_attribute_flavor=system], ++ [gl_cv_func_printf_attribute_flavor=gnu])]) ++ if test "$gl_cv_func_printf_attribute_flavor" = gnu; then ++ AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1], ++ [Define to 1 if printf and friends should be labeled with ++ attribute "__gnu_printf__" instead of "__printf__"]) ++ fi ++ + dnl No need to create extra modules for these functions. Everyone who uses + dnl likely needs them. + GNULIB_FSCANF=1 +diff -urN libidn2-0.11.pristine/src/gl/m4/stdlib_h.m4 libidn2-0.11/src/gl/m4/stdlib_h.m4 +--- libidn2-0.11.pristine/src/gl/m4/stdlib_h.m4 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/stdlib_h.m4 2016-11-24 21:38:50.589572813 +0100 +@@ -0,0 +1,120 @@ ++# stdlib_h.m4 serial 43 ++dnl Copyright (C) 2007-2016 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++AC_DEFUN([gl_STDLIB_H], ++[ ++ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) ++ gl_NEXT_HEADERS([stdlib.h]) ++ ++ dnl Check for declarations of anything we want to poison if the ++ dnl corresponding gnulib module is not in use, and which is not ++ dnl guaranteed by C89. ++ gl_WARN_ON_USE_PREPARE([[#include ++#if HAVE_SYS_LOADAVG_H ++# include ++#endif ++#if HAVE_RANDOM_H ++# include ++#endif ++ ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt ++ initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps ++ posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch ++ secure_getenv setenv setstate setstate_r srandom srandom_r ++ strtod strtoll strtoull unlockpt unsetenv]) ++]) ++ ++AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], ++[ ++ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. ++ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) ++ gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ++ dnl Define it also as a C macro, for the benefit of the unit tests. ++ gl_MODULE_INDICATOR_FOR_TESTS([$1]) ++]) ++ ++AC_DEFUN([gl_STDLIB_H_DEFAULTS], ++[ ++ GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT]) ++ GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) ++ GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) ++ GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) ++ GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) ++ GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) ++ GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT]) ++ GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) ++ GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC]) ++ GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) ++ GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) ++ GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) ++ GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) ++ GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) ++ GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT]) ++ GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) ++ GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R]) ++ GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) ++ GNULIB_QSORT_R=0; AC_SUBST([GNULIB_QSORT_R]) ++ GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM]) ++ GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) ++ GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) ++ GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) ++ GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) ++ GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV]) ++ GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) ++ GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) ++ GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) ++ GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) ++ GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX]) ++ GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) ++ GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) ++ GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB]) ++ dnl Assume proper GNU behavior unless another module says otherwise. ++ HAVE__EXIT=1; AC_SUBST([HAVE__EXIT]) ++ HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) ++ HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) ++ HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) ++ HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) ++ HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) ++ HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) ++ HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) ++ HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) ++ HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) ++ HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) ++ HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT]) ++ HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) ++ HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R]) ++ HAVE_QSORT_R=1; AC_SUBST([HAVE_QSORT_R]) ++ HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM]) ++ HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) ++ HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) ++ HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) ++ HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) ++ HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV]) ++ HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) ++ HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) ++ HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) ++ HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) ++ HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) ++ HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) ++ HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) ++ HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) ++ HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) ++ REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) ++ REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) ++ REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) ++ REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) ++ REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) ++ REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME]) ++ REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R]) ++ REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) ++ REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R]) ++ REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R]) ++ REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) ++ REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) ++ REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) ++ REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) ++ REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) ++ REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB]) ++]) +diff -urN libidn2-0.11.pristine/src/gl/m4/strerror.m4 libidn2-0.11/src/gl/m4/strerror.m4 +--- libidn2-0.11.pristine/src/gl/m4/strerror.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/strerror.m4 2016-11-24 21:38:50.699576673 +0100 +@@ -1,5 +1,5 @@ + # strerror.m4 serial 17 +-dnl Copyright (C) 2002, 2007-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2002, 2007-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/string_h.m4 libidn2-0.11/src/gl/m4/string_h.m4 +--- libidn2-0.11.pristine/src/gl/m4/string_h.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/string_h.m4 2016-11-24 21:38:50.702576778 +0100 +@@ -1,6 +1,6 @@ + # Configure a GNU-like replacement for . + +-# Copyright (C) 2007-2014 Free Software Foundation, Inc. ++# Copyright (C) 2007-2016 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/sys_socket_h.m4 libidn2-0.11/src/gl/m4/sys_socket_h.m4 +--- libidn2-0.11.pristine/src/gl/m4/sys_socket_h.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/sys_socket_h.m4 2016-11-24 21:38:50.705576883 +0100 +@@ -1,5 +1,5 @@ + # sys_socket_h.m4 serial 23 +-dnl Copyright (C) 2005-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2005-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/sys_types_h.m4 libidn2-0.11/src/gl/m4/sys_types_h.m4 +--- libidn2-0.11.pristine/src/gl/m4/sys_types_h.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/sys_types_h.m4 2016-11-24 21:38:50.709577023 +0100 +@@ -1,5 +1,5 @@ +-# sys_types_h.m4 serial 5 +-dnl Copyright (C) 2011-2014 Free Software Foundation, Inc. ++# sys_types_h.m4 serial 6 ++dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +@@ -22,3 +22,28 @@ + AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], + [ + ]) ++ ++# This works around a buggy version in autoconf <= 2.69. ++# See ++ ++m4_version_prereq([2.70], [], [ ++ ++# This is taken from the following Autoconf patch: ++# http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98 ++ ++m4_undefine([AC_HEADER_MAJOR]) ++AC_DEFUN([AC_HEADER_MAJOR], ++[AC_CHECK_HEADERS_ONCE([sys/types.h]) ++AC_CHECK_HEADER([sys/mkdev.h], ++ [AC_DEFINE([MAJOR_IN_MKDEV], [1], ++ [Define to 1 if `major', `minor', and `makedev' are declared in ++ .])]) ++if test $ac_cv_header_sys_mkdev_h = no; then ++ AC_CHECK_HEADER([sys/sysmacros.h], ++ [AC_DEFINE([MAJOR_IN_SYSMACROS], [1], ++ [Define to 1 if `major', `minor', and `makedev' are declared in ++ .])]) ++fi ++]) ++ ++]) +diff -urN libidn2-0.11.pristine/src/gl/m4/unistd_h.m4 libidn2-0.11/src/gl/m4/unistd_h.m4 +--- libidn2-0.11.pristine/src/gl/m4/unistd_h.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/unistd_h.m4 2016-11-24 21:38:50.712577128 +0100 +@@ -1,5 +1,5 @@ +-# unistd_h.m4 serial 67 +-dnl Copyright (C) 2006-2014 Free Software Foundation, Inc. ++# unistd_h.m4 serial 68 ++dnl Copyright (C) 2006-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +@@ -173,9 +173,11 @@ + REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) + REPLACE_READ=0; AC_SUBST([REPLACE_READ]) + REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) ++ REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT]) + REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) + REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) + REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) ++ REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT]) + REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) + REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) + REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) +diff -urN libidn2-0.11.pristine/src/gl/m4/version-etc.m4 libidn2-0.11/src/gl/m4/version-etc.m4 +--- libidn2-0.11.pristine/src/gl/m4/version-etc.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/version-etc.m4 2016-11-24 21:38:50.715577233 +0100 +@@ -1,5 +1,5 @@ + # version-etc.m4 serial 1 +-# Copyright (C) 2009-2014 Free Software Foundation, Inc. ++# Copyright (C) 2009-2016 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/warnings.m4 libidn2-0.11/src/gl/m4/warnings.m4 +--- libidn2-0.11.pristine/src/gl/m4/warnings.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/warnings.m4 2016-11-24 21:38:50.722577480 +0100 +@@ -1,5 +1,5 @@ + # warnings.m4 serial 11 +-dnl Copyright (C) 2008-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/warn-on-use.m4 libidn2-0.11/src/gl/m4/warn-on-use.m4 +--- libidn2-0.11.pristine/src/gl/m4/warn-on-use.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/warn-on-use.m4 2016-11-24 21:38:50.719577375 +0100 +@@ -1,5 +1,5 @@ + # warn-on-use.m4 serial 5 +-dnl Copyright (C) 2010-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2010-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/m4/wchar_t.m4 libidn2-0.11/src/gl/m4/wchar_t.m4 +--- libidn2-0.11.pristine/src/gl/m4/wchar_t.m4 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/m4/wchar_t.m4 2016-11-24 21:38:50.725577585 +0100 +@@ -1,5 +1,5 @@ + # wchar_t.m4 serial 4 (gettext-0.18.2) +-dnl Copyright (C) 2002-2003, 2008-2014 Free Software Foundation, Inc. ++dnl Copyright (C) 2002-2003, 2008-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +diff -urN libidn2-0.11.pristine/src/gl/Makefile.am libidn2-0.11/src/gl/Makefile.am +--- libidn2-0.11.pristine/src/gl/Makefile.am 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/Makefile.am 2016-11-24 21:38:51.705611963 +0100 +@@ -1,6 +1,6 @@ + ## DO NOT EDIT! GENERATED AUTOMATICALLY! + ## Process this file with automake to produce Makefile.in. +-# Copyright (C) 2002-2014 Free Software Foundation, Inc. ++# Copyright (C) 2002-2016 Free Software Foundation, Inc. + # + # This file is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -21,7 +21,7 @@ + # the same distribution terms as the rest of that program. + # + # Generated by gnulib-tool. +-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=../build-aux --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files configmake error gettext-h manywarnings progname version-etc ++# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=../build-aux --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files configmake error getopt-gnu gettext-h manywarnings progname version-etc + + AUTOMAKE_OPTIONS = 1.9.6 gnits + +@@ -106,6 +106,21 @@ + + ## end gnulib module configmake + ++## begin gnulib module dirname-lgpl ++ ++libgnu_la_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c ++ ++EXTRA_DIST += dirname.h ++ ++## end gnulib module dirname-lgpl ++ ++## begin gnulib module dosname ++ ++ ++EXTRA_DIST += dosname.h ++ ++## end gnulib module dosname ++ + ## begin gnulib module errno + + BUILT_SOURCES += $(ERRNO_H) +@@ -149,6 +164,39 @@ + + ## end gnulib module error + ++## begin gnulib module getopt-posix ++ ++BUILT_SOURCES += $(GETOPT_H) ++ ++# We need the following in order to create when the system ++# doesn't have one that works with the given compiler. ++getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) ++ $(AM_V_GEN)rm -f $@-t $@ && \ ++ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ ++ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ ++ -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ ++ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ ++ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ ++ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ ++ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ ++ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ ++ < $(srcdir)/getopt.in.h; \ ++ } > $@-t && \ ++ mv -f $@-t $@ ++MOSTLYCLEANFILES += getopt.h getopt.h-t ++ ++EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h ++ ++EXTRA_libgnu_la_SOURCES += getopt.c getopt1.c ++ ++## end gnulib module getopt-posix ++ ++## begin gnulib module getprogname ++ ++libgnu_la_SOURCES += getprogname.h getprogname.c ++ ++## end gnulib module getprogname ++ + ## begin gnulib module gettext-h + + libgnu_la_SOURCES += gettext.h +@@ -162,6 +210,15 @@ + + ## end gnulib module intprops + ++## begin gnulib module malloc-posix ++ ++ ++EXTRA_DIST += malloc.c ++ ++EXTRA_libgnu_la_SOURCES += malloc.c ++ ++## end gnulib module malloc-posix ++ + ## begin gnulib module msvc-inval + + +@@ -186,6 +243,18 @@ + + ## end gnulib module progname + ++## begin gnulib module snippet/_Noreturn ++ ++# Because this Makefile snippet defines a variable used by other ++# gnulib Makefile snippets, it must be present in all Makefile.am that ++# need it. This is ensured by the applicability 'all' defined above. ++ ++_NORETURN_H=$(top_srcdir)/../build-aux/snippet/_Noreturn.h ++ ++EXTRA_DIST += $(top_srcdir)/../build-aux/snippet/_Noreturn.h ++ ++## end gnulib module snippet/_Noreturn ++ + ## begin gnulib module snippet/arg-nonnull + + # The BUILT_SOURCES created by this Makefile snippet are not used via #include +@@ -283,6 +352,29 @@ + + ## end gnulib module stdarg + ++## begin gnulib module stdbool ++ ++BUILT_SOURCES += $(STDBOOL_H) ++ ++# We need the following in order to create when the system ++# doesn't have one that works. ++if GL_GENERATE_STDBOOL_H ++stdbool.h: stdbool.in.h $(top_builddir)/config.status ++ $(AM_V_GEN)rm -f $@-t $@ && \ ++ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ ++ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ ++ } > $@-t && \ ++ mv $@-t $@ ++else ++stdbool.h: $(top_builddir)/config.status ++ rm -f $@ ++endif ++MOSTLYCLEANFILES += stdbool.h stdbool.h-t ++ ++EXTRA_DIST += stdbool.in.h ++ ++## end gnulib module stdbool ++ + ## begin gnulib module stddef + + BUILT_SOURCES += $(STDDEF_H) +@@ -298,6 +390,7 @@ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ ++ -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \ + -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ + -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ + < $(srcdir)/stddef.in.h; \ +@@ -441,6 +534,112 @@ + + ## end gnulib module stdio + ++## begin gnulib module stdlib ++ ++BUILT_SOURCES += stdlib.h ++ ++# We need the following in order to create when the system ++# doesn't have one that works with the given compiler. ++stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ ++ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) ++ $(AM_V_GEN)rm -f $@-t $@ && \ ++ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ ++ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ ++ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ ++ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ ++ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ ++ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ ++ -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ ++ -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ ++ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ ++ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ ++ -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ ++ -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ ++ -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ ++ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ ++ -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ ++ -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ ++ -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ ++ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ ++ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ ++ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ ++ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ ++ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ ++ -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ ++ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ ++ -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \ ++ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ ++ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ ++ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ ++ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ ++ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ ++ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ ++ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ ++ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ ++ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ ++ -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ ++ -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ ++ -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ ++ -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ ++ -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ ++ < $(srcdir)/stdlib.in.h | \ ++ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ ++ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ ++ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ ++ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ ++ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ ++ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ ++ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ ++ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ ++ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ ++ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ ++ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ ++ -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ ++ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ ++ -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ ++ -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \ ++ -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ ++ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ ++ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ ++ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ ++ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ ++ -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ ++ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ ++ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ ++ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ ++ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ ++ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ ++ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ ++ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ ++ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ ++ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ ++ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ ++ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ ++ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ ++ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ ++ -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \ ++ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ ++ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ ++ -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ ++ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ ++ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ ++ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ ++ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ ++ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ ++ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ ++ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ ++ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ ++ -e '/definition of _Noreturn/r $(_NORETURN_H)' \ ++ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ ++ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ ++ } > $@-t && \ ++ mv $@-t $@ ++MOSTLYCLEANFILES += stdlib.h stdlib.h-t ++ ++EXTRA_DIST += stdlib.in.h ++ ++## end gnulib module stdlib ++ + ## begin gnulib module strerror + + +@@ -715,9 +914,11 @@ + -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ + -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ + -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ ++ -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \ + -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ + -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ + -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ ++ -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ + -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ + -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ + -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ +diff -urN libidn2-0.11.pristine/src/gl/Makefile.in libidn2-0.11/src/gl/Makefile.in +--- libidn2-0.11.pristine/src/gl/Makefile.in 2016-11-03 11:35:18.000000000 +0100 ++++ libidn2-0.11/src/gl/Makefile.in 2016-11-24 21:39:11.706313573 +0100 +@@ -1,7 +1,7 @@ +-# Makefile.in generated by automake 1.14.1 from Makefile.am. ++# Makefile.in generated by automake 1.15 from Makefile.am. + # @configure_input@ + +-# Copyright (C) 1994-2013 Free Software Foundation, Inc. ++# Copyright (C) 1994-2014 Free Software Foundation, Inc. + + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -14,7 +14,7 @@ + + @SET_MAKE@ + +-# Copyright (C) 2002-2014 Free Software Foundation, Inc. ++# Copyright (C) 2002-2016 Free Software Foundation, Inc. + # + # This file is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -35,12 +35,22 @@ + # the same distribution terms as the rest of that program. + # + # Generated by gnulib-tool. +-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=../build-aux --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files configmake error gettext-h manywarnings progname version-etc ++# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=../build-aux --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files configmake error getopt-gnu gettext-h manywarnings progname version-etc + + + + VPATH = @srcdir@ +-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' ++am__is_gnu_make = { \ ++ if test -z '$(MAKELEVEL)'; then \ ++ false; \ ++ elif test -n '$(MAKE_HOST)'; then \ ++ true; \ ++ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ ++ true; \ ++ else \ ++ false; \ ++ fi; \ ++} + am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ +@@ -103,24 +113,29 @@ + build_triplet = @build@ + host_triplet = @host@ + subdir = gl +-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ +- $(top_srcdir)/../build-aux/depcomp $(noinst_HEADERS) + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 \ ++ $(top_srcdir)/gl/m4/dirname.m4 \ ++ $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ ++ $(top_srcdir)/gl/m4/getopt.m4 \ ++ $(top_srcdir)/gl/m4/getprogname.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ ++ $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ +- $(top_srcdir)/gl/m4/off_t.m4 $(top_srcdir)/gl/m4/onceonly.m4 \ +- $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ ++ $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ ++ $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ ++ $(top_srcdir)/gl/m4/stdarg.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ + $(top_srcdir)/gl/m4/stddef_h.m4 $(top_srcdir)/gl/m4/stdio_h.m4 \ ++ $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ +@@ -136,6 +151,8 @@ + $(top_srcdir)/../m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) ++DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ ++ $(am__DIST_COMMON) + mkinstalldirs = $(install_sh) -d + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = +@@ -143,7 +160,8 @@ + LIBRARIES = $(noinst_LIBRARIES) + LTLIBRARIES = $(noinst_LTLIBRARIES) + am__DEPENDENCIES_1 = +-am_libgnu_la_OBJECTS = progname.lo unistd.lo version-etc.lo ++am_libgnu_la_OBJECTS = dirname-lgpl.lo basename-lgpl.lo stripslash.lo \ ++ getprogname.lo progname.lo unistd.lo version-etc.lo + libgnu_la_OBJECTS = $(am_libgnu_la_OBJECTS) + AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +@@ -230,6 +248,8 @@ + ETAGS = etags + CTAGS = ctags + DIST_SUBDIRS = $(SUBDIRS) ++am__DIST_COMMON = $(srcdir)/Makefile.in \ ++ $(top_srcdir)/../build-aux/depcomp + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + am__relativize = \ + dir0=`pwd`; \ +@@ -290,6 +310,10 @@ + ERRNO_H = @ERRNO_H@ + EXEEXT = @EXEEXT@ + FGREP = @FGREP@ ++GETOPT_H = @GETOPT_H@ ++GNULIB_ATOLL = @GNULIB_ATOLL@ ++GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ ++GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ + GNULIB_CHDIR = @GNULIB_CHDIR@ + GNULIB_CHOWN = @GNULIB_CHOWN@ + GNULIB_CLOSE = @GNULIB_CLOSE@ +@@ -335,16 +359,21 @@ + GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ + GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ + GNULIB_GETLINE = @GNULIB_GETLINE@ ++GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ + GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ + GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ + GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ ++GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ + GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ ++GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ ++GNULIB_GRANTPT = @GNULIB_GRANTPT@ + GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ + GNULIB_ISATTY = @GNULIB_ISATTY@ + GNULIB_LCHOWN = @GNULIB_LCHOWN@ + GNULIB_LINK = @GNULIB_LINK@ + GNULIB_LINKAT = @GNULIB_LINKAT@ + GNULIB_LSEEK = @GNULIB_LSEEK@ ++GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ + GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ + GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ + GNULIB_MBSCHR = @GNULIB_MBSCHR@ +@@ -359,10 +388,16 @@ + GNULIB_MBSSPN = @GNULIB_MBSSPN@ + GNULIB_MBSSTR = @GNULIB_MBSSTR@ + GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ ++GNULIB_MBTOWC = @GNULIB_MBTOWC@ + GNULIB_MEMCHR = @GNULIB_MEMCHR@ + GNULIB_MEMMEM = @GNULIB_MEMMEM@ + GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ + GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ ++GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ ++GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ ++GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ ++GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ ++GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ + GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ + GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ + GNULIB_PCLOSE = @GNULIB_PCLOSE@ +@@ -370,22 +405,34 @@ + GNULIB_PIPE = @GNULIB_PIPE@ + GNULIB_PIPE2 = @GNULIB_PIPE2@ + GNULIB_POPEN = @GNULIB_POPEN@ ++GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ + GNULIB_PREAD = @GNULIB_PREAD@ + GNULIB_PRINTF = @GNULIB_PRINTF@ + GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ ++GNULIB_PTSNAME = @GNULIB_PTSNAME@ ++GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ + GNULIB_PUTC = @GNULIB_PUTC@ + GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ ++GNULIB_PUTENV = @GNULIB_PUTENV@ + GNULIB_PUTS = @GNULIB_PUTS@ + GNULIB_PWRITE = @GNULIB_PWRITE@ ++GNULIB_QSORT_R = @GNULIB_QSORT_R@ ++GNULIB_RANDOM = @GNULIB_RANDOM@ ++GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ + GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ + GNULIB_READ = @GNULIB_READ@ + GNULIB_READLINK = @GNULIB_READLINK@ + GNULIB_READLINKAT = @GNULIB_READLINKAT@ ++GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ ++GNULIB_REALPATH = @GNULIB_REALPATH@ + GNULIB_REMOVE = @GNULIB_REMOVE@ + GNULIB_RENAME = @GNULIB_RENAME@ + GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ + GNULIB_RMDIR = @GNULIB_RMDIR@ ++GNULIB_RPMATCH = @GNULIB_RPMATCH@ + GNULIB_SCANF = @GNULIB_SCANF@ ++GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ ++GNULIB_SETENV = @GNULIB_SETENV@ + GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ + GNULIB_SLEEP = @GNULIB_SLEEP@ + GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +@@ -406,16 +453,22 @@ + GNULIB_STRSEP = @GNULIB_STRSEP@ + GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ + GNULIB_STRSTR = @GNULIB_STRSTR@ ++GNULIB_STRTOD = @GNULIB_STRTOD@ + GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ ++GNULIB_STRTOLL = @GNULIB_STRTOLL@ ++GNULIB_STRTOULL = @GNULIB_STRTOULL@ + GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ + GNULIB_SYMLINK = @GNULIB_SYMLINK@ + GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ ++GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ + GNULIB_TMPFILE = @GNULIB_TMPFILE@ + GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ + GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ + GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ + GNULIB_UNLINK = @GNULIB_UNLINK@ + GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ ++GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ ++GNULIB_UNSETENV = @GNULIB_UNSETENV@ + GNULIB_USLEEP = @GNULIB_USLEEP@ + GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ + GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ +@@ -427,8 +480,12 @@ + GNULIB_VSCANF = @GNULIB_VSCANF@ + GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ + GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ ++GNULIB_WCTOMB = @GNULIB_WCTOMB@ + GNULIB_WRITE = @GNULIB_WRITE@ ++GNULIB__EXIT = @GNULIB__EXIT@ + GREP = @GREP@ ++HAVE_ATOLL = @HAVE_ATOLL@ ++HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ + HAVE_CHOWN = @HAVE_CHOWN@ + HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ + HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +@@ -439,12 +496,14 @@ + HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ + HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ + HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ ++HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ + HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ + HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ + HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ + HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ + HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ + HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ ++HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ + HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ + HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ + HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +@@ -454,6 +513,7 @@ + HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ + HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ + HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ ++HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ + HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ + HAVE_DPRINTF = @HAVE_DPRINTF@ + HAVE_DUP2 = @HAVE_DUP2@ +@@ -473,26 +533,46 @@ + HAVE_GETGROUPS = @HAVE_GETGROUPS@ + HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ + HAVE_GETLOGIN = @HAVE_GETLOGIN@ ++HAVE_GETOPT_H = @HAVE_GETOPT_H@ + HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ ++HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ ++HAVE_GRANTPT = @HAVE_GRANTPT@ + HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ + HAVE_LCHOWN = @HAVE_LCHOWN@ + HAVE_LINK = @HAVE_LINK@ + HAVE_LINKAT = @HAVE_LINKAT@ ++HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ + HAVE_MBSLEN = @HAVE_MBSLEN@ + HAVE_MEMCHR = @HAVE_MEMCHR@ + HAVE_MEMPCPY = @HAVE_MEMPCPY@ ++HAVE_MKDTEMP = @HAVE_MKDTEMP@ ++HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ ++HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ ++HAVE_MKSTEMP = @HAVE_MKSTEMP@ ++HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ + HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ + HAVE_OS_H = @HAVE_OS_H@ + HAVE_PCLOSE = @HAVE_PCLOSE@ + HAVE_PIPE = @HAVE_PIPE@ + HAVE_PIPE2 = @HAVE_PIPE2@ + HAVE_POPEN = @HAVE_POPEN@ ++HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ + HAVE_PREAD = @HAVE_PREAD@ ++HAVE_PTSNAME = @HAVE_PTSNAME@ ++HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ + HAVE_PWRITE = @HAVE_PWRITE@ ++HAVE_QSORT_R = @HAVE_QSORT_R@ ++HAVE_RANDOM = @HAVE_RANDOM@ ++HAVE_RANDOM_H = @HAVE_RANDOM_H@ ++HAVE_RANDOM_R = @HAVE_RANDOM_R@ + HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ + HAVE_READLINK = @HAVE_READLINK@ + HAVE_READLINKAT = @HAVE_READLINKAT@ ++HAVE_REALPATH = @HAVE_REALPATH@ + HAVE_RENAMEAT = @HAVE_RENAMEAT@ ++HAVE_RPMATCH = @HAVE_RPMATCH@ ++HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ ++HAVE_SETENV = @HAVE_SETENV@ + HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ + HAVE_SLEEP = @HAVE_SLEEP@ + HAVE_STPCPY = @HAVE_STPCPY@ +@@ -501,17 +581,25 @@ + HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ + HAVE_STRPBRK = @HAVE_STRPBRK@ + HAVE_STRSEP = @HAVE_STRSEP@ ++HAVE_STRTOD = @HAVE_STRTOD@ ++HAVE_STRTOLL = @HAVE_STRTOLL@ ++HAVE_STRTOULL = @HAVE_STRTOULL@ ++HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ + HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ + HAVE_SYMLINK = @HAVE_SYMLINK@ + HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ ++HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ + HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ + HAVE_UNISTD_H = @HAVE_UNISTD_H@ + HAVE_UNLINKAT = @HAVE_UNLINKAT@ ++HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ + HAVE_USLEEP = @HAVE_USLEEP@ + HAVE_VASPRINTF = @HAVE_VASPRINTF@ + HAVE_VDPRINTF = @HAVE_VDPRINTF@ + HAVE_WCHAR_T = @HAVE_WCHAR_T@ + HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ ++HAVE__BOOL = @HAVE__BOOL@ ++HAVE__EXIT = @HAVE__EXIT@ + INCLUDE_NEXT = @INCLUDE_NEXT@ + INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ + INSTALL = @INSTALL@ +@@ -533,16 +621,20 @@ + MANIFEST_TOOL = @MANIFEST_TOOL@ + MKDIR_P = @MKDIR_P@ + NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ ++NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ + NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ + NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ + NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ ++NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ + NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ + NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ + NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ + NEXT_ERRNO_H = @NEXT_ERRNO_H@ ++NEXT_GETOPT_H = @NEXT_GETOPT_H@ + NEXT_STDARG_H = @NEXT_STDARG_H@ + NEXT_STDDEF_H = @NEXT_STDDEF_H@ + NEXT_STDIO_H = @NEXT_STDIO_H@ ++NEXT_STDLIB_H = @NEXT_STDLIB_H@ + NEXT_STRING_H = @NEXT_STRING_H@ + NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ + NEXT_UNISTD_H = @NEXT_UNISTD_H@ +@@ -563,6 +655,8 @@ + PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ + PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ + RANLIB = @RANLIB@ ++REPLACE_CALLOC = @REPLACE_CALLOC@ ++REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ + REPLACE_CHOWN = @REPLACE_CHOWN@ + REPLACE_CLOSE = @REPLACE_CLOSE@ + REPLACE_DPRINTF = @REPLACE_DPRINTF@ +@@ -594,21 +688,33 @@ + REPLACE_LINK = @REPLACE_LINK@ + REPLACE_LINKAT = @REPLACE_LINKAT@ + REPLACE_LSEEK = @REPLACE_LSEEK@ ++REPLACE_MALLOC = @REPLACE_MALLOC@ ++REPLACE_MBTOWC = @REPLACE_MBTOWC@ + REPLACE_MEMCHR = @REPLACE_MEMCHR@ + REPLACE_MEMMEM = @REPLACE_MEMMEM@ ++REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ + REPLACE_NULL = @REPLACE_NULL@ + REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ + REPLACE_PERROR = @REPLACE_PERROR@ + REPLACE_POPEN = @REPLACE_POPEN@ + REPLACE_PREAD = @REPLACE_PREAD@ + REPLACE_PRINTF = @REPLACE_PRINTF@ ++REPLACE_PTSNAME = @REPLACE_PTSNAME@ ++REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ ++REPLACE_PUTENV = @REPLACE_PUTENV@ + REPLACE_PWRITE = @REPLACE_PWRITE@ ++REPLACE_QSORT_R = @REPLACE_QSORT_R@ ++REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ + REPLACE_READ = @REPLACE_READ@ + REPLACE_READLINK = @REPLACE_READLINK@ ++REPLACE_READLINKAT = @REPLACE_READLINKAT@ ++REPLACE_REALLOC = @REPLACE_REALLOC@ ++REPLACE_REALPATH = @REPLACE_REALPATH@ + REPLACE_REMOVE = @REPLACE_REMOVE@ + REPLACE_RENAME = @REPLACE_RENAME@ + REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ + REPLACE_RMDIR = @REPLACE_RMDIR@ ++REPLACE_SETENV = @REPLACE_SETENV@ + REPLACE_SLEEP = @REPLACE_SLEEP@ + REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ + REPLACE_SPRINTF = @REPLACE_SPRINTF@ +@@ -625,12 +731,15 @@ + REPLACE_STRNLEN = @REPLACE_STRNLEN@ + REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ + REPLACE_STRSTR = @REPLACE_STRSTR@ ++REPLACE_STRTOD = @REPLACE_STRTOD@ + REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ + REPLACE_SYMLINK = @REPLACE_SYMLINK@ ++REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ + REPLACE_TMPFILE = @REPLACE_TMPFILE@ + REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ + REPLACE_UNLINK = @REPLACE_UNLINK@ + REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ ++REPLACE_UNSETENV = @REPLACE_UNSETENV@ + REPLACE_USLEEP = @REPLACE_USLEEP@ + REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ + REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ +@@ -638,11 +747,13 @@ + REPLACE_VPRINTF = @REPLACE_VPRINTF@ + REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ + REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ ++REPLACE_WCTOMB = @REPLACE_WCTOMB@ + REPLACE_WRITE = @REPLACE_WRITE@ + SED = @SED@ + SET_MAKE = @SET_MAKE@ + SHELL = @SHELL@ + STDARG_H = @STDARG_H@ ++STDBOOL_H = @STDBOOL_H@ + STDDEF_H = @STDDEF_H@ + STRIP = @STRIP@ + UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ +@@ -715,14 +826,16 @@ + noinst_HEADERS = + noinst_LIBRARIES = + noinst_LTLIBRARIES = libgnu.la +-EXTRA_DIST = m4/gnulib-cache.m4 errno.in.h error.c error.h intprops.h \ +- msvc-inval.c msvc-inval.h msvc-nothrow.c msvc-nothrow.h \ ++EXTRA_DIST = m4/gnulib-cache.m4 dirname.h dosname.h errno.in.h error.c \ ++ error.h getopt.c getopt.in.h getopt1.c getopt_int.h intprops.h \ ++ malloc.c msvc-inval.c msvc-inval.h msvc-nothrow.c \ ++ msvc-nothrow.h $(top_srcdir)/../build-aux/snippet/_Noreturn.h \ + $(top_srcdir)/../build-aux/snippet/arg-nonnull.h \ + $(top_srcdir)/../build-aux/snippet/c++defs.h \ + $(top_srcdir)/../build-aux/snippet/warn-on-use.h stdarg.in.h \ +- stddef.in.h stdio.in.h strerror.c strerror-override.c \ +- strerror-override.h string.in.h sys_types.in.h unistd.in.h \ +- verify.h ++ stdbool.in.h stddef.in.h stdio.in.h stdlib.in.h strerror.c \ ++ strerror-override.c strerror-override.h string.in.h \ ++ sys_types.in.h unistd.in.h verify.h + + # The BUILT_SOURCES created by this Makefile snippet are not used via #include + # statements but through direct file reference. Therefore this snippet must be +@@ -733,33 +846,40 @@ + # statements but through direct file reference. Therefore this snippet must be + # present in all Makefile.am that need it. This is ensured by the applicability + # 'all' defined above. +-BUILT_SOURCES = configmake.h $(ERRNO_H) arg-nonnull.h c++defs.h \ +- warn-on-use.h $(STDARG_H) $(STDDEF_H) stdio.h string.h \ +- sys/types.h unistd.h ++BUILT_SOURCES = configmake.h $(ERRNO_H) $(GETOPT_H) arg-nonnull.h \ ++ c++defs.h warn-on-use.h $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) \ ++ stdio.h stdlib.h string.h sys/types.h unistd.h + SUFFIXES = +-MOSTLYCLEANFILES = core *.stackdump errno.h errno.h-t arg-nonnull.h \ +- arg-nonnull.h-t c++defs.h c++defs.h-t warn-on-use.h \ +- warn-on-use.h-t stdarg.h stdarg.h-t stddef.h stddef.h-t \ +- stdio.h stdio.h-t string.h string.h-t sys/types.h \ +- sys/types.h-t unistd.h unistd.h-t ++MOSTLYCLEANFILES = core *.stackdump errno.h errno.h-t getopt.h \ ++ getopt.h-t arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \ ++ warn-on-use.h warn-on-use.h-t stdarg.h stdarg.h-t stdbool.h \ ++ stdbool.h-t stddef.h stddef.h-t stdio.h stdio.h-t stdlib.h \ ++ stdlib.h-t string.h string.h-t sys/types.h sys/types.h-t \ ++ unistd.h unistd.h-t + MOSTLYCLEANDIRS = + CLEANFILES = configmake.h configmake.h-t + DISTCLEANFILES = + MAINTAINERCLEANFILES = + AM_CPPFLAGS = + AM_CFLAGS = +-libgnu_la_SOURCES = gettext.h progname.h progname.c unistd.c \ +- version-etc.h version-etc.c ++libgnu_la_SOURCES = dirname-lgpl.c basename-lgpl.c stripslash.c \ ++ getprogname.h getprogname.c gettext.h progname.h progname.c \ ++ unistd.c version-etc.h version-etc.c + libgnu_la_LIBADD = $(gl_LTLIBOBJS) + libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) +-EXTRA_libgnu_la_SOURCES = error.c msvc-inval.c msvc-nothrow.c \ +- strerror.c strerror-override.c ++EXTRA_libgnu_la_SOURCES = error.c getopt.c getopt1.c malloc.c \ ++ msvc-inval.c msvc-nothrow.c strerror.c strerror-override.c + libgnu_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(LTLIBINTL) + + # Use this preprocessor expression to decide whether #include_next works. + # Do not rely on a 'configure'-time test for this, since the expression + # might appear in an installed header, which is used by some other compiler. + HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) ++ ++# Because this Makefile snippet defines a variable used by other ++# gnulib Makefile snippets, it must be present in all Makefile.am that ++# need it. This is ensured by the applicability 'all' defined above. ++_NORETURN_H = $(top_srcdir)/../build-aux/snippet/_Noreturn.h + ARG_NONNULL_H = arg-nonnull.h + CXXDEFS_H = c++defs.h + WARN_ON_USE_H = warn-on-use.h +@@ -780,7 +900,6 @@ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gl/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnits gl/Makefile +-.PRECIOUS: Makefile + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ +@@ -822,12 +941,19 @@ + distclean-compile: + -rm -f *.tab.c + ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getprogname.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version-etc.Plo@am__quote@ + +@@ -1143,6 +1269,8 @@ + mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ + pdf-am ps ps-am tags tags-am uninstall uninstall-am + ++.PRECIOUS: Makefile ++ + + # Listed in the same order as the GNU makefile conventions, and + # provided by autoconf 2.59c+ or 2.70. +@@ -1203,6 +1331,22 @@ + @GL_GENERATE_ERRNO_H_TRUE@ mv $@-t $@ + @GL_GENERATE_ERRNO_H_FALSE@errno.h: $(top_builddir)/config.status + @GL_GENERATE_ERRNO_H_FALSE@ rm -f $@ ++ ++# We need the following in order to create when the system ++# doesn't have one that works with the given compiler. ++getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) ++ $(AM_V_GEN)rm -f $@-t $@ && \ ++ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ ++ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ ++ -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ ++ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ ++ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ ++ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ ++ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ ++ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ ++ < $(srcdir)/getopt.in.h; \ ++ } > $@-t && \ ++ mv -f $@-t $@ + # The arg-nonnull.h that gets inserted into generated .h files is the same as + # build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut + # off. +@@ -1246,6 +1390,17 @@ + @GL_GENERATE_STDARG_H_FALSE@stdarg.h: $(top_builddir)/config.status + @GL_GENERATE_STDARG_H_FALSE@ rm -f $@ + ++# We need the following in order to create when the system ++# doesn't have one that works. ++@GL_GENERATE_STDBOOL_H_TRUE@stdbool.h: stdbool.in.h $(top_builddir)/config.status ++@GL_GENERATE_STDBOOL_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ ++@GL_GENERATE_STDBOOL_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ ++@GL_GENERATE_STDBOOL_H_TRUE@ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ ++@GL_GENERATE_STDBOOL_H_TRUE@ } > $@-t && \ ++@GL_GENERATE_STDBOOL_H_TRUE@ mv $@-t $@ ++@GL_GENERATE_STDBOOL_H_FALSE@stdbool.h: $(top_builddir)/config.status ++@GL_GENERATE_STDBOOL_H_FALSE@ rm -f $@ ++ + # We need the following in order to create when the system + # doesn't have one that works with the given compiler. + @GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status +@@ -1256,6 +1411,7 @@ + @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ ++@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \ + @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ + @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ + @GL_GENERATE_STDDEF_H_TRUE@ < $(srcdir)/stddef.in.h; \ +@@ -1383,6 +1539,103 @@ + } > $@-t && \ + mv $@-t $@ + ++# We need the following in order to create when the system ++# doesn't have one that works with the given compiler. ++stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ ++ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) ++ $(AM_V_GEN)rm -f $@-t $@ && \ ++ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ ++ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ ++ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ ++ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ ++ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ ++ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ ++ -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ ++ -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ ++ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ ++ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ ++ -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ ++ -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ ++ -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ ++ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ ++ -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ ++ -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ ++ -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ ++ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ ++ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ ++ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ ++ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ ++ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ ++ -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ ++ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ ++ -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \ ++ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ ++ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ ++ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ ++ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ ++ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ ++ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ ++ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ ++ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ ++ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ ++ -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ ++ -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ ++ -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ ++ -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ ++ -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ ++ < $(srcdir)/stdlib.in.h | \ ++ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ ++ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ ++ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ ++ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ ++ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ ++ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ ++ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ ++ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ ++ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ ++ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ ++ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ ++ -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ ++ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ ++ -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ ++ -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \ ++ -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ ++ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ ++ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ ++ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ ++ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ ++ -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ ++ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ ++ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ ++ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ ++ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ ++ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ ++ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ ++ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ ++ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ ++ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ ++ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ ++ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ ++ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ ++ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ ++ -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \ ++ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ ++ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ ++ -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ ++ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ ++ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ ++ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ ++ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ ++ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ ++ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ ++ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ ++ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ ++ -e '/definition of _Noreturn/r $(_NORETURN_H)' \ ++ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ ++ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ ++ } > $@-t && \ ++ mv $@-t $@ ++ + # We need the following in order to create when the system + # doesn't have one that works with the given compiler. + string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) +@@ -1616,9 +1869,11 @@ + -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ + -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ + -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ ++ -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \ + -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ + -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ + -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ ++ -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ + -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ + -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ + -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ +diff -urN libidn2-0.11.pristine/src/gl/malloc.c libidn2-0.11/src/gl/malloc.c +--- libidn2-0.11.pristine/src/gl/malloc.c 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/malloc.c 2016-11-24 21:38:50.593572953 +0100 +@@ -0,0 +1,56 @@ ++/* malloc() function that is glibc compatible. ++ ++ Copyright (C) 1997-1998, 2006-2007, 2009-2016 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3, or (at your option) ++ any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, see . */ ++ ++/* written by Jim Meyering and Bruno Haible */ ++ ++#define _GL_USE_STDLIB_ALLOC 1 ++#include ++/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ ++#ifdef malloc ++# define NEED_MALLOC_GNU 1 ++# undef malloc ++/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ ++#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU ++# define NEED_MALLOC_GNU 1 ++#endif ++ ++#include ++ ++#include ++ ++/* Allocate an N-byte block of memory from the heap. ++ If N is zero, allocate a 1-byte block. */ ++ ++void * ++rpl_malloc (size_t n) ++{ ++ void *result; ++ ++#if NEED_MALLOC_GNU ++ if (n == 0) ++ n = 1; ++#endif ++ ++ result = malloc (n); ++ ++#if !HAVE_MALLOC_POSIX ++ if (result == NULL) ++ errno = ENOMEM; ++#endif ++ ++ return result; ++} +diff -urN libidn2-0.11.pristine/src/gl/msvc-inval.c libidn2-0.11/src/gl/msvc-inval.c +--- libidn2-0.11.pristine/src/gl/msvc-inval.c 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/msvc-inval.c 2016-11-24 21:38:50.729577725 +0100 +@@ -1,5 +1,5 @@ + /* Invalid parameter handler for MSVC runtime libraries. +- Copyright (C) 2011-2014 Free Software Foundation, Inc. ++ Copyright (C) 2011-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +diff -urN libidn2-0.11.pristine/src/gl/msvc-inval.h libidn2-0.11/src/gl/msvc-inval.h +--- libidn2-0.11.pristine/src/gl/msvc-inval.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/msvc-inval.h 2016-11-24 21:38:50.733577865 +0100 +@@ -1,5 +1,5 @@ + /* Invalid parameter handler for MSVC runtime libraries. +- Copyright (C) 2011-2014 Free Software Foundation, Inc. ++ Copyright (C) 2011-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +diff -urN libidn2-0.11.pristine/src/gl/msvc-nothrow.c libidn2-0.11/src/gl/msvc-nothrow.c +--- libidn2-0.11.pristine/src/gl/msvc-nothrow.c 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/msvc-nothrow.c 2016-11-24 21:38:50.738578040 +0100 +@@ -1,6 +1,6 @@ + /* Wrappers that don't throw invalid parameter notifications + with MSVC runtime libraries. +- Copyright (C) 2011-2014 Free Software Foundation, Inc. ++ Copyright (C) 2011-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +diff -urN libidn2-0.11.pristine/src/gl/msvc-nothrow.h libidn2-0.11/src/gl/msvc-nothrow.h +--- libidn2-0.11.pristine/src/gl/msvc-nothrow.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/msvc-nothrow.h 2016-11-24 21:38:50.742578181 +0100 +@@ -1,6 +1,6 @@ + /* Wrappers that don't throw invalid parameter notifications + with MSVC runtime libraries. +- Copyright (C) 2011-2014 Free Software Foundation, Inc. ++ Copyright (C) 2011-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +diff -urN libidn2-0.11.pristine/src/gl/progname.c libidn2-0.11/src/gl/progname.c +--- libidn2-0.11.pristine/src/gl/progname.c 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/progname.c 2016-11-24 21:38:50.746578322 +0100 +@@ -1,5 +1,5 @@ + /* Program name management. +- Copyright (C) 2001-2003, 2005-2014 Free Software Foundation, Inc. ++ Copyright (C) 2001-2003, 2005-2016 Free Software Foundation, Inc. + Written by Bruno Haible , 2001. + + This program is free software: you can redistribute it and/or modify +diff -urN libidn2-0.11.pristine/src/gl/progname.h libidn2-0.11/src/gl/progname.h +--- libidn2-0.11.pristine/src/gl/progname.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/progname.h 2016-11-24 21:38:50.749578427 +0100 +@@ -1,5 +1,5 @@ + /* Program name management. +- Copyright (C) 2001-2004, 2006, 2009-2014 Free Software Foundation, Inc. ++ Copyright (C) 2001-2004, 2006, 2009-2016 Free Software Foundation, Inc. + Written by Bruno Haible , 2001. + + This program is free software: you can redistribute it and/or modify +diff -urN libidn2-0.11.pristine/src/gl/stdarg.in.h libidn2-0.11/src/gl/stdarg.in.h +--- libidn2-0.11.pristine/src/gl/stdarg.in.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/stdarg.in.h 2016-11-24 21:38:50.754578602 +0100 +@@ -1,5 +1,5 @@ + /* Substitute for and wrapper around . +- Copyright (C) 2008-2014 Free Software Foundation, Inc. ++ Copyright (C) 2008-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +diff -urN libidn2-0.11.pristine/src/gl/stdbool.in.h libidn2-0.11/src/gl/stdbool.in.h +--- libidn2-0.11.pristine/src/gl/stdbool.in.h 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/stdbool.in.h 2016-11-24 21:38:50.595573025 +0100 +@@ -0,0 +1,132 @@ ++/* Copyright (C) 2001-2003, 2006-2016 Free Software Foundation, Inc. ++ Written by Bruno Haible , 2001. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3, or (at your option) ++ any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, see . */ ++ ++#ifndef _GL_STDBOOL_H ++#define _GL_STDBOOL_H ++ ++/* ISO C 99 for platforms that lack it. */ ++ ++/* Usage suggestions: ++ ++ Programs that use should be aware of some limitations ++ and standards compliance issues. ++ ++ Standards compliance: ++ ++ - must be #included before 'bool', 'false', 'true' ++ can be used. ++ ++ - You cannot assume that sizeof (bool) == 1. ++ ++ - Programs should not undefine the macros bool, true, and false, ++ as C99 lists that as an "obsolescent feature". ++ ++ Limitations of this substitute, when used in a C89 environment: ++ ++ - must be #included before the '_Bool' type can be used. ++ ++ - You cannot assume that _Bool is a typedef; it might be a macro. ++ ++ - Bit-fields of type 'bool' are not supported. Portable code ++ should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. ++ ++ - In C99, casts and automatic conversions to '_Bool' or 'bool' are ++ performed in such a way that every nonzero value gets converted ++ to 'true', and zero gets converted to 'false'. This doesn't work ++ with this substitute. With this substitute, only the values 0 and 1 ++ give the expected result when converted to _Bool' or 'bool'. ++ ++ - C99 allows the use of (_Bool)0.0 in constant expressions, but ++ this substitute cannot always provide this property. ++ ++ Also, it is suggested that programs use 'bool' rather than '_Bool'; ++ this isn't required, but 'bool' is more common. */ ++ ++ ++/* 7.16. Boolean type and values */ ++ ++/* BeOS already #defines false 0, true 1. We use the same ++ definitions below, but temporarily we have to #undef them. */ ++#if defined __BEOS__ && !defined __HAIKU__ ++# include /* defines bool but not _Bool */ ++# undef false ++# undef true ++#endif ++ ++#ifdef __cplusplus ++# define _Bool bool ++# define bool bool ++#else ++# if defined __BEOS__ && !defined __HAIKU__ ++ /* A compiler known to have 'bool'. */ ++ /* If the compiler already has both 'bool' and '_Bool', we can assume they ++ are the same types. */ ++# if !@HAVE__BOOL@ ++typedef bool _Bool; ++# endif ++# else ++# if !defined __GNUC__ ++ /* If @HAVE__BOOL@: ++ Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when ++ the built-in _Bool type is used. See ++ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html ++ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html ++ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html ++ Similar bugs are likely with other compilers as well; this file ++ wouldn't be used if was working. ++ So we override the _Bool type. ++ If !@HAVE__BOOL@: ++ Need to define _Bool ourselves. As 'signed char' or as an enum type? ++ Use of a typedef, with SunPRO C, leads to a stupid ++ "warning: _Bool is a keyword in ISO C99". ++ Use of an enum type, with IRIX cc, leads to a stupid ++ "warning(1185): enumerated type mixed with another type". ++ Even the existence of an enum type, without a typedef, ++ "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. ++ The only benefit of the enum, debuggability, is not important ++ with these compilers. So use 'signed char' and no enum. */ ++# define _Bool signed char ++# else ++ /* With this compiler, trust the _Bool type if the compiler has it. */ ++# if !@HAVE__BOOL@ ++ /* For the sake of symbolic names in gdb, define true and false as ++ enum constants, not only as macros. ++ It is tempting to write ++ typedef enum { false = 0, true = 1 } _Bool; ++ so that gdb prints values of type 'bool' symbolically. But then ++ values of type '_Bool' might promote to 'int' or 'unsigned int' ++ (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' ++ (see ISO C 99 6.3.1.1.(2)). So add a negative value to the ++ enum; this ensures that '_Bool' promotes to 'int'. */ ++typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; ++# endif ++# endif ++# endif ++# define bool _Bool ++#endif ++ ++/* The other macros must be usable in preprocessor directives. */ ++#ifdef __cplusplus ++# define false false ++# define true true ++#else ++# define false 0 ++# define true 1 ++#endif ++ ++#define __bool_true_false_are_defined 1 ++ ++#endif /* _GL_STDBOOL_H */ +diff -urN libidn2-0.11.pristine/src/gl/stddef.in.h libidn2-0.11/src/gl/stddef.in.h +--- libidn2-0.11.pristine/src/gl/stddef.in.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/stddef.in.h 2016-11-24 21:38:50.758578742 +0100 +@@ -1,6 +1,6 @@ + /* A substitute for POSIX 2008 , for platforms that have issues. + +- Copyright (C) 2009-2014 Free Software Foundation, Inc. ++ Copyright (C) 2009-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -39,7 +39,6 @@ + + # if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T) + # ifdef __need_wint_t +-# undef _@GUARD_PREFIX@_STDDEF_H + # define _GL_STDDEF_WINT_T + # endif + # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ +@@ -54,33 +53,58 @@ + + # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ + +-# ifndef _@GUARD_PREFIX@_STDDEF_H +-# define _@GUARD_PREFIX@_STDDEF_H +- + /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ +-#if @REPLACE_NULL@ +-# undef NULL +-# ifdef __cplusplus ++# if (@REPLACE_NULL@ \ ++ && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _GL_STDDEF_WINT_T)) ++# undef NULL ++# ifdef __cplusplus + /* ISO C++ says that the macro NULL must expand to an integer constant + expression, hence '((void *) 0)' is not allowed in C++. */ +-# if __GNUG__ >= 3 ++# if __GNUG__ >= 3 + /* GNU C++ has a __null macro that behaves like an integer ('int' or + 'long') but has the same size as a pointer. Use that, to avoid + warnings. */ +-# define NULL __null +-# else +-# define NULL 0L ++# define NULL __null ++# else ++# define NULL 0L ++# endif ++# else ++# define NULL ((void *) 0) ++# endif + # endif +-# else +-# define NULL ((void *) 0) +-# endif +-#endif ++ ++# ifndef _@GUARD_PREFIX@_STDDEF_H ++# define _@GUARD_PREFIX@_STDDEF_H + + /* Some platforms lack wchar_t. */ + #if !@HAVE_WCHAR_T@ + # define wchar_t int + #endif + ++/* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is ++ a hack in case the configure-time test was done with g++ even though ++ we are currently compiling with gcc. */ ++#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) ++/* On the x86, the maximum storage alignment of double, long, etc. is 4, ++ but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, ++ and the C11 standard allows this. Work around this problem by ++ using __alignof__ (which returns 8 for double) rather than _Alignof ++ (which returns 4), and align each union member accordingly. */ ++# ifdef __GNUC__ ++# define _GL_STDDEF_ALIGNAS(type) \ ++ __attribute__ ((__aligned__ (__alignof__ (type)))) ++# else ++# define _GL_STDDEF_ALIGNAS(type) /* */ ++# endif ++typedef union ++{ ++ char *__p _GL_STDDEF_ALIGNAS (char *); ++ double __d _GL_STDDEF_ALIGNAS (double); ++ long double __ld _GL_STDDEF_ALIGNAS (long double); ++ long int __i _GL_STDDEF_ALIGNAS (long int); ++} max_align_t; ++#endif ++ + # endif /* _@GUARD_PREFIX@_STDDEF_H */ + # endif /* _@GUARD_PREFIX@_STDDEF_H */ + #endif /* __need_XXX */ +diff -urN libidn2-0.11.pristine/src/gl/stdio.in.h libidn2-0.11/src/gl/stdio.in.h +--- libidn2-0.11.pristine/src/gl/stdio.in.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/stdio.in.h 2016-11-24 21:38:50.763578917 +0100 +@@ -1,6 +1,6 @@ + /* A GNU-like . + +- Copyright (C) 2004, 2007-2014 Free Software Foundation, Inc. ++ Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -84,8 +84,13 @@ + except that it indicates to GCC that the supported format string directives + are the ones of the system printf(), rather than the ones standardized by + ISO C99 and POSIX. */ +-#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ ++#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU ++# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ ++ _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) ++#else ++# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) ++#endif + + /* _GL_ATTRIBUTE_FORMAT_SCANF + indicates to GCC that the function takes a format string and arguments, +@@ -718,11 +723,10 @@ + so any use of gets warrants an unconditional warning; besides, C11 + removed it. */ + #undef gets +-#if HAVE_RAW_DECL_GETS ++#if HAVE_RAW_DECL_GETS && !defined __cplusplus + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + #endif + +- + #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ + struct obstack; + /* Grow an obstack with formatted output. Return the number of +diff -urN libidn2-0.11.pristine/src/gl/stdlib.in.h libidn2-0.11/src/gl/stdlib.in.h +--- libidn2-0.11.pristine/src/gl/stdlib.in.h 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/stdlib.in.h 2016-11-24 21:38:50.599573165 +0100 +@@ -0,0 +1,992 @@ ++/* A GNU-like . ++ ++ Copyright (C) 1995, 2001-2004, 2006-2016 Free Software Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#if __GNUC__ >= 3 ++@PRAGMA_SYSTEM_HEADER@ ++#endif ++@PRAGMA_COLUMNS@ ++ ++#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc ++/* Special invocation conventions inside some gnulib header files, ++ and inside some glibc header files, respectively. */ ++ ++#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ ++ ++#else ++/* Normal invocation convention. */ ++ ++#ifndef _@GUARD_PREFIX@_STDLIB_H ++ ++/* The include_next requires a split double-inclusion guard. */ ++#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ ++ ++#ifndef _@GUARD_PREFIX@_STDLIB_H ++#define _@GUARD_PREFIX@_STDLIB_H ++ ++/* NetBSD 5.0 mis-defines NULL. */ ++#include ++ ++/* MirBSD 10 defines WEXITSTATUS in , not in . */ ++#if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS ++# include ++#endif ++ ++/* Solaris declares getloadavg() in . */ ++#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ ++# include ++#endif ++ ++/* Native Windows platforms declare mktemp() in . */ ++#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) ++# include ++#endif ++ ++#if @GNULIB_RANDOM_R@ ++ ++/* OSF/1 5.1 declares 'struct random_data' in , which is included ++ from if _REENTRANT is defined. Include it whenever we need ++ 'struct random_data'. */ ++# if @HAVE_RANDOM_H@ ++# include ++# endif ++ ++# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@ ++# include ++# endif ++ ++# if !@HAVE_STRUCT_RANDOM_DATA@ ++/* Define 'struct random_data'. ++ But allow multiple gnulib generated replacements to coexist. */ ++# if !GNULIB_defined_struct_random_data ++struct random_data ++{ ++ int32_t *fptr; /* Front pointer. */ ++ int32_t *rptr; /* Rear pointer. */ ++ int32_t *state; /* Array of state values. */ ++ int rand_type; /* Type of random number generator. */ ++ int rand_deg; /* Degree of random number generator. */ ++ int rand_sep; /* Distance between front and rear. */ ++ int32_t *end_ptr; /* Pointer behind state table. */ ++}; ++# define GNULIB_defined_struct_random_data 1 ++# endif ++# endif ++#endif ++ ++#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) ++/* On Mac OS X 10.3, only declares mkstemp. */ ++/* On Mac OS X 10.5, only declares mkstemps. */ ++/* On Cygwin 1.7.1, only declares getsubopt. */ ++/* But avoid namespace pollution on glibc systems and native Windows. */ ++# include ++#endif ++ ++/* The __attribute__ feature is available in gcc versions 2.5 and later. ++ The attribute __pure__ was added in gcc 2.96. */ ++#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) ++# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) ++#else ++# define _GL_ATTRIBUTE_PURE /* empty */ ++#endif ++ ++/* The definition of _Noreturn is copied here. */ ++ ++/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ ++ ++/* The definition of _GL_ARG_NONNULL is copied here. */ ++ ++/* The definition of _GL_WARN_ON_USE is copied here. */ ++ ++ ++/* Some systems do not define EXIT_*, despite otherwise supporting C89. */ ++#ifndef EXIT_SUCCESS ++# define EXIT_SUCCESS 0 ++#endif ++/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere ++ with proper operation of xargs. */ ++#ifndef EXIT_FAILURE ++# define EXIT_FAILURE 1 ++#elif EXIT_FAILURE != 1 ++# undef EXIT_FAILURE ++# define EXIT_FAILURE 1 ++#endif ++ ++ ++#if @GNULIB__EXIT@ ++/* Terminate the current process with the given return code, without running ++ the 'atexit' handlers. */ ++# if !@HAVE__EXIT@ ++_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); ++# endif ++_GL_CXXALIAS_SYS (_Exit, void, (int status)); ++_GL_CXXALIASWARN (_Exit); ++#elif defined GNULIB_POSIXCHECK ++# undef _Exit ++# if HAVE_RAW_DECL__EXIT ++_GL_WARN_ON_USE (_Exit, "_Exit is unportable - " ++ "use gnulib module _Exit for portability"); ++# endif ++#endif ++ ++ ++#if @GNULIB_ATOLL@ ++/* Parse a signed decimal integer. ++ Returns the value of the integer. Errors are not detected. */ ++# if !@HAVE_ATOLL@ ++_GL_FUNCDECL_SYS (atoll, long long, (const char *string) ++ _GL_ATTRIBUTE_PURE ++ _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (atoll, long long, (const char *string)); ++_GL_CXXALIASWARN (atoll); ++#elif defined GNULIB_POSIXCHECK ++# undef atoll ++# if HAVE_RAW_DECL_ATOLL ++_GL_WARN_ON_USE (atoll, "atoll is unportable - " ++ "use gnulib module atoll for portability"); ++# endif ++#endif ++ ++#if @GNULIB_CALLOC_POSIX@ ++# if @REPLACE_CALLOC@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef calloc ++# define calloc rpl_calloc ++# endif ++_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); ++_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); ++# else ++_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); ++# endif ++_GL_CXXALIASWARN (calloc); ++#elif defined GNULIB_POSIXCHECK ++# undef calloc ++/* Assume calloc is always declared. */ ++_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " ++ "use gnulib module calloc-posix for portability"); ++#endif ++ ++#if @GNULIB_CANONICALIZE_FILE_NAME@ ++# if @REPLACE_CANONICALIZE_FILE_NAME@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# define canonicalize_file_name rpl_canonicalize_file_name ++# endif ++_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) ++ _GL_ARG_NONNULL ((1))); ++_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); ++# else ++# if !@HAVE_CANONICALIZE_FILE_NAME@ ++_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) ++ _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); ++# endif ++_GL_CXXALIASWARN (canonicalize_file_name); ++#elif defined GNULIB_POSIXCHECK ++# undef canonicalize_file_name ++# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME ++_GL_WARN_ON_USE (canonicalize_file_name, ++ "canonicalize_file_name is unportable - " ++ "use gnulib module canonicalize-lgpl for portability"); ++# endif ++#endif ++ ++#if @GNULIB_GETLOADAVG@ ++/* Store max(NELEM,3) load average numbers in LOADAVG[]. ++ The three numbers are the load average of the last 1 minute, the last 5 ++ minutes, and the last 15 minutes, respectively. ++ LOADAVG is an array of NELEM numbers. */ ++# if !@HAVE_DECL_GETLOADAVG@ ++_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) ++ _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); ++_GL_CXXALIASWARN (getloadavg); ++#elif defined GNULIB_POSIXCHECK ++# undef getloadavg ++# if HAVE_RAW_DECL_GETLOADAVG ++_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " ++ "use gnulib module getloadavg for portability"); ++# endif ++#endif ++ ++#if @GNULIB_GETSUBOPT@ ++/* Assuming *OPTIONP is a comma separated list of elements of the form ++ "token" or "token=value", getsubopt parses the first of these elements. ++ If the first element refers to a "token" that is member of the given ++ NULL-terminated array of tokens: ++ - It replaces the comma with a NUL byte, updates *OPTIONP to point past ++ the first option and the comma, sets *VALUEP to the value of the ++ element (or NULL if it doesn't contain an "=" sign), ++ - It returns the index of the "token" in the given array of tokens. ++ Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. ++ For more details see the POSIX:2001 specification. ++ http://www.opengroup.org/susv3xsh/getsubopt.html */ ++# if !@HAVE_GETSUBOPT@ ++_GL_FUNCDECL_SYS (getsubopt, int, ++ (char **optionp, char *const *tokens, char **valuep) ++ _GL_ARG_NONNULL ((1, 2, 3))); ++# endif ++_GL_CXXALIAS_SYS (getsubopt, int, ++ (char **optionp, char *const *tokens, char **valuep)); ++_GL_CXXALIASWARN (getsubopt); ++#elif defined GNULIB_POSIXCHECK ++# undef getsubopt ++# if HAVE_RAW_DECL_GETSUBOPT ++_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " ++ "use gnulib module getsubopt for portability"); ++# endif ++#endif ++ ++#if @GNULIB_GRANTPT@ ++/* Change the ownership and access permission of the slave side of the ++ pseudo-terminal whose master side is specified by FD. */ ++# if !@HAVE_GRANTPT@ ++_GL_FUNCDECL_SYS (grantpt, int, (int fd)); ++# endif ++_GL_CXXALIAS_SYS (grantpt, int, (int fd)); ++_GL_CXXALIASWARN (grantpt); ++#elif defined GNULIB_POSIXCHECK ++# undef grantpt ++# if HAVE_RAW_DECL_GRANTPT ++_GL_WARN_ON_USE (grantpt, "grantpt is not portable - " ++ "use gnulib module grantpt for portability"); ++# endif ++#endif ++ ++/* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not ++ rely on GNU or POSIX semantics for malloc and realloc (for example, ++ by never specifying a zero size), so it does not need malloc or ++ realloc to be redefined. */ ++#if @GNULIB_MALLOC_POSIX@ ++# if @REPLACE_MALLOC@ ++# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ ++ || _GL_USE_STDLIB_ALLOC) ++# undef malloc ++# define malloc rpl_malloc ++# endif ++_GL_FUNCDECL_RPL (malloc, void *, (size_t size)); ++_GL_CXXALIAS_RPL (malloc, void *, (size_t size)); ++# else ++_GL_CXXALIAS_SYS (malloc, void *, (size_t size)); ++# endif ++_GL_CXXALIASWARN (malloc); ++#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC ++# undef malloc ++/* Assume malloc is always declared. */ ++_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " ++ "use gnulib module malloc-posix for portability"); ++#endif ++ ++/* Convert a multibyte character to a wide character. */ ++#if @GNULIB_MBTOWC@ ++# if @REPLACE_MBTOWC@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef mbtowc ++# define mbtowc rpl_mbtowc ++# endif ++_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); ++_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); ++# else ++_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); ++# endif ++_GL_CXXALIASWARN (mbtowc); ++#endif ++ ++#if @GNULIB_MKDTEMP@ ++/* Create a unique temporary directory from TEMPLATE. ++ The last six characters of TEMPLATE must be "XXXXXX"; ++ they are replaced with a string that makes the directory name unique. ++ Returns TEMPLATE, or a null pointer if it cannot get a unique name. ++ The directory is created mode 700. */ ++# if !@HAVE_MKDTEMP@ ++_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); ++_GL_CXXALIASWARN (mkdtemp); ++#elif defined GNULIB_POSIXCHECK ++# undef mkdtemp ++# if HAVE_RAW_DECL_MKDTEMP ++_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " ++ "use gnulib module mkdtemp for portability"); ++# endif ++#endif ++ ++#if @GNULIB_MKOSTEMP@ ++/* Create a unique temporary file from TEMPLATE. ++ The last six characters of TEMPLATE must be "XXXXXX"; ++ they are replaced with a string that makes the file name unique. ++ The flags are a bitmask, possibly including O_CLOEXEC (defined in ) ++ and O_TEXT, O_BINARY (defined in "binary-io.h"). ++ The file is then created, with the specified flags, ensuring it didn't exist ++ before. ++ The file is created read-write (mask at least 0600 & ~umask), but it may be ++ world-readable and world-writable (mask 0666 & ~umask), depending on the ++ implementation. ++ Returns the open file descriptor if successful, otherwise -1 and errno ++ set. */ ++# if !@HAVE_MKOSTEMP@ ++_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) ++ _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); ++_GL_CXXALIASWARN (mkostemp); ++#elif defined GNULIB_POSIXCHECK ++# undef mkostemp ++# if HAVE_RAW_DECL_MKOSTEMP ++_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " ++ "use gnulib module mkostemp for portability"); ++# endif ++#endif ++ ++#if @GNULIB_MKOSTEMPS@ ++/* Create a unique temporary file from TEMPLATE. ++ The last six characters of TEMPLATE before a suffix of length ++ SUFFIXLEN must be "XXXXXX"; ++ they are replaced with a string that makes the file name unique. ++ The flags are a bitmask, possibly including O_CLOEXEC (defined in ) ++ and O_TEXT, O_BINARY (defined in "binary-io.h"). ++ The file is then created, with the specified flags, ensuring it didn't exist ++ before. ++ The file is created read-write (mask at least 0600 & ~umask), but it may be ++ world-readable and world-writable (mask 0666 & ~umask), depending on the ++ implementation. ++ Returns the open file descriptor if successful, otherwise -1 and errno ++ set. */ ++# if !@HAVE_MKOSTEMPS@ ++_GL_FUNCDECL_SYS (mkostemps, int, ++ (char * /*template*/, int /*suffixlen*/, int /*flags*/) ++ _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (mkostemps, int, ++ (char * /*template*/, int /*suffixlen*/, int /*flags*/)); ++_GL_CXXALIASWARN (mkostemps); ++#elif defined GNULIB_POSIXCHECK ++# undef mkostemps ++# if HAVE_RAW_DECL_MKOSTEMPS ++_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " ++ "use gnulib module mkostemps for portability"); ++# endif ++#endif ++ ++#if @GNULIB_MKSTEMP@ ++/* Create a unique temporary file from TEMPLATE. ++ The last six characters of TEMPLATE must be "XXXXXX"; ++ they are replaced with a string that makes the file name unique. ++ The file is then created, ensuring it didn't exist before. ++ The file is created read-write (mask at least 0600 & ~umask), but it may be ++ world-readable and world-writable (mask 0666 & ~umask), depending on the ++ implementation. ++ Returns the open file descriptor if successful, otherwise -1 and errno ++ set. */ ++# if @REPLACE_MKSTEMP@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# define mkstemp rpl_mkstemp ++# endif ++_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); ++_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); ++# else ++# if ! @HAVE_MKSTEMP@ ++_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); ++# endif ++_GL_CXXALIASWARN (mkstemp); ++#elif defined GNULIB_POSIXCHECK ++# undef mkstemp ++# if HAVE_RAW_DECL_MKSTEMP ++_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " ++ "use gnulib module mkstemp for portability"); ++# endif ++#endif ++ ++#if @GNULIB_MKSTEMPS@ ++/* Create a unique temporary file from TEMPLATE. ++ The last six characters of TEMPLATE prior to a suffix of length ++ SUFFIXLEN must be "XXXXXX"; ++ they are replaced with a string that makes the file name unique. ++ The file is then created, ensuring it didn't exist before. ++ The file is created read-write (mask at least 0600 & ~umask), but it may be ++ world-readable and world-writable (mask 0666 & ~umask), depending on the ++ implementation. ++ Returns the open file descriptor if successful, otherwise -1 and errno ++ set. */ ++# if !@HAVE_MKSTEMPS@ ++_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) ++ _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); ++_GL_CXXALIASWARN (mkstemps); ++#elif defined GNULIB_POSIXCHECK ++# undef mkstemps ++# if HAVE_RAW_DECL_MKSTEMPS ++_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " ++ "use gnulib module mkstemps for portability"); ++# endif ++#endif ++ ++#if @GNULIB_POSIX_OPENPT@ ++/* Return an FD open to the master side of a pseudo-terminal. Flags should ++ include O_RDWR, and may also include O_NOCTTY. */ ++# if !@HAVE_POSIX_OPENPT@ ++_GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); ++# endif ++_GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); ++_GL_CXXALIASWARN (posix_openpt); ++#elif defined GNULIB_POSIXCHECK ++# undef posix_openpt ++# if HAVE_RAW_DECL_POSIX_OPENPT ++_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " ++ "use gnulib module posix_openpt for portability"); ++# endif ++#endif ++ ++#if @GNULIB_PTSNAME@ ++/* Return the pathname of the pseudo-terminal slave associated with ++ the master FD is open on, or NULL on errors. */ ++# if @REPLACE_PTSNAME@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef ptsname ++# define ptsname rpl_ptsname ++# endif ++_GL_FUNCDECL_RPL (ptsname, char *, (int fd)); ++_GL_CXXALIAS_RPL (ptsname, char *, (int fd)); ++# else ++# if !@HAVE_PTSNAME@ ++_GL_FUNCDECL_SYS (ptsname, char *, (int fd)); ++# endif ++_GL_CXXALIAS_SYS (ptsname, char *, (int fd)); ++# endif ++_GL_CXXALIASWARN (ptsname); ++#elif defined GNULIB_POSIXCHECK ++# undef ptsname ++# if HAVE_RAW_DECL_PTSNAME ++_GL_WARN_ON_USE (ptsname, "ptsname is not portable - " ++ "use gnulib module ptsname for portability"); ++# endif ++#endif ++ ++#if @GNULIB_PTSNAME_R@ ++/* Set the pathname of the pseudo-terminal slave associated with ++ the master FD is open on and return 0, or set errno and return ++ non-zero on errors. */ ++# if @REPLACE_PTSNAME_R@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef ptsname_r ++# define ptsname_r rpl_ptsname_r ++# endif ++_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); ++_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); ++# else ++# if !@HAVE_PTSNAME_R@ ++_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); ++# endif ++_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); ++# endif ++_GL_CXXALIASWARN (ptsname_r); ++#elif defined GNULIB_POSIXCHECK ++# undef ptsname_r ++# if HAVE_RAW_DECL_PTSNAME_R ++_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " ++ "use gnulib module ptsname_r for portability"); ++# endif ++#endif ++ ++#if @GNULIB_PUTENV@ ++# if @REPLACE_PUTENV@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef putenv ++# define putenv rpl_putenv ++# endif ++_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); ++_GL_CXXALIAS_RPL (putenv, int, (char *string)); ++# else ++_GL_CXXALIAS_SYS (putenv, int, (char *string)); ++# endif ++_GL_CXXALIASWARN (putenv); ++#endif ++ ++#if @GNULIB_QSORT_R@ ++/* Sort an array of NMEMB elements, starting at address BASE, each element ++ occupying SIZE bytes, in ascending order according to the comparison ++ function COMPARE. */ ++# if @REPLACE_QSORT_R@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef qsort_r ++# define qsort_r rpl_qsort_r ++# endif ++_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, ++ int (*compare) (void const *, void const *, ++ void *), ++ void *arg) _GL_ARG_NONNULL ((1, 4))); ++_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, ++ int (*compare) (void const *, void const *, ++ void *), ++ void *arg)); ++# else ++# if !@HAVE_QSORT_R@ ++_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, ++ int (*compare) (void const *, void const *, ++ void *), ++ void *arg) _GL_ARG_NONNULL ((1, 4))); ++# endif ++_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, ++ int (*compare) (void const *, void const *, ++ void *), ++ void *arg)); ++# endif ++_GL_CXXALIASWARN (qsort_r); ++#elif defined GNULIB_POSIXCHECK ++# undef qsort_r ++# if HAVE_RAW_DECL_QSORT_R ++_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " ++ "use gnulib module qsort_r for portability"); ++# endif ++#endif ++ ++ ++#if @GNULIB_RANDOM_R@ ++# if !@HAVE_RANDOM_R@ ++# ifndef RAND_MAX ++# define RAND_MAX 2147483647 ++# endif ++# endif ++#endif ++ ++ ++#if @GNULIB_RANDOM@ ++# if !@HAVE_RANDOM@ ++_GL_FUNCDECL_SYS (random, long, (void)); ++# endif ++_GL_CXXALIAS_SYS (random, long, (void)); ++_GL_CXXALIASWARN (random); ++#elif defined GNULIB_POSIXCHECK ++# undef random ++# if HAVE_RAW_DECL_RANDOM ++_GL_WARN_ON_USE (random, "random is unportable - " ++ "use gnulib module random for portability"); ++# endif ++#endif ++ ++#if @GNULIB_RANDOM@ ++# if !@HAVE_RANDOM@ ++_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); ++# endif ++_GL_CXXALIAS_SYS (srandom, void, (unsigned int seed)); ++_GL_CXXALIASWARN (srandom); ++#elif defined GNULIB_POSIXCHECK ++# undef srandom ++# if HAVE_RAW_DECL_SRANDOM ++_GL_WARN_ON_USE (srandom, "srandom is unportable - " ++ "use gnulib module random for portability"); ++# endif ++#endif ++ ++#if @GNULIB_RANDOM@ ++# if !@HAVE_RANDOM@ ++_GL_FUNCDECL_SYS (initstate, char *, ++ (unsigned int seed, char *buf, size_t buf_size) ++ _GL_ARG_NONNULL ((2))); ++# endif ++_GL_CXXALIAS_SYS (initstate, char *, ++ (unsigned int seed, char *buf, size_t buf_size)); ++_GL_CXXALIASWARN (initstate); ++#elif defined GNULIB_POSIXCHECK ++# undef initstate ++# if HAVE_RAW_DECL_INITSTATE_R ++_GL_WARN_ON_USE (initstate, "initstate is unportable - " ++ "use gnulib module random for portability"); ++# endif ++#endif ++ ++#if @GNULIB_RANDOM@ ++# if !@HAVE_RANDOM@ ++_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); ++_GL_CXXALIASWARN (setstate); ++#elif defined GNULIB_POSIXCHECK ++# undef setstate ++# if HAVE_RAW_DECL_SETSTATE_R ++_GL_WARN_ON_USE (setstate, "setstate is unportable - " ++ "use gnulib module random for portability"); ++# endif ++#endif ++ ++ ++#if @GNULIB_RANDOM_R@ ++# if @REPLACE_RANDOM_R@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef random_r ++# define random_r rpl_random_r ++# endif ++_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result) ++ _GL_ARG_NONNULL ((1, 2))); ++_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result)); ++# else ++# if !@HAVE_RANDOM_R@ ++_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) ++ _GL_ARG_NONNULL ((1, 2))); ++# endif ++_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); ++# endif ++_GL_CXXALIASWARN (random_r); ++#elif defined GNULIB_POSIXCHECK ++# undef random_r ++# if HAVE_RAW_DECL_RANDOM_R ++_GL_WARN_ON_USE (random_r, "random_r is unportable - " ++ "use gnulib module random_r for portability"); ++# endif ++#endif ++ ++#if @GNULIB_RANDOM_R@ ++# if @REPLACE_RANDOM_R@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef srandom_r ++# define srandom_r rpl_srandom_r ++# endif ++_GL_FUNCDECL_RPL (srandom_r, int, ++ (unsigned int seed, struct random_data *rand_state) ++ _GL_ARG_NONNULL ((2))); ++_GL_CXXALIAS_RPL (srandom_r, int, ++ (unsigned int seed, struct random_data *rand_state)); ++# else ++# if !@HAVE_RANDOM_R@ ++_GL_FUNCDECL_SYS (srandom_r, int, ++ (unsigned int seed, struct random_data *rand_state) ++ _GL_ARG_NONNULL ((2))); ++# endif ++_GL_CXXALIAS_SYS (srandom_r, int, ++ (unsigned int seed, struct random_data *rand_state)); ++# endif ++_GL_CXXALIASWARN (srandom_r); ++#elif defined GNULIB_POSIXCHECK ++# undef srandom_r ++# if HAVE_RAW_DECL_SRANDOM_R ++_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " ++ "use gnulib module random_r for portability"); ++# endif ++#endif ++ ++#if @GNULIB_RANDOM_R@ ++# if @REPLACE_RANDOM_R@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef initstate_r ++# define initstate_r rpl_initstate_r ++# endif ++_GL_FUNCDECL_RPL (initstate_r, int, ++ (unsigned int seed, char *buf, size_t buf_size, ++ struct random_data *rand_state) ++ _GL_ARG_NONNULL ((2, 4))); ++_GL_CXXALIAS_RPL (initstate_r, int, ++ (unsigned int seed, char *buf, size_t buf_size, ++ struct random_data *rand_state)); ++# else ++# if !@HAVE_RANDOM_R@ ++_GL_FUNCDECL_SYS (initstate_r, int, ++ (unsigned int seed, char *buf, size_t buf_size, ++ struct random_data *rand_state) ++ _GL_ARG_NONNULL ((2, 4))); ++# endif ++_GL_CXXALIAS_SYS (initstate_r, int, ++ (unsigned int seed, char *buf, size_t buf_size, ++ struct random_data *rand_state)); ++# endif ++_GL_CXXALIASWARN (initstate_r); ++#elif defined GNULIB_POSIXCHECK ++# undef initstate_r ++# if HAVE_RAW_DECL_INITSTATE_R ++_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " ++ "use gnulib module random_r for portability"); ++# endif ++#endif ++ ++#if @GNULIB_RANDOM_R@ ++# if @REPLACE_RANDOM_R@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef setstate_r ++# define setstate_r rpl_setstate_r ++# endif ++_GL_FUNCDECL_RPL (setstate_r, int, ++ (char *arg_state, struct random_data *rand_state) ++ _GL_ARG_NONNULL ((1, 2))); ++_GL_CXXALIAS_RPL (setstate_r, int, ++ (char *arg_state, struct random_data *rand_state)); ++# else ++# if !@HAVE_RANDOM_R@ ++_GL_FUNCDECL_SYS (setstate_r, int, ++ (char *arg_state, struct random_data *rand_state) ++ _GL_ARG_NONNULL ((1, 2))); ++# endif ++_GL_CXXALIAS_SYS (setstate_r, int, ++ (char *arg_state, struct random_data *rand_state)); ++# endif ++_GL_CXXALIASWARN (setstate_r); ++#elif defined GNULIB_POSIXCHECK ++# undef setstate_r ++# if HAVE_RAW_DECL_SETSTATE_R ++_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " ++ "use gnulib module random_r for portability"); ++# endif ++#endif ++ ++ ++#if @GNULIB_REALLOC_POSIX@ ++# if @REPLACE_REALLOC@ ++# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ ++ || _GL_USE_STDLIB_ALLOC) ++# undef realloc ++# define realloc rpl_realloc ++# endif ++_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); ++_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); ++# else ++_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); ++# endif ++_GL_CXXALIASWARN (realloc); ++#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC ++# undef realloc ++/* Assume realloc is always declared. */ ++_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " ++ "use gnulib module realloc-posix for portability"); ++#endif ++ ++#if @GNULIB_REALPATH@ ++# if @REPLACE_REALPATH@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# define realpath rpl_realpath ++# endif ++_GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved) ++ _GL_ARG_NONNULL ((1))); ++_GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved)); ++# else ++# if !@HAVE_REALPATH@ ++_GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved) ++ _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved)); ++# endif ++_GL_CXXALIASWARN (realpath); ++#elif defined GNULIB_POSIXCHECK ++# undef realpath ++# if HAVE_RAW_DECL_REALPATH ++_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " ++ "canonicalize or canonicalize-lgpl for portability"); ++# endif ++#endif ++ ++#if @GNULIB_RPMATCH@ ++/* Test a user response to a question. ++ Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ ++# if !@HAVE_RPMATCH@ ++_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); ++_GL_CXXALIASWARN (rpmatch); ++#elif defined GNULIB_POSIXCHECK ++# undef rpmatch ++# if HAVE_RAW_DECL_RPMATCH ++_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " ++ "use gnulib module rpmatch for portability"); ++# endif ++#endif ++ ++#if @GNULIB_SECURE_GETENV@ ++/* Look up NAME in the environment, returning 0 in insecure situations. */ ++# if !@HAVE_SECURE_GETENV@ ++_GL_FUNCDECL_SYS (secure_getenv, char *, ++ (char const *name) _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name)); ++_GL_CXXALIASWARN (secure_getenv); ++#elif defined GNULIB_POSIXCHECK ++# undef secure_getenv ++# if HAVE_RAW_DECL_SECURE_GETENV ++_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " ++ "use gnulib module secure_getenv for portability"); ++# endif ++#endif ++ ++#if @GNULIB_SETENV@ ++/* Set NAME to VALUE in the environment. ++ If REPLACE is nonzero, overwrite an existing value. */ ++# if @REPLACE_SETENV@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef setenv ++# define setenv rpl_setenv ++# endif ++_GL_FUNCDECL_RPL (setenv, int, ++ (const char *name, const char *value, int replace) ++ _GL_ARG_NONNULL ((1))); ++_GL_CXXALIAS_RPL (setenv, int, ++ (const char *name, const char *value, int replace)); ++# else ++# if !@HAVE_DECL_SETENV@ ++_GL_FUNCDECL_SYS (setenv, int, ++ (const char *name, const char *value, int replace) ++ _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (setenv, int, ++ (const char *name, const char *value, int replace)); ++# endif ++# if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@) ++_GL_CXXALIASWARN (setenv); ++# endif ++#elif defined GNULIB_POSIXCHECK ++# undef setenv ++# if HAVE_RAW_DECL_SETENV ++_GL_WARN_ON_USE (setenv, "setenv is unportable - " ++ "use gnulib module setenv for portability"); ++# endif ++#endif ++ ++#if @GNULIB_STRTOD@ ++ /* Parse a double from STRING, updating ENDP if appropriate. */ ++# if @REPLACE_STRTOD@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# define strtod rpl_strtod ++# endif ++_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp) ++ _GL_ARG_NONNULL ((1))); ++_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp)); ++# else ++# if !@HAVE_STRTOD@ ++_GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp) ++ _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp)); ++# endif ++_GL_CXXALIASWARN (strtod); ++#elif defined GNULIB_POSIXCHECK ++# undef strtod ++# if HAVE_RAW_DECL_STRTOD ++_GL_WARN_ON_USE (strtod, "strtod is unportable - " ++ "use gnulib module strtod for portability"); ++# endif ++#endif ++ ++#if @GNULIB_STRTOLL@ ++/* Parse a signed integer whose textual representation starts at STRING. ++ The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, ++ it may be decimal or octal (with prefix "0") or hexadecimal (with prefix ++ "0x"). ++ If ENDPTR is not NULL, the address of the first byte after the integer is ++ stored in *ENDPTR. ++ Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set ++ to ERANGE. */ ++# if !@HAVE_STRTOLL@ ++_GL_FUNCDECL_SYS (strtoll, long long, ++ (const char *string, char **endptr, int base) ++ _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (strtoll, long long, ++ (const char *string, char **endptr, int base)); ++_GL_CXXALIASWARN (strtoll); ++#elif defined GNULIB_POSIXCHECK ++# undef strtoll ++# if HAVE_RAW_DECL_STRTOLL ++_GL_WARN_ON_USE (strtoll, "strtoll is unportable - " ++ "use gnulib module strtoll for portability"); ++# endif ++#endif ++ ++#if @GNULIB_STRTOULL@ ++/* Parse an unsigned integer whose textual representation starts at STRING. ++ The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, ++ it may be decimal or octal (with prefix "0") or hexadecimal (with prefix ++ "0x"). ++ If ENDPTR is not NULL, the address of the first byte after the integer is ++ stored in *ENDPTR. ++ Upon overflow, the return value is ULLONG_MAX, and errno is set to ++ ERANGE. */ ++# if !@HAVE_STRTOULL@ ++_GL_FUNCDECL_SYS (strtoull, unsigned long long, ++ (const char *string, char **endptr, int base) ++ _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (strtoull, unsigned long long, ++ (const char *string, char **endptr, int base)); ++_GL_CXXALIASWARN (strtoull); ++#elif defined GNULIB_POSIXCHECK ++# undef strtoull ++# if HAVE_RAW_DECL_STRTOULL ++_GL_WARN_ON_USE (strtoull, "strtoull is unportable - " ++ "use gnulib module strtoull for portability"); ++# endif ++#endif ++ ++#if @GNULIB_UNLOCKPT@ ++/* Unlock the slave side of the pseudo-terminal whose master side is specified ++ by FD, so that it can be opened. */ ++# if !@HAVE_UNLOCKPT@ ++_GL_FUNCDECL_SYS (unlockpt, int, (int fd)); ++# endif ++_GL_CXXALIAS_SYS (unlockpt, int, (int fd)); ++_GL_CXXALIASWARN (unlockpt); ++#elif defined GNULIB_POSIXCHECK ++# undef unlockpt ++# if HAVE_RAW_DECL_UNLOCKPT ++_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " ++ "use gnulib module unlockpt for portability"); ++# endif ++#endif ++ ++#if @GNULIB_UNSETENV@ ++/* Remove the variable NAME from the environment. */ ++# if @REPLACE_UNSETENV@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef unsetenv ++# define unsetenv rpl_unsetenv ++# endif ++_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); ++_GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); ++# else ++# if !@HAVE_DECL_UNSETENV@ ++_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); ++# endif ++_GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); ++# endif ++# if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@) ++_GL_CXXALIASWARN (unsetenv); ++# endif ++#elif defined GNULIB_POSIXCHECK ++# undef unsetenv ++# if HAVE_RAW_DECL_UNSETENV ++_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " ++ "use gnulib module unsetenv for portability"); ++# endif ++#endif ++ ++/* Convert a wide character to a multibyte character. */ ++#if @GNULIB_WCTOMB@ ++# if @REPLACE_WCTOMB@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef wctomb ++# define wctomb rpl_wctomb ++# endif ++_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); ++_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); ++# else ++_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); ++# endif ++_GL_CXXALIASWARN (wctomb); ++#endif ++ ++ ++#endif /* _@GUARD_PREFIX@_STDLIB_H */ ++#endif /* _@GUARD_PREFIX@_STDLIB_H */ ++#endif +diff -urN libidn2-0.11.pristine/src/gl/strerror.c libidn2-0.11/src/gl/strerror.c +--- libidn2-0.11.pristine/src/gl/strerror.c 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/strerror.c 2016-11-24 21:38:50.776579374 +0100 +@@ -1,6 +1,6 @@ + /* strerror.c --- POSIX compatible system error routine + +- Copyright (C) 2007-2014 Free Software Foundation, Inc. ++ Copyright (C) 2007-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -66,5 +66,6 @@ + if (sizeof buf <= len) + abort (); + +- return memcpy (buf, msg, len + 1); ++ memcpy (buf, msg, len + 1); ++ return buf; + } +diff -urN libidn2-0.11.pristine/src/gl/strerror-override.c libidn2-0.11/src/gl/strerror-override.c +--- libidn2-0.11.pristine/src/gl/strerror-override.c 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/strerror-override.c 2016-11-24 21:38:50.768579094 +0100 +@@ -1,6 +1,6 @@ + /* strerror-override.c --- POSIX compatible system error routine + +- Copyright (C) 2010-2014 Free Software Foundation, Inc. ++ Copyright (C) 2010-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +diff -urN libidn2-0.11.pristine/src/gl/strerror-override.h libidn2-0.11/src/gl/strerror-override.h +--- libidn2-0.11.pristine/src/gl/strerror-override.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/strerror-override.h 2016-11-24 21:38:50.772579234 +0100 +@@ -1,6 +1,6 @@ + /* strerror-override.h --- POSIX compatible system error routine + +- Copyright (C) 2010-2014 Free Software Foundation, Inc. ++ Copyright (C) 2010-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +diff -urN libidn2-0.11.pristine/src/gl/string.in.h libidn2-0.11/src/gl/string.in.h +--- libidn2-0.11.pristine/src/gl/string.in.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/string.in.h 2016-11-24 21:38:50.781579549 +0100 +@@ -1,6 +1,6 @@ + /* A GNU-like . + +- Copyright (C) 1995-1996, 2001-2014 Free Software Foundation, Inc. ++ Copyright (C) 1995-1996, 2001-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -15,16 +15,32 @@ + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +-#ifndef _@GUARD_PREFIX@_STRING_H +- + #if __GNUC__ >= 3 + @PRAGMA_SYSTEM_HEADER@ + #endif + @PRAGMA_COLUMNS@ + ++#if defined _GL_ALREADY_INCLUDING_STRING_H ++/* Special invocation convention: ++ - On OS X/NetBSD we have a sequence of nested includes ++ -> -> "string.h" ++ In this situation system _chk variants due to -D_FORTIFY_SOURCE ++ might be used after any replacements defined here. */ ++ ++#@INCLUDE_NEXT@ @NEXT_STRING_H@ ++ ++#else ++/* Normal invocation convention. */ ++ ++#ifndef _@GUARD_PREFIX@_STRING_H ++ ++#define _GL_ALREADY_INCLUDING_STRING_H ++ + /* The include_next requires a split double-inclusion guard. */ + #@INCLUDE_NEXT@ @NEXT_STRING_H@ + ++#undef _GL_ALREADY_INCLUDING_STRING_H ++ + #ifndef _@GUARD_PREFIX@_STRING_H + #define _@GUARD_PREFIX@_STRING_H + +@@ -400,15 +416,15 @@ + # undef strndup + # define strndup rpl_strndup + # endif +-_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n) ++_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1))); +-_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n)); ++_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); + # else + # if ! @HAVE_DECL_STRNDUP@ +-_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n) ++_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1))); + # endif +-_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n)); ++_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); + # endif + _GL_CXXALIASWARN (strndup); + #elif defined GNULIB_POSIXCHECK +@@ -428,17 +444,17 @@ + # undef strnlen + # define strnlen rpl_strnlen + # endif +-_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen) ++_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +-_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)); ++_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)); + # else + # if ! @HAVE_DECL_STRNLEN@ +-_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen) ++_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); + # endif +-_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)); ++_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)); + # endif + _GL_CXXALIASWARN (strnlen); + #elif defined GNULIB_POSIXCHECK +@@ -1027,3 +1043,4 @@ + + #endif /* _@GUARD_PREFIX@_STRING_H */ + #endif /* _@GUARD_PREFIX@_STRING_H */ ++#endif +diff -urN libidn2-0.11.pristine/src/gl/stripslash.c libidn2-0.11/src/gl/stripslash.c +--- libidn2-0.11.pristine/src/gl/stripslash.c 1970-01-01 01:00:00.000000000 +0100 ++++ libidn2-0.11/src/gl/stripslash.c 2016-11-24 21:38:50.602573270 +0100 +@@ -0,0 +1,45 @@ ++/* stripslash.c -- remove redundant trailing slashes from a file name ++ ++ Copyright (C) 1990, 2001, 2003-2006, 2009-2016 Free Software Foundation, ++ Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program 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 General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#include ++ ++#include "dirname.h" ++ ++/* Remove trailing slashes from FILE. Return true if a trailing slash ++ was removed. This is useful when using file name completion from a ++ shell that adds a "/" after directory names (such as tcsh and ++ bash), because on symlinks to directories, several system calls ++ have different semantics according to whether a trailing slash is ++ present. */ ++ ++bool ++strip_trailing_slashes (char *file) ++{ ++ char *base = last_component (file); ++ char *base_lim; ++ bool had_slash; ++ ++ /* last_component returns "" for file system roots, but we need to turn ++ "///" into "/". */ ++ if (! *base) ++ base = file; ++ base_lim = base + base_len (base); ++ had_slash = (*base_lim != '\0'); ++ *base_lim = '\0'; ++ return had_slash; ++} +diff -urN libidn2-0.11.pristine/src/gl/sys_types.in.h libidn2-0.11/src/gl/sys_types.in.h +--- libidn2-0.11.pristine/src/gl/sys_types.in.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/sys_types.in.h 2016-11-24 21:38:50.785579689 +0100 +@@ -1,6 +1,6 @@ + /* Provide a more complete sys/types.h. + +- Copyright (C) 2011-2014 Free Software Foundation, Inc. ++ Copyright (C) 2011-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +diff -urN libidn2-0.11.pristine/src/gl/unistd.c libidn2-0.11/src/gl/unistd.c +--- libidn2-0.11.pristine/src/gl/unistd.c 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/unistd.c 2016-11-24 21:38:50.789579829 +0100 +@@ -1,3 +1,4 @@ + #include + #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE + #include "unistd.h" ++typedef int dummy; +diff -urN libidn2-0.11.pristine/src/gl/unistd.in.h libidn2-0.11/src/gl/unistd.in.h +--- libidn2-0.11.pristine/src/gl/unistd.in.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/unistd.in.h 2016-11-24 21:38:50.795580041 +0100 +@@ -1,5 +1,5 @@ + /* Substitute for and wrapper around . +- Copyright (C) 2003-2014 Free Software Foundation, Inc. ++ Copyright (C) 2003-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -401,6 +401,12 @@ + /* Set of environment variables and values. An array of strings of the form + "VARIABLE=VALUE", terminated with a NULL. */ + # if defined __APPLE__ && defined __MACH__ ++# include ++# if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR ++# define _GL_USE_CRT_EXTERNS ++# endif ++# endif ++# ifdef _GL_USE_CRT_EXTERNS + # include + # define environ (*_NSGetEnviron ()) + # else +@@ -1287,13 +1293,24 @@ + + + #if @GNULIB_READLINKAT@ +-# if !@HAVE_READLINKAT@ ++# if @REPLACE_READLINKAT@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# define readlinkat rpl_readlinkat ++# endif ++_GL_FUNCDECL_RPL (readlinkat, ssize_t, ++ (int fd, char const *file, char *buf, size_t len) ++ _GL_ARG_NONNULL ((2, 3))); ++_GL_CXXALIAS_RPL (readlinkat, ssize_t, ++ (int fd, char const *file, char *buf, size_t len)); ++# else ++# if !@HAVE_READLINKAT@ + _GL_FUNCDECL_SYS (readlinkat, ssize_t, + (int fd, char const *file, char *buf, size_t len) + _GL_ARG_NONNULL ((2, 3))); +-# endif ++# endif + _GL_CXXALIAS_SYS (readlinkat, ssize_t, + (int fd, char const *file, char *buf, size_t len)); ++# endif + _GL_CXXALIASWARN (readlinkat); + #elif defined GNULIB_POSIXCHECK + # undef readlinkat +@@ -1407,13 +1424,25 @@ + + + #if @GNULIB_SYMLINKAT@ +-# if !@HAVE_SYMLINKAT@ ++# if @REPLACE_SYMLINKAT@ ++# if !(defined __cplusplus && defined GNULIB_NAMESPACE) ++# undef symlinkat ++# define symlinkat rpl_symlinkat ++# endif ++_GL_FUNCDECL_RPL (symlinkat, int, ++ (char const *contents, int fd, char const *file) ++ _GL_ARG_NONNULL ((1, 3))); ++_GL_CXXALIAS_RPL (symlinkat, int, ++ (char const *contents, int fd, char const *file)); ++# else ++# if !@HAVE_SYMLINKAT@ + _GL_FUNCDECL_SYS (symlinkat, int, + (char const *contents, int fd, char const *file) + _GL_ARG_NONNULL ((1, 3))); +-# endif ++# endif + _GL_CXXALIAS_SYS (symlinkat, int, + (char const *contents, int fd, char const *file)); ++# endif + _GL_CXXALIASWARN (symlinkat); + #elif defined GNULIB_POSIXCHECK + # undef symlinkat +diff -urN libidn2-0.11.pristine/src/gl/verify.h libidn2-0.11/src/gl/verify.h +--- libidn2-0.11.pristine/src/gl/verify.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/verify.h 2016-11-24 21:38:50.799580181 +0100 +@@ -1,6 +1,6 @@ + /* Compile-time assert-like macros. + +- Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc. ++ Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -263,7 +263,7 @@ + # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ()) + #elif 1200 <= _MSC_VER + # define assume(R) __assume (R) +-#elif (defined lint \ ++#elif ((defined GCC_LINT || defined lint) \ + && (__has_builtin (__builtin_trap) \ + || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__)))) + /* Doing it this way helps various packages when configured with +diff -urN libidn2-0.11.pristine/src/gl/version-etc.c libidn2-0.11/src/gl/version-etc.c +--- libidn2-0.11.pristine/src/gl/version-etc.c 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/version-etc.c 2016-11-24 21:38:50.803580321 +0100 +@@ -1,5 +1,5 @@ + /* Print --version and bug-reporting information in a consistent format. +- Copyright (C) 1999-2014 Free Software Foundation, Inc. ++ Copyright (C) 1999-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -38,7 +38,7 @@ + # define PACKAGE PACKAGE_TARNAME + #endif + +-enum { COPYRIGHT_YEAR = 2014 }; ++enum { COPYRIGHT_YEAR = 2016 }; + + /* The three functions below display the --version information the + standard way. +diff -urN libidn2-0.11.pristine/src/gl/version-etc.h libidn2-0.11/src/gl/version-etc.h +--- libidn2-0.11.pristine/src/gl/version-etc.h 2016-11-03 11:17:53.000000000 +0100 ++++ libidn2-0.11/src/gl/version-etc.h 2016-11-24 21:38:50.807580461 +0100 +@@ -1,5 +1,5 @@ + /* Print --version and bug-reporting information in a consistent format. +- Copyright (C) 1999, 2003, 2005, 2009-2014 Free Software Foundation, Inc. ++ Copyright (C) 1999, 2003, 2005, 2009-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +diff -urN libidn2-0.11.pristine/src/Makefile.in libidn2-0.11/src/Makefile.in +--- libidn2-0.11.pristine/src/Makefile.in 2016-11-03 11:35:18.000000000 +0100 ++++ libidn2-0.11/src/Makefile.in 2016-11-24 21:39:11.629310872 +0100 +@@ -1,7 +1,7 @@ +-# Makefile.in generated by automake 1.14.1 from Makefile.am. ++# Makefile.in generated by automake 1.15 from Makefile.am. + # @configure_input@ + +-# Copyright (C) 1994-2013 Free Software Foundation, Inc. ++# Copyright (C) 1994-2014 Free Software Foundation, Inc. + + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -31,7 +31,17 @@ + + + VPATH = @srcdir@ +-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' ++am__is_gnu_make = { \ ++ if test -z '$(MAKELEVEL)'; then \ ++ false; \ ++ elif test -n '$(MAKE_HOST)'; then \ ++ true; \ ++ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ ++ true; \ ++ else \ ++ false; \ ++ fi; \ ++} + am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ +@@ -95,37 +105,29 @@ + host_triplet = @host@ + bin_PROGRAMS = idn2$(EXEEXT) + subdir = . +-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ +- $(top_srcdir)/configure $(am__configure_deps) \ +- $(srcdir)/config.h.in $(top_srcdir)/../build-aux/depcomp \ +- ../build-aux/ar-lib ../build-aux/compile \ +- ../build-aux/config.guess ../build-aux/config.rpath \ +- ../build-aux/config.sub ../build-aux/depcomp \ +- ../build-aux/install-sh ../build-aux/mdate-sh \ +- ../build-aux/missing ../build-aux/texinfo.tex \ +- ../build-aux/ltmain.sh $(top_srcdir)/../build-aux/ar-lib \ +- $(top_srcdir)/../build-aux/compile \ +- $(top_srcdir)/../build-aux/config.guess \ +- $(top_srcdir)/../build-aux/config.sub \ +- $(top_srcdir)/../build-aux/install-sh \ +- $(top_srcdir)/../build-aux/ltmain.sh \ +- $(top_srcdir)/../build-aux/missing + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 \ ++ $(top_srcdir)/gl/m4/dirname.m4 \ ++ $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ ++ $(top_srcdir)/gl/m4/getopt.m4 \ ++ $(top_srcdir)/gl/m4/getprogname.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ ++ $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ +- $(top_srcdir)/gl/m4/off_t.m4 $(top_srcdir)/gl/m4/onceonly.m4 \ +- $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ ++ $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ ++ $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ ++ $(top_srcdir)/gl/m4/stdarg.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ + $(top_srcdir)/gl/m4/stddef_h.m4 $(top_srcdir)/gl/m4/stdio_h.m4 \ ++ $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ +@@ -141,6 +143,8 @@ + $(top_srcdir)/../m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) ++DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ ++ $(am__configure_deps) $(am__DIST_COMMON) + am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno + mkinstalldirs = $(install_sh) -d +@@ -243,6 +247,20 @@ + CTAGS = ctags + CSCOPE = cscope + DIST_SUBDIRS = $(SUBDIRS) ++am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ ++ $(top_srcdir)/../build-aux/ar-lib \ ++ $(top_srcdir)/../build-aux/compile \ ++ $(top_srcdir)/../build-aux/config.guess \ ++ $(top_srcdir)/../build-aux/config.sub \ ++ $(top_srcdir)/../build-aux/depcomp \ ++ $(top_srcdir)/../build-aux/install-sh \ ++ $(top_srcdir)/../build-aux/ltmain.sh \ ++ $(top_srcdir)/../build-aux/missing ../build-aux/ar-lib \ ++ ../build-aux/compile ../build-aux/config.guess \ ++ ../build-aux/config.rpath ../build-aux/config.sub \ ++ ../build-aux/depcomp ../build-aux/install-sh \ ++ ../build-aux/ltmain.sh ../build-aux/mdate-sh \ ++ ../build-aux/missing ../build-aux/texinfo.tex + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + distdir = $(PACKAGE)-$(VERSION) + top_distdir = $(distdir) +@@ -319,6 +337,10 @@ + ERRNO_H = @ERRNO_H@ + EXEEXT = @EXEEXT@ + FGREP = @FGREP@ ++GETOPT_H = @GETOPT_H@ ++GNULIB_ATOLL = @GNULIB_ATOLL@ ++GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ ++GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ + GNULIB_CHDIR = @GNULIB_CHDIR@ + GNULIB_CHOWN = @GNULIB_CHOWN@ + GNULIB_CLOSE = @GNULIB_CLOSE@ +@@ -364,16 +386,21 @@ + GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ + GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ + GNULIB_GETLINE = @GNULIB_GETLINE@ ++GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ + GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ + GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ + GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ ++GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ + GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ ++GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ ++GNULIB_GRANTPT = @GNULIB_GRANTPT@ + GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ + GNULIB_ISATTY = @GNULIB_ISATTY@ + GNULIB_LCHOWN = @GNULIB_LCHOWN@ + GNULIB_LINK = @GNULIB_LINK@ + GNULIB_LINKAT = @GNULIB_LINKAT@ + GNULIB_LSEEK = @GNULIB_LSEEK@ ++GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ + GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ + GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ + GNULIB_MBSCHR = @GNULIB_MBSCHR@ +@@ -388,10 +415,16 @@ + GNULIB_MBSSPN = @GNULIB_MBSSPN@ + GNULIB_MBSSTR = @GNULIB_MBSSTR@ + GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ ++GNULIB_MBTOWC = @GNULIB_MBTOWC@ + GNULIB_MEMCHR = @GNULIB_MEMCHR@ + GNULIB_MEMMEM = @GNULIB_MEMMEM@ + GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ + GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ ++GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ ++GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ ++GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ ++GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ ++GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ + GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ + GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ + GNULIB_PCLOSE = @GNULIB_PCLOSE@ +@@ -399,22 +432,34 @@ + GNULIB_PIPE = @GNULIB_PIPE@ + GNULIB_PIPE2 = @GNULIB_PIPE2@ + GNULIB_POPEN = @GNULIB_POPEN@ ++GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ + GNULIB_PREAD = @GNULIB_PREAD@ + GNULIB_PRINTF = @GNULIB_PRINTF@ + GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ ++GNULIB_PTSNAME = @GNULIB_PTSNAME@ ++GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ + GNULIB_PUTC = @GNULIB_PUTC@ + GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ ++GNULIB_PUTENV = @GNULIB_PUTENV@ + GNULIB_PUTS = @GNULIB_PUTS@ + GNULIB_PWRITE = @GNULIB_PWRITE@ ++GNULIB_QSORT_R = @GNULIB_QSORT_R@ ++GNULIB_RANDOM = @GNULIB_RANDOM@ ++GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ + GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ + GNULIB_READ = @GNULIB_READ@ + GNULIB_READLINK = @GNULIB_READLINK@ + GNULIB_READLINKAT = @GNULIB_READLINKAT@ ++GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ ++GNULIB_REALPATH = @GNULIB_REALPATH@ + GNULIB_REMOVE = @GNULIB_REMOVE@ + GNULIB_RENAME = @GNULIB_RENAME@ + GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ + GNULIB_RMDIR = @GNULIB_RMDIR@ ++GNULIB_RPMATCH = @GNULIB_RPMATCH@ + GNULIB_SCANF = @GNULIB_SCANF@ ++GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ ++GNULIB_SETENV = @GNULIB_SETENV@ + GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ + GNULIB_SLEEP = @GNULIB_SLEEP@ + GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +@@ -435,16 +480,22 @@ + GNULIB_STRSEP = @GNULIB_STRSEP@ + GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ + GNULIB_STRSTR = @GNULIB_STRSTR@ ++GNULIB_STRTOD = @GNULIB_STRTOD@ + GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ ++GNULIB_STRTOLL = @GNULIB_STRTOLL@ ++GNULIB_STRTOULL = @GNULIB_STRTOULL@ + GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ + GNULIB_SYMLINK = @GNULIB_SYMLINK@ + GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ ++GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ + GNULIB_TMPFILE = @GNULIB_TMPFILE@ + GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ + GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ + GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ + GNULIB_UNLINK = @GNULIB_UNLINK@ + GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ ++GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ ++GNULIB_UNSETENV = @GNULIB_UNSETENV@ + GNULIB_USLEEP = @GNULIB_USLEEP@ + GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ + GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ +@@ -456,8 +507,12 @@ + GNULIB_VSCANF = @GNULIB_VSCANF@ + GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ + GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ ++GNULIB_WCTOMB = @GNULIB_WCTOMB@ + GNULIB_WRITE = @GNULIB_WRITE@ ++GNULIB__EXIT = @GNULIB__EXIT@ + GREP = @GREP@ ++HAVE_ATOLL = @HAVE_ATOLL@ ++HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ + HAVE_CHOWN = @HAVE_CHOWN@ + HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ + HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +@@ -468,12 +523,14 @@ + HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ + HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ + HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ ++HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ + HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ + HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ + HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ + HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ + HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ + HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ ++HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ + HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ + HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ + HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +@@ -483,6 +540,7 @@ + HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ + HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ + HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ ++HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ + HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ + HAVE_DPRINTF = @HAVE_DPRINTF@ + HAVE_DUP2 = @HAVE_DUP2@ +@@ -502,26 +560,46 @@ + HAVE_GETGROUPS = @HAVE_GETGROUPS@ + HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ + HAVE_GETLOGIN = @HAVE_GETLOGIN@ ++HAVE_GETOPT_H = @HAVE_GETOPT_H@ + HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ ++HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ ++HAVE_GRANTPT = @HAVE_GRANTPT@ + HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ + HAVE_LCHOWN = @HAVE_LCHOWN@ + HAVE_LINK = @HAVE_LINK@ + HAVE_LINKAT = @HAVE_LINKAT@ ++HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ + HAVE_MBSLEN = @HAVE_MBSLEN@ + HAVE_MEMCHR = @HAVE_MEMCHR@ + HAVE_MEMPCPY = @HAVE_MEMPCPY@ ++HAVE_MKDTEMP = @HAVE_MKDTEMP@ ++HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ ++HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ ++HAVE_MKSTEMP = @HAVE_MKSTEMP@ ++HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ + HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ + HAVE_OS_H = @HAVE_OS_H@ + HAVE_PCLOSE = @HAVE_PCLOSE@ + HAVE_PIPE = @HAVE_PIPE@ + HAVE_PIPE2 = @HAVE_PIPE2@ + HAVE_POPEN = @HAVE_POPEN@ ++HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ + HAVE_PREAD = @HAVE_PREAD@ ++HAVE_PTSNAME = @HAVE_PTSNAME@ ++HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ + HAVE_PWRITE = @HAVE_PWRITE@ ++HAVE_QSORT_R = @HAVE_QSORT_R@ ++HAVE_RANDOM = @HAVE_RANDOM@ ++HAVE_RANDOM_H = @HAVE_RANDOM_H@ ++HAVE_RANDOM_R = @HAVE_RANDOM_R@ + HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ + HAVE_READLINK = @HAVE_READLINK@ + HAVE_READLINKAT = @HAVE_READLINKAT@ ++HAVE_REALPATH = @HAVE_REALPATH@ + HAVE_RENAMEAT = @HAVE_RENAMEAT@ ++HAVE_RPMATCH = @HAVE_RPMATCH@ ++HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ ++HAVE_SETENV = @HAVE_SETENV@ + HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ + HAVE_SLEEP = @HAVE_SLEEP@ + HAVE_STPCPY = @HAVE_STPCPY@ +@@ -530,17 +608,25 @@ + HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ + HAVE_STRPBRK = @HAVE_STRPBRK@ + HAVE_STRSEP = @HAVE_STRSEP@ ++HAVE_STRTOD = @HAVE_STRTOD@ ++HAVE_STRTOLL = @HAVE_STRTOLL@ ++HAVE_STRTOULL = @HAVE_STRTOULL@ ++HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ + HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ + HAVE_SYMLINK = @HAVE_SYMLINK@ + HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ ++HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ + HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ + HAVE_UNISTD_H = @HAVE_UNISTD_H@ + HAVE_UNLINKAT = @HAVE_UNLINKAT@ ++HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ + HAVE_USLEEP = @HAVE_USLEEP@ + HAVE_VASPRINTF = @HAVE_VASPRINTF@ + HAVE_VDPRINTF = @HAVE_VDPRINTF@ + HAVE_WCHAR_T = @HAVE_WCHAR_T@ + HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ ++HAVE__BOOL = @HAVE__BOOL@ ++HAVE__EXIT = @HAVE__EXIT@ + INCLUDE_NEXT = @INCLUDE_NEXT@ + INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ + INSTALL = @INSTALL@ +@@ -562,16 +648,20 @@ + MANIFEST_TOOL = @MANIFEST_TOOL@ + MKDIR_P = @MKDIR_P@ + NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ ++NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ + NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ + NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ + NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ ++NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ + NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ + NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ + NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ + NEXT_ERRNO_H = @NEXT_ERRNO_H@ ++NEXT_GETOPT_H = @NEXT_GETOPT_H@ + NEXT_STDARG_H = @NEXT_STDARG_H@ + NEXT_STDDEF_H = @NEXT_STDDEF_H@ + NEXT_STDIO_H = @NEXT_STDIO_H@ ++NEXT_STDLIB_H = @NEXT_STDLIB_H@ + NEXT_STRING_H = @NEXT_STRING_H@ + NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ + NEXT_UNISTD_H = @NEXT_UNISTD_H@ +@@ -592,6 +682,8 @@ + PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ + PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ + RANLIB = @RANLIB@ ++REPLACE_CALLOC = @REPLACE_CALLOC@ ++REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ + REPLACE_CHOWN = @REPLACE_CHOWN@ + REPLACE_CLOSE = @REPLACE_CLOSE@ + REPLACE_DPRINTF = @REPLACE_DPRINTF@ +@@ -623,21 +715,33 @@ + REPLACE_LINK = @REPLACE_LINK@ + REPLACE_LINKAT = @REPLACE_LINKAT@ + REPLACE_LSEEK = @REPLACE_LSEEK@ ++REPLACE_MALLOC = @REPLACE_MALLOC@ ++REPLACE_MBTOWC = @REPLACE_MBTOWC@ + REPLACE_MEMCHR = @REPLACE_MEMCHR@ + REPLACE_MEMMEM = @REPLACE_MEMMEM@ ++REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ + REPLACE_NULL = @REPLACE_NULL@ + REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ + REPLACE_PERROR = @REPLACE_PERROR@ + REPLACE_POPEN = @REPLACE_POPEN@ + REPLACE_PREAD = @REPLACE_PREAD@ + REPLACE_PRINTF = @REPLACE_PRINTF@ ++REPLACE_PTSNAME = @REPLACE_PTSNAME@ ++REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ ++REPLACE_PUTENV = @REPLACE_PUTENV@ + REPLACE_PWRITE = @REPLACE_PWRITE@ ++REPLACE_QSORT_R = @REPLACE_QSORT_R@ ++REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ + REPLACE_READ = @REPLACE_READ@ + REPLACE_READLINK = @REPLACE_READLINK@ ++REPLACE_READLINKAT = @REPLACE_READLINKAT@ ++REPLACE_REALLOC = @REPLACE_REALLOC@ ++REPLACE_REALPATH = @REPLACE_REALPATH@ + REPLACE_REMOVE = @REPLACE_REMOVE@ + REPLACE_RENAME = @REPLACE_RENAME@ + REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ + REPLACE_RMDIR = @REPLACE_RMDIR@ ++REPLACE_SETENV = @REPLACE_SETENV@ + REPLACE_SLEEP = @REPLACE_SLEEP@ + REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ + REPLACE_SPRINTF = @REPLACE_SPRINTF@ +@@ -654,12 +758,15 @@ + REPLACE_STRNLEN = @REPLACE_STRNLEN@ + REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ + REPLACE_STRSTR = @REPLACE_STRSTR@ ++REPLACE_STRTOD = @REPLACE_STRTOD@ + REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ + REPLACE_SYMLINK = @REPLACE_SYMLINK@ ++REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ + REPLACE_TMPFILE = @REPLACE_TMPFILE@ + REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ + REPLACE_UNLINK = @REPLACE_UNLINK@ + REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ ++REPLACE_UNSETENV = @REPLACE_UNSETENV@ + REPLACE_USLEEP = @REPLACE_USLEEP@ + REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ + REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ +@@ -667,11 +774,13 @@ + REPLACE_VPRINTF = @REPLACE_VPRINTF@ + REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ + REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ ++REPLACE_WCTOMB = @REPLACE_WCTOMB@ + REPLACE_WRITE = @REPLACE_WRITE@ + SED = @SED@ + SET_MAKE = @SET_MAKE@ + SHELL = @SHELL@ + STDARG_H = @STDARG_H@ ++STDBOOL_H = @STDBOOL_H@ + STDDEF_H = @STDDEF_H@ + STRIP = @STRIP@ + UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ +@@ -773,7 +882,6 @@ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +-.PRECIOUS: Makefile + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ +@@ -1108,15 +1216,15 @@ + $(am__post_remove_distdir) + + dist-tarZ: distdir +- @echo WARNING: "Support for shar distribution archives is" \ +- "deprecated." >&2 ++ @echo WARNING: "Support for distribution archives compressed with" \ ++ "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + + dist-shar: distdir +- @echo WARNING: "Support for distribution archives compressed with" \ +- "legacy program 'compress' is deprecated." >&2 ++ @echo WARNING: "Support for shar distribution archives is" \ ++ "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) +@@ -1152,17 +1260,17 @@ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) +- mkdir $(distdir)/_build $(distdir)/_inst ++ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ +- && $(am__cd) $(distdir)/_build \ +- && ../configure \ ++ && $(am__cd) $(distdir)/_build/sub \ ++ && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ +- --srcdir=.. --prefix="$$dc_install_base" \ ++ --srcdir=../.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ +@@ -1353,6 +1461,8 @@ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS + ++.PRECIOUS: Makefile ++ + + idn2.c: $(BUILT_SOURCES) +