gsasl-commit
[Top][All Lists]
Advanced

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

[SCM] GNU gsasl branch, master, updated. gsasl-1-3-21-g5c75c79


From: Simon Josefsson
Subject: [SCM] GNU gsasl branch, master, updated. gsasl-1-3-21-g5c75c79
Date: Mon, 02 Nov 2009 15:32:51 +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 gsasl".

http://git.savannah.gnu.org/cgit/gsasl.git/commit/?id=5c75c798645e9a34605ae2e24fae1918ef0a743f

The branch, master has been updated
       via  5c75c798645e9a34605ae2e24fae1918ef0a743f (commit)
      from  3cd4787ae4df3e67252df4e65d2236c66e4842b1 (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 5c75c798645e9a34605ae2e24fae1918ef0a743f
Author: Simon Josefsson <address@hidden>
Date:   Mon Nov 2 15:35:15 2009 +0100

    Update gnulib files.

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

Summary of changes:
 gl/getopt.c                          |    5 +-
 gl/m4/fseeko.m4                      |    9 ++-
 gl/m4/gnulib-comp.m4                 |    2 -
 gl/m4/pmccabe2html.m4                |   14 -----
 gl/m4/ungetc.m4                      |    4 +-
 gl/sockets.c                         |   10 ++--
 gl/stdio.in.h                        |   18 ++++++-
 gltests/test-arpa_inet.c             |    4 +-
 gltests/test-getaddrinfo.c           |    3 +-
 gltests/test-getdelim.c              |    4 +-
 gltests/test-getline.c               |    4 +-
 gltests/test-getopt.c                |    2 +-
 gltests/test-getopt.h                |   44 ++++++++--------
 gltests/test-getopt_long.h           |   97 +++++++++++++++++++---------------
 gltests/test-gettimeofday.c          |    4 +-
 gltests/test-memchr.c                |    6 +--
 gltests/test-netinet_in.c            |    4 +-
 gltests/test-quotearg.c              |    2 +-
 gltests/test-select-stdin.c          |    4 +-
 gltests/test-select.c                |    4 +-
 gltests/test-sockets.c               |    2 +-
 gltests/test-stddef.c                |    2 +-
 gltests/test-stdint.c                |    4 +-
 gltests/test-stdio.c                 |    2 +-
 gltests/test-stdlib.c                |    2 +-
 gltests/test-strerror.c              |    4 +-
 gltests/test-string.c                |    2 +-
 gltests/test-sys_select.c            |    2 +-
 gltests/test-sys_socket.c            |    2 +-
 gltests/test-sys_time.c              |    4 +-
 gltests/test-unistd.c                |    2 +-
 gltests/test-version-etc.c           |    2 +-
 gltests/test-wchar.c                 |    2 +-
 gltests/test-wctype.c                |    2 +-
 lib/build-aux/pmccabe2html           |    5 +-
 lib/build-aux/useless-if-before-free |    5 ++-
 lib/gl/md5.c                         |   13 ++++-
 lib/gl/sha1.c                        |   14 ++++-
 lib/gl/stdio.in.h                    |   18 ++++++-
 lib/gltests/test-base64.c            |    4 +-
 lib/gltests/test-getdelim.c          |    4 +-
 lib/gltests/test-getline.c           |    4 +-
 lib/gltests/test-memchr.c            |    6 +--
 lib/gltests/test-rawmemchr.c         |    4 +-
 lib/gltests/test-stddef.c            |    2 +-
 lib/gltests/test-stdint.c            |    4 +-
 lib/gltests/test-stdio.c             |    2 +-
 lib/gltests/test-stdlib.c            |    2 +-
 lib/gltests/test-strchrnul.c         |    4 +-
 lib/gltests/test-string.c            |    2 +-
 lib/gltests/test-strverscmp.c        |    4 +-
 lib/gltests/test-unistd.c            |    2 +-
 lib/gltests/test-wchar.c             |    2 +-
 lib/maint.mk                         |    6 ++
 maint.mk                             |    6 ++
 55 files changed, 223 insertions(+), 168 deletions(-)
 delete mode 100644 gl/m4/pmccabe2html.m4

diff --git a/gl/getopt.c b/gl/getopt.c
index f1e6d1f..797d166 100644
--- a/gl/getopt.c
+++ b/gl/getopt.c
@@ -2,7 +2,7 @@
    NOTE: getopt is now part of the C library, so if you don't know what
    "Keep this file name-space clean" means, talk to address@hidden
    before changing it!
-   Copyright (C) 
1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004,2006,2008
+   Copyright (C) 
1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004,2006,2008,2009
        Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -225,7 +225,8 @@ exchange (char **argv, struct _getopt_data *d)
 /* Initialize the internal data when the first call is made.  */
 
 static const char *
-_getopt_initialize (int argc, char **argv, const char *optstring,
+_getopt_initialize (int argc _UNUSED_PARAMETER_,
+                   char **argv _UNUSED_PARAMETER_, const char *optstring,
                    int posixly_correct, struct _getopt_data *d)
 {
   /* Start processing options with ARGV-element 1 (since ARGV-element 0
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 99fc4f3..669760f 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -121,7 +121,6 @@ AC_SUBST([LTALLOCA])
   gl_HEADER_NETDB
   gl_HEADER_NETINET_IN
   AC_PROG_MKDIR_P
-  gl_PMCCABE2HTML
   gl_FUNC_POLL
   AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
   AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
@@ -575,7 +574,6 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/netinet_in_h.m4
   m4/nls.m4
   m4/perror.m4
-  m4/pmccabe2html.m4
   m4/po.m4
   m4/poll.m4
   m4/printf-posix.m4
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/gltests/test-arpa_inet.c b/gltests/test-arpa_inet.c
index fc2d8ba..1e2479f 100644
--- a/gltests/test-arpa_inet.c
+++ b/gltests/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/gltests/test-getaddrinfo.c b/gltests/test-getaddrinfo.c
index eeea3f7..384b98b 100644
--- a/gltests/test-getaddrinfo.c
+++ b/gltests/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/gltests/test-getdelim.c b/gltests/test-getdelim.c
index 0c112f6..da4fe6b 100644
--- a/gltests/test-getdelim.c
+++ b/gltests/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/gltests/test-getline.c b/gltests/test-getline.c
index 51fc816..50722cd 100644
--- a/gltests/test-getline.c
+++ b/gltests/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/gltests/test-getopt.c b/gltests/test-getopt.c
index 12d8d92..6c59d47 100644
--- a/gltests/test-getopt.c
+++ b/gltests/test-getopt.c
@@ -53,7 +53,7 @@
 #endif
 
 int
-main ()
+main (void)
 {
   unsetenv ("POSIXLY_CORRECT");
 
diff --git a/gltests/test-getopt.h b/gltests/test-getopt.h
index 352fe32..4efec4b 100644
--- a/gltests/test-getopt.h
+++ b/gltests/test-getopt.h
@@ -17,7 +17,7 @@
 /* Written by Bruno Haible <address@hidden>, 2009.  */
 
 static void
-getopt_loop (int argc, char **argv,
+getopt_loop (int argc, const char **argv,
             const char *options,
             int *a_seen, int *b_seen,
             const char **p_value, const char **q_value,
@@ -27,7 +27,7 @@ getopt_loop (int argc, char **argv,
   int c;
 
   opterr = 0;
-  while ((c = getopt (argc, argv, options)) != -1)
+  while ((c = getopt (argc, (char **) argv, options)) != -1)
     {
       switch (c)
        {
@@ -74,7 +74,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "-a";
@@ -102,7 +102,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "-b";
@@ -131,7 +131,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "-ba";
@@ -159,7 +159,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "-ab";
@@ -190,7 +190,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "-pfoo";
@@ -217,7 +217,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "-p";
@@ -245,7 +245,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "-ab";
@@ -278,7 +278,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "-pfoo";
@@ -305,7 +305,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "-p";
@@ -333,7 +333,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "-p";
@@ -364,7 +364,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "-p";
@@ -396,7 +396,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "donald";
@@ -458,7 +458,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[20];
+      const char *argv[20];
 
       argv[argc++] = "program";
       argv[argc++] = "donald";
@@ -536,7 +536,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "donald";
@@ -579,7 +579,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[20];
+      const char *argv[20];
 
       argv[argc++] = "program";
       argv[argc++] = "donald";
@@ -650,7 +650,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "donald";
@@ -713,7 +713,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "donald";
@@ -751,7 +751,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "-+";
@@ -779,7 +779,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[20];
+      const char *argv[20];
 
       argv[argc++] = "program";
       argv[argc++] = "donald";
@@ -829,7 +829,7 @@ test_getopt (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
 
       argv[argc++] = "program";
       argv[argc++] = "donald";
diff --git a/gltests/test-getopt_long.h b/gltests/test-getopt_long.h
index fb505b2..d0d16fa 100644
--- a/gltests/test-getopt_long.h
+++ b/gltests/test-getopt_long.h
@@ -41,7 +41,7 @@ static const struct option long_options_optional[] =
   };
 
 static void
-getopt_long_loop (int argc, char **argv,
+getopt_long_loop (int argc, const char **argv,
                  const char *options, const struct option *long_options,
                  const char **p_value, const char **q_value,
                  int *non_options_count, const char **non_options,
@@ -51,7 +51,8 @@ getopt_long_loop (int argc, char **argv,
   int c;
 
   opterr = 0;
-  while ((c = getopt_long (argc, argv, options, long_options, &option_index))
+  while ((c = getopt_long (argc, (char **) argv, options, long_options,
+                          &option_index))
         != -1)
     {
       switch (c)
@@ -86,6 +87,16 @@ getopt_long_loop (int argc, char **argv,
     }
 }
 
+/* Reduce casting, so we can use string literals elsewhere.
+   getopt_long takes an array of char*, but luckily does not modify
+   those elements, so we can pass const char*.  */
+static int
+do_getopt_long (int argc, const char **argv, const char *shortopts,
+                const struct option *longopts, int *longind)
+{
+  return getopt_long (argc, (char **) argv, shortopts, longopts, longind);
+}
+
 static void
 test_getopt_long (void)
 {
@@ -94,7 +105,7 @@ test_getopt_long (void)
   /* Test disambiguation of options.  */
   {
     int argc = 0;
-    char *argv[10];
+    const char *argv[10];
     int option_index;
     int c;
 
@@ -102,13 +113,13 @@ test_getopt_long (void)
     argv[argc++] = "--x";
     optind = 1;
     opterr = 0;
-    c = getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    c = do_getopt_long (argc, argv, "ab", long_options_required, 
&option_index);
     ASSERT (c == '?');
     ASSERT (optopt == 0);
   }
   {
     int argc = 0;
-    char *argv[10];
+    const char *argv[10];
     int option_index;
     int c;
 
@@ -116,13 +127,13 @@ test_getopt_long (void)
     argv[argc++] = "--xt";
     optind = 1;
     opterr = 0;
-    c = getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    c = do_getopt_long (argc, argv, "ab", long_options_required, 
&option_index);
     ASSERT (c == '?');
     ASSERT (optopt == 0);
   }
   {
     int argc = 0;
-    char *argv[10];
+    const char *argv[10];
     int option_index;
     int c;
 
@@ -130,13 +141,13 @@ test_getopt_long (void)
     argv[argc++] = "--xtr";
     optind = 1;
     opterr = 0;
-    c = getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    c = do_getopt_long (argc, argv, "ab", long_options_required, 
&option_index);
     ASSERT (c == '?');
     ASSERT (optopt == 0);
   }
   {
     int argc = 0;
-    char *argv[10];
+    const char *argv[10];
     int option_index;
     int c;
 
@@ -144,12 +155,12 @@ test_getopt_long (void)
     argv[argc++] = "--xtra";
     optind = 1;
     opterr = 0;
-    c = getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    c = do_getopt_long (argc, argv, "ab", long_options_required, 
&option_index);
     ASSERT (c == 1001);
   }
   {
     int argc = 0;
-    char *argv[10];
+    const char *argv[10];
     int option_index;
     int c;
 
@@ -157,13 +168,13 @@ test_getopt_long (void)
     argv[argc++] = "--xtre";
     optind = 1;
     opterr = 0;
-    c = getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    c = do_getopt_long (argc, argv, "ab", long_options_required, 
&option_index);
     ASSERT (c == '?');
     ASSERT (optopt == 0);
   }
   {
     int argc = 0;
-    char *argv[10];
+    const char *argv[10];
     int option_index;
     int c;
 
@@ -171,13 +182,13 @@ test_getopt_long (void)
     argv[argc++] = "--xtrem";
     optind = 1;
     opterr = 0;
-    c = getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    c = do_getopt_long (argc, argv, "ab", long_options_required, 
&option_index);
     ASSERT (c == '?');
     ASSERT (optopt == 0);
   }
   {
     int argc = 0;
-    char *argv[10];
+    const char *argv[10];
     int option_index;
     int c;
 
@@ -185,12 +196,12 @@ test_getopt_long (void)
     argv[argc++] = "--xtreme";
     optind = 1;
     opterr = 0;
-    c = getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    c = do_getopt_long (argc, argv, "ab", long_options_required, 
&option_index);
     ASSERT (c == 1002);
   }
   {
     int argc = 0;
-    char *argv[10];
+    const char *argv[10];
     int option_index;
     int c;
 
@@ -198,12 +209,12 @@ test_getopt_long (void)
     argv[argc++] = "--xtremel";
     optind = 1;
     opterr = 0;
-    c = getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    c = do_getopt_long (argc, argv, "ab", long_options_required, 
&option_index);
     ASSERT (c == 1003);
   }
   {
     int argc = 0;
-    char *argv[10];
+    const char *argv[10];
     int option_index;
     int c;
 
@@ -211,7 +222,7 @@ test_getopt_long (void)
     argv[argc++] = "--xtremely";
     optind = 1;
     opterr = 0;
-    c = getopt_long (argc, argv, "ab", long_options_required, &option_index);
+    c = do_getopt_long (argc, argv, "ab", long_options_required, 
&option_index);
     ASSERT (c == 1003);
   }
 
@@ -224,7 +235,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -252,7 +263,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -281,7 +292,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -309,7 +320,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -340,7 +351,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -367,7 +378,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -395,7 +406,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -427,7 +438,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -454,7 +465,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -482,7 +493,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -512,7 +523,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -544,7 +555,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -584,7 +595,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[20];
+      const char *argv[20];
       a_seen = 0;
       b_seen = 0;
 
@@ -634,7 +645,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -677,7 +688,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[20];
+      const char *argv[20];
       a_seen = 0;
       b_seen = 0;
 
@@ -747,7 +758,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -788,7 +799,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -826,7 +837,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -854,7 +865,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[20];
+      const char *argv[20];
       a_seen = 0;
       b_seen = 0;
 
@@ -904,7 +915,7 @@ test_getopt_long (void)
       const char *non_options[10];
       int unrecognized = 0;
       int argc = 0;
-      char *argv[10];
+      const char *argv[10];
       a_seen = 0;
       b_seen = 0;
 
@@ -944,14 +955,14 @@ static void
 test_getopt_long_posix (void)
 {
   int c = 3;
-  char *v[4] = {"test", "-r", "foo", NULL};
-  struct option l[] = {{NULL}};
+  const char *v[4] = {"test", "-r", "foo", NULL};
+  struct option l[] = {{NULL, 0, NULL, 0}};
   int start;
   int result;
   for (start = OPTIND_MIN; start <= 1; start++)
     {
       optind = start;
-      result = getopt_long (c, v, "r::", l, NULL);
+      result = do_getopt_long (c, v, "r::", l, NULL);
     }
   ASSERT (result == 'r');
   ASSERT (optarg == NULL);
diff --git a/gltests/test-gettimeofday.c b/gltests/test-gettimeofday.c
index 892b188..3b85879 100644
--- a/gltests/test-gettimeofday.c
+++ b/gltests/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/gltests/test-memchr.c b/gltests/test-memchr.c
index 1124f8b..d5e53e0 100644
--- a/gltests/test-memchr.c
+++ b/gltests/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/gltests/test-netinet_in.c b/gltests/test-netinet_in.c
index b195719..5a61557 100644
--- a/gltests/test-netinet_in.c
+++ b/gltests/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/gltests/test-quotearg.c b/gltests/test-quotearg.c
index 04891bc..7346cba 100644
--- a/gltests/test-quotearg.c
+++ b/gltests/test-quotearg.c
@@ -378,7 +378,7 @@ use_quotearg_colon (const char *str, size_t *len)
 }
 
 int
-main (int argc, char *argv[])
+main (int argc _UNUSED_PARAMETER_, char *argv[])
 {
   int i;
   bool ascii_only = MB_CUR_MAX == 1 && !isprint ((unsigned char) LQ[0]);
diff --git a/gltests/test-select-stdin.c b/gltests/test-select-stdin.c
index e855f92..079dec5 100644
--- a/gltests/test-select-stdin.c
+++ b/gltests/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/gltests/test-select.c b/gltests/test-select.c
index ec82250..d6d6b06 100644
--- a/gltests/test-select.c
+++ b/gltests/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/gltests/test-sockets.c b/gltests/test-sockets.c
index 3c85a43..2d25964 100644
--- a/gltests/test-sockets.c
+++ b/gltests/test-sockets.c
@@ -22,7 +22,7 @@
 #include "sockets.h"
 
 int
-main (int argc, char *argv[])
+main (void)
 {
   int err;
 
diff --git a/gltests/test-stddef.c b/gltests/test-stddef.c
index f848498..c0a7515 100644
--- a/gltests/test-stddef.c
+++ b/gltests/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/gltests/test-stdint.c b/gltests/test-stdint.c
index a2bf42a..4e9b362 100644
--- a/gltests/test-stdint.c
+++ b/gltests/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/gltests/test-stdio.c b/gltests/test-stdio.c
index dcfe38d..3f2f067 100644
--- a/gltests/test-stdio.c
+++ b/gltests/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/gltests/test-stdlib.c b/gltests/test-stdlib.c
index ae46ba1..fad5cf4 100644
--- a/gltests/test-stdlib.c
+++ b/gltests/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/gltests/test-strerror.c b/gltests/test-strerror.c
index 3d9814d..27eb969 100644
--- a/gltests/test-strerror.c
+++ b/gltests/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/gltests/test-string.c b/gltests/test-string.c
index fe53cd9..69df747 100644
--- a/gltests/test-string.c
+++ b/gltests/test-string.c
@@ -27,7 +27,7 @@
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/gltests/test-sys_select.c b/gltests/test-sys_select.c
index 6607952..aef8941 100644
--- a/gltests/test-sys_select.c
+++ b/gltests/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/gltests/test-sys_socket.c b/gltests/test-sys_socket.c
index 3d946a8..ddb491b 100644
--- a/gltests/test-sys_socket.c
+++ b/gltests/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/gltests/test-sys_time.c b/gltests/test-sys_time.c
index bae4108..74f35ac 100644
--- a/gltests/test-sys_time.c
+++ b/gltests/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/gltests/test-unistd.c b/gltests/test-unistd.c
index 129367b..dd907f4 100644
--- a/gltests/test-unistd.c
+++ b/gltests/test-unistd.c
@@ -50,7 +50,7 @@ intptr_t t8;
 #endif
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/gltests/test-version-etc.c b/gltests/test-version-etc.c
index 71cbc8b..9ff97c4 100644
--- a/gltests/test-version-etc.c
+++ b/gltests/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/gltests/test-wchar.c b/gltests/test-wchar.c
index 2866068..2e60bb8 100644
--- a/gltests/test-wchar.c
+++ b/gltests/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/gltests/test-wctype.c b/gltests/test-wctype.c
index 5deae45..a39514a 100644
--- a/gltests/test-wctype.c
+++ b/gltests/test-wctype.c
@@ -41,7 +41,7 @@ wint_t a = 'x';
 wint_t e = WEOF;
 
 int
-main ()
+main (void)
 {
   /* Check that the isw* functions exist as functions or as macros.  */
   (void) iswalnum (0);
diff --git a/lib/build-aux/pmccabe2html b/lib/build-aux/pmccabe2html
index 27bb8f3..bc0f6e8 100755
--- a/lib/build-aux/pmccabe2html
+++ b/lib/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/lib/build-aux/useless-if-before-free 
b/lib/build-aux/useless-if-before-free
index abcdef2..793c975 100755
--- a/lib/build-aux/useless-if-before-free
+++ b/lib/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/lib/gl/md5.c b/lib/gl/md5.c
index 1585443..eb5e947 100644
--- a/lib/gl/md5.c
+++ b/lib/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
@@ -136,9 +136,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);
 
@@ -167,7 +170,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;
            }
 
@@ -192,6 +198,7 @@ process_partial_block:
 
   /* Construct result in desired memory.  */
   md5_finish_ctx (&ctx, resblock);
+  free (buffer);
   return 0;
 }
 
diff --git a/lib/gl/sha1.c b/lib/gl/sha1.c
index 62c96ec..ee992f8 100644
--- a/lib/gl/sha1.c
+++ b/lib/gl/sha1.c
@@ -28,6 +28,7 @@
 #include "sha1.h"
 
 #include <stddef.h>
+#include <stdlib.h>
 #include <string.h>
 
 #if USE_UNLOCKED_IO
@@ -41,7 +42,7 @@
     (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
 #endif
 
-#define BLOCKSIZE 4096
+#define BLOCKSIZE 32768
 #if BLOCKSIZE % 64 != 0
 # error "invalid BLOCKSIZE"
 #endif
@@ -124,9 +125,12 @@ int
 sha1_stream (FILE *stream, void *resblock)
 {
   struct sha1_ctx ctx;
-  char buffer[BLOCKSIZE + 72];
   size_t sum;
 
+  char *buffer = malloc (BLOCKSIZE + 72);
+  if (!buffer)
+    return 1;
+
   /* Initialize the computation context.  */
   sha1_init_ctx (&ctx);
 
@@ -155,7 +159,10 @@ sha1_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;
            }
 
@@ -180,6 +187,7 @@ sha1_stream (FILE *stream, void *resblock)
 
   /* Construct result in desired memory.  */
   sha1_finish_ctx (&ctx, resblock);
+  free (buffer);
   return 0;
 }
 
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/gltests/test-base64.c b/lib/gltests/test-base64.c
index f707a9e..7440e8c 100644
--- a/lib/gltests/test-base64.c
+++ b/lib/gltests/test-base64.c
@@ -1,5 +1,5 @@
 /* Self tests for base64.
-   Copyright (C) 2004, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This program is free software: you can redistribute it and/or modify
@@ -25,7 +25,7 @@
 #include "base64.h"
 
 int
-main (int argc, char *argv[])
+main (void)
 {
   const char *in = "abcdefghijklmnop";
   const char *b64in = "YWJjZGVmZw==";
diff --git a/lib/gltests/test-getdelim.c b/lib/gltests/test-getdelim.c
index 0c112f6..da4fe6b 100644
--- a/lib/gltests/test-getdelim.c
+++ b/lib/gltests/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/lib/gltests/test-getline.c b/lib/gltests/test-getline.c
index 51fc816..50722cd 100644
--- a/lib/gltests/test-getline.c
+++ b/lib/gltests/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/lib/gltests/test-memchr.c b/lib/gltests/test-memchr.c
index 1124f8b..d5e53e0 100644
--- a/lib/gltests/test-memchr.c
+++ b/lib/gltests/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/gltests/test-rawmemchr.c b/lib/gltests/test-rawmemchr.c
index 34e70ef..963af39 100644
--- a/lib/gltests/test-rawmemchr.c
+++ b/lib/gltests/test-rawmemchr.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008 Free Software Foundation
+ * Copyright (C) 2008, 2009 Free Software Foundation
  * Written by Eric Blake and Bruno Haible
  *
  * This program is free software: you can redistribute it and/or modify
@@ -39,7 +39,7 @@
 #define RAWMEMCHR (char *) rawmemchr
 
 int
-main ()
+main (void)
 {
   size_t n = 0x100000;
   char *input = malloc (n + 1);
diff --git a/lib/gltests/test-stddef.c b/lib/gltests/test-stddef.c
index f848498..c0a7515 100644
--- a/lib/gltests/test-stddef.c
+++ b/lib/gltests/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/gltests/test-stdint.c b/lib/gltests/test-stdint.c
index a2bf42a..4e9b362 100644
--- a/lib/gltests/test-stdint.c
+++ b/lib/gltests/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/gltests/test-stdio.c b/lib/gltests/test-stdio.c
index dcfe38d..3f2f067 100644
--- a/lib/gltests/test-stdio.c
+++ b/lib/gltests/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/gltests/test-stdlib.c b/lib/gltests/test-stdlib.c
index ae46ba1..fad5cf4 100644
--- a/lib/gltests/test-stdlib.c
+++ b/lib/gltests/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/gltests/test-strchrnul.c b/lib/gltests/test-strchrnul.c
index dc55066..ea882e5 100644
--- a/lib/gltests/test-strchrnul.c
+++ b/lib/gltests/test-strchrnul.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008 Free Software Foundation
+ * Copyright (C) 2008, 2009 Free Software Foundation
  * Written by Eric Blake and Bruno Haible
  *
  * This program is free software: you can redistribute it and/or modify
@@ -35,7 +35,7 @@
   while (0)
 
 int
-main ()
+main (void)
 {
   size_t n = 0x100000;
   char *input = malloc (n + 1);
diff --git a/lib/gltests/test-string.c b/lib/gltests/test-string.c
index fe53cd9..69df747 100644
--- a/lib/gltests/test-string.c
+++ b/lib/gltests/test-string.c
@@ -27,7 +27,7 @@
 verify (sizeof NULL == sizeof (void *));
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/lib/gltests/test-strverscmp.c b/lib/gltests/test-strverscmp.c
index 04da20c..a98695b 100644
--- a/lib/gltests/test-strverscmp.c
+++ b/lib/gltests/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/gltests/test-unistd.c b/lib/gltests/test-unistd.c
index 129367b..dd907f4 100644
--- a/lib/gltests/test-unistd.c
+++ b/lib/gltests/test-unistd.c
@@ -50,7 +50,7 @@ intptr_t t8;
 #endif
 
 int
-main ()
+main (void)
 {
   return 0;
 }
diff --git a/lib/gltests/test-wchar.c b/lib/gltests/test-wchar.c
index 2866068..2e60bb8 100644
--- a/lib/gltests/test-wchar.c
+++ b/lib/gltests/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/maint.mk b/lib/maint.mk
index 68bd8f9..996344a 100644
--- a/lib/maint.mk
+++ b/lib/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/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:


hooks/post-receive
-- 
GNU gsasl




reply via email to

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