gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_2_9_7-46-gd2c494e


From: Simon Josefsson
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_9_7-46-gd2c494e
Date: Tue, 03 Nov 2009 06:45:09 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=d2c494ec61ef25d704e14b3c8ca62e4869c085be

The branch, master has been updated
       via  d2c494ec61ef25d704e14b3c8ca62e4869c085be (commit)
       via  ee594d6c64f09259d6e80568de4f533c08bc93aa (commit)
      from  e3a268ca8093434d04f351a77e374f8adf63c0a5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d2c494ec61ef25d704e14b3c8ca62e4869c085be
Author: Simon Josefsson <address@hidden>
Date:   Tue Nov 3 07:45:02 2009 +0100

    Use INET_NTOP_LIB and INET_PTON_LIB.

commit ee594d6c64f09259d6e80568de4f533c08bc93aa
Author: Simon Josefsson <address@hidden>
Date:   Tue Nov 3 07:41:31 2009 +0100

    Update gnulib files.

-----------------------------------------------------------------------

Summary of changes:
 build-aux/pmccabe2html           |    5 +++--
 build-aux/useless-if-before-free |    5 ++++-
 doc/examples/Makefile.am         |    2 +-
 gl/m4/fseeko.m4                  |    9 ++++++---
 gl/m4/gnulib-comp.m4             |    2 --
 gl/m4/inet_ntop.m4               |   16 ++++++++--------
 gl/m4/inet_pton.m4               |   15 +++++++++++++--
 gl/m4/pmccabe2html.m4            |   14 --------------
 gl/m4/ungetc.m4                  |    4 ++--
 gl/sockets.c                     |   10 +++++-----
 gl/stdio.in.h                    |   18 ++++++++++++++++--
 gl/sys_stat.in.h                 |   10 +++++++++-
 gl/tests/test-arpa_inet.c        |    4 ++--
 gl/tests/test-getaddrinfo.c      |    3 ++-
 gl/tests/test-getdelim.c         |    4 ++--
 gl/tests/test-getline.c          |    4 ++--
 gl/tests/test-gettimeofday.c     |    4 ++--
 gl/tests/test-memchr.c           |    6 ++----
 gl/tests/test-netinet_in.c       |    4 ++--
 gl/tests/test-select-stdin.c     |    4 ++--
 gl/tests/test-select.c           |    4 ++--
 gl/tests/test-sockets.c          |    2 +-
 gl/tests/test-stddef.c           |    2 +-
 gl/tests/test-stdint.c           |    4 ++--
 gl/tests/test-stdio.c            |    2 +-
 gl/tests/test-stdlib.c           |    2 +-
 gl/tests/test-strerror.c         |    4 ++--
 gl/tests/test-string.c           |    2 +-
 gl/tests/test-sys_select.c       |    2 +-
 gl/tests/test-sys_socket.c       |    2 +-
 gl/tests/test-sys_stat.c         |    2 +-
 gl/tests/test-sys_time.c         |    4 ++--
 gl/tests/test-time.c             |    2 +-
 gl/tests/test-unistd.c           |    2 +-
 gl/tests/test-version-etc.c      |    2 +-
 gl/tests/test-wchar.c            |    2 +-
 lib/gl/m4/fseeko.m4              |    9 ++++++---
 lib/gl/m4/ungetc.m4              |    4 ++--
 lib/gl/sockets.c                 |   10 +++++-----
 lib/gl/stdio.in.h                |   18 ++++++++++++++++--
 lib/gl/sys_stat.in.h             |   10 +++++++++-
 lib/gl/tests/test-memchr.c       |    6 ++----
 lib/gl/tests/test-sockets.c      |    2 +-
 lib/gl/tests/test-stddef.c       |    2 +-
 lib/gl/tests/test-stdint.c       |    4 ++--
 lib/gl/tests/test-stdio.c        |    2 +-
 lib/gl/tests/test-stdlib.c       |    2 +-
 lib/gl/tests/test-string.c       |    2 +-
 lib/gl/tests/test-strverscmp.c   |    4 ++--
 lib/gl/tests/test-sys_socket.c   |    2 +-
 lib/gl/tests/test-sys_stat.c     |    2 +-
 lib/gl/tests/test-time.c         |    2 +-
 lib/gl/tests/test-unistd.c       |    2 +-
 lib/gl/tests/test-wchar.c        |    2 +-
 libextra/gl/md5.c                |   13 ++++++++++---
 maint.mk                         |    6 ++++++
 src/Makefile.am                  |    2 +-
 tests/Makefile.am                |    2 +-
 58 files changed, 175 insertions(+), 116 deletions(-)
 delete mode 100644 gl/m4/pmccabe2html.m4

diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html
index 27bb8f3..bc0f6e8 100755
--- a/build-aux/pmccabe2html
+++ b/build-aux/pmccabe2html
@@ -1,7 +1,8 @@
-#!/usr/bin/awk -f
+#!/bin/sh
+exec awk -f "$0" "$@"
 # pmccabe2html - pmccabe to html converter
 
-# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 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
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
index abcdef2..793c975 100755
--- a/build-aux/useless-if-before-free
+++ b/build-aux/useless-if-before-free
@@ -1,4 +1,6 @@
-#!/usr/bin/perl -T
+eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}'
+  & eval 'exec perl -wST "$0" $argv:q'
+    if 0;
 # Detect instances of "if (p) free (p);".
 # Likewise for "if (p != NULL) free (p);".  And with braces.
 # Also detect "if (NULL != p) free (p);".
@@ -197,6 +199,7 @@ When modifying files, refuse to process anything other than 
a regular file.
 EOF
 
 ## Local Variables:
+## mode: perl
 ## indent-tabs-mode: nil
 ## eval: (add-hook 'write-file-hooks 'time-stamp)
 ## time-stamp-start: "my $VERSION = '"
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index f5bc40a..ee8a4a0 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -30,7 +30,7 @@ LDADD = libexamples.la                                \
        ../../lib/libgnutls.la                  \
        ../../libextra/libgnutls-extra.la       \
        ../../gl/libgnu.la                      \
-       $(LIBSOCKET)
+       $(LIBSOCKET) $(INET_NTOP_LIB) $(INET_PTON_LIB)
 
 CXX_LDADD = $(LDADD) \
        ../../lib/libgnutlsxx.la
diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4
index 3d77365..a370648 100644
--- a/gl/m4/fseeko.m4
+++ b/gl/m4/fseeko.m4
@@ -1,5 +1,5 @@
-# fseeko.m4 serial 4
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# fseeko.m4 serial 6
+dnl Copyright (C) 2007-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.
@@ -15,7 +15,8 @@ AC_DEFUN([gl_FUNC_FSEEKO],
 
   AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko],
     [
-      AC_TRY_LINK([#include <stdio.h>], [fseeko (stdin, 0, 0);],
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+]], [fseeko (stdin, 0, 0);])],
        [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
     ])
   if test $gl_cv_func_fseeko = no; then
@@ -31,4 +32,6 @@ AC_DEFUN([gl_REPLACE_FSEEKO],
   AC_LIBOBJ([fseeko])
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   REPLACE_FSEEKO=1
+  dnl If we are also using the fseek module, then fseek needs replacing, too.
+  m4_ifdef([gl_REPLACE_FSEEK], [gl_REPLACE_FSEEK])
 ])
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 045b826..669e6d8 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -124,7 +124,6 @@ AC_SUBST([LTALLOCA])
   AC_PROG_MKDIR_P
   gl_FUNC_PERROR
   gl_STRING_MODULE_INDICATOR([perror])
-  gl_PMCCABE2HTML
   AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
   AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
   gl_FUNC_READ_FILE
@@ -481,7 +480,6 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/netdb_h.m4
   m4/netinet_in_h.m4
   m4/perror.m4
-  m4/pmccabe2html.m4
   m4/printf.m4
   m4/read-file.m4
   m4/readline.m4
diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4
index 2bbdca1..85a6bb6 100644
--- a/gl/m4/inet_ntop.m4
+++ b/gl/m4/inet_ntop.m4
@@ -1,4 +1,4 @@
-# inet_ntop.m4 serial 9
+# inet_ntop.m4 serial 10
 dnl Copyright (C) 2005, 2006, 2008, 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,17 +11,17 @@ AC_DEFUN([gl_INET_NTOP],
 
   gl_REPLACE_ARPA_INET_H
 
-  dnl The AC_SEARCH_LIBS call is a hack to persuade the Solaris 8 linker to
-  dnl find inet_ntop.
-  dnl
-  dnl It is the responsibility of gl_INET_NTOP's caller to arrange for
-  dnl -lnsl if it is needed.  Normally -lnsl is not needed on Solaris 8,
-  dnl since inet_ntop is needed only by getaddrinfo, and getaddrinfo
-  dnl isn't built on Solaris 8.
+  dnl Most platforms that provide inet_ntop define it in libc.
+  dnl Solaris 8..10 provide inet_ntop in libnsl instead.
   gl_save_LIBS=$LIBS
   AC_SEARCH_LIBS([inet_ntop], [nsl], [],
     [AC_REPLACE_FUNCS([inet_ntop])])
   LIBS=$gl_save_LIBS
+  INET_NTOP_LIB=
+  if test "$ac_cv_search_inet_ntop" != "none needed"; then
+    INET_NTOP_LIB="$ac_cv_search_inet_ntop"
+  fi
+  AC_SUBST([INET_NTOP_LIB])
 
   gl_PREREQ_INET_NTOP
 ])
