diff options
author | Simon Josefsson <simon@josefsson.org> | 2013-03-24 10:17:07 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2013-03-24 10:17:07 +0100 |
commit | 50e02f7e015ccd603d89039f1ad82a5b2eb9a25a (patch) | |
tree | 165b0e7818031f9cc9f57c5b78fd23a03b2cbb99 /gl | |
parent | eb7dcd9f2da288acf527e13fc8f701d7b20886bf (diff) | |
download | libtasn1-50e02f7e015ccd603d89039f1ad82a5b2eb9a25a.tar.gz libtasn1-50e02f7e015ccd603d89039f1ad82a5b2eb9a25a.tar.bz2 libtasn1-50e02f7e015ccd603d89039f1ad82a5b2eb9a25a.zip |
Update gnulib files.
Diffstat (limited to 'gl')
87 files changed, 369 insertions, 290 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am index a0e4802..d97b595 100644 --- a/gl/Makefile.am +++ b/gl/Makefile.am @@ -1,6 +1,6 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -613,6 +613,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ + -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ @@ -641,6 +642,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ + -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ @@ -654,6 +656,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ + -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ @@ -849,6 +852,7 @@ EXTRA_DIST += timespec.h ## begin gnulib module unistd BUILT_SOURCES += unistd.h +libgnu_la_SOURCES += unistd.c # We need the following in order to create an empty placeholder for # <unistd.h> when the system doesn't have one. diff --git a/gl/errno.in.h b/gl/errno.in.h index 5e5af92..49b3546 100644 --- a/gl/errno.in.h +++ b/gl/errno.in.h @@ -1,6 +1,6 @@ /* A POSIX-like <errno.h>. - Copyright (C) 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2008-2013 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 @@ -270,5 +270,10 @@ # define GNULIB_defined_ENOTRECOVERABLE 1 # endif +# ifndef EILSEQ +# define EILSEQ 2015 +# define GNULIB_defined_EILSEQ 1 +# endif + #endif /* _@GUARD_PREFIX@_ERRNO_H */ #endif /* _@GUARD_PREFIX@_ERRNO_H */ @@ -1,5 +1,5 @@ /* fstat() replacement. - Copyright (C) 2011-2012 Free Software Foundation, Inc. + Copyright (C) 2011-2013 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 @@ -31,7 +31,7 @@ #endif #undef __need_system_sys_stat_h -static inline int +static int orig_fstat (int fd, struct stat *buf) { return fstat (fd, buf); @@ -51,7 +51,7 @@ orig_fstat (int fd, struct stat *buf) #endif #if HAVE_MSVC_INVALID_PARAMETER_HANDLER -static inline int +static int fstat_nothrow (int fd, struct stat *buf) { int result; @@ -1,5 +1,5 @@ /* An ftell() function that works around platform bugs. - Copyright (C) 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2007-2013 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/gl/ftello.c b/gl/ftello.c index 1f581c5..3a2a0f2 100644 --- a/gl/ftello.c +++ b/gl/ftello.c @@ -1,5 +1,5 @@ /* An ftello() function that works around platform bugs. - Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2013 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/gl/getopt.c b/gl/getopt.c index 4342a34..ef0f4ce 100644 --- a/gl/getopt.c +++ b/gl/getopt.c @@ -2,7 +2,7 @@ NOTE: getopt is part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! - Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2012 Free Software + Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2013 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gl/getopt.in.h b/gl/getopt.in.h index 06b6dfc..d9c7d81 100644 --- a/gl/getopt.in.h +++ b/gl/getopt.in.h @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2012 Free Software + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2013 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -49,7 +49,9 @@ linkers. */ #if defined __GETOPT_PREFIX && !defined __need_getopt # if !@HAVE_GETOPT_H@ +# define __need_system_stdlib_h # include <stdlib.h> +# undef __need_system_stdlib_h # include <stdio.h> # include <unistd.h> # endif diff --git a/gl/getopt1.c b/gl/getopt1.c index fb2a8f5..55a6b4e 100644 --- a/gl/getopt1.c +++ b/gl/getopt1.c @@ -1,5 +1,5 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2012 Free Software + Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2013 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gl/getopt_int.h b/gl/getopt_int.h index 2da020c..a6e4b9e 100644 --- a/gl/getopt_int.h +++ b/gl/getopt_int.h @@ -1,5 +1,5 @@ /* Internal declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2012 Free Software + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2013 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gl/gettext.h b/gl/gettext.h index 65ca1e6..d021571 100644 --- a/gl/gettext.h +++ b/gl/gettext.h @@ -1,5 +1,5 @@ /* Convenience header for conditional use of GNU <libintl.h>. - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2012 Free Software + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2013 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/gl/gettime.c b/gl/gettime.c index 8075bfa..0a642dd 100644 --- a/gl/gettime.c +++ b/gl/gettime.c @@ -1,6 +1,6 @@ /* gettime -- get the system clock - Copyright (C) 2002, 2004-2007, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2002, 2004-2007, 2009-2013 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/gl/gettimeofday.c b/gl/gettimeofday.c index 5d35060..ad65c6d 100644 --- a/gl/gettimeofday.c +++ b/gl/gettimeofday.c @@ -1,6 +1,6 @@ /* Provide gettimeofday for systems that don't have it or for which it's broken. - Copyright (C) 2001-2003, 2005-2007, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2007, 2009-2013 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 @@ -1,5 +1,5 @@ /* An lseek() function that detects pipes. - Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2013 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/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4 index d978cb8..d4ad759 100644 --- a/gl/m4/00gnulib.m4 +++ b/gl/m4/00gnulib.m4 @@ -1,5 +1,5 @@ # 00gnulib.m4 serial 2 -dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2013 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. diff --git a/gl/m4/autobuild.m4 b/gl/m4/autobuild.m4 index 284dc60..3147b5b 100644 --- a/gl/m4/autobuild.m4 +++ b/gl/m4/autobuild.m4 @@ -1,5 +1,5 @@ # autobuild.m4 serial 7 -dnl Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2004, 2006-2013 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. diff --git a/gl/m4/clock_time.m4 b/gl/m4/clock_time.m4 index 0bec0ef..6597fb6 100644 --- a/gl/m4/clock_time.m4 +++ b/gl/m4/clock_time.m4 @@ -1,5 +1,5 @@ # clock_time.m4 serial 10 -dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2013 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. diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4 index 1e76ba2..c813ea5 100644 --- a/gl/m4/errno_h.m4 +++ b/gl/m4/errno_h.m4 @@ -1,5 +1,5 @@ -# errno_h.m4 serial 11 -dnl Copyright (C) 2004, 2006, 2008-2012 Free Software Foundation, Inc. +# errno_h.m4 serial 12 +dnl Copyright (C) 2004, 2006, 2008-2013 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. @@ -58,6 +58,9 @@ booboo #if !defined ENOTRECOVERABLE booboo #endif +#if !defined EILSEQ +booboo +#endif ], [gl_cv_header_errno_h_complete=no], [gl_cv_header_errno_h_complete=yes]) diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4 index 6d17d8a..07ba376 100644 --- a/gl/m4/extensions.m4 +++ b/gl/m4/extensions.m4 @@ -1,14 +1,14 @@ -# serial 12 -*- Autoconf -*- +# serial 13 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS # Autoconf. Perhaps we can remove this once we can assume Autoconf -# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly +# 2.70 or later everywhere, but since Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. @@ -30,6 +30,7 @@ # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. +# # Remember that #undef in AH_VERBATIM gets replaced with #define by # AC_DEFINE. The goal here is to define all known feature-enabling # macros, then, if reports of conflicts are made, disable macros that @@ -38,8 +39,6 @@ AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) if test "$MINIX" = yes; then AC_DEFINE([_POSIX_SOURCE], [1], @@ -50,24 +49,18 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl except with this defined.]) AC_DEFINE([_MINIX], [1], [Define to 1 if on MINIX.]) + AC_DEFINE([_NETBSD_SOURCE], [1], + [Define to 1 to make NetBSD features available. MINIX 3 needs this.]) fi - dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, - dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already - dnl provided. - case "$host_os" in - hpux*) - AC_DEFINE([_XOPEN_SOURCE], [500], - [Define to 500 only on HP-UX.]) - ;; - esac - - AH_VERBATIM([__EXTENSIONS__], +dnl Use a different key than __EXTENSIONS__, as that name broke existing +dnl configure.ac when using autoheader 2.62. + AH_VERBATIM([USE_SYSTEM_EXTENSIONS], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif -/* Enable general extensions on Mac OS X. */ +/* Enable general extensions on OS X. */ #ifndef _DARWIN_C_SOURCE # undef _DARWIN_C_SOURCE #endif @@ -83,6 +76,12 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE +#endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ @@ -103,6 +102,22 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) + AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], + [ac_cv_should_define__xopen_source], + [ac_cv_should_define__xopen_source=no + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #include <wchar.h> + mbstate_t x;]])], + [], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #define _XOPEN_SOURCE 500 + #include <wchar.h> + mbstate_t x;]])], + [ac_cv_should_define__xopen_source=yes])])]) + test $ac_cv_should_define__xopen_source = yes && + AC_DEFINE([_XOPEN_SOURCE], [500]) ])# AC_USE_SYSTEM_EXTENSIONS # gl_USE_SYSTEM_EXTENSIONS diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4 index 12f24fa..0152f29 100644 --- a/gl/m4/extern-inline.m4 +++ b/gl/m4/extern-inline.m4 @@ -1,13 +1,12 @@ dnl 'extern inline' a la ISO C99. -dnl Copyright 2012 Free Software Foundation, Inc. +dnl Copyright 2012-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_EXTERN_INLINE], [ - AC_REQUIRE([AC_C_INLINE]) AH_VERBATIM([extern_inline], [/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'. _GL_EXTERN_INLINE is a portable alternative to 'extern inline'. @@ -17,11 +16,22 @@ AC_DEFUN([gl_EXTERN_INLINE], when FOO is an inline function in the header; see <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>. _GL_INLINE_HEADER_END contains useful stuff to put - in the same include file, after uses of _GL_INLINE. */ -#if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__ + in the same include file, after uses of _GL_INLINE. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>. + + Suppress the use of extern inline on Apple's platforms, + as Libc-825.25 (2012-09-19) is incompatible with it; see + <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>. + Perhaps Apple will fix this some day. */ +#if ((__GNUC__ \ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : 199901L <= __STDC_VERSION__ && !defined __HP_cc) \ + && !defined __APPLE__) # define _GL_INLINE inline # define _GL_EXTERN_INLINE extern inline -#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __APPLE__ # if __GNUC_GNU_INLINE__ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) @@ -30,12 +40,12 @@ AC_DEFUN([gl_EXTERN_INLINE], # endif # define _GL_EXTERN_INLINE extern #else -# define _GL_INLINE static inline -# define _GL_EXTERN_INLINE static inline +# define _GL_INLINE static _GL_UNUSED +# define _GL_EXTERN_INLINE static _GL_UNUSED #endif #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) -# if __GNUC_STDC_INLINE__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ # define _GL_INLINE_HEADER_CONST_PRAGMA # else # define _GL_INLINE_HEADER_CONST_PRAGMA \ diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4 index 1bb88c7..e0f2dfb 100644 --- a/gl/m4/fseeko.m4 +++ b/gl/m4/fseeko.m4 @@ -1,5 +1,5 @@ # fseeko.m4 serial 16 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2013 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. diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4 index 3ab3297..b2cf2ad 100644 --- a/gl/m4/fstat.m4 +++ b/gl/m4/fstat.m4 @@ -1,5 +1,5 @@ -# fstat.m4 serial 3 -dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. +# fstat.m4 serial 4 +dnl Copyright (C) 2011-2013 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. @@ -33,7 +33,4 @@ AC_DEFUN([gl_FUNC_FSTAT], ]) # Prerequisites of lib/fstat.c. -AC_DEFUN([gl_PREREQ_FSTAT], -[ - AC_REQUIRE([AC_C_INLINE]) -]) +AC_DEFUN([gl_PREREQ_FSTAT], [:]) diff --git a/gl/m4/ftell.m4 b/gl/m4/ftell.m4 index ed8d014..5acd752 100644 --- a/gl/m4/ftell.m4 +++ b/gl/m4/ftell.m4 @@ -1,5 +1,5 @@ # ftell.m4 serial 3 -dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2013 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. diff --git a/gl/m4/ftello.m4 b/gl/m4/ftello.m4 index ab7b548..678039e 100644 --- a/gl/m4/ftello.m4 +++ b/gl/m4/ftello.m4 @@ -1,5 +1,5 @@ # ftello.m4 serial 11 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2013 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. diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4 index f6902b5..50f4509 100644 --- a/gl/m4/getopt.m4 +++ b/gl/m4/getopt.m4 @@ -1,5 +1,5 @@ # getopt.m4 serial 44 -dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2008-2013 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. diff --git a/gl/m4/gettime.m4 b/gl/m4/gettime.m4 index 7d03d12..dc100de 100644 --- a/gl/m4/gettime.m4 +++ b/gl/m4/gettime.m4 @@ -1,5 +1,5 @@ # gettime.m4 serial 8 -dnl Copyright (C) 2002, 2004-2006, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2004-2006, 2009-2013 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. diff --git a/gl/m4/gettimeofday.m4 b/gl/m4/gettimeofday.m4 index eda9702..3c05e59 100644 --- a/gl/m4/gettimeofday.m4 +++ b/gl/m4/gettimeofday.m4 @@ -1,6 +1,6 @@ # serial 20 -# Copyright (C) 2001-2003, 2005, 2007, 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2003, 2005, 2007, 2009-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 index 6bea3f6..8d2d0b9 100644 --- a/gl/m4/gnulib-cache.m4 +++ b/gl/m4/gnulib-cache.m4 @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file 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/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4 index 15d2b2b..0ae5a9e 100644 --- a/gl/m4/gnulib-common.m4 +++ b/gl/m4/gnulib-common.m4 @@ -1,5 +1,5 @@ # gnulib-common.m4 serial 33 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2013 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. @@ -294,6 +294,8 @@ Amsterdam # for interoperability with automake-1.9.6 from autoconf-2.62. # Remove this macro when we can assume autoconf >= 2.62 or # autoconf >= 2.60 && automake >= 1.10. +# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness. +m4_ifndef([AC_AUTOCONF_VERSION],[ m4_ifdef([AC_PROG_MKDIR_P], [ dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed. m4_define([AC_PROG_MKDIR_P], @@ -304,13 +306,15 @@ m4_ifdef([AC_PROG_MKDIR_P], [ [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake MKDIR_P='$(mkdir_p)' AC_SUBST([MKDIR_P])])]) +]) # AC_C_RESTRICT # This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61, # so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ # works. # This definition can be removed once autoconf >= 2.62 can be assumed. -m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[ +# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness. +m4_ifndef([AC_AUTOCONF_VERSION],[ AC_DEFUN([AC_C_RESTRICT], [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], [ac_cv_c_restrict=no diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index afaabe3..90e6dcf 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -1,5 +1,5 @@ # DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -407,6 +407,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/time.in.h lib/timespec.c lib/timespec.h + lib/unistd.c lib/unistd.in.h lib/version-etc-fsf.c lib/version-etc.c diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4 index a09ffc1..f3dea1a 100644 --- a/gl/m4/gnulib-tool.m4 +++ b/gl/m4/gnulib-tool.m4 @@ -1,5 +1,5 @@ # gnulib-tool.m4 serial 2 -dnl Copyright (C) 2004-2005, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2005, 2009-2013 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. diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4 index a60a261..108d945 100644 --- a/gl/m4/include_next.m4 +++ b/gl/m4/include_next.m4 @@ -1,5 +1,5 @@ # include_next.m4 serial 23 -dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2013 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. diff --git a/gl/m4/largefile.m4 b/gl/m4/largefile.m4 index a88850a..1e605e3 100644 --- a/gl/m4/largefile.m4 +++ b/gl/m4/largefile.m4 @@ -1,13 +1,14 @@ # Enable large files on systems where this is not the default. -# Copyright 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright 1992-1996, 1998-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# The following implementation works around a problem in autoconf <= 2.68; -# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5. -m4_version_prereq([2.69], [] ,[ +# The following implementation works around a problem in autoconf <= 2.69; +# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5, +# or configures them incorrectly in some cases. +m4_version_prereq([2.70], [] ,[ # _AC_SYS_LARGEFILE_TEST_INCLUDES # ------------------------------- @@ -25,9 +26,9 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, -# CACHE-VAR, -# DESCRIPTION, -# PROLOGUE, [FUNCTION-BODY]) +# CACHE-VAR, +# DESCRIPTION, +# PROLOGUE, [FUNCTION-BODY]) # -------------------------------------------------------- m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE], [AC_CACHE_CHECK([for $1 value needed for large files], [$3], @@ -93,15 +94,11 @@ if test "$enable_largefile" != no; then [_AC_SYS_LARGEFILE_TEST_INCLUDES]) fi - AH_VERBATIM([_DARWIN_USE_64_BIT_INODE], -[/* Enable large inode numbers on Mac OS X. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif]) + AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1], + [Enable large inode numbers on Mac OS X 10.5.]) fi ])# AC_SYS_LARGEFILE - -])# m4_version_prereq 2.69 +])# m4_version_prereq 2.70 # Enable large files on systems where this is implemented by Gnulib, not by the # system headers. diff --git a/gl/m4/longlong.m4 b/gl/m4/longlong.m4 index b9c65c7..3af6ab5 100644 --- a/gl/m4/longlong.m4 +++ b/gl/m4/longlong.m4 @@ -1,5 +1,5 @@ # longlong.m4 serial 17 -dnl Copyright (C) 1999-2007, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 1999-2007, 2009-2013 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. diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4 index bdda7f6..df9302a 100644 --- a/gl/m4/lseek.m4 +++ b/gl/m4/lseek.m4 @@ -1,5 +1,5 @@ # lseek.m4 serial 10 -dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2013 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. diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4 index 8fa48e9..4b24a0b 100644 --- a/gl/m4/malloc.m4 +++ b/gl/m4/malloc.m4 @@ -1,5 +1,5 @@ # malloc.m4 serial 14 -dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2013 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. diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4 index 2760efb..45a30af 100644 --- a/gl/m4/manywarnings.m4 +++ b/gl/m4/manywarnings.m4 @@ -1,5 +1,5 @@ -# manywarnings.m4 serial 4 -dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. +# manywarnings.m4 serial 5 +dnl Copyright (C) 2008-2013 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. @@ -35,14 +35,12 @@ AC_DEFUN([gl_MANYWARN_COMPLEMENT], # make sure your gcc understands it. AC_DEFUN([gl_MANYWARN_ALL_GCC], [ - dnl First, check if -Wno-missing-field-initializers is needed. - dnl -Wmissing-field-initializers is implied by -W, but that issues - dnl warnings with GCC version before 4.7, for the common idiom - dnl of initializing types on the stack to zero, using { 0, } + dnl First, check for some issues that only occur when combining multiple + dnl gcc warning categories. AC_REQUIRE([AC_PROG_CC]) if test -n "$GCC"; then - dnl First, check -W -Werror -Wno-missing-field-initializers is supported + dnl Check if -W -Werror -Wno-missing-field-initializers is supported dnl with the current $CC $CFLAGS $CPPFLAGS. AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported]) AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [ @@ -77,8 +75,24 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], ]) AC_MSG_RESULT([$gl_cv_cc_nomfi_needed]) fi + + dnl Next, check if -Werror -Wuninitialized is useful with the + dnl user's choice of $CFLAGS; some versions of gcc warn that it + dnl has no effect if -O is not also used + AC_MSG_CHECKING([whether -Wuninitialized is supported]) + AC_CACHE_VAL([gl_cv_cc_uninitialized_supported], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror -Wuninitialized" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_uninitialized_supported=yes], + [gl_cv_cc_uninitialized_supported=no]) + CFLAGS="$gl_save_CFLAGS"]) + AC_MSG_RESULT([$gl_cv_cc_uninitialized_supported]) + fi + # List all gcc warning categories. gl_manywarn_set= for gl_manywarn_item in \ -W \ @@ -197,10 +211,14 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done - # Disable the missing-field-initializers warning if needed + # Disable specific options as needed. if test "$gl_cv_cc_nomfi_needed" = yes; then gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" fi + if test "$gl_cv_cc_uninitialized_supported" = no; then + gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized" + fi + $1=$gl_manywarn_set ]) diff --git a/gl/m4/msvc-inval.m4 b/gl/m4/msvc-inval.m4 index 8db4617..9a6a47a 100644 --- a/gl/m4/msvc-inval.m4 +++ b/gl/m4/msvc-inval.m4 @@ -1,5 +1,5 @@ # msvc-inval.m4 serial 1 -dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2013 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. diff --git a/gl/m4/msvc-nothrow.m4 b/gl/m4/msvc-nothrow.m4 index 0125050..a39618a 100644 --- a/gl/m4/msvc-nothrow.m4 +++ b/gl/m4/msvc-nothrow.m4 @@ -1,5 +1,5 @@ # msvc-nothrow.m4 serial 1 -dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2013 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. diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4 index 0c288b8..552ec7e 100644 --- a/gl/m4/multiarch.m4 +++ b/gl/m4/multiarch.m4 @@ -1,5 +1,5 @@ # multiarch.m4 serial 7 -dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2013 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. diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4 index c2638df..105b884 100644 --- a/gl/m4/nocrash.m4 +++ b/gl/m4/nocrash.m4 @@ -1,5 +1,5 @@ # nocrash.m4 serial 4 -dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2009-2013 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. diff --git a/gl/m4/off_t.m4 b/gl/m4/off_t.m4 index dfca2df..d355d01 100644 --- a/gl/m4/off_t.m4 +++ b/gl/m4/off_t.m4 @@ -1,5 +1,5 @@ # off_t.m4 serial 1 -dnl Copyright (C) 2012 Free Software Foundation, Inc. +dnl Copyright (C) 2012-2013 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. diff --git a/gl/m4/read-file.m4 b/gl/m4/read-file.m4 index 3665247..491bba8 100644 --- a/gl/m4/read-file.m4 +++ b/gl/m4/read-file.m4 @@ -1,5 +1,5 @@ # read-file.m4 serial 3 -dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2013 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. diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4 index 954c2f0..d477fb4 100644 --- a/gl/m4/realloc.m4 +++ b/gl/m4/realloc.m4 @@ -1,5 +1,5 @@ # realloc.m4 serial 13 -dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2013 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. diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4 index 209d64c..6338134 100644 --- a/gl/m4/ssize_t.m4 +++ b/gl/m4/ssize_t.m4 @@ -1,5 +1,5 @@ # ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2003, 2006, 2010-2013 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. diff --git a/gl/m4/stdarg.m4 b/gl/m4/stdarg.m4 index 5c313cb..c087f61 100644 --- a/gl/m4/stdarg.m4 +++ b/gl/m4/stdarg.m4 @@ -1,5 +1,5 @@ # stdarg.m4 serial 6 -dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2008-2013 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. diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4 index cc11609..5da8ab1 100644 --- a/gl/m4/stddef_h.m4 +++ b/gl/m4/stddef_h.m4 @@ -1,6 +1,6 @@ dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues. # stddef_h.m4 serial 4 -dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2013 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. diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4 index 28d342e..27cdcdb 100644 --- a/gl/m4/stdint.m4 +++ b/gl/m4/stdint.m4 @@ -1,5 +1,5 @@ # stdint.m4 serial 43 -dnl Copyright (C) 2001-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2013 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. diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4 index 5298dd6..ebade06 100644 --- a/gl/m4/stdio_h.m4 +++ b/gl/m4/stdio_h.m4 @@ -1,5 +1,5 @@ -# stdio_h.m4 serial 42 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +# stdio_h.m4 serial 43 +dnl Copyright (C) 2007-2013 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. @@ -7,7 +7,6 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDIO_H], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([AC_C_INLINE]) gl_NEXT_HEADERS([stdio.h]) dnl No need to create extra modules for these functions. Everyone who uses diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4 index ab43728..2027ab3 100644 --- a/gl/m4/stdlib_h.m4 +++ b/gl/m4/stdlib_h.m4 @@ -1,5 +1,5 @@ -# stdlib_h.m4 serial 41 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +# stdlib_h.m4 serial 42 +dnl Copyright (C) 2007-2013 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. @@ -22,7 +22,7 @@ AC_DEFUN([gl_STDLIB_H], ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random random_r realpath rpmatch - setenv setstate setstate_r srandom srandom_r + secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv]) ]) @@ -60,6 +60,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) + GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV]) GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) @@ -88,6 +89,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) + HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV]) HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) @@ -102,6 +104,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) + REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME]) REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R]) diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4 index 8d4e7e1..9486377 100644 --- a/gl/m4/sys_socket_h.m4 +++ b/gl/m4/sys_socket_h.m4 @@ -1,5 +1,5 @@ -# sys_socket_h.m4 serial 22 -dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. +# sys_socket_h.m4 serial 23 +dnl Copyright (C) 2005-2013 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. @@ -10,7 +10,6 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET], [ AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_C_INLINE]) dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have dnl old-style declarations (with return type 'int' instead of 'ssize_t') diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4 index f45dee1..6dd3d99 100644 --- a/gl/m4/sys_stat_h.m4 +++ b/gl/m4/sys_stat_h.m4 @@ -1,5 +1,5 @@ -# sys_stat_h.m4 serial 27 -*- Autoconf -*- -dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. +# sys_stat_h.m4 serial 28 -*- Autoconf -*- +dnl Copyright (C) 2006-2013 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. @@ -11,9 +11,6 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - dnl For the mkdir substitute. - AC_REQUIRE([AC_C_INLINE]) - dnl Check for broken stat macros. AC_REQUIRE([AC_HEADER_STAT]) diff --git a/gl/m4/sys_time_h.m4 b/gl/m4/sys_time_h.m4 index c4a30cd..0ac71ac 100644 --- a/gl/m4/sys_time_h.m4 +++ b/gl/m4/sys_time_h.m4 @@ -1,7 +1,7 @@ # Configure a replacement for <sys/time.h>. # serial 8 -# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4 index f11eef2..d15c1b3 100644 --- a/gl/m4/sys_types_h.m4 +++ b/gl/m4/sys_types_h.m4 @@ -1,10 +1,10 @@ -# sys_types_h.m4 serial 4 -dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. +# sys_types_h.m4 serial 5 +dnl Copyright (C) 2011-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -AC_DEFUN([gl_SYS_TYPES_H], +AC_DEFUN_ONCE([gl_SYS_TYPES_H], [ AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) gl_NEXT_HEADERS([sys/types.h]) diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4 index 6415bfb..3b83900 100644 --- a/gl/m4/time_h.m4 +++ b/gl/m4/time_h.m4 @@ -1,6 +1,6 @@ # Configure a more-standard replacement for <time.h>. -# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc. # serial 7 diff --git a/gl/m4/timespec.m4 b/gl/m4/timespec.m4 index 63c00e8..399404b 100644 --- a/gl/m4/timespec.m4 +++ b/gl/m4/timespec.m4 @@ -1,6 +1,6 @@ #serial 15 -# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4 index 7e7651b..32dcfa5 100644 --- a/gl/m4/unistd_h.m4 +++ b/gl/m4/unistd_h.m4 @@ -1,5 +1,5 @@ -# unistd_h.m4 serial 65 -dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. +# unistd_h.m4 serial 66 +dnl Copyright (C) 2006-2013 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. @@ -11,7 +11,6 @@ AC_DEFUN([gl_UNISTD_H], dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_C_INLINE]) gl_CHECK_NEXT_HEADERS([unistd.h]) if test $ac_cv_header_unistd_h = yes; then diff --git a/gl/m4/valgrind-tests.m4 b/gl/m4/valgrind-tests.m4 index 753d6fa..d5efeca 100644 --- a/gl/m4/valgrind-tests.m4 +++ b/gl/m4/valgrind-tests.m4 @@ -1,5 +1,5 @@ # valgrind-tests.m4 serial 3 -dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2013 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. diff --git a/gl/m4/version-etc.m4 b/gl/m4/version-etc.m4 index 4c6c678..5dbef8e 100644 --- a/gl/m4/version-etc.m4 +++ b/gl/m4/version-etc.m4 @@ -1,5 +1,5 @@ # version-etc.m4 serial 1 -# Copyright (C) 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4 index a77802e..e43beeb 100644 --- a/gl/m4/warn-on-use.m4 +++ b/gl/m4/warn-on-use.m4 @@ -1,5 +1,5 @@ # warn-on-use.m4 serial 5 -dnl Copyright (C) 2010-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2010-2013 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. diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4 index 28b8294..4b2ac38 100644 --- a/gl/m4/warnings.m4 +++ b/gl/m4/warnings.m4 @@ -1,5 +1,5 @@ # warnings.m4 serial 7 -dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2013 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. diff --git a/gl/m4/wchar_t.m4 b/gl/m4/wchar_t.m4 index 534735d..e1e1e69 100644 --- a/gl/m4/wchar_t.m4 +++ b/gl/m4/wchar_t.m4 @@ -1,5 +1,5 @@ # wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2003, 2008-2013 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. diff --git a/gl/malloc.c b/gl/malloc.c index e0d5c89..908735d 100644 --- a/gl/malloc.c +++ b/gl/malloc.c @@ -1,6 +1,6 @@ /* malloc() function that is glibc compatible. - Copyright (C) 1997-1998, 2006-2007, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 1997-1998, 2006-2007, 2009-2013 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/gl/msvc-inval.c b/gl/msvc-inval.c index ba76a7e..72a6b6e 100644 --- a/gl/msvc-inval.c +++ b/gl/msvc-inval.c @@ -1,5 +1,5 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2012 Free Software Foundation, Inc. + Copyright (C) 2011-2013 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/gl/msvc-inval.h b/gl/msvc-inval.h index eb6930b..dcb0353 100644 --- a/gl/msvc-inval.h +++ b/gl/msvc-inval.h @@ -1,5 +1,5 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2012 Free Software Foundation, Inc. + Copyright (C) 2011-2013 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/gl/msvc-nothrow.c b/gl/msvc-nothrow.c index e5cf181..8d65472 100644 --- a/gl/msvc-nothrow.c +++ b/gl/msvc-nothrow.c @@ -1,6 +1,6 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011-2012 Free Software Foundation, Inc. + Copyright (C) 2011-2013 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/gl/msvc-nothrow.h b/gl/msvc-nothrow.h index 2b71945..5f52181 100644 --- a/gl/msvc-nothrow.h +++ b/gl/msvc-nothrow.h @@ -1,6 +1,6 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011-2012 Free Software Foundation, Inc. + Copyright (C) 2011-2013 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/gl/progname.c b/gl/progname.c index bdd4dd7..0c195e5 100644 --- a/gl/progname.c +++ b/gl/progname.c @@ -1,5 +1,5 @@ /* Program name management. - Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2013 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gl/progname.h b/gl/progname.h index a75a02e..b4f3c27 100644 --- a/gl/progname.h +++ b/gl/progname.h @@ -1,5 +1,5 @@ /* Program name management. - Copyright (C) 2001-2004, 2006, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2006, 2009-2013 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2001. This program is free software: you can redistribute it and/or modify diff --git a/gl/read-file.c b/gl/read-file.c index 87a7f36..bcc5a92 100644 --- a/gl/read-file.c +++ b/gl/read-file.c @@ -1,5 +1,5 @@ /* read-file.c -- read file contents into a string - Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc. Written by Simon Josefsson and Bruno Haible. This program is free software; you can redistribute it and/or modify @@ -26,11 +26,7 @@ #include <stdio.h> /* Get SIZE_MAX. */ -#ifdef __BIONIC__ -#include <limits.h> -#else #include <stdint.h> -#endif /* Get malloc, realloc, free. */ #include <stdlib.h> diff --git a/gl/read-file.h b/gl/read-file.h index a1142b8..507135f 100644 --- a/gl/read-file.h +++ b/gl/read-file.h @@ -1,5 +1,5 @@ /* read-file.h -- read file contents into a string - Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify diff --git a/gl/realloc.c b/gl/realloc.c index 99556cc..b51010a 100644 --- a/gl/realloc.c +++ b/gl/realloc.c @@ -1,6 +1,6 @@ /* realloc() function that is glibc compatible. - Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2012 Free Software + Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gl/stdarg.in.h b/gl/stdarg.in.h index 53104a6..7484842 100644 --- a/gl/stdarg.in.h +++ b/gl/stdarg.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around <stdarg.h>. - Copyright (C) 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2008-2013 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/gl/stddef.in.h b/gl/stddef.in.h index 17fcaea..40f0536 100644 --- a/gl/stddef.in.h +++ b/gl/stddef.in.h @@ -1,6 +1,6 @@ /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. - Copyright (C) 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2009-2013 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/gl/stdint.in.h b/gl/stdint.in.h index 2f80268..2db8b2e 100644 --- a/gl/stdint.in.h +++ b/gl/stdint.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2002, 2004-2012 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2013 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. diff --git a/gl/stdio-impl.h b/gl/stdio-impl.h index 920b4d4..e00600a 100644 --- a/gl/stdio-impl.h +++ b/gl/stdio-impl.h @@ -1,5 +1,5 @@ /* Implementation details of FILE streams. - Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc. + Copyright (C) 2007-2008, 2010-2013 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/gl/stdio.in.h b/gl/stdio.in.h index b1b543d..d6af99c 100644 --- a/gl/stdio.in.h +++ b/gl/stdio.in.h @@ -1,6 +1,6 @@ /* A GNU-like <stdio.h>. - Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2013 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 @@ -575,21 +575,17 @@ _GL_CXXALIAS_RPL (fwrite, size_t, _GL_CXXALIAS_SYS (fwrite, size_t, (const void *ptr, size_t s, size_t n, FILE *stream)); -/* Work around glibc bug 11959 +/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>, which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes, so it's not - needed for C++. */ -# if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL -static inline size_t _GL_ARG_NONNULL ((1, 4)) -rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream) -{ - size_t r = fwrite (ptr, s, n, stream); - (void) r; - return r; -} + This affects only function declaration attributes under certain + versions of gcc, and is not needed for C++. */ +# if (0 < __USE_FORTIFY_LEVEL \ + && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ + && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ + && !defined __cplusplus) # undef fwrite -# define fwrite rpl_fwrite +# define fwrite(a, b, c, d) ({size_t __r = fwrite (a, b, c, d); __r; }) # endif # endif _GL_CXXALIASWARN (fwrite); @@ -1333,7 +1329,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " "POSIX compliance"); #endif - #endif /* _@GUARD_PREFIX@_STDIO_H */ #endif /* _@GUARD_PREFIX@_STDIO_H */ #endif diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h index 1d67ec6..c955248 100644 --- a/gl/stdlib.in.h +++ b/gl/stdlib.in.h @@ -1,6 +1,6 @@ /* A GNU-like <stdlib.h>. - Copyright (C) 1995, 2001-2004, 2006-2012 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2013 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 @@ -20,8 +20,9 @@ #endif @PRAGMA_COLUMNS@ -#if defined __need_malloc_and_calloc -/* Special invocation convention inside glibc header files. */ +#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc +/* Special invocation conventions inside some gnulib header files, + and inside some glibc header files, respectively. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ @@ -457,10 +458,19 @@ _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " #if @GNULIB_PTSNAME@ /* Return the pathname of the pseudo-terminal slave associated with the master FD is open on, or NULL on errors. */ -# if !@HAVE_PTSNAME@ +# if @REPLACE_PTSNAME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ptsname +# define ptsname rpl_ptsname +# endif +_GL_FUNCDECL_RPL (ptsname, char *, (int fd)); +_GL_CXXALIAS_RPL (ptsname, char *, (int fd)); +# else +# if !@HAVE_PTSNAME@ _GL_FUNCDECL_SYS (ptsname, char *, (int fd)); -# endif +# endif _GL_CXXALIAS_SYS (ptsname, char *, (int fd)); +# endif _GL_CXXALIASWARN (ptsname); #elif defined GNULIB_POSIXCHECK # undef ptsname @@ -757,6 +767,22 @@ _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " # endif #endif +#if @GNULIB_SECURE_GETENV@ +/* Look up NAME in the environment, returning 0 in insecure situations. */ +# if !@HAVE_SECURE_GETENV@ +_GL_FUNCDECL_SYS (secure_getenv, char *, + (char const *name) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name)); +_GL_CXXALIASWARN (secure_getenv); +#elif defined GNULIB_POSIXCHECK +# undef secure_getenv +# if HAVE_RAW_DECL_SECURE_GETENV +_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " + "use gnulib module secure_getenv for portability"); +# endif +#endif + #if @GNULIB_SETENV@ /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h index 2efc1e9..acc3694 100644 --- a/gl/sys_stat.in.h +++ b/gl/sys_stat.in.h @@ -1,5 +1,5 @@ /* Provide a more complete sys/stat header file. - Copyright (C) 2005-2012 Free Software Foundation, Inc. + Copyright (C) 2005-2013 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 @@ -150,6 +150,10 @@ # endif #endif +#ifndef S_ISMPX /* AIX */ +# define S_ISMPX(m) 0 +#endif + #ifndef S_ISNAM /* Xenix */ # ifdef S_IFNAM # define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) @@ -497,7 +501,7 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # if !GNULIB_defined_rpl_mkdir -static inline int +static int rpl_mkdir (char const *name, mode_t mode) { return _mkdir (name); diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h index d915cee..3dbf632 100644 --- a/gl/sys_time.in.h +++ b/gl/sys_time.in.h @@ -1,6 +1,6 @@ /* Provide a more complete sys/time.h. - Copyright (C) 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2007-2013 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 @@ -17,37 +17,42 @@ /* Written by Paul Eggert. */ +#ifndef _@GUARD_PREFIX@_SYS_TIME_H + #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ -#if defined _@GUARD_PREFIX@_SYS_TIME_H - -/* Simply delegate to the system's header, without adding anything. */ -# if @HAVE_SYS_TIME_H@ -# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ -# endif - +/* On Cygwin, <sys/time.h> includes itself recursively via <sys/select.h>. + Simply delegate to the system's header in this case; it is a no-op. + Without this extra ifdef, the C++ gettimeofday declaration below + would be a forward declaration in gnulib's nested <sys/time.h>. */ +#ifdef _CYGWIN_SYS_TIME_H +# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ #else -# define _@GUARD_PREFIX@_SYS_TIME_H +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_SYS_TIME_H@ +# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ +#endif + +#ifndef _@GUARD_PREFIX@_SYS_TIME_H +#define _@GUARD_PREFIX@_SYS_TIME_H -# if @HAVE_SYS_TIME_H@ -# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ -# else -# include <time.h> -# endif +#if ! @HAVE_SYS_TIME_H@ +# include <time.h> +#endif /* On native Windows with MSVC, get the 'struct timeval' type. Also, on native Windows with a 64-bit time_t, where we are overriding the 'struct timeval' type, get all declarations of system functions whose signature contains 'struct timeval'. */ -# if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H -# define _GL_INCLUDING_WINSOCK2_H -# include <winsock2.h> -# undef _GL_INCLUDING_WINSOCK2_H -# endif +#if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H +# define _GL_INCLUDING_WINSOCK2_H +# include <winsock2.h> +# undef _GL_INCLUDING_WINSOCK2_H +#endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ @@ -55,112 +60,112 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ -# ifdef __cplusplus +#ifdef __cplusplus extern "C" { -# endif +#endif -# if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@ +#if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@ -# if @REPLACE_STRUCT_TIMEVAL@ -# define timeval rpl_timeval -# endif +# if @REPLACE_STRUCT_TIMEVAL@ +# define timeval rpl_timeval +# endif -# if !GNULIB_defined_struct_timeval +# if !GNULIB_defined_struct_timeval struct timeval { time_t tv_sec; long int tv_usec; }; -# define GNULIB_defined_struct_timeval 1 -# endif - +# define GNULIB_defined_struct_timeval 1 # endif -# ifdef __cplusplus +#endif + +#ifdef __cplusplus } -# endif +#endif -# if @GNULIB_GETTIMEOFDAY@ -# if @REPLACE_GETTIMEOFDAY@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gettimeofday -# define gettimeofday rpl_gettimeofday -# endif +#if @GNULIB_GETTIMEOFDAY@ +# if @REPLACE_GETTIMEOFDAY@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gettimeofday +# define gettimeofday rpl_gettimeofday +# endif _GL_FUNCDECL_RPL (gettimeofday, int, (struct timeval *restrict, void *restrict) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (gettimeofday, int, (struct timeval *restrict, void *restrict)); -# else -# if !@HAVE_GETTIMEOFDAY@ +# else +# if !@HAVE_GETTIMEOFDAY@ _GL_FUNCDECL_SYS (gettimeofday, int, (struct timeval *restrict, void *restrict) _GL_ARG_NONNULL ((1))); -# endif +# endif /* Need to cast, because on glibc systems, by default, the second argument is struct timezone *. */ _GL_CXXALIAS_SYS_CAST (gettimeofday, int, (struct timeval *restrict, void *restrict)); -# endif +# endif _GL_CXXALIASWARN (gettimeofday); -# elif defined GNULIB_POSIXCHECK -# undef gettimeofday -# if HAVE_RAW_DECL_GETTIMEOFDAY +#elif defined GNULIB_POSIXCHECK +# undef gettimeofday +# if HAVE_RAW_DECL_GETTIMEOFDAY _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " "use gnulib module gettimeofday for portability"); -# endif # endif +#endif /* Hide some function declarations from <winsock2.h>. */ -# if defined _MSC_VER && @HAVE_WINSOCK2_H@ -# if !defined _@GUARD_PREFIX@_UNISTD_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef close -# define close close_used_without_including_unistd_h -# else +#if defined _MSC_VER && @HAVE_WINSOCK2_H@ +# if !defined _@GUARD_PREFIX@_UNISTD_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close close_used_without_including_unistd_h +# else _GL_WARN_ON_USE (close, "close() used without including <unistd.h>"); -# endif -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gethostname -# define gethostname gethostname_used_without_including_unistd_h -# else +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gethostname +# define gethostname gethostname_used_without_including_unistd_h +# else _GL_WARN_ON_USE (gethostname, "gethostname() used without including <unistd.h>"); -# endif # endif -# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef socket -# define socket socket_used_without_including_sys_socket_h -# undef connect -# define connect connect_used_without_including_sys_socket_h -# undef accept -# define accept accept_used_without_including_sys_socket_h -# undef bind -# define bind bind_used_without_including_sys_socket_h -# undef getpeername -# define getpeername getpeername_used_without_including_sys_socket_h -# undef getsockname -# define getsockname getsockname_used_without_including_sys_socket_h -# undef getsockopt -# define getsockopt getsockopt_used_without_including_sys_socket_h -# undef listen -# define listen listen_used_without_including_sys_socket_h -# undef recv -# define recv recv_used_without_including_sys_socket_h -# undef send -# define send send_used_without_including_sys_socket_h -# undef recvfrom -# define recvfrom recvfrom_used_without_including_sys_socket_h -# undef sendto -# define sendto sendto_used_without_including_sys_socket_h -# undef setsockopt -# define setsockopt setsockopt_used_without_including_sys_socket_h -# undef shutdown -# define shutdown shutdown_used_without_including_sys_socket_h -# else +# endif +# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef socket +# define socket socket_used_without_including_sys_socket_h +# undef connect +# define connect connect_used_without_including_sys_socket_h +# undef accept +# define accept accept_used_without_including_sys_socket_h +# undef bind +# define bind bind_used_without_including_sys_socket_h +# undef getpeername +# define getpeername getpeername_used_without_including_sys_socket_h +# undef getsockname +# define getsockname getsockname_used_without_including_sys_socket_h +# undef getsockopt +# define getsockopt getsockopt_used_without_including_sys_socket_h +# undef listen +# define listen listen_used_without_including_sys_socket_h +# undef recv +# define recv recv_used_without_including_sys_socket_h +# undef send +# define send send_used_without_including_sys_socket_h +# undef recvfrom +# define recvfrom recvfrom_used_without_including_sys_socket_h +# undef sendto +# define sendto sendto_used_without_including_sys_socket_h +# undef setsockopt +# define setsockopt setsockopt_used_without_including_sys_socket_h +# undef shutdown +# define shutdown shutdown_used_without_including_sys_socket_h +# else _GL_WARN_ON_USE (socket, "socket() used without including <sys/socket.h>"); _GL_WARN_ON_USE (connect, @@ -189,17 +194,19 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " "setsockopt() used without including <sys/socket.h>"); _GL_WARN_ON_USE (shutdown, "shutdown() used without including <sys/socket.h>"); -# endif # endif -# if !defined _@GUARD_PREFIX@_SYS_SELECT_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef select -# define select select_used_without_including_sys_select_h -# else +# endif +# if !defined _@GUARD_PREFIX@_SYS_SELECT_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef select +# define select select_used_without_including_sys_select_h +# else _GL_WARN_ON_USE (select, "select() used without including <sys/select.h>"); -# endif # endif # endif +#endif #endif /* _@GUARD_PREFIX@_SYS_TIME_H */ +#endif /* _CYGWIN_SYS_TIME_H */ +#endif /* _@GUARD_PREFIX@_SYS_TIME_H */ diff --git a/gl/sys_types.in.h b/gl/sys_types.in.h index 8139d98..d7da356 100644 --- a/gl/sys_types.in.h +++ b/gl/sys_types.in.h @@ -1,6 +1,6 @@ /* Provide a more complete sys/types.h. - Copyright (C) 2011-2012 Free Software Foundation, Inc. + Copyright (C) 2011-2013 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/gl/time.in.h b/gl/time.in.h index 04cde05..8ced794 100644 --- a/gl/time.in.h +++ b/gl/time.in.h @@ -1,6 +1,6 @@ /* A more-standard <time.h>. - Copyright (C) 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2007-2013 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/gl/timespec.h b/gl/timespec.h index d0a2194..d665e6c 100644 --- a/gl/timespec.h +++ b/gl/timespec.h @@ -1,6 +1,6 @@ /* timespec -- System time interface - Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2012 Free Software + Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gl/unistd.c b/gl/unistd.c new file mode 100644 index 0000000..6c6a8e2 --- /dev/null +++ b/gl/unistd.c @@ -0,0 +1,3 @@ +#include <config.h> +#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE +#include "unistd.h" diff --git a/gl/unistd.in.h b/gl/unistd.in.h index e904e51..2ea9af4 100644 --- a/gl/unistd.in.h +++ b/gl/unistd.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around <unistd.h>. - Copyright (C) 2003-2012 Free Software Foundation, Inc. + Copyright (C) 2003-2013 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 @@ -14,29 +14,13 @@ You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. */ +#ifndef _@GUARD_PREFIX@_UNISTD_H + #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ -/* Special invocation convention: - - On mingw, several headers, including <winsock2.h>, include <unistd.h>, - but we need to ensure that both the system <unistd.h> and <winsock2.h> - are completely included before we replace gethostname. */ -#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ - && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H -/* <unistd.h> is being indirectly included for the first time from - <winsock2.h>; avoid declaring any overrides. */ -# if @HAVE_UNISTD_H@ -# @INCLUDE_NEXT@ @NEXT_UNISTD_H@ -# else -# error unexpected; report this to bug-gnulib@gnu.org -# endif -# define _GL_WINSOCK2_H_WITNESS - -/* Normal invocation. */ -#elif !defined _@GUARD_PREFIX@_UNISTD_H - /* The include_next requires a split double-inclusion guard. */ #if @HAVE_UNISTD_H@ # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ @@ -77,9 +61,13 @@ /* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */ /* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */ +/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system <stdlib.h> is + included here. */ /* But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ +#if !defined __GLIBC__ && !defined __osf__ +# define __need_system_stdlib_h # include <stdlib.h> +# undef __need_system_stdlib_h #endif /* Native Windows platforms declare chdir, getcwd, rmdir in @@ -124,9 +112,15 @@ /* Get getopt(), optarg, optind, opterr, optopt. But avoid namespace pollution on glibc systems. */ #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT +# define __need_getopt # include <getopt.h> #endif +_GL_INLINE_HEADER_BEGIN +#ifndef _GL_UNISTD_INLINE +# define _GL_UNISTD_INLINE _GL_INLINE +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ @@ -404,7 +398,7 @@ extern char **environ; # endif #elif defined GNULIB_POSIXCHECK # if HAVE_RAW_DECL_ENVIRON -static inline char *** +_GL_UNISTD_INLINE char *** rpl_environ (void) { return &environ; @@ -862,7 +856,7 @@ _GL_CXXALIAS_RPL (getpagesize, int, (void)); # define getpagesize() _gl_getpagesize () # else # if !GNULIB_defined_getpagesize_function -static inline int +_GL_UNISTD_INLINE int getpagesize () { return _gl_getpagesize (); @@ -1530,6 +1524,7 @@ _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); _GL_CXXALIASWARN (write); #endif +_GL_INLINE_HEADER_END #endif /* _@GUARD_PREFIX@_UNISTD_H */ #endif /* _@GUARD_PREFIX@_UNISTD_H */ diff --git a/gl/version-etc-fsf.c b/gl/version-etc-fsf.c index c452f40..e1c69da 100644 --- a/gl/version-etc-fsf.c +++ b/gl/version-etc-fsf.c @@ -1,5 +1,5 @@ /* Variable with FSF copyright information, for version-etc. - Copyright (C) 1999-2006, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 1999-2006, 2009-2013 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/gl/version-etc.c b/gl/version-etc.c index ae1e44d..b7d23ab 100644 --- a/gl/version-etc.c +++ b/gl/version-etc.c @@ -1,5 +1,5 @@ /* Print --version and bug-reporting information in a consistent format. - Copyright (C) 1999-2012 Free Software Foundation, Inc. + Copyright (C) 1999-2013 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 @@ -38,7 +38,7 @@ # define PACKAGE PACKAGE_TARNAME #endif -enum { COPYRIGHT_YEAR = 2012 }; +enum { COPYRIGHT_YEAR = 2013 }; /* The three functions below display the --version information the standard way. diff --git a/gl/version-etc.h b/gl/version-etc.h index 5548c02..6c3d084 100644 --- a/gl/version-etc.h +++ b/gl/version-etc.h @@ -1,5 +1,5 @@ /* Print --version and bug-reporting information in a consistent format. - Copyright (C) 1999, 2003, 2005, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 1999, 2003, 2005, 2009-2013 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 |