diff options
author | Simon Josefsson <simon@josefsson.org> | 2007-10-22 08:35:09 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2007-10-22 08:35:09 +0200 |
commit | 4d59ff82f4a40333df0562de340ec2b995b1f31c (patch) | |
tree | 3dc271245c107926fd907b96fe9cea640876d1c8 /lgl/m4 | |
parent | ead3e58c4189b6c407ab723aa8208df766edcf7a (diff) | |
download | gnutls-4d59ff82f4a40333df0562de340ec2b995b1f31c.tar.gz |
Update gnulib files.
Diffstat (limited to 'lgl/m4')
-rw-r--r-- | lgl/m4/extensions.m4 | 52 | ||||
-rw-r--r-- | lgl/m4/gnulib-comp.m4 | 53 | ||||
-rw-r--r-- | lgl/m4/lock.m4 | 11 | ||||
-rw-r--r-- | lgl/m4/longlong.m4 | 13 | ||||
-rw-r--r-- | lgl/m4/memmem.m4 | 4 | ||||
-rw-r--r-- | lgl/m4/socklen.m4 | 4 | ||||
-rw-r--r-- | lgl/m4/stdint.m4 | 4 | ||||
-rw-r--r-- | lgl/m4/stdio_h.m4 | 6 | ||||
-rw-r--r-- | lgl/m4/string_h.m4 | 3 | ||||
-rw-r--r-- | lgl/m4/strverscmp.m4 | 6 | ||||
-rw-r--r-- | lgl/m4/ulonglong.m4 | 13 | ||||
-rw-r--r-- | lgl/m4/vasprintf.m4 | 4 |
12 files changed, 114 insertions, 59 deletions
diff --git a/lgl/m4/extensions.m4 b/lgl/m4/extensions.m4 index 143a9e5403..bcbb3ceee2 100644 --- a/lgl/m4/extensions.m4 +++ b/lgl/m4/extensions.m4 @@ -1,14 +1,14 @@ -# serial 4 -*- Autoconf -*- +# serial 5 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006, 2007 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.61 or later everywhere, but since CVS Autoconf mutates rapidly +# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. @@ -16,26 +16,48 @@ # ------------------------ # 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 +# cause problems on some platforms (such as __EXTENSIONS__). AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], -[ - AC_BEFORE([$0], [AC_COMPILE_IFELSE]) - AC_BEFORE([$0], [AC_RUN_IFELSE]) +[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl +AC_BEFORE([$0], [AC_RUN_IFELSE])dnl - AC_REQUIRE([AC_GNU_SOURCE]) - AC_REQUIRE([AC_AIX]) - AC_REQUIRE([AC_MINIX]) + AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) + if test "$MINIX" = yes; then + AC_DEFINE([_POSIX_SOURCE], [1], + [Define to 1 if you need to in order for `stat' and other + things to work.]) + AC_DEFINE([_POSIX_1_SOURCE], [2], + [Define to 2 if the system does not provide POSIX.1 features + except with this defined.]) + AC_DEFINE([_MINIX], [1], + [Define to 1 if on MINIX.]) + fi AH_VERBATIM([__EXTENSIONS__], -[/* Enable extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ +[/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE #endif +/* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif +/* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE -#endif]) +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif +]) AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( @@ -46,9 +68,11 @@ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && AC_DEFINE([__EXTENSIONS__]) + AC_DEFINE([_ALL_SOURCE]) + AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) -]) +])# AC_USE_SYSTEM_EXTENSIONS # gl_USE_SYSTEM_EXTENSIONS # ------------------------ diff --git a/lgl/m4/gnulib-comp.m4 b/lgl/m4/gnulib-comp.m4 index 10e3e26fe8..55c46f19cc 100644 --- a/lgl/m4/gnulib-comp.m4 +++ b/lgl/m4/gnulib-comp.m4 @@ -124,25 +124,38 @@ AC_DEFUN([lgl_INIT], # Like AC_LIBOBJ, except that the module name goes # into lgl_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([lgl_LIBOBJ], - [lgl_LIBOBJS="$lgl_LIBOBJS $1.$ac_objext"]) +AC_DEFUN([lgl_LIBOBJ], [ + AS_LITERAL_IF([$1], [lgl_LIBSOURCES([$1.c])])dnl + lgl_LIBOBJS="$lgl_LIBOBJS $1.$ac_objext" +]) # Like AC_REPLACE_FUNCS, except that the module name goes # into lgl_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([lgl_REPLACE_FUNCS], - [AC_CHECK_FUNCS([$1], , [lgl_LIBOBJ($ac_func)])]) +AC_DEFUN([lgl_REPLACE_FUNCS], [ + m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl + AC_CHECK_FUNCS([$1], , [lgl_LIBOBJ($ac_func)]) +]) -# Like AC_LIBSOURCES, except that it does nothing. -# We rely on EXTRA_lib..._SOURCES instead. -AC_DEFUN([lgl_LIBSOURCES], - []) +# Like AC_LIBSOURCES, except the directory where the source file is +# expected is derived from the gnulib-tool parametrization, +# and alloca is special cased (for the alloca-opt module). +# We could also entirely rely on EXTRA_lib..._SOURCES. +AC_DEFUN([lgl_LIBSOURCES], [ + m4_foreach([_gl_NAME], [$1], [ + m4_if(_gl_NAME, [alloca.c], [], [ + m4_syscmd([test -r lgl/]_gl_NAME[ || test ! -d lgl])dnl + m4_if(m4_sysval, [0], [], + [AC_FATAL([missing lgl/]_gl_NAME)]) + ]) + ]) +]) # This macro records the list of files which have been installed by # gnulib-tool and may be removed by future gnulib-tool invocations. AC_DEFUN([lgl_FILE_LIST], [ build-aux/config.rpath build-aux/link-warning.h - lib/alloca_.h + lib/alloca.in.h lib/arcfour.c lib/arcfour.h lib/arctwo.c @@ -153,7 +166,7 @@ AC_DEFUN([lgl_FILE_LIST], [ lib/des.h lib/dummy.c lib/float+.h - lib/float_.h + lib/float.in.h lib/gc-gnulib.c lib/gc-libgcrypt.c lib/gc-pbkdf2-sha1.c @@ -188,22 +201,22 @@ AC_DEFUN([lgl_FILE_LIST], [ lib/sha1.h lib/size_max.h lib/snprintf.c - lib/stdbool_.h - lib/stdint_.h - lib/stdio_.h - lib/stdlib_.h - lib/string_.h + lib/stdbool.in.h + lib/stdint.in.h + lib/stdio.in.h + lib/stdlib.in.h + lib/string.in.h lib/strverscmp.c lib/strverscmp.h - lib/sys_socket_.h - lib/sys_stat_.h - lib/time_.h + lib/sys_socket.in.h + lib/sys_stat.in.h + lib/time.in.h lib/time_r.c - lib/unistd_.h + lib/unistd.in.h lib/vasnprintf.c lib/vasnprintf.h lib/vasprintf.c - lib/wchar_.h + lib/wchar.in.h lib/xsize.h m4/absolute-header.m4 m4/alloca.m4 diff --git a/lgl/m4/lock.m4 b/lgl/m4/lock.m4 index 0224f2ff87..4cc585ea2e 100644 --- a/lgl/m4/lock.m4 +++ b/lgl/m4/lock.m4 @@ -1,5 +1,5 @@ -# lock.m4 serial 6 (gettext-0.16) -dnl Copyright (C) 2005-2006 Free Software Foundation, Inc. +# lock.m4 serial 7 (gettext-0.16.2) +dnl Copyright (C) 2005-2007 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,7 +35,12 @@ AC_DEFUN([gl_LOCK_EARLY_BODY], AC_BEFORE([$0], [gl_ARGP])dnl AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems + dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. + dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes + dnl AC_GNU_SOURCE. + m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], + [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], + [AC_REQUIRE([AC_GNU_SOURCE])]) dnl Check for multithreading. AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API]) diff --git a/lgl/m4/longlong.m4 b/lgl/m4/longlong.m4 index 1f9e862ef1..5799c3965a 100644 --- a/lgl/m4/longlong.m4 +++ b/lgl/m4/longlong.m4 @@ -1,5 +1,5 @@ -# longlong.m4 serial 10 -dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. +# longlong.m4 serial 11 +dnl Copyright (C) 1999-2007 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,8 +7,8 @@ dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_LONG_LONG_INT if 'long long int' works. -# This fixes a bug in Autoconf 2.60, but can be removed once we -# assume 2.61 everywhere. +# This fixes a bug in Autoconf 2.61, but can be removed once we +# assume 2.62 everywhere. # Note: If the type 'long long int' exists but is only 32 bits large # (as on some very old compilers), HAVE_LONG_LONG_INT will not be @@ -19,7 +19,10 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT], AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( - [[long long int ll = 9223372036854775807ll; + [[#if ! (-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + error in preprocessor; + #endif + long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) diff --git a/lgl/m4/memmem.m4 b/lgl/m4/memmem.m4 index e6d40068e4..e6a3da193c 100644 --- a/lgl/m4/memmem.m4 +++ b/lgl/m4/memmem.m4 @@ -1,4 +1,4 @@ -# memmem.m4 serial 4 +# memmem.m4 serial 5 dnl Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MEMMEM], [ dnl Persuade glibc <string.h> to declare memmem(). - AC_REQUIRE([AC_GNU_SOURCE]) + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REPLACE_FUNCS(memmem) diff --git a/lgl/m4/socklen.m4 b/lgl/m4/socklen.m4 index d39a314e17..b755757be4 100644 --- a/lgl/m4/socklen.m4 +++ b/lgl/m4/socklen.m4 @@ -1,4 +1,4 @@ -# socklen.m4 serial 5 +# socklen.m4 serial 6 dnl Copyright (C) 2005, 2006, 2007 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 @@ dnl types for the argument to getsockopt, getpeername, etc. So we dnl have to test to find something that will work. dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find -dnl it there first. That file is included by gnulib's sys_socket_.h, which +dnl it there first. That file is included by gnulib's sys_socket.in.h, which dnl all users of this module should include. Cygwin must not include dnl ws2tcpip.h. AC_DEFUN([gl_TYPE_SOCKLEN_T], diff --git a/lgl/m4/stdint.m4 b/lgl/m4/stdint.m4 index 03bb093202..bb6c34fe1e 100644 --- a/lgl/m4/stdint.m4 +++ b/lgl/m4/stdint.m4 @@ -1,4 +1,4 @@ -# stdint.m4 serial 28 +# stdint.m4 serial 29 dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -370,7 +370,7 @@ AC_DEFUN([gl_STDINT_INCLUDES], dnl gl_STDINT_TYPE_PROPERTIES dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t -dnl of interest to stdint_.h. +dnl of interest to stdint.in.h. AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], [ gl_STDINT_BITSIZEOF([ptrdiff_t sig_atomic_t size_t wchar_t wint_t], diff --git a/lgl/m4/stdio_h.m4 b/lgl/m4/stdio_h.m4 index b9a69984f6..45e54e2a62 100644 --- a/lgl/m4/stdio_h.m4 +++ b/lgl/m4/stdio_h.m4 @@ -1,4 +1,4 @@ -# stdio_h.m4 serial 7 +# stdio_h.m4 serial 8 dnl Copyright (C) 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -28,6 +28,8 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF]) GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) + GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN]) + GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN]) GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK]) GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO]) GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL]) @@ -48,6 +50,8 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF]) HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF]) REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF]) + REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) + REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO]) REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO]) REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK]) diff --git a/lgl/m4/string_h.m4 b/lgl/m4/string_h.m4 index ec51e9a018..d811e26b88 100644 --- a/lgl/m4/string_h.m4 +++ b/lgl/m4/string_h.m4 @@ -57,6 +57,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) + GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) @@ -74,4 +75,6 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) + HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR]) + REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) ]) diff --git a/lgl/m4/strverscmp.m4 b/lgl/m4/strverscmp.m4 index ab20c1809d..5f01ba9e5b 100644 --- a/lgl/m4/strverscmp.m4 +++ b/lgl/m4/strverscmp.m4 @@ -1,5 +1,5 @@ -# strverscmp.m4 serial 4 -dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. +# strverscmp.m4 serial 5 +dnl Copyright (C) 2002, 2005, 2006, 2007 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,7 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRVERSCMP], [ dnl Persuade glibc <string.h> to declare strverscmp(). - AC_REQUIRE([AC_GNU_SOURCE]) + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REPLACE_FUNCS(strverscmp) if test $ac_cv_func_strverscmp = no; then diff --git a/lgl/m4/ulonglong.m4 b/lgl/m4/ulonglong.m4 index 9fae98e3a6..e9807895a7 100644 --- a/lgl/m4/ulonglong.m4 +++ b/lgl/m4/ulonglong.m4 @@ -1,5 +1,5 @@ -# ulonglong.m4 serial 6 -dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. +# ulonglong.m4 serial 7 +dnl Copyright (C) 1999-2007 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,8 +7,8 @@ dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This fixes a bug in Autoconf 2.60, but can be removed once we -# assume 2.61 everywhere. +# This fixes a bug in Autoconf 2.61, but can be removed once we +# assume 2.62 everywhere. # Note: If the type 'unsigned long long int' exists but is only 32 bits # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT @@ -21,7 +21,10 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [ac_cv_type_unsigned_long_long_int], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( - [[unsigned long long int ull = 18446744073709551615ULL; + [[#if ! (18446744073709551615ULL <= -1u) + error in preprocessor; + #endif + unsigned long long int ull = 18446744073709551615ULL; typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63;]], diff --git a/lgl/m4/vasprintf.m4 b/lgl/m4/vasprintf.m4 index 4f0c79a71a..074b03cf72 100644 --- a/lgl/m4/vasprintf.m4 +++ b/lgl/m4/vasprintf.m4 @@ -1,4 +1,4 @@ -# vasprintf.m4 serial 5 +# vasprintf.m4 serial 6 dnl Copyright (C) 2002-2003, 2006-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -31,7 +31,7 @@ AC_DEFUN([gl_REPLACE_VASPRINTF], AC_DEFUN([gl_PREREQ_VASPRINTF_H], [ dnl Persuade glibc <stdio.h> to declare asprintf() and vasprintf(). - AC_REQUIRE([AC_GNU_SOURCE]) + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) ]) # Prerequisites of lib/vasprintf.c. |