From 82892f131b83746e6359845d2de39369728f8c25 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 9 May 2008 13:46:09 +0000 Subject: [PATCH] Prepare to use gnulib's c-type module. * bootstrap: Move module list into separate variable w/less syntax. (modules): Add c-ctype. Update the following from gnulib: * build-aux/useless-if-before-free: * build-aux/vc-list-files: * gnulib/lib/Makefile.am: * gnulib/lib/getaddrinfo.h: * gnulib/m4/gnulib-cache.m4: * gnulib/m4/gnulib-comp.m4: * gnulib/m4/inet_ntop.m4: * gnulib/tests/Makefile.am: * gnulib/tests/test-getaddrinfo.c: --- ChangeLog | 16 ++++++++++++ bootstrap | 25 +++++++++++++------ build-aux/useless-if-before-free | 6 ++--- build-aux/vc-list-files | 4 +-- gnulib/lib/Makefile.am | 14 +++++------ gnulib/lib/dummy.c | 42 -------------------------------- gnulib/lib/getaddrinfo.h | 10 +++++++- gnulib/m4/gnulib-cache.m4 | 4 +-- gnulib/m4/gnulib-comp.m4 | 8 +++++- gnulib/m4/inet_ntop.m4 | 5 +++- gnulib/tests/Makefile.am | 18 ++++++++++++++ gnulib/tests/test-getaddrinfo.c | 1 + 12 files changed, 87 insertions(+), 66 deletions(-) delete mode 100644 gnulib/lib/dummy.c diff --git a/ChangeLog b/ChangeLog index 08ea02863d..b23d5f265d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +Fri May 9 15:45:39 CEST 2008 Jim Meyering + + Prepare to use gnulib's c-type module. + * bootstrap: Move module list into separate variable w/less syntax. + (modules): Add c-ctype. + Update the following from gnulib: + * build-aux/useless-if-before-free: + * build-aux/vc-list-files: + * gnulib/lib/Makefile.am: + * gnulib/lib/getaddrinfo.h: + * gnulib/m4/gnulib-cache.m4: + * gnulib/m4/gnulib-comp.m4: + * gnulib/m4/inet_ntop.m4: + * gnulib/tests/Makefile.am: + * gnulib/tests/test-getaddrinfo.c: + Fri May 9 10:10:28 CEST 2008 Daniel Veillard * src/xen_unified.c src/xend_internal.c src/xend_internal.h: patch diff --git a/bootstrap b/bootstrap index 087b98d972..acce4e86cf 100755 --- a/bootstrap +++ b/bootstrap @@ -64,6 +64,23 @@ esac gnulib_tool=$GNULIB_SRCDIR/gnulib-tool <$gnulib_tool || exit +modules=' +c-ctype +getaddrinfo +getpass +gettext +mktempd +physmem +poll +posix-shell +strndup +strsep +sys_stat +useless-if-before-free +vasprintf +vc-list-files +' + # Tell gnulib to: # require LGPLv2+ # put *.m4 files in new gnulib/m4/ dir @@ -75,13 +92,7 @@ $gnulib_tool \ --m4-base=gnulib/m4 \ --source-base=gnulib/lib \ --tests-base=gnulib/tests \ - --import physmem getaddrinfo \ - sys_stat vasprintf strndup \ - strsep poll gettext getpass \ - useless-if-before-free \ - posix-shell \ - mktempd \ - vc-list-files + --import $modules rm -f \ .gitignore \ diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free index 4603c6c601..48f55c661a 100755 --- a/build-aux/useless-if-before-free +++ b/build-aux/useless-if-before-free @@ -2,7 +2,7 @@ # Detect instances of "if (p) free (p);". # Likewise for "if (p != NULL) free (p);". And with braces. -my $VERSION = '2008-04-29 19:56'; # UTC +my $VERSION = '2008-05-01 19:11'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -68,8 +68,8 @@ OPTIONS: Exit status: - 0 no match - 1 one or more matches + 0 one or more matches + 1 no match 2 an error EXAMPLE: diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files index abb0c40239..8ca4530f7a 100755 --- a/build-aux/vc-list-files +++ b/build-aux/vc-list-files @@ -2,7 +2,7 @@ # List version-controlled file names. # Print a version string. -scriptversion=2008-04-30.12 +scriptversion=2008-05-01.10 # Copyright (C) 2006-2008 Free Software Foundation, Inc. @@ -91,7 +91,7 @@ elif test -d CVS; then sub(/CVS\/Entries/, "", f); \ print f $2; \ }}'\'' \ - $(find "$dir" -name Entries -print) /dev/null' $postprocess + `find "$dir" -name Entries -print` /dev/null' $postprocess fi else echo "$0: Failed to determine type of version control used in `pwd`" 1>&2 diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am index ad0a92f7fb..1390c05286 100644 --- a/gnulib/lib/Makefile.am +++ b/gnulib/lib/Makefile.am @@ -9,7 +9,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=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl getaddrinfo getpass gettext mktempd physmem poll posix-shell strndup strsep sys_stat useless-if-before-free vasprintf vc-list-files +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl c-ctype getaddrinfo getpass gettext mktempd physmem poll posix-shell strndup strsep sys_stat useless-if-before-free vasprintf vc-list-files AUTOMAKE_OPTIONS = 1.5 gnits @@ -79,6 +79,12 @@ EXTRA_DIST += arpa_inet.in.h ## end gnulib module arpa_inet +## begin gnulib module c-ctype + +libgnu_la_SOURCES += c-ctype.h c-ctype.c + +## end gnulib module c-ctype + ## begin gnulib module float BUILT_SOURCES += $(FLOAT_H) @@ -794,12 +800,6 @@ libgnu_la_SOURCES += xsize.h ## end gnulib module xsize -## begin gnulib module dummy - -libgnu_la_SOURCES += dummy.c - -## end gnulib module dummy - mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ diff --git a/gnulib/lib/dummy.c b/gnulib/lib/dummy.c deleted file mode 100644 index 5834053b05..0000000000 --- a/gnulib/lib/dummy.c +++ /dev/null @@ -1,42 +0,0 @@ -/* A dummy file, to prevent empty libraries from breaking builds. - Copyright (C) 2004, 2007 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - This 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . */ - -/* Some systems, reportedly OpenBSD and Mac OS X, refuse to create - libraries without any object files. You might get an error like: - - > ar cru .libs/libgl.a - > ar: no archive members specified - - Compiling this file, and adding its object file to the library, will - prevent the library from being empty. */ - -/* Some systems, such as Solaris with cc 5.0, refuse to work with libraries - that don't export any symbol. You might get an error like: - - > cc ... libgnu.a - > ild: (bad file) garbled symbol table in archive ../gllib/libgnu.a - - Compiling this file, and adding its object file to the library, will - prevent the library from exporting no symbols. */ - -#ifdef __sun -/* This declaration ensures that the library will export at least 1 symbol. */ -int gl_dummy_symbol; -#else -/* This declaration is solely to ensure that after preprocessing - this file is never empty. */ -typedef int dummy; -#endif diff --git a/gnulib/lib/getaddrinfo.h b/gnulib/lib/getaddrinfo.h index f8623682ee..12f473b9e8 100644 --- a/gnulib/lib/getaddrinfo.h +++ b/gnulib/lib/getaddrinfo.h @@ -1,5 +1,5 @@ /* Get address information. - Copyright (C) 1996-2002, 2003, 2004, 2005, 2006 + Copyright (C) 1996-2002, 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. Contributed by Simon Josefsson . @@ -84,6 +84,14 @@ struct addrinfo # define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */ # define EAI_MEMORY -10 /* Memory allocation failure. */ #endif + +/* Since EAI_NODATA is deprecated by RFC3493, some systems (at least + FreeBSD, which does define EAI_BADFLAGS) have removed the definition + in favor of EAI_NONAME. */ +#if !defined EAI_NODATA && defined EAI_NONAME +# define EAI_NODATA EAI_NONAME +#endif + #ifndef EAI_OVERFLOW /* Not defined on mingw32. */ # define EAI_OVERFLOW -12 /* Argument buffer overflow. */ diff --git a/gnulib/m4/gnulib-cache.m4 b/gnulib/m4/gnulib-cache.m4 index d7498a8d69..3c817e0338 100644 --- a/gnulib/m4/gnulib-cache.m4 +++ b/gnulib/m4/gnulib-cache.m4 @@ -15,11 +15,11 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl getaddrinfo getpass gettext mktempd physmem poll posix-shell strndup strsep sys_stat useless-if-before-free vasprintf vc-list-files +# gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl c-ctype getaddrinfo getpass gettext mktempd physmem poll posix-shell strndup strsep sys_stat useless-if-before-free vasprintf vc-list-files # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) -gl_MODULES([getaddrinfo getpass gettext mktempd physmem poll posix-shell strndup strsep sys_stat useless-if-before-free vasprintf vc-list-files]) +gl_MODULES([c-ctype getaddrinfo getpass gettext mktempd physmem poll posix-shell strndup strsep sys_stat useless-if-before-free vasprintf vc-list-files]) gl_AVOID([]) gl_SOURCE_BASE([gnulib/lib]) gl_M4_BASE([gnulib/m4]) diff --git a/gnulib/m4/gnulib-comp.m4 b/gnulib/m4/gnulib-comp.m4 index 444531d77c..d3a9ffcc65 100644 --- a/gnulib/m4/gnulib-comp.m4 +++ b/gnulib/m4/gnulib-comp.m4 @@ -134,6 +134,8 @@ AC_DEFUN([gl_INIT], gt_TYPE_WCHAR_T gt_TYPE_WINT_T AC_CHECK_FUNCS([shutdown]) + abs_aux_dir=`cd "$ac_aux_dir"; pwd` + AC_SUBST([abs_aux_dir]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) @@ -237,7 +239,8 @@ AC_DEFUN([gl_FILE_LIST], [ lib/arpa_inet.in.h lib/asnprintf.c lib/asprintf.c - lib/dummy.c + lib/c-ctype.c + lib/c-ctype.h lib/float+.h lib/float.in.h lib/fseeko.c @@ -361,6 +364,7 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-EOVERFLOW.c tests/test-alloca-opt.c tests/test-arpa_inet.c + tests/test-c-ctype.c tests/test-fseeko.c tests/test-fseeko.sh tests/test-getaddrinfo.c @@ -382,6 +386,8 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-unistd.c tests/test-vasnprintf.c tests/test-vasprintf.c + tests/test-vc-list-files-cvs.sh + tests/test-vc-list-files-git.sh tests/test-wchar.c tests=lib/dummy.c tests=lib/intprops.h diff --git a/gnulib/m4/inet_ntop.m4 b/gnulib/m4/inet_ntop.m4 index 342cd28a47..25a3ee9b68 100644 --- a/gnulib/m4/inet_ntop.m4 +++ b/gnulib/m4/inet_ntop.m4 @@ -1,4 +1,4 @@ -# inet_ntop.m4 serial 5 +# inet_ntop.m4 serial 6 dnl Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -19,6 +19,9 @@ AC_DEFUN([gl_INET_NTOP], # Prerequisites of lib/inet_ntop.c. AC_DEFUN([gl_PREREQ_INET_NTOP], [ AC_CHECK_DECLS([inet_ntop],,,[#include ]) + if test $ac_cv_have_decl_inet_ntop = no; then + HAVE_DECL_INET_NTOP=0 + fi AC_REQUIRE([gl_SOCKET_FAMILIES]) AC_REQUIRE([AC_C_RESTRICT]) ]) diff --git a/gnulib/tests/Makefile.am b/gnulib/tests/Makefile.am index 3a50a19694..c52f3733fa 100644 --- a/gnulib/tests/Makefile.am +++ b/gnulib/tests/Makefile.am @@ -68,6 +68,15 @@ EXTRA_DIST += test-arpa_inet.c ## end gnulib module arpa_inet-tests +## begin gnulib module c-ctype-tests + +TESTS += test-c-ctype +check_PROGRAMS += test-c-ctype + +EXTRA_DIST += test-c-ctype.c + +## end gnulib module c-ctype-tests + ## begin gnulib module fseeko-tests TESTS += test-fseeko.sh @@ -247,6 +256,15 @@ EXTRA_DIST += test-vasprintf.c ## end gnulib module vasprintf-tests +## begin gnulib module vc-list-files-tests + +TESTS += test-vc-list-files-git.sh +TESTS += test-vc-list-files-cvs.sh +TESTS_ENVIRONMENT += PATH='$(abs_aux_dir)':"$$PATH" +EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh + +## end gnulib module vc-list-files-tests + ## begin gnulib module verify libtests_a_SOURCES += verify.h diff --git a/gnulib/tests/test-getaddrinfo.c b/gnulib/tests/test-getaddrinfo.c index 8d487cb5bf..530f8dc310 100644 --- a/gnulib/tests/test-getaddrinfo.c +++ b/gnulib/tests/test-getaddrinfo.c @@ -20,6 +20,7 @@ #include #include "getaddrinfo.h" #include +#include #include #include -- GitLab