]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Update gnulib files.
authorSimon Josefsson <simon@josefsson.org>
Mon, 10 Aug 2009 13:09:15 +0000 (15:09 +0200)
committerSimon Josefsson <simon@josefsson.org>
Mon, 10 Aug 2009 13:09:15 +0000 (15:09 +0200)
gl/m4/gnulib-comp.m4
gl/m4/sys_select_h.m4
gl/stdio-write.c
gl/sys_select.in.h
gl/tests/gettimeofday.c
gl/tests/test-sys_select.c
gl/tests/test-version-etc.sh
lib/gl/m4/gnulib-comp.m4
lib/gl/stdio-write.c
maint.mk

index cf3336d3ccdf9bb86b7662a2dbcdbb213e2af92a..e39c73a4d46e0b5566febf8fd426b2d28a8999f8 100644 (file)
@@ -75,8 +75,8 @@ AC_SUBST([LTALLOCA])
   gl_HEADER_ERRNO_H
   gl_ERROR
   m4_ifdef([AM_XGETTEXT_OPTION],
-    [AM_XGETTEXT_OPTION([--flag=error:3:c-format])
-     AM_XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+    [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
+     AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
   gl_FUNC_FCLOSE
   gl_STDIO_MODULE_INDICATOR([fclose])
   gl_FLOAT_H
index c48be2ce383ab443fec974a2e8e04d6d4340a80d..0bb097e1a7395af4f103fe94ce7b5de947705076 100644 (file)
@@ -1,4 +1,4 @@
-# sys_select_h.m4 serial 7
+# sys_select_h.m4 serial 8
 dnl Copyright (C) 2006-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,
@@ -11,10 +11,39 @@ AC_DEFUN([gl_HEADER_SYS_SELECT],
   AC_CACHE_CHECK([whether <sys/select.h> is self-contained],
     [gl_cv_header_sys_select_h_selfcontained],
     [
+      dnl Test against two bugs:
+      dnl 1. On many platforms, <sys/select.h> assumes prior inclusion of
+      dnl    <sys/types.h>.
+      dnl 2. On OSF/1 4.0, <sys/select.h> provides only a forward declaration
+      dnl    of 'struct timeval', and no definition of this type.
       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/select.h>]],
                                         [[struct timeval b;]])],
         [gl_cv_header_sys_select_h_selfcontained=yes],
         [gl_cv_header_sys_select_h_selfcontained=no])
+      dnl Test against another bug:
+      dnl 3. On Solaris 10, <sys/select.h> provides an FD_ZERO implementation
+      dnl    that relies on memset(), but without including <string.h>.
+      if test $gl_cv_header_sys_select_h_selfcontained = yes; then
+        AC_COMPILE_IFELSE(
+          [AC_LANG_PROGRAM([[#include <sys/select.h>]],
+                           [[int memset; int bzero;]])
+          ],
+          [AC_LINK_IFELSE(
+             [AC_LANG_PROGRAM([[#include <sys/select.h>]], [[
+                  #undef memset
+                  #define memset nonexistent_memset
+                  extern void *memset (void *, int, unsigned long);
+                  #undef bzero
+                  #define bzero nonexistent_bzero
+                  extern void bzero (void *, unsigned long);
+                  fd_set fds;
+                  FD_ZERO (&fds);
+                ]])
+             ],
+             [],
+             [gl_cv_header_sys_select_h_selfcontained=no])
+          ])
+      fi
     ])
   if test $gl_cv_header_sys_select_h_selfcontained = yes; then
     SYS_SELECT_H=''
index f1d0fcb730566c30b61714d872ae0d51a048afff..15cc5ed742c9bf15996a105c388ccf9145d2d030 100644 (file)
@@ -1,5 +1,5 @@
 /* POSIX compatible FILE stream write function.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008-2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
@@ -63,6 +63,7 @@
     }
 
 #  if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */
+#   if !DEPENDS_ON_LIBINTL /* avoid collision with intl/printf.c */
 int
 printf (const char *format, ...)
 {
@@ -75,6 +76,7 @@ printf (const char *format, ...)
 
   return retval;
 }
+#   endif
 #  endif
 
 #  if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */
@@ -92,7 +94,7 @@ fprintf (FILE *stream, const char *format, ...)
 }
 #  endif
 
-#  if !REPLACE_VFPRINTF_POSIX /* avoid collision with vprintf.c */
+#  if !REPLACE_VPRINTF_POSIX /* avoid collision with vprintf.c */
 int
 vprintf (const char *format, va_list args)
 {
@@ -100,7 +102,7 @@ vprintf (const char *format, va_list args)
 }
 #  endif
 
-#  if !REPLACE_VPRINTF_POSIX /* avoid collision with vfprintf.c */
+#  if !REPLACE_VFPRINTF_POSIX /* avoid collision with vfprintf.c */
 int
 vfprintf (FILE *stream, const char *format, va_list args)
 #undef vfprintf