diff --git a/gl/m4/inet_pton.m4 b/gl/m4/inet_pton.m4
index e0ec432..f071801 100644
--- a/gl/m4/inet_pton.m4
+++ b/gl/m4/inet_pton.m4
@@ -1,4 +1,4 @@
-# inet_pton.m4 serial 7
+# inet_pton.m4 serial 8
 dnl Copyright (C) 2006, 2008, 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,7 +11,18 @@ AC_DEFUN([gl_INET_PTON],
 
   gl_REPLACE_ARPA_INET_H
 
-  AC_REPLACE_FUNCS([inet_pton])
+  dnl Most platforms that provide inet_pton define it in libc.
+  dnl Solaris 8..10 provide inet_pton in libnsl instead.
+  gl_save_LIBS=$LIBS
+  AC_SEARCH_LIBS([inet_pton], [nsl], [],
+    [AC_REPLACE_FUNCS([inet_pton])])
+  LIBS=$gl_save_LIBS
+  INET_PTON_LIB=
+  if test "$ac_cv_search_inet_pton" != "none needed"; then
+    INET_PTON_LIB="$ac_cv_search_inet_pton"
+  fi
+  AC_SUBST([INET_PTON_LIB])
+
   gl_PREREQ_INET_PTON
 ])
 
diff --git a/gl/m4/pmccabe2html.m4 b/gl/m4/pmccabe2html.m4
deleted file mode 100644
index 2985f7c..0000000
--- a/gl/m4/pmccabe2html.m4
+++ /dev/null
@@ -1,14 +0,0 @@
-# pmccabe2html.m4 serial 2
-dnl Copyright (C) 2008, 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.
-
-dnl From Simon Josefsson
-
-# Usage: gl_PMCCABE2HTML([]).
-AC_DEFUN([gl_PMCCABE2HTML],
-[
-  AC_REQUIRE([AC_PROG_AWK])
-  AC_PATH_PROG([PMCCABE], [pmccabe], [false])
-])
diff --git a/gl/m4/ungetc.m4 b/gl/m4/ungetc.m4
index 9236d4c..eb65235 100644
--- a/gl/m4/ungetc.m4
+++ b/gl/m4/ungetc.m4
@@ -1,4 +1,4 @@
-# ungetc.m4 serial 1
+# ungetc.m4 serial 2
 dnl Copyright (C) 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,
@@ -12,7 +12,7 @@ AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
     [gl_cv_func_ungetc_works],
     [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
 #include <stdio.h>
-      ]], [FILE *f; long l;
+      ]], [FILE *f;
           if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
           if (fputs ("abc", f) < 0) return 2;
           rewind (f);
diff --git a/gl/sockets.c b/gl/sockets.c
index 7cb9981..cb169f8 100644
--- a/gl/sockets.c
+++ b/gl/sockets.c
@@ -25,12 +25,12 @@
 #if WINDOWS_SOCKETS
 
 /* This includes winsock2.h on MinGW. */
-#include <sys/socket.h>
+# include <sys/socket.h>
 
-#include "close-hook.h"
+# include "close-hook.h"
 
 /* Get set_winsock_errno, FD_TO_SOCKET etc. */
-#include "w32sock.h"
+# include "w32sock.h"
 
 static int
 close_fd_maybe_socket (int fd, const struct close_hook *remaining_list)
@@ -71,10 +71,10 @@ static struct close_hook close_sockets_hook;
 
 static int initialized_sockets_version /* = 0 */;
 
-#endif
+#endif /* WINDOWS_SOCKETS */
 
 int
-gl_sockets_startup (int version)
+gl_sockets_startup (int version _UNUSED_PARAMETER_)
 {
 #if WINDOWS_SOCKETS
   if (version > initialized_sockets_version)
diff --git a/gl/stdio.in.h b/gl/stdio.in.h
index 5002acc..ee53703 100644
--- a/gl/stdio.in.h
+++ b/gl/stdio.in.h
@@ -227,7 +227,14 @@ extern int rpl_fseek (FILE *fp, long offset, int whence);
    fflush(), and which detect pipes.  */
 #  define fseeko rpl_fseeko
 extern int fseeko (FILE *fp, off_t offset, int whence);
-#  define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence)
+#  if address@hidden@
+#   undef fseek
+#   define fseek(f,o,w) \
+     (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
+                       "on 32-bit platforms - " \
+                       "use fseeko function for handling of large files"), \
+      fseeko (f, o, w))
+#  endif
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef fseeko
@@ -263,7 +270,14 @@ extern long rpl_ftell (FILE *fp);
 # if @REPLACE_FTELLO@
 #  define ftello rpl_ftello
 extern off_t ftello (FILE *fp);
-#  define ftell(fp) ftello (fp)
+#  if address@hidden@
+#   undef ftell
+#   define ftell(f) \
+     (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
+                       "on 32-bit platforms - " \
+                       "use ftello function for handling of large files"), \
+      ftello (f))
+#  endif
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef ftello
diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h
index 875f064..98b3689 100644
--- a/gl/sys_stat.in.h
+++ b/gl/sys_stat.in.h
@@ -456,7 +456,15 @@ int mknodat (int fd, char const *file, mode_t mode, dev_t 
dev);
    struct stat.  This means that rpl_stat will not be used if the user
    does (stat)(a,b).  Oh well.  */
 #  undef stat
