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:
This commit is contained in:
Jim Meyering 2008-05-09 13:46:09 +00:00
parent 5e1bd04692
commit 82892f131b
12 changed files with 87 additions and 66 deletions

View File

@ -1,3 +1,19 @@
Fri May 9 15:45:39 CEST 2008 Jim Meyering <meyering@redhat.com>
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 <veillard@redhat.com>
* src/xen_unified.c src/xend_internal.c src/xend_internal.h: patch

View File

@ -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 \

View File

@ -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:

View File

@ -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

View File

@ -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 \

View File

@ -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 <http://www.gnu.org/licenses/>. */
/* 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

View File

@ -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 <simon@josefsson.org>.
@ -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. */

View File

@ -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])

View File

@ -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

View File

@ -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 <arpa/inet.h>])
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])
])

View File

@ -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

View File

@ -20,6 +20,7 @@
#include <config.h>
#include "getaddrinfo.h"
#include <arpa/inet.h>
#include <netinet/in.h>
#include <stdio.h>
#include <string.h>