index e87b7d04bb4c229d52ff8e12628962b3ef7a4d85..7d392a04aa08983ca2eb171e7437b606a9bf5d75 100644 (file)
 # include <sys/types.h>
 
 /* On OSF/1 4.0, <sys/select.h> provides only a forward declaration
-   of 'struct timeval', and no definition of this type..  */
+   of 'struct timeval', and no definition of this type.  */
 # include <sys/time.h>
 
+/* On Solaris 10, <sys/select.h> provides an FD_ZERO implementation
+   that relies on memset(), but without including <string.h>.  */
+# include <string.h>
+
 /* The include_next requires a split double-inclusion guard.  */
 # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
 
index eb6bf9c126762b5aef8d99a624da1efacf888f93..63ee747c0cc001aabc58292040fea75038608b59 100644 (file)
@@ -1,6 +1,6 @@
 /* Provide gettimeofday for systems that don't have it or for which it's broken.
 
-   Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 Free Software
+   Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2009 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -111,7 +111,7 @@ rpl_gettimeofday (struct timeval *restrict tv, void *restrict tz)
   struct tm save = *localtime_buffer_addr;
 # endif
 
-  int result = gettimeofday (tv, tz);
+  int result = gettimeofday (tv, (struct timezone *) tz);
 
 # if GETTIMEOFDAY_CLOBBERS_LOCALTIME
   *localtime_buffer_addr = save;
index 6449dafde76ecc9be1fbeb44e070fdeeb8d985bc..66079529ef6b6e758825ed8e378c3993ac422607 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <sys/select.h> substitute.
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-2009 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
@@ -26,5 +26,10 @@ struct timeval t1;
 int
 main ()
 {
+  /* Check that FD_ZERO can be used.  This should not yield a warning
+     such as "warning: implicit declaration of function 'memset'".  */
+  fd_set fds;
+  FD_ZERO (&fds);
+
   return 0;
 }
index 3b2fc4db806c8af2c8c7a891d20bbde2dcd4c6a8..c88bb93c39cd7052de986b098770795283278850 100755 (executable)
@@ -31,7 +31,7 @@ There is NO WARRANTY, to the extent permitted by law.
 Written by Sergey Poznyakoff and Eric Blake.
 EOT
 
-./test-version-etc --version |
+./test-version-etc${EXEEXT} --version |
  sed '2s/Copyright (C) [0-9]\{4,4\}/COPYRIGHT/' |
  diff -c $TMP - || ERR=1
 
index d11f04b93629132523ed2fee9f3246586f300c29..bc89db4dd1baa20353e90d545653f5fa8b305758 100644 (file)
@@ -95,8 +95,8 @@ AC_DEFUN([lgl_INIT],
   gl_FUNC_VASPRINTF
   gl_STDIO_MODULE_INDICATOR([vasprintf])
   m4_ifdef([AM_XGETTEXT_OPTION],
-    [AM_XGETTEXT_OPTION([--flag=asprintf:2:c-format])
-     AM_XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
+    [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
+     AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
   gl_FUNC_VSNPRINTF
   gl_STDIO_MODULE_INDICATOR([vsnprintf])
   gl_WCHAR_H
index 0abcfc4088a7d882de91b293a988574291be9dc8..01102d66cbbbec2134ea45061924a4ef47ef7409 100644 (file)
@@ -1,5 +1,5 @@
 /* POSIX compatible FILE stream write function.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008-2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
@@ -63,6 +63,7 @@
     }
 
 #  if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */
+#   if !DEPENDS_ON_LIBINTL /* avoid collision with intl/printf.c */
 int
 printf (const char *format, ...)
 {
@@ -75,6 +76,7 @@ printf (const char *format, ...)
 
   return retval;
 }
+#   endif
 #  endif
 
 #  if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */
@@ -92,7 +94,7 @@ fprintf (FILE *stream, const char *format, ...)
 }
 #  endif
 
-#  if !REPLACE_VFPRINTF_POSIX /* avoid collision with vprintf.c */
+#  if !REPLACE_VPRINTF_POSIX /* avoid collision with vprintf.c */
 int
 vprintf (const char *format, va_list args)
 {
@@ -100,7 +102,7 @@ vprintf (const char *format, va_list args)
 }
 #  endif
 
-#  if !REPLACE_VPRINTF_POSIX /* avoid collision with vfprintf.c */
+#  if !REPLACE_VFPRINTF_POSIX /* avoid collision with vfprintf.c */
 int
 vfprintf (FILE *stream, const char *format, va_list args)
 #undef vfprintf
index 2df7c046732bda4e7730b48e14caa4e4fb97ded3..a4ce064924756ddf28f7e7069add5a877ed9f004 100644 (file)
--- a/maint.mk
+++ b/maint.mk
@@ -772,11 +772,15 @@ 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 ?=
+
 # 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$$
 .PHONY: update-copyright
-update-copyright:
+update-copyright: $(update-copyright-local)
        grep -l -w Copyright $$($(VC_LIST_EXCEPT))              \
          | grep -v -E '$(update-copyright-exclude-regexp)'     \
          | xargs $(build_aux)/$@