-#  define stat(name, st) rpl_stat (name, st)
+#  ifdef _LARGE_FILES
+    /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
+       so we have to replace stat64() instead of stat(). */
+#   define stat stat64
+#   undef stat64
+#   define stat64(name, st) rpl_stat (name, st)
+#  else /* !_LARGE_FILES */
+#   define stat(name, st) rpl_stat (name, st)
+#  endif /* !_LARGE_FILES */
 extern int stat (const char *name, struct stat *buf);
 # endif
 #elif defined GNULIB_POSIXCHECK
diff --git a/gl/tests/test-arpa_inet.c b/gl/tests/test-arpa_inet.c
index fc2d8ba..1e2479f 100644
--- a/gl/tests/test-arpa_inet.c
+++ b/gl/tests/test-arpa_inet.c
@@ -1,5 +1,5 @@
 /* Test of <arpa/inet.h> substitute.
-   Copyright (C) 2007 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
@@ -21,7 +21,7 @@
 #include <arpa/inet.h>
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/gl/tests/test-getaddrinfo.c b/gl/tests/test-getaddrinfo.c
index eeea3f7..384b98b 100644
--- a/gl/tests/test-getaddrinfo.c
+++ b/gl/tests/test-getaddrinfo.c
@@ -44,7 +44,8 @@
 # define EAI_SERVICE 0
 #endif
 
-int simple (char *host, char *service)
+static int
+simple (char const *host, char const *service)
 {
   char buf[BUFSIZ];
   static int skip = 0;
diff --git a/gl/tests/test-getdelim.c b/gl/tests/test-getdelim.c
index 0c112f6..da4fe6b 100644
--- a/gl/tests/test-getdelim.c
+++ b/gl/tests/test-getdelim.c
@@ -1,5 +1,5 @@
 /* Test of getdelim() function.
-   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
@@ -36,7 +36,7 @@
   while (0)
 
 int
-main (int argc, char **argv)
+main (void)
 {
   FILE *f;
   char *line = NULL;
diff --git a/gl/tests/test-getline.c b/gl/tests/test-getline.c
index 51fc816..50722cd 100644
--- a/gl/tests/test-getline.c
+++ b/gl/tests/test-getline.c
@@ -1,5 +1,5 @@
 /* Test of getline() function.
-   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
@@ -36,7 +36,7 @@
   while (0)
 
 int
-main (int argc, char **argv)
+main (void)
 {
   FILE *f;
   char *line = NULL;
diff --git a/gl/tests/test-gettimeofday.c b/gl/tests/test-gettimeofday.c
index 892b188..3b85879 100644
--- a/gl/tests/test-gettimeofday.c
+++ b/gl/tests/test-gettimeofday.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005, 2007 Free Software Foundation
+ * Copyright (C) 2005, 2007, 2009 Free Software Foundation
  * Written by Jim Meyering.
  *
  * This program is free software: you can redistribute it and/or modify
@@ -24,7 +24,7 @@
 #include <string.h>
 
 int
-main (int argc, char *argv[])
+main (void)
 {
   time_t t = 0;
   struct tm *lt;
diff --git a/gl/tests/test-memchr.c b/gl/tests/test-memchr.c
index 1124f8b..d5e53e0 100644
--- a/gl/tests/test-memchr.c
+++ b/gl/tests/test-memchr.c
@@ -41,7 +41,7 @@
 #define MEMCHR (char *) memchr
 
 int
-main ()
+main (void)
 {
   size_t n = 0x100000;
   char *input = malloc (n);
@@ -102,8 +102,6 @@ main ()
 
     if (page_boundary != NULL)
       {
-       int n;
-
        for (n = 1; n <= 500; n++)
          {
            char *mem = page_boundary - n;
@@ -111,7 +109,7 @@ main ()
            ASSERT (MEMCHR (mem, 'U', n) == NULL);
 
            {
-             int i;
+             size_t i;
 
              for (i = 0; i < n; i++)
                {
diff --git a/gl/tests/test-netinet_in.c b/gl/tests/test-netinet_in.c
index b195719..5a61557 100644
--- a/gl/tests/test-netinet_in.c
+++ b/gl/tests/test-netinet_in.c
@@ -1,5 +1,5 @@
 /* Test of <netinet/in.h> substitute.
-   Copyright (C) 2007 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
@@ -21,7 +21,7 @@
 #include <netinet/in.h>
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/gl/tests/test-select-stdin.c b/gl/tests/test-select-stdin.c
index e855f92..079dec5 100644
--- a/gl/tests/test-select-stdin.c
+++ b/gl/tests/test-select-stdin.c
@@ -1,5 +1,5 @@
 /* Test of select() substitute, reading from stdin.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 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
@@ -25,7 +25,7 @@
 #include <unistd.h>
 
 int
-main ()
+main (void)
 {
   printf ("Applying select() from standard input. Press Ctrl-C to abort.\n");
   for (;;)
diff --git a/gl/tests/test-select.c b/gl/tests/test-select.c
index ec82250..d6d6b06 100644
--- a/gl/tests/test-select.c
+++ b/gl/tests/test-select.c
@@ -84,7 +84,7 @@ test (void (*fn) (void), const char *msg)
 /* Funny socket code.  */
 
 static int
-open_server_socket ()
+open_server_socket (void)
 {
   int s, x;
   struct sockaddr_in ia;
@@ -355,7 +355,7 @@ test_pipe (void)
 /* Do them all.  */
 
 int
-main ()
+main (void)
 {
   int result;
 
diff --git a/gl/tests/test-sockets.c b/gl/tests/test-sockets.c
index 3c85a43..2d25964 100644
--- a/gl/tests/test-sockets.c
+++ b/gl/tests/test-sockets.c
@@ -22,7 +22,7 @@
 #include "sockets.h"
 
 int
-main (int argc, char *argv[])
+main (void)
 {
   int err;
 
diff --git a/gl/tests/test-stddef.c b/gl/tests/test-stddef.c
index f848498..c0a7515 100644
--- a/gl/tests/test-stddef.c
+++ b/gl/tests/test-stddef.c
@@ -32,7 +32,7 @@ size_t c = 2;
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/gl/tests/test-stdint.c b/gl/tests/test-stdint.c
index a2bf42a..4e9b362 100644
--- a/gl/tests/test-stdint.c
+++ b/gl/tests/test-stdint.c
@@ -1,5 +1,5 @@
 /* Test of <stdint.h> substitute.
-   Copyright (C) 2006-2008 Free Software Foundation, Inc.
+   Copyright (C) 2006-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
@@ -354,7 +354,7 @@ verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0);
 
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/gl/tests/test-stdio.c b/gl/tests/test-stdio.c
index dcfe38d..3f2f067 100644
--- a/gl/tests/test-stdio.c
+++ b/gl/tests/test-stdio.c
@@ -30,7 +30,7 @@ int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/gl/tests/test-stdlib.c b/gl/tests/test-stdlib.c
index ae46ba1..fad5cf4 100644
--- a/gl/tests/test-stdlib.c
+++ b/gl/tests/test-stdlib.c
@@ -29,7 +29,7 @@ int exitcode;
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   /* Check that some macros are defined and different integer constants.  */
   switch (exitcode)
diff --git a/gl/tests/test-strerror.c b/gl/tests/test-strerror.c
index 3d9814d..27eb969 100644
--- a/gl/tests/test-strerror.c
+++ b/gl/tests/test-strerror.c
@@ -1,5 +1,5 @@
 /* Test of strerror() function.
-   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
@@ -37,7 +37,7 @@
   while (0)
 
 int
-main (int argc, char **argv)
+main (void)
 {
   char *str;
 
diff --git a/gl/tests/test-string.c b/gl/tests/test-string.c
index fe53cd9..69df747 100644
--- a/gl/tests/test-string.c
+++ b/gl/tests/test-string.c
@@ -27,7 +27,7 @@
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/gl/tests/test-sys_select.c b/gl/tests/test-sys_select.c
index 6607952..aef8941 100644
--- a/gl/tests/test-sys_select.c
+++ b/gl/tests/test-sys_select.c
@@ -24,7 +24,7 @@
 struct timeval t1;
 
 int
-main ()
+main (void)
 {
   /* Check that FD_ZERO can be used.  This should not yield a warning
      such as "warning: implicit declaration of function 'memset'".  */
diff --git a/gl/tests/test-sys_socket.c b/gl/tests/test-sys_socket.c
index 3d946a8..ddb491b 100644
--- a/gl/tests/test-sys_socket.c
+++ b/gl/tests/test-sys_socket.c
@@ -28,7 +28,7 @@ int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
 #endif
 
 int
-main ()
+main (void)
 {
   struct sockaddr_storage x;
   sa_family_t i;
diff --git a/gl/tests/test-sys_stat.c b/gl/tests/test-sys_stat.c
index a73f9b8..4a85c9f 100644
--- a/gl/tests/test-sys_stat.c
+++ b/gl/tests/test-sys_stat.c
@@ -282,7 +282,7 @@ nlink_t t1;
 struct timespec t2;
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/gl/tests/test-sys_time.c b/gl/tests/test-sys_time.c
index bae4108..74f35ac 100644
--- a/gl/tests/test-sys_time.c
+++ b/gl/tests/test-sys_time.c
@@ -1,5 +1,5 @@
 /* Test of <sys/time.h> substitute.
-   Copyright (C) 2007 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
@@ -23,7 +23,7 @@
 struct timeval a;
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/gl/tests/test-time.c b/gl/tests/test-time.c
index ea81437..4afa3b3 100644
--- a/gl/tests/test-time.c
+++ b/gl/tests/test-time.c
@@ -29,7 +29,7 @@ struct timespec a;
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/gl/tests/test-unistd.c b/gl/tests/test-unistd.c
index 129367b..dd907f4 100644
--- a/gl/tests/test-unistd.c
+++ b/gl/tests/test-unistd.c
@@ -50,7 +50,7 @@ intptr_t t8;
 #endif
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/gl/tests/test-version-etc.c b/gl/tests/test-version-etc.c
index 71cbc8b..9ff97c4 100644
--- a/gl/tests/test-version-etc.c
+++ b/gl/tests/test-version-etc.c
@@ -24,7 +24,7 @@
 #define AUTHORS "Sergey Poznyakoff", "Eric Blake"
 
 int
-main (int argc, char **argv)
+main (int argc _UNUSED_PARAMETER_, char **argv)
 {
   set_program_name (argv[0]);
   version_etc (stdout, "test-version-etc", "dummy", "0", AUTHORS,
diff --git a/gl/tests/test-wchar.c b/gl/tests/test-wchar.c
index 2866068..2e60bb8 100644
--- a/gl/tests/test-wchar.c
+++ b/gl/tests/test-wchar.c
@@ -31,7 +31,7 @@ wint_t b = 'x';
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/lib/gl/m4/fseeko.m4 b/lib/gl/m4/fseeko.m4
index 3d77365..a370648 100644
--- a/lib/gl/m4/fseeko.m4
+++ b/lib/gl/m4/fseeko.m4
@@ -1,5 +1,5 @@
-# fseeko.m4 serial 4
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# fseeko.m4 serial 6
+dnl Copyright (C) 2007-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.
@@ -15,7 +15,8 @@ AC_DEFUN([gl_FUNC_FSEEKO],
 
   AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko],
     [
-      AC_TRY_LINK([#include <stdio.h>], [fseeko (stdin, 0, 0);],
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+]], [fseeko (stdin, 0, 0);])],
        [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
     ])
   if test $gl_cv_func_fseeko = no; then
@@ -31,4 +32,6 @@ AC_DEFUN([gl_REPLACE_FSEEKO],
   AC_LIBOBJ([fseeko])
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   REPLACE_FSEEKO=1
+  dnl If we are also using the fseek module, then fseek needs replacing, too.
+  m4_ifdef([gl_REPLACE_FSEEK], [gl_REPLACE_FSEEK])
 ])
diff --git a/lib/gl/m4/ungetc.m4 b/lib/gl/m4/ungetc.m4
index 9236d4c..eb65235 100644
--- a/lib/gl/m4/ungetc.m4
+++ b/lib/gl/m4/ungetc.m4
@@ -1,4 +1,4 @@
-# ungetc.m4 serial 1
+# ungetc.m4 serial 2
 dnl Copyright (C) 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,
@@ -12,7 +12,7 @@ AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
     [gl_cv_func_ungetc_works],
     [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
 #include <stdio.h>
-      ]], [FILE *f; long l;
+      ]], [FILE *f;
           if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
           if (fputs ("abc", f) < 0) return 2;
           rewind (f);
diff --git a/lib/gl/sockets.c b/lib/gl/sockets.c
index f0bf0ac..a6bbf03 100644
--- a/lib/gl/sockets.c
+++ b/lib/gl/sockets.c
@@ -25,12 +25,12 @@
 #if WINDOWS_SOCKETS
 
 /* This includes winsock2.h on MinGW. */
-#include <sys/socket.h>
+# include <sys/socket.h>
 
-#include "close-hook.h"
+# include "close-hook.h"
 
 /* Get set_winsock_errno, FD_TO_SOCKET etc. */
-#include "w32sock.h"
+# include "w32sock.h"
 
 static int
 close_fd_maybe_socket (int fd, const struct close_hook *remaining_list)
@@ -71,10 +71,10 @@ static struct close_hook close_sockets_hook;
 
 static int initialized_sockets_version /* = 0 */;
 
-#endif
+#endif /* WINDOWS_SOCKETS */
 
 int
-gl_sockets_startup (int version)
+gl_sockets_startup (int version _UNUSED_PARAMETER_)
 {
 #if WINDOWS_SOCKETS
   if (version > initialized_sockets_version)
diff --git a/lib/gl/stdio.in.h b/lib/gl/stdio.in.h
index 384010a..cd11a52 100644
--- a/lib/gl/stdio.in.h
+++ b/lib/gl/stdio.in.h
@@ -227,7 +227,14 @@ extern int rpl_fseek (FILE *fp, long offset, int whence);
    fflush(), and which detect pipes.  */
 #  define fseeko rpl_fseeko
 extern int fseeko (FILE *fp, off_t offset, int whence);
-#  define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence)
+#  if address@hidden@
+#   undef fseek
+#   define fseek(f,o,w) \
+     (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
+                       "on 32-bit platforms - " \
+                       "use fseeko function for handling of large files"), \
+      fseeko (f, o, w))
+#  endif
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef fseeko
@@ -263,7 +270,14 @@ extern long rpl_ftell (FILE *fp);
 # if @REPLACE_FTELLO@
 #  define ftello rpl_ftello
 extern off_t ftello (FILE *fp);
-#  define ftell(fp) ftello (fp)
+#  if address@hidden@
+#   undef ftell
+#   define ftell(f) \
+     (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
+                       "on 32-bit platforms - " \
+                       "use ftello function for handling of large files"), \
+      ftello (f))
+#  endif
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef ftello
diff --git a/lib/gl/sys_stat.in.h b/lib/gl/sys_stat.in.h
index 13cfcbf..1afd5c9 100644
--- a/lib/gl/sys_stat.in.h
+++ b/lib/gl/sys_stat.in.h
@@ -456,7 +456,15 @@ int mknodat (int fd, char const *file, mode_t mode, dev_t 
dev);
    struct stat.  This means that rpl_stat will not be used if the user
    does (stat)(a,b).  Oh well.  */
 #  undef stat
-#  define stat(name, st) rpl_stat (name, st)
+#  ifdef _LARGE_FILES
+    /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
+       so we have to replace stat64() instead of stat(). */
+#   define stat stat64
+#   undef stat64
+#   define stat64(name, st) rpl_stat (name, st)
+#  else /* !_LARGE_FILES */
+#   define stat(name, st) rpl_stat (name, st)
+#  endif /* !_LARGE_FILES */
 extern int stat (const char *name, struct stat *buf);
 # endif
 #elif defined GNULIB_POSIXCHECK
diff --git a/lib/gl/tests/test-memchr.c b/lib/gl/tests/test-memchr.c
index 1124f8b..d5e53e0 100644
--- a/lib/gl/tests/test-memchr.c
+++ b/lib/gl/tests/test-memchr.c
@@ -41,7 +41,7 @@
 #define MEMCHR (char *) memchr
 
 int
-main ()
+main (void)
 {
   size_t n = 0x100000;
   char *input = malloc (n);
@@ -102,8 +102,6 @@ main ()
 
     if (page_boundary != NULL)
       {
-       int n;
-
        for (n = 1; n <= 500; n++)
          {
            char *mem = page_boundary - n;
@@ -111,7 +109,7 @@ main ()
            ASSERT (MEMCHR (mem, 'U', n) == NULL);
 
            {
-             int i;
+             size_t i;
 
              for (i = 0; i < n; i++)
                {
diff --git a/lib/gl/tests/test-sockets.c b/lib/gl/tests/test-sockets.c
index 3c85a43..2d25964 100644
--- a/lib/gl/tests/test-sockets.c
+++ b/lib/gl/tests/test-sockets.c
@@ -22,7 +22,7 @@
 #include "sockets.h"
 
 int
-main (int argc, char *argv[])
+main (void)
 {
   int err;
 
diff --git a/lib/gl/tests/test-stddef.c b/lib/gl/tests/test-stddef.c
index f848498..c0a7515 100644
--- a/lib/gl/tests/test-stddef.c
+++ b/lib/gl/tests/test-stddef.c
@@ -32,7 +32,7 @@ size_t c = 2;
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/lib/gl/tests/test-stdint.c b/lib/gl/tests/test-stdint.c
index a2bf42a..4e9b362 100644
--- a/lib/gl/tests/test-stdint.c
+++ b/lib/gl/tests/test-stdint.c
@@ -1,5 +1,5 @@
 /* Test of <stdint.h> substitute.
-   Copyright (C) 2006-2008 Free Software Foundation, Inc.
+   Copyright (C) 2006-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
@@ -354,7 +354,7 @@ verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0);
 
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/lib/gl/tests/test-stdio.c b/lib/gl/tests/test-stdio.c
index dcfe38d..3f2f067 100644
--- a/lib/gl/tests/test-stdio.c
+++ b/lib/gl/tests/test-stdio.c
@@ -30,7 +30,7 @@ int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/lib/gl/tests/test-stdlib.c b/lib/gl/tests/test-stdlib.c
index ae46ba1..fad5cf4 100644
--- a/lib/gl/tests/test-stdlib.c
+++ b/lib/gl/tests/test-stdlib.c
@@ -29,7 +29,7 @@ int exitcode;
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   /* Check that some macros are defined and different integer constants.  */
   switch (exitcode)
diff --git a/lib/gl/tests/test-string.c b/lib/gl/tests/test-string.c
index fe53cd9..69df747 100644
--- a/lib/gl/tests/test-string.c
+++ b/lib/gl/tests/test-string.c
@@ -27,7 +27,7 @@
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/lib/gl/tests/test-strverscmp.c b/lib/gl/tests/test-strverscmp.c
index 04da20c..a98695b 100644
--- a/lib/gl/tests/test-strverscmp.c
+++ b/lib/gl/tests/test-strverscmp.c
@@ -1,5 +1,5 @@
 /* Test of strverscmp() function.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 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
@@ -37,7 +37,7 @@
   while (0)
 
 int
-main (int argc, char **argv)
+main (void)
 {
   ASSERT (strverscmp ("", "") == 0);
   ASSERT (strverscmp ("a", "a") == 0);
diff --git a/lib/gl/tests/test-sys_socket.c b/lib/gl/tests/test-sys_socket.c
index 3d946a8..ddb491b 100644
--- a/lib/gl/tests/test-sys_socket.c
+++ b/lib/gl/tests/test-sys_socket.c
@@ -28,7 +28,7 @@ int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
 #endif
 
 int
-main ()
+main (void)
 {
   struct sockaddr_storage x;
   sa_family_t i;
diff --git a/lib/gl/tests/test-sys_stat.c b/lib/gl/tests/test-sys_stat.c
index a73f9b8..4a85c9f 100644
--- a/lib/gl/tests/test-sys_stat.c
+++ b/lib/gl/tests/test-sys_stat.c
@@ -282,7 +282,7 @@ nlink_t t1;
 struct timespec t2;
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/lib/gl/tests/test-time.c b/lib/gl/tests/test-time.c
index ea81437..4afa3b3 100644
--- a/lib/gl/tests/test-time.c
+++ b/lib/gl/tests/test-time.c
@@ -29,7 +29,7 @@ struct timespec a;
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/lib/gl/tests/test-unistd.c b/lib/gl/tests/test-unistd.c
index 129367b..dd907f4 100644
--- a/lib/gl/tests/test-unistd.c
+++ b/lib/gl/tests/test-unistd.c
@@ -50,7 +50,7 @@ intptr_t t8;
 #endif
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/lib/gl/tests/test-wchar.c b/lib/gl/tests/test-wchar.c
index 2866068..2e60bb8 100644
--- a/lib/gl/tests/test-wchar.c
+++ b/lib/gl/tests/test-wchar.c
@@ -31,7 +31,7 @@ wint_t b = 'x';
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/libextra/gl/md5.c b/libextra/gl/md5.c
index 07e7e92..0905367 100644
--- a/libextra/gl/md5.c
+++ b/libextra/gl/md5.c
@@ -56,7 +56,7 @@
 # define SWAP(n) (n)
 #endif
 
-#define BLOCKSIZE 4096
+#define BLOCKSIZE 32768
 #if BLOCKSIZE % 64 != 0
 # error "invalid BLOCKSIZE"
 #endif
@@ -138,9 +138,12 @@ int
 md5_stream (FILE *stream, void *resblock)
 {
   struct md5_ctx ctx;
-  char buffer[BLOCKSIZE + 72];
   size_t sum;
 
+  char *buffer = malloc (BLOCKSIZE + 72);
+  if (!buffer)
+    return 1;
+
   /* Initialize the computation context.  */
   md5_init_ctx (&ctx);
 
@@ -169,7 +172,10 @@ md5_stream (FILE *stream, void *resblock)
                 exit the loop after a partial read due to e.g., EAGAIN
                 or EWOULDBLOCK.  */
              if (ferror (stream))
-               return 1;
+               {
+                 free (buffer);
+                 return 1;
+               }
              goto process_partial_block;
            }
 
@@ -194,6 +200,7 @@ process_partial_block:
 
   /* Construct result in desired memory.  */
   md5_finish_ctx (&ctx, resblock);
+  free (buffer);
   return 0;
 }
 #endif
diff --git a/maint.mk b/maint.mk
index 68bd8f9..996344a 100644
--- a/maint.mk
+++ b/maint.mk
@@ -156,6 +156,12 @@ sc_prohibit_strcmp:
          { echo '$(ME): use STREQ in place of the above uses of str''cmp' \
                1>&2; exit 1; } || :
 
+# Pass EXIT_*, not number, to usage, exit, and error (when exiting)
+sc_prohibit_magic_number_exit:
+       @re='\<(usage|exit) ?\([0-9]|\<error ?\([1-9][0-9]*,'           \
+       msg='use EXIT_* values rather than magic number'                \
+         $(_prohibit_regexp)
+
 # Using EXIT_SUCCESS as the first argument to error is misleading,
 # since when that parameter is 0, error does not exit.  Use `0' instead.
 sc_error_exit_success:
diff --git a/src/Makefile.am b/src/Makefile.am
index 6fdd3b6..77379db 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -94,7 +94,7 @@ libcmd_certtool_la_SOURCES = certtool.gaa certtool-gaa.h      
\
        certtool-gaa.c certtool-cfg.h certtool-cfg.c
 libcmd_certtool_la_LIBADD = ../gl/libgnu.la $(LTLIBREADLINE)
 libcmd_certtool_la_LIBADD += ../lib/libgnutls.la ../libextra/libgnutls-extra.la
-libcmd_certtool_la_LIBADD += ../gl/libgnu.la
+libcmd_certtool_la_LIBADD += ../gl/libgnu.la $(INET_PTON_LIB)
 
 psk-gaa.c: $(srcdir)/psk.gaa
        -$(GAA) $< -o psk-gaa.c -i psk-gaa.h
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1d68bdc..fd9899b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -44,7 +44,7 @@ LDADD = ../lib/libgnutls.la \
        ../gl/libgnu.la \
        libutils.la \
        $(LTLIBGCRYPT)  \
-       $(LIBSOCKET)
+       $(LIBSOCKET) $(INET_NTOP_LIB) $(INET_PTON_LIB)
 
 if ENABLE_MINITASN1
 AM_CPPFLAGS += -I$(srcdir)/../lib/minitasn1


hooks/post-receive
-- 
GNU gnutls




reply via email to

[Prev in Thread] Current Thread [Next in Thread]