From b475e3b8e497ef459fb227e8b37383ca86a0320b Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 18 Aug 2009 23:46:10 +0200 Subject: Update gnulib files. --- gl/stdio.in.h | 3 +++ lib/gl/Makefile.am | 11 +---------- lib/gl/m4/gnulib-cache.m4 | 3 +-- lib/gl/m4/gnulib-comp.m4 | 3 --- lib/gl/m4/memmove.m4 | 18 ------------------ lib/gl/memmove.c | 26 -------------------------- lib/gl/stdio.in.h | 3 +++ maint.mk | 19 ++++++++++--------- 8 files changed, 18 insertions(+), 68 deletions(-) delete mode 100644 lib/gl/m4/memmove.m4 delete mode 100644 lib/gl/memmove.c diff --git a/gl/stdio.in.h b/gl/stdio.in.h index 0445c6f107..b659b6703a 100644 --- a/gl/stdio.in.h +++ b/gl/stdio.in.h @@ -414,6 +414,9 @@ extern long rpl_ftell (FILE *fp); # if @REPLACE_FPURGE@ || !@HAVE_DECL_FPURGE@ /* Discard all pending buffered I/O data on STREAM. STREAM must not be wide-character oriented. + When discarding pending output, the file position is set back to where it + was before the write calls. When discarding pending input, the file + position is advanced to match the end of the previously read input. Return 0 if successful. Upon error, return -1 and set errno. */ extern int fpurge (FILE *gl_stream); # endif diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am index 598561d568..a0e3cd44c3 100644 --- a/lib/gl/Makefile.am +++ b/lib/gl/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=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext lib-msvc-compat lib-symbol-versions memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf vsnprintf +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext lib-msvc-compat lib-symbol-versions memmem-simple minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf vsnprintf AUTOMAKE_OPTIONS = 1.5 gnits @@ -224,15 +224,6 @@ EXTRA_liblgnu_la_SOURCES += memmem.c ## end gnulib module memmem-simple -## begin gnulib module memmove - - -EXTRA_DIST += memmove.c - -EXTRA_liblgnu_la_SOURCES += memmove.c - -## end gnulib module memmove - ## begin gnulib module minmax liblgnu_la_SOURCES += minmax.h diff --git a/lib/gl/m4/gnulib-cache.m4 b/lib/gl/m4/gnulib-cache.m4 index eb846ec907..de6f4c74a4 100644 --- a/lib/gl/m4/gnulib-cache.m4 +++ b/lib/gl/m4/gnulib-cache.m4 @@ -15,7 +15,7 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext lib-msvc-compat lib-symbol-versions memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf vsnprintf +# gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext lib-msvc-compat lib-symbol-versions memmem-simple minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf vsnprintf # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([gl/override]) @@ -28,7 +28,6 @@ gl_MODULES([ lib-msvc-compat lib-symbol-versions memmem-simple - memmove minmax netdb read-file diff --git a/lib/gl/m4/gnulib-comp.m4 b/lib/gl/m4/gnulib-comp.m4 index 36c449e1dd..7f3142d5b7 100644 --- a/lib/gl/m4/gnulib-comp.m4 +++ b/lib/gl/m4/gnulib-comp.m4 @@ -63,7 +63,6 @@ AC_DEFUN([lgl_INIT], gl_STRING_MODULE_INDICATOR([memchr]) gl_FUNC_MEMMEM_SIMPLE gl_STRING_MODULE_INDICATOR([memmem]) - gl_FUNC_MEMMOVE gl_MINMAX gl_MULTIARCH gl_HEADER_NETDB @@ -257,7 +256,6 @@ AC_DEFUN([lgl_FILE_LIST], [ lib/memchr.c lib/memchr.valgrind lib/memmem.c - lib/memmove.c lib/minmax.h lib/netdb.in.h lib/printf-args.c @@ -332,7 +330,6 @@ AC_DEFUN([lgl_FILE_LIST], [ m4/malloc.m4 m4/memchr.m4 m4/memmem.m4 - m4/memmove.m4 m4/minmax.m4 m4/mmap-anon.m4 m4/multiarch.m4 diff --git a/lib/gl/m4/memmove.m4 b/lib/gl/m4/memmove.m4 deleted file mode 100644 index 0b01cc6c0c..0000000000 --- a/lib/gl/m4/memmove.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# memmove.m4 serial 3 -dnl Copyright (C) 2002, 2009 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_FUNC_MEMMOVE], -[ - AC_REPLACE_FUNCS([memmove]) - if test $ac_cv_func_memmove = no; then - gl_PREREQ_MEMMOVE - fi -]) - -# Prerequisites of lib/memmove.c. -AC_DEFUN([gl_PREREQ_MEMMOVE], [ - : -]) diff --git a/lib/gl/memmove.c b/lib/gl/memmove.c deleted file mode 100644 index c5ff8b520d..0000000000 --- a/lib/gl/memmove.c +++ /dev/null @@ -1,26 +0,0 @@ -/* memmove.c -- copy memory. - Copy LENGTH bytes from SOURCE to DEST. Does not null-terminate. - In the public domain. - By David MacKenzie . */ - -#include - -#include - -void * -memmove (void *dest0, void const *source0, size_t length) -{ - char *dest = dest0; - char const *source = source0; - if (source < dest) - /* Moving from low mem to hi mem; start at end. */ - for (source += length, dest += length; length; --length) - *--dest = *--source; - else if (source != dest) - { - /* Moving from hi mem to low mem; start at beginning. */ - for (; length; --length) - *dest++ = *source++; - } - return dest0; -} diff --git a/lib/gl/stdio.in.h b/lib/gl/stdio.in.h index 1d194fa498..e04799bc9d 100644 --- a/lib/gl/stdio.in.h +++ b/lib/gl/stdio.in.h @@ -414,6 +414,9 @@ extern long rpl_ftell (FILE *fp); # if @REPLACE_FPURGE@ || !@HAVE_DECL_FPURGE@ /* Discard all pending buffered I/O data on STREAM. STREAM must not be wide-character oriented. + When discarding pending output, the file position is set back to where it + was before the write calls. When discarding pending input, the file + position is advanced to match the end of the previously read input. Return 0 if successful. Upon error, return -1 and set errno. */ extern int fpurge (FILE *gl_stream); # endif diff --git a/maint.mk b/maint.mk index 5d7c45e66e..4108177678 100644 --- a/maint.mk +++ b/maint.mk @@ -38,7 +38,8 @@ VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)' VC_LIST = $(build_aux)/vc-list-files -C $(srcdir) VC_LIST_EXCEPT = \ - $(VC_LIST) | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; else grep -v ChangeLog; fi + $(VC_LIST) | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \ + else grep -Ev "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi ifeq ($(origin prev_version_file), undefined) prev_version_file = $(srcdir)/.prev-version @@ -772,19 +773,19 @@ INDENT_SOURCES ?= $(C_SOURCES) indent: indent $(INDENT_SOURCES) -# If you have an additional project-specific rule, -# define it in cfg.mk and set this variable to its name. -update-copyright-local ?= - # If you want to set UPDATE_COPYRIGHT_* environment variables, # put the assignments in this variable. update-copyright-env ?= # Run this rule once per year (usually early in January) # to update all FSF copyright year lists in your project. -update-copyright-exclude-regexp ?= (^|/)COPYING$$ +# If you have an additional project-specific rule, +# add it in cfg.mk along with a line 'update-copyright: prereq'. +# By default, exclude all variants of COPYING; you can also +# add exemptions (such as ChangeLog..* for rotated change logs) +# in the file .x-update-copyright. .PHONY: update-copyright -update-copyright: $(update-copyright-local) - grep -l -w Copyright $$($(VC_LIST_EXCEPT)) \ - | grep -v -E '$(update-copyright-exclude-regexp)' \ +update-copyright: + grep -l -w Copyright \ + $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \ | $(update-copyright-env) xargs $(build_aux)/$@ -- cgit v1.2.1