From 55d0a6859696c95fd168ca191407253e552d2758 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 7 Jan 2009 17:10:00 +0000 Subject: [PATCH] bootstrap: pull in gnulib's ioctl module * bootstrap: Invoke gnulib-tool with its --no-vc-files option, since we version-control the files it imports. This tells it not to mark imported files as cvs-ignored. (modules): Add ioctl. * gnulib/lib/ioctl.c: New file. * gnulib/lib/sys_ioctl.in.h: New file. * gnulib/tests/sys_ioctl.in.h: Removed. * gnulib/tests/ioctl.c: Removed. * gnulib/lib/Makefile.am: Update. * gnulib/m4/gnulib-cache.m4: Likewise. * gnulib/m4/gnulib-comp.m4: Likewise. * gnulib/tests/Makefile.am: Likewise. * gnulib/lib/.cvsignore: Ignore sys_ioctl.h. * gnulib/lib/.gitignore: Regenerate. --- ChangeLog | 16 ++++++++++++ bootstrap | 2 ++ gnulib/lib/.cvsignore | 1 + gnulib/lib/.gitignore | 1 + gnulib/lib/Makefile.am | 38 +++++++++++++++++++++++++++- gnulib/{tests => lib}/ioctl.c | 8 +++--- gnulib/{tests => lib}/sys_ioctl.in.h | 8 +++--- gnulib/m4/gnulib-cache.m4 | 4 ++- gnulib/m4/gnulib-comp.m4 | 22 ++++++++-------- gnulib/tests/Makefile.am | 36 -------------------------- 10 files changed, 79 insertions(+), 57 deletions(-) rename gnulib/{tests => lib}/ioctl.c (78%) rename gnulib/{tests => lib}/sys_ioctl.in.h (85%) diff --git a/ChangeLog b/ChangeLog index 03f59df7e2..42d019d368 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,21 @@ Wed Jan 7 17:12:33 +0100 2009 Jim Meyering + bootstrap: pull in gnulib's ioctl module + * bootstrap: Invoke gnulib-tool with its --no-vc-files + option, since we version-control the files it imports. + This tells it not to mark imported files as cvs-ignored. + (modules): Add ioctl. + * gnulib/lib/ioctl.c: New file. + * gnulib/lib/sys_ioctl.in.h: New file. + * gnulib/tests/sys_ioctl.in.h: Removed. + * gnulib/tests/ioctl.c: Removed. + * gnulib/lib/Makefile.am: Update. + * gnulib/m4/gnulib-cache.m4: Likewise. + * gnulib/m4/gnulib-comp.m4: Likewise. + * gnulib/tests/Makefile.am: Likewise. + * gnulib/lib/.cvsignore: Ignore sys_ioctl.h. + * gnulib/lib/.gitignore: Regenerate. + ignore generated libvirtd.logrotate. * qemud/.cvsignore: Add libvirtd.logrotate. * qemud/.gitignore: Regenerate. diff --git a/bootstrap b/bootstrap index c5487b2569..38dd3ae1ad 100755 --- a/bootstrap +++ b/bootstrap @@ -73,6 +73,7 @@ gethostname getpass gettext inet_pton +ioctl mkstemp mktempd perror @@ -100,6 +101,7 @@ vc-list-files # put *.[ch] files in new gnulib/lib/ dir. $gnulib_tool \ + --no-vc-files \ --lgpl=2 \ --with-tests \ --m4-base=gnulib/m4 \ diff --git a/gnulib/lib/.cvsignore b/gnulib/lib/.cvsignore index 5a82aa0c45..9d6b35f849 100644 --- a/gnulib/lib/.cvsignore +++ b/gnulib/lib/.cvsignore @@ -16,6 +16,7 @@ stdint.h stdio.h stdlib.h string.h +sys_ioctl.h sys_select.h sys_socket.h sys_stat.h diff --git a/gnulib/lib/.gitignore b/gnulib/lib/.gitignore index 5a82aa0c45..9d6b35f849 100644 --- a/gnulib/lib/.gitignore +++ b/gnulib/lib/.gitignore @@ -16,6 +16,7 @@ stdint.h stdio.h stdlib.h string.h +sys_ioctl.h sys_select.h sys_socket.h sys_stat.h diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am index 528142e520..746881c6fe 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 --tests-base=gnulib/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl c-ctype close connect getaddrinfo gethostname getpass gettext inet_pton mkstemp mktempd perror physmem poll posix-shell recv send setsockopt socket strerror strndup strsep sys_stat time_r useless-if-before-free vasprintf vc-list-files verify +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl --no-vc-files c-ctype close connect getaddrinfo gethostname getpass gettext inet_pton ioctl mkstemp mktempd perror physmem poll posix-shell recv send setsockopt socket strerror strndup strsep sys_stat time_r useless-if-before-free vasprintf vc-list-files verify AUTOMAKE_OPTIONS = 1.5 gnits @@ -291,6 +291,15 @@ EXTRA_DIST += intprops.h ## end gnulib module intprops +## begin gnulib module ioctl + + +EXTRA_DIST += ioctl.c w32sock.h + +EXTRA_libgnu_la_SOURCES += ioctl.c + +## end gnulib module ioctl + ## begin gnulib module link-warning LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h @@ -831,6 +840,33 @@ EXTRA_libgnu_la_SOURCES += strsep.c ## end gnulib module strsep +## begin gnulib module sys_ioctl + +BUILT_SOURCES += $(SYS_IOCTL_H) + +# We need the following in order to create when the system +# does not have a complete one. +sys/ioctl.h: sys_ioctl.in.h + @MKDIR_P@ sys + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''NEXT_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \ + -e 's|@''GNULIB_IOCTL''@|$(GNULIB_IOCTL)|g' \ + -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ + < $(srcdir)/sys_ioctl.in.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += sys/ioctl.h sys/ioctl.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_ioctl.in.h + +## end gnulib module sys_ioctl + ## begin gnulib module sys_select BUILT_SOURCES += $(SYS_SELECT_H) diff --git a/gnulib/tests/ioctl.c b/gnulib/lib/ioctl.c similarity index 78% rename from gnulib/tests/ioctl.c rename to gnulib/lib/ioctl.c index a23d363bc5..77e01015d4 100644 --- a/gnulib/tests/ioctl.c +++ b/gnulib/lib/ioctl.c @@ -3,16 +3,16 @@ Copyright (C) 2008 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 + 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 General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Paolo Bonzini */ diff --git a/gnulib/tests/sys_ioctl.in.h b/gnulib/lib/sys_ioctl.in.h similarity index 85% rename from gnulib/tests/sys_ioctl.in.h rename to gnulib/lib/sys_ioctl.in.h index 65c2c4a452..6ce02d4036 100644 --- a/gnulib/tests/sys_ioctl.in.h +++ b/gnulib/lib/sys_ioctl.in.h @@ -2,16 +2,16 @@ Copyright (C) 2008 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) + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1, 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. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ diff --git a/gnulib/m4/gnulib-cache.m4 b/gnulib/m4/gnulib-cache.m4 index 9eb606409e..77a285f766 100644 --- a/gnulib/m4/gnulib-cache.m4 +++ b/gnulib/m4/gnulib-cache.m4 @@ -15,7 +15,7 @@ # 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 --tests-base=gnulib/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl c-ctype close connect getaddrinfo gethostname getpass gettext inet_pton mkstemp mktempd perror physmem poll posix-shell recv send setsockopt socket strerror strndup strsep sys_stat time_r useless-if-before-free vasprintf vc-list-files verify +# gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl --no-vc-files c-ctype close connect getaddrinfo gethostname getpass gettext inet_pton ioctl mkstemp mktempd perror physmem poll posix-shell recv send setsockopt socket strerror strndup strsep sys_stat time_r useless-if-before-free vasprintf vc-list-files verify # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) @@ -28,6 +28,7 @@ gl_MODULES([ getpass gettext inet_pton + ioctl mkstemp mktempd perror @@ -61,3 +62,4 @@ gl_MAKEFILE_NAME([]) gl_LIBTOOL gl_MACRO_PREFIX([gl]) gl_PO_DOMAIN([]) +gl_VC_FILES([false]) diff --git a/gnulib/m4/gnulib-comp.m4 b/gnulib/m4/gnulib-comp.m4 index 072b9f0f74..1393b97b70 100644 --- a/gnulib/m4/gnulib-comp.m4 +++ b/gnulib/m4/gnulib-comp.m4 @@ -82,6 +82,13 @@ AC_SUBST([LTALLOCA]) gl_ARPA_INET_MODULE_INDICATOR([inet_ntop]) gl_INET_PTON gl_ARPA_INET_MODULE_INDICATOR([inet_pton]) + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([ioctl]) + gl_REPLACE_SYS_IOCTL_H + fi + gl_SYS_IOCTL_MODULE_INDICATOR([ioctl]) + gl_MODULE_INDICATOR([ioctl]) gl_FUNC_LSEEK gl_UNISTD_MODULE_INDICATOR([lseek]) gl_FUNC_LSTAT @@ -141,6 +148,8 @@ AC_SUBST([LTALLOCA]) gl_STRING_MODULE_INDICATOR([strnlen]) gl_FUNC_STRSEP gl_STRING_MODULE_INDICATOR([strsep]) + gl_SYS_IOCTL_H + AC_PROG_MKDIR_P gl_HEADER_SYS_SELECT AC_PROG_MKDIR_P gl_HEADER_SYS_SOCKET @@ -212,13 +221,6 @@ AC_SUBST([LTALLOCA]) fi gl_SYS_SOCKET_MODULE_INDICATOR([bind]) AC_REQUIRE([gl_HEADER_SYS_SOCKET]) - if test "$ac_cv_header_winsock2_h" = yes; then - AC_LIBOBJ([ioctl]) - gl_REPLACE_SYS_IOCTL_H - fi - gl_SYS_IOCTL_MODULE_INDICATOR([ioctl]) - gl_MODULE_INDICATOR([ioctl]) - AC_REQUIRE([gl_HEADER_SYS_SOCKET]) if test "$ac_cv_header_winsock2_h" = yes; then AC_LIBOBJ([listen]) fi @@ -227,8 +229,6 @@ AC_SUBST([LTALLOCA]) gl_SOCKETS gt_TYPE_WCHAR_T gt_TYPE_WINT_T - gl_SYS_IOCTL_H - AC_PROG_MKDIR_P AC_CHECK_FUNCS([shutdown]) abs_aux_dir=`cd "$ac_aux_dir"; pwd` AC_SUBST([abs_aux_dir]) @@ -354,6 +354,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/inet_ntop.c lib/inet_pton.c lib/intprops.h + lib/ioctl.c lib/lseek.c lib/lstat.c lib/malloc.c @@ -388,6 +389,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/strndup.c lib/strnlen.c lib/strsep.c + lib/sys_ioctl.in.h lib/sys_select.in.h lib/sys_socket.in.h lib/sys_stat.in.h @@ -535,10 +537,8 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-wchar.c tests=lib/accept.c tests=lib/bind.c - tests=lib/ioctl.c tests=lib/listen.c tests=lib/sockets.c tests=lib/sockets.h - tests=lib/sys_ioctl.in.h tests=lib/w32sock.h ]) diff --git a/gnulib/tests/Makefile.am b/gnulib/tests/Makefile.am index 4273d6cc12..ea40a21e6e 100644 --- a/gnulib/tests/Makefile.am +++ b/gnulib/tests/Makefile.am @@ -150,15 +150,6 @@ EXTRA_DIST += test-gettimeofday.c ## end gnulib module gettimeofday-tests -## begin gnulib module ioctl - - -EXTRA_DIST += ioctl.c w32sock.h - -EXTRA_libtests_a_SOURCES += ioctl.c - -## end gnulib module ioctl - ## begin gnulib module listen @@ -298,33 +289,6 @@ EXTRA_DIST += test-string.c ## end gnulib module string-tests -## begin gnulib module sys_ioctl - -BUILT_SOURCES += $(SYS_IOCTL_H) - -# We need the following in order to create when the system -# does not have a complete one. -sys/ioctl.h: sys_ioctl.in.h - @MKDIR_P@ sys - rm -f $@-t $@ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''NEXT_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \ - -e 's|@''GNULIB_IOCTL''@|$(GNULIB_IOCTL)|g' \ - -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \ - -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ - < $(srcdir)/sys_ioctl.in.h; \ - } > $@-t - mv $@-t $@ -MOSTLYCLEANFILES += sys/ioctl.h sys/ioctl.h-t -MOSTLYCLEANDIRS += sys - -EXTRA_DIST += sys_ioctl.in.h - -## end gnulib module sys_ioctl - ## begin gnulib module sys_select-tests TESTS += test-sys_select