diff options
author | Andreas Rottmann <a.rottmann@gmx.at> | 2010-05-27 18:23:17 +0200 |
---|---|---|
committer | Andreas Rottmann <a.rottmann@gmx.at> | 2010-05-27 18:23:17 +0200 |
commit | bd6adfa17d453e4c486e36fed4c5779db90a8a0e (patch) | |
tree | 9798677560d5f99061afe9f0db105a8c97f2438a /gnulib-m4 | |
parent | 79ca645d222db2e158784642c3b464a47bea26f3 (diff) | |
parent | 3e0814cd9862b89c7a39672672937477bd87ddfb (diff) |
Merge commit 'upstream/0.9.3'
Diffstat (limited to 'gnulib-m4')
94 files changed, 3638 insertions, 842 deletions
diff --git a/gnulib-m4/00gnulib.m4 b/gnulib-m4/00gnulib.m4 index d4d04d15..301469b3 100644 --- a/gnulib-m4/00gnulib.m4 +++ b/gnulib-m4/00gnulib.m4 @@ -1,5 +1,5 @@ # 00gnulib.m4 serial 2 -dnl Copyright (C) 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2010 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/gnulib-m4/alloca.m4 b/gnulib-m4/alloca.m4 index 4b978e13..f3ee3438 100644 --- a/gnulib-m4/alloca.m4 +++ b/gnulib-m4/alloca.m4 @@ -1,5 +1,6 @@ # alloca.m4 serial 9 -dnl Copyright (C) 2002-2004, 2006, 2007, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2006-2007, 2009-2010 Free Software Foundation, +dnl 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/gnulib-m4/codeset.m4 b/gnulib-m4/codeset.m4 index 413217bd..a53c0426 100644 --- a/gnulib-m4/codeset.m4 +++ b/gnulib-m4/codeset.m4 @@ -1,5 +1,5 @@ # codeset.m4 serial 4 (gettext-0.18) -dnl Copyright (C) 2000-2002, 2006, 2008, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2006, 2008-2010 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/gnulib-m4/dup2.m4 b/gnulib-m4/dup2.m4 deleted file mode 100644 index 2abc74cd..00000000 --- a/gnulib-m4/dup2.m4 +++ /dev/null @@ -1,35 +0,0 @@ -#serial 6 -dnl Copyright (C) 2002, 2005, 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. - -AC_DEFUN([gl_FUNC_DUP2], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_FUNCS_ONCE([dup2]) - if test $ac_cv_func_dup2 = no; then - HAVE_DUP2=0 - AC_LIBOBJ([dup2]) - else - AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include <unistd.h> -]], [return 1 - dup2 (1, 1);])], - [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no], - [case "$host_os" in - mingw*) # on this platform, dup2 always returns 0 for success - gl_cv_func_dup2_works=no;; - cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 - gl_cv_func_dup2_works=no;; - *) gl_cv_func_dup2_works=yes;; - esac])]) - if test "$gl_cv_func_dup2_works" = no; then - REPLACE_DUP2=1 - AC_LIBOBJ([dup2]) - fi - fi - AC_DEFINE_UNQUOTED([REPLACE_DUP2], [$REPLACE_DUP2], - [Define to 1 if dup2 returns 0 instead of the target fd.]) -]) diff --git a/gnulib-m4/eealloc.m4 b/gnulib-m4/eealloc.m4 index 3c9c0b52..63dd9202 100644 --- a/gnulib-m4/eealloc.m4 +++ b/gnulib-m4/eealloc.m4 @@ -1,5 +1,5 @@ # eealloc.m4 serial 2 -dnl Copyright (C) 2003, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2009, 2010 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/gnulib-m4/environ.m4 b/gnulib-m4/environ.m4 index b17bb60a..5f50d6e3 100644 --- a/gnulib-m4/environ.m4 +++ b/gnulib-m4/environ.m4 @@ -1,10 +1,10 @@ -# environ.m4 serial 2 -dnl Copyright (C) 2001-2004, 2006-2009 Free Software Foundation, Inc. +# environ.m4 serial 3 +dnl Copyright (C) 2001-2004, 2006-2010 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_ENVIRON], +AC_DEFUN_ONCE([gl_ENVIRON], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl Persuade glibc <unistd.h> to declare environ. diff --git a/gnulib-m4/errno_h.m4 b/gnulib-m4/errno_h.m4 index 4ce1ccbd..d02a0393 100644 --- a/gnulib-m4/errno_h.m4 +++ b/gnulib-m4/errno_h.m4 @@ -1,5 +1,5 @@ # errno_h.m4 serial 6 -dnl Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2004, 2006, 2008, 2009, 2010 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/gnulib-m4/error.m4 b/gnulib-m4/error.m4 index 7c7746e2..9f1307a4 100644 --- a/gnulib-m4/error.m4 +++ b/gnulib-m4/error.m4 @@ -1,7 +1,6 @@ -#serial 11 +#serial 12 -# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004 Free Software -# Foundation, Inc. +# Copyright (C) 1996-1998, 2001-2004, 2009-2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -18,5 +17,6 @@ AC_DEFUN([gl_ERROR], AC_DEFUN([gl_PREREQ_ERROR], [ AC_REQUIRE([AC_FUNC_STRERROR_R]) + AC_REQUIRE([AC_C_INLINE]) : ]) diff --git a/gnulib-m4/exitfail.m4 b/gnulib-m4/exitfail.m4 deleted file mode 100644 index b7a691e5..00000000 --- a/gnulib-m4/exitfail.m4 +++ /dev/null @@ -1,13 +0,0 @@ -# exitfail.m4 serial 6 -dnl Copyright (C) 2002, 2003, 2005, 2006 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_EXITFAIL], -[ - AC_LIBOBJ([exitfail]) - - dnl No prerequisites of lib/exitfail.c. - : -]) diff --git a/gnulib-m4/exponentd.m4 b/gnulib-m4/exponentd.m4 index 140cee4a..5d44d0e0 100644 --- a/gnulib-m4/exponentd.m4 +++ b/gnulib-m4/exponentd.m4 @@ -1,5 +1,5 @@ # exponentd.m4 serial 1 -dnl Copyright (C) 2007-2008 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2010 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/gnulib-m4/exponentf.m4 b/gnulib-m4/exponentf.m4 index 7ff34131..4d8063fa 100644 --- a/gnulib-m4/exponentf.m4 +++ b/gnulib-m4/exponentf.m4 @@ -1,5 +1,5 @@ # exponentf.m4 serial 1 -dnl Copyright (C) 2007-2008 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2010 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/gnulib-m4/exponentl.m4 b/gnulib-m4/exponentl.m4 index 98e35eb2..a700d3ba 100644 --- a/gnulib-m4/exponentl.m4 +++ b/gnulib-m4/exponentl.m4 @@ -1,5 +1,5 @@ # exponentl.m4 serial 2 -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2010 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/gnulib-m4/extensions.m4 b/gnulib-m4/extensions.m4 index ba6d5e19..7d9458a8 100644 --- a/gnulib-m4/extensions.m4 +++ b/gnulib-m4/extensions.m4 @@ -1,7 +1,7 @@ -# serial 8 -*- Autoconf -*- +# serial 9 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2009 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2010 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. @@ -12,6 +12,20 @@ # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. +# If autoconf reports a warning +# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS +# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS +# the fix is +# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked +# but always AC_REQUIREd, +# 2) to ensure that for each occurrence of +# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) +# or +# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) +# the corresponding gnulib module description has 'extensions' among +# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS +# invocation occurs in gl_EARLY, not in gl_INIT. + # AC_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, @@ -74,8 +88,8 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ -# define __EXTENSIONS__ 1 - ]AC_INCLUDES_DEFAULT])], +# define __EXTENSIONS__ 1 + ]AC_INCLUDES_DEFAULT])], [ac_cv_safe_to_define___extensions__=yes], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && diff --git a/gnulib-m4/fcntl-o.m4 b/gnulib-m4/fcntl-o.m4 new file mode 100644 index 00000000..d416a61c --- /dev/null +++ b/gnulib-m4/fcntl-o.m4 @@ -0,0 +1,81 @@ +# fcntl-o.m4 serial 1 +dnl Copyright (C) 2006, 2009-2010 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 Written by Paul Eggert. + +# Test whether the flags O_NOATIME and O_NOFOLLOW actually work. +# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. +# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. +AC_DEFUN([gl_FCNTL_O_FLAGS], +[ + dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include <sys/types.h> + #include <sys/stat.h> + #include <unistd.h> + #include <fcntl.h> + #ifndef O_NOATIME + #define O_NOATIME 0 + #endif + #ifndef O_NOFOLLOW + #define O_NOFOLLOW 0 + #endif + static int const constants[] = + { + O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, + O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY + }; + ]], + [[ + int status = !constants; + { + static char const sym[] = "conftest.sym"; + if (symlink (".", sym) != 0 + || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0) + status |= 32; + unlink (sym); + } + { + static char const file[] = "confdefs.h"; + int fd = open (file, O_RDONLY | O_NOATIME); + char c; + struct stat st0, st1; + if (fd < 0 + || fstat (fd, &st0) != 0 + || sleep (1) != 0 + || read (fd, &c, 1) != 1 + || close (fd) != 0 + || stat (file, &st1) != 0 + || st0.st_atime != st1.st_atime) + status |= 64; + } + return status;]])], + [gl_cv_header_working_fcntl_h=yes], + [case $? in #( + 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( + 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( + 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( + *) gl_cv_header_working_fcntl_h='no';; + esac], + [gl_cv_header_working_fcntl_h=cross-compiling])]) + + case $gl_cv_header_working_fcntl_h in #( + *O_NOATIME* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], + [Define to 1 if O_NOATIME works.]) + + case $gl_cv_header_working_fcntl_h in #( + *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], + [Define to 1 if O_NOFOLLOW works.]) +]) diff --git a/gnulib-m4/fcntl_h.m4 b/gnulib-m4/fcntl_h.m4 deleted file mode 100644 index 1ae0b15a..00000000 --- a/gnulib-m4/fcntl_h.m4 +++ /dev/null @@ -1,96 +0,0 @@ -# Configure fcntl.h. -dnl Copyright (C) 2006, 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. - -dnl Written by Paul Eggert. - -AC_DEFUN([gl_FCNTL_H], -[ - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) - dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW. - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include <sys/types.h> - #include <sys/stat.h> - #include <unistd.h> - #include <fcntl.h> - #ifndef O_NOATIME - #define O_NOATIME 0 - #endif - #ifndef O_NOFOLLOW - #define O_NOFOLLOW 0 - #endif - static int const constants[] = - { - O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, - O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY - }; - ]], - [[ - int status = !constants; - { - static char const sym[] = "conftest.sym"; - if (symlink (".", sym) != 0 - || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0) - status |= 32; - } - { - static char const file[] = "confdefs.h"; - int fd = open (file, O_RDONLY | O_NOATIME); - char c; - struct stat st0, st1; - if (fd < 0 - || fstat (fd, &st0) != 0 - || sleep (1) != 0 - || read (fd, &c, 1) != 1 - || close (fd) != 0 - || stat (file, &st1) != 0 - || st0.st_atime != st1.st_atime) - status |= 64; - } - return status;]])], - [gl_cv_header_working_fcntl_h=yes], - [case $? in #( - 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( - 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( - 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( - *) gl_cv_header_working_fcntl_h='no';; - esac], - [gl_cv_header_working_fcntl_h=cross-compiling])]) - - case $gl_cv_header_working_fcntl_h in #( - *O_NOATIME* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], - [Define to 1 if O_NOATIME works.]) - - case $gl_cv_header_working_fcntl_h in #( - *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], - [Define to 1 if O_NOFOLLOW works.]) - - gl_CHECK_NEXT_HEADERS([fcntl.h]) - FCNTL_H='fcntl.h' - AC_SUBST([FCNTL_H]) -]) - -AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) - GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 -]) - -AC_DEFUN([gl_FCNTL_H_DEFAULTS], -[ - GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN]) - dnl Assume proper GNU behavior unless another module says otherwise. - REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) -]) diff --git a/gnulib-m4/float_h.m4 b/gnulib-m4/float_h.m4 index d36e3a46..a74a0d95 100644 --- a/gnulib-m4/float_h.m4 +++ b/gnulib-m4/float_h.m4 @@ -1,5 +1,5 @@ # float_h.m4 serial 3 -dnl Copyright (C) 2007 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009, 2010 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/gnulib-m4/fpieee.m4 b/gnulib-m4/fpieee.m4 index 9f4a92cb..532802d7 100644 --- a/gnulib-m4/fpieee.m4 +++ b/gnulib-m4/fpieee.m4 @@ -1,5 +1,5 @@ # fpieee.m4 serial 1 -dnl Copyright (C) 2007 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009, 2010 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/gnulib-m4/frexp.m4 b/gnulib-m4/frexp.m4 index 6c911121..3a450f65 100644 --- a/gnulib-m4/frexp.m4 +++ b/gnulib-m4/frexp.m4 @@ -1,5 +1,5 @@ # frexp.m4 serial 7 -dnl Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2008, 2009, 2010 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/gnulib-m4/frexpl.m4 b/gnulib-m4/frexpl.m4 index c5da7446..80165204 100644 --- a/gnulib-m4/frexpl.m4 +++ b/gnulib-m4/frexpl.m4 @@ -1,5 +1,5 @@ # frexpl.m4 serial 9 -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2010 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,54 +7,56 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FREXPL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) + dnl Check whether it's declared. + dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>. + AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include <math.h>]) FREXPL_LIBM= - AC_CACHE_CHECK([whether frexpl() can be used without linking with libm], - [gl_cv_func_frexpl_no_libm], - [ - AC_TRY_LINK([#include <math.h> - long double x;], - [int e; return frexpl (x, &e) > 0;], - [gl_cv_func_frexpl_no_libm=yes], - [gl_cv_func_frexpl_no_libm=no]) - ]) - if test $gl_cv_func_frexpl_no_libm = no; then - AC_CACHE_CHECK([whether frexpl() can be used with libm], - [gl_cv_func_frexpl_in_libm], + if test $HAVE_DECL_FREXPL = 1; then + AC_CACHE_CHECK([whether frexpl() can be used without linking with libm], + [gl_cv_func_frexpl_no_libm], [ - save_LIBS="$LIBS" - LIBS="$LIBS -lm" AC_TRY_LINK([#include <math.h> long double x;], [int e; return frexpl (x, &e) > 0;], - [gl_cv_func_frexpl_in_libm=yes], - [gl_cv_func_frexpl_in_libm=no]) - LIBS="$save_LIBS" + [gl_cv_func_frexpl_no_libm=yes], + [gl_cv_func_frexpl_no_libm=no]) ]) - if test $gl_cv_func_frexpl_in_libm = yes; then - FREXPL_LIBM=-lm + if test $gl_cv_func_frexpl_no_libm = no; then + AC_CACHE_CHECK([whether frexpl() can be used with libm], + [gl_cv_func_frexpl_in_libm], + [ + save_LIBS="$LIBS" + LIBS="$LIBS -lm" + AC_TRY_LINK([#include <math.h> + long double x;], + [int e; return frexpl (x, &e) > 0;], + [gl_cv_func_frexpl_in_libm=yes], + [gl_cv_func_frexpl_in_libm=no]) + LIBS="$save_LIBS" + ]) + if test $gl_cv_func_frexpl_in_libm = yes; then + FREXPL_LIBM=-lm + fi + fi + if test $gl_cv_func_frexpl_no_libm = yes \ + || test $gl_cv_func_frexpl_in_libm = yes; then + save_LIBS="$LIBS" + LIBS="$LIBS $FREXPL_LIBM" + gl_FUNC_FREXPL_WORKS + LIBS="$save_LIBS" + case "$gl_cv_func_frexpl_works" in + *yes) gl_func_frexpl=yes ;; + *) gl_func_frexpl=no; REPLACE_FREXPL=1; FREXPL_LIBM= ;; + esac + else + gl_func_frexpl=no + fi + if test $gl_func_frexpl = yes; then + AC_DEFINE([HAVE_FREXPL], [1], + [Define if the frexpl() function is available.]) fi fi - if test $gl_cv_func_frexpl_no_libm = yes \ - || test $gl_cv_func_frexpl_in_libm = yes; then - save_LIBS="$LIBS" - LIBS="$LIBS $FREXPL_LIBM" - gl_FUNC_FREXPL_WORKS - LIBS="$save_LIBS" - case "$gl_cv_func_frexpl_works" in - *yes) gl_func_frexpl=yes ;; - *) gl_func_frexpl=no; REPLACE_FREXPL=1; FREXPL_LIBM= ;; - esac - else - gl_func_frexpl=no - fi - if test $gl_func_frexpl = yes; then - AC_DEFINE([HAVE_FREXPL], [1], - [Define if the frexpl() function is available.]) - dnl Also check whether it's declared. - dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>. - AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include <math.h>]) - else - HAVE_DECL_FREXPL=0 + if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then AC_LIBOBJ([frexpl]) fi AC_SUBST([FREXPL_LIBM]) @@ -63,34 +65,36 @@ AC_DEFUN([gl_FUNC_FREXPL], AC_DEFUN([gl_FUNC_FREXPL_NO_LIBM], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) - AC_CACHE_CHECK([whether frexpl() can be used without linking with libm], - [gl_cv_func_frexpl_no_libm], - [ - AC_TRY_LINK([#include <math.h> - long double x;], - [int e; return frexpl (x, &e) > 0;], - [gl_cv_func_frexpl_no_libm=yes], - [gl_cv_func_frexpl_no_libm=no]) - ]) - if test $gl_cv_func_frexpl_no_libm = yes; then - gl_FUNC_FREXPL_WORKS - case "$gl_cv_func_frexpl_works" in - *yes) gl_func_frexpl_no_libm=yes ;; - *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; - esac - else - gl_func_frexpl_no_libm=no - dnl Set REPLACE_FREXPL here because the system may have frexpl in libm. - REPLACE_FREXPL=1 + dnl Check whether it's declared. + dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>. + AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include <math.h>]) + if test $HAVE_DECL_FREXPL = 1; then + AC_CACHE_CHECK([whether frexpl() can be used without linking with libm], + [gl_cv_func_frexpl_no_libm], + [ + AC_TRY_LINK([#include <math.h> + long double x;], + [int e; return frexpl (x, &e) > 0;], + [gl_cv_func_frexpl_no_libm=yes], + [gl_cv_func_frexpl_no_libm=no]) + ]) + if test $gl_cv_func_frexpl_no_libm = yes; then + gl_FUNC_FREXPL_WORKS + case "$gl_cv_func_frexpl_works" in + *yes) gl_func_frexpl_no_libm=yes ;; + *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; + esac + else + gl_func_frexpl_no_libm=no + dnl Set REPLACE_FREXPL here because the system may have frexpl in libm. + REPLACE_FREXPL=1 + fi + if test $gl_func_frexpl_no_libm = yes; then + AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1], + [Define if the frexpl() function is available in libc.]) + fi fi - if test $gl_func_frexpl_no_libm = yes; then - AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1], - [Define if the frexpl() function is available in libc.]) - dnl Also check whether it's declared. - dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>. - AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include <math.h>]) - else - HAVE_DECL_FREXPL=0 + if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then AC_LIBOBJ([frexpl]) fi ]) diff --git a/gnulib-m4/getpagesize.m4 b/gnulib-m4/getpagesize.m4 index 0d07a3a5..313ad7fa 100644 --- a/gnulib-m4/getpagesize.m4 +++ b/gnulib-m4/getpagesize.m4 @@ -1,5 +1,6 @@ -# getpagesize.m4 serial 7 -dnl Copyright (C) 2002, 2004-2005, 2007 Free Software Foundation, Inc. +# getpagesize.m4 serial 8 +dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2010 Free Software Foundation, +dnl 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. @@ -26,4 +27,7 @@ AC_DEFUN([gl_FUNC_GETPAGESIZE], AC_LIBOBJ([getpagesize]) ;; esac + dnl Also check whether it's declared. + dnl mingw has getpagesize() in libgcc.a but doesn't declare it. + AC_CHECK_DECL([getpagesize], , [HAVE_DECL_GETPAGESIZE=0]) ]) diff --git a/gnulib-m4/glibc21.m4 b/gnulib-m4/glibc21.m4 index 93fbf474..68ada9d4 100644 --- a/gnulib-m4/glibc21.m4 +++ b/gnulib-m4/glibc21.m4 @@ -1,5 +1,5 @@ # glibc21.m4 serial 4 -dnl Copyright (C) 2000-2002, 2004, 2008 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2004, 2008-2010 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. @@ -12,16 +12,16 @@ AC_DEFUN([gl_GLIBC21], AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer], [ac_cv_gnu_library_2_1], [AC_EGREP_CPP([Lucky GNU user], - [ + [ #include <features.h> #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif - ], - [ac_cv_gnu_library_2_1=yes], - [ac_cv_gnu_library_2_1=no]) + ], + [ac_cv_gnu_library_2_1=yes], + [ac_cv_gnu_library_2_1=no]) ] ) AC_SUBST([GLIBC21]) diff --git a/gnulib-m4/gnulib-cache.m4 b/gnulib-m4/gnulib-cache.m4 index b3ae1d22..72bc8cce 100644 --- a/gnulib-m4/gnulib-cache.m4 +++ b/gnulib-m4/gnulib-cache.m4 @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2009 Free Software Foundation, Inc. +# Copyright (C) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General @@ -15,7 +15,7 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libunistring --source-base=lib --m4-base=gnulib-m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --lgpl --makefile-name=Makefile.gnulib --libtool --macro-prefix=gl relocatable-lib-lgpl unicase/base unicase/empty-prefix-context unicase/empty-suffix-context unicase/locale-language unicase/tolower unicase/totitle unicase/toupper unicase/u16-casecmp unicase/u16-casecoll unicase/u16-casefold unicase/u16-casexfrm unicase/u16-ct-casefold unicase/u16-ct-tolower unicase/u16-ct-totitle unicase/u16-ct-toupper unicase/u16-is-cased unicase/u16-is-casefolded unicase/u16-is-lowercase unicase/u16-is-titlecase unicase/u16-is-uppercase unicase/u16-tolower unicase/u16-totitle unicase/u16-toupper unicase/u32-casecmp unicase/u32-casecoll unicase/u32-casefold unicase/u32-casexfrm unicase/u32-ct-casefold unicase/u32-ct-tolower unicase/u32-ct-totitle unicase/u32-ct-toupper unicase/u32-is-cased unicase/u32-is-casefolded unicase/u32-is-lowercase unicase/u32-is-titlecase unicase/u32-is-uppercase unicase/u32-tolower unicase/u32-totitle unicase/u32-toupper unicase/u8-casecmp unicase/u8-casecoll unicase/u8-casefold unicase/u8-casexfrm unicase/u8-ct-casefold unicase/u8-ct-tolower unicase/u8-ct-totitle unicase/u8-ct-toupper unicase/u8-is-cased unicase/u8-is-casefolded unicase/u8-is-lowercase unicase/u8-is-titlecase unicase/u8-is-uppercase unicase/u8-tolower unicase/u8-totitle unicase/u8-toupper unicase/ulc-casecmp unicase/ulc-casecoll unicase/ulc-casexfrm uniconv/base uniconv/u16-conv-from-enc uniconv/u16-conv-to-enc uniconv/u16-strconv-from-enc uniconv/u16-strconv-from-locale uniconv/u16-strconv-to-enc uniconv/u16-strconv-to-locale uniconv/u32-conv-from-enc uniconv/u32-conv-to-enc uniconv/u32-strconv-from-enc uniconv/u32-strconv-from-locale uniconv/u32-strconv-to-enc uniconv/u32-strconv-to-locale uniconv/u8-conv-from-enc uniconv/u8-conv-to-enc uniconv/u8-strconv-from-enc uniconv/u8-strconv-from-locale uniconv/u8-strconv-to-enc uniconv/u8-strconv-to-locale unictype/base unictype/bidicategory-all unictype/block-all unictype/category-all unictype/combining-class unictype/ctype-alnum unictype/ctype-alpha unictype/ctype-blank unictype/ctype-cntrl unictype/ctype-digit unictype/ctype-graph unictype/ctype-lower unictype/ctype-print unictype/ctype-punct unictype/ctype-space unictype/ctype-upper unictype/ctype-xdigit unictype/decimal-digit unictype/digit unictype/mirror unictype/numeric unictype/property-all unictype/scripts-all unictype/syntax-c-ident unictype/syntax-c-whitespace unictype/syntax-java-ident unictype/syntax-java-whitespace unilbrk/base unilbrk/tables unilbrk/u16-possible-linebreaks unilbrk/u16-width-linebreaks unilbrk/u32-possible-linebreaks unilbrk/u32-width-linebreaks unilbrk/u8-possible-linebreaks unilbrk/u8-width-linebreaks unilbrk/ulc-possible-linebreaks unilbrk/ulc-width-linebreaks uniname/base uniname/uniname uninorm/base uninorm/canonical-decomposition uninorm/compat-decomposition uninorm/composition uninorm/decomposition uninorm/filter uninorm/nfc uninorm/nfd uninorm/nfkc uninorm/nfkd uninorm/u16-normalize uninorm/u16-normcmp uninorm/u16-normcoll uninorm/u16-normxfrm uninorm/u32-normalize uninorm/u32-normcmp uninorm/u32-normcoll uninorm/u32-normxfrm uninorm/u8-normalize uninorm/u8-normcmp uninorm/u8-normcoll uninorm/u8-normxfrm unistdio/base unistdio/u16-asnprintf unistdio/u16-asprintf unistdio/u16-snprintf unistdio/u16-sprintf unistdio/u16-u16-asnprintf unistdio/u16-u16-asprintf unistdio/u16-u16-snprintf unistdio/u16-u16-sprintf unistdio/u16-u16-vasnprintf unistdio/u16-u16-vasprintf unistdio/u16-u16-vsnprintf unistdio/u16-u16-vsprintf unistdio/u16-vasnprintf unistdio/u16-vasprintf unistdio/u16-vsnprintf unistdio/u16-vsprintf unistdio/u32-asnprintf unistdio/u32-asprintf unistdio/u32-snprintf unistdio/u32-sprintf unistdio/u32-u32-asnprintf unistdio/u32-u32-asprintf unistdio/u32-u32-snprintf unistdio/u32-u32-sprintf unistdio/u32-u32-vasnprintf unistdio/u32-u32-vasprintf unistdio/u32-u32-vsnprintf unistdio/u32-u32-vsprintf unistdio/u32-vasnprintf unistdio/u32-vasprintf unistdio/u32-vsnprintf unistdio/u32-vsprintf unistdio/u8-asnprintf unistdio/u8-asprintf unistdio/u8-snprintf unistdio/u8-sprintf unistdio/u8-u8-asnprintf unistdio/u8-u8-asprintf unistdio/u8-u8-snprintf unistdio/u8-u8-sprintf unistdio/u8-u8-vasnprintf unistdio/u8-u8-vasprintf unistdio/u8-u8-vsnprintf unistdio/u8-u8-vsprintf unistdio/u8-vasnprintf unistdio/u8-vasprintf unistdio/u8-vsnprintf unistdio/u8-vsprintf unistdio/ulc-asnprintf unistdio/ulc-asprintf unistdio/ulc-fprintf unistdio/ulc-snprintf unistdio/ulc-sprintf unistdio/ulc-vasnprintf unistdio/ulc-vasprintf unistdio/ulc-vfprintf unistdio/ulc-vsnprintf unistdio/ulc-vsprintf unistr/base unistr/u16-check unistr/u16-chr unistr/u16-cmp unistr/u16-cmp2 unistr/u16-cpy unistr/u16-cpy-alloc unistr/u16-endswith unistr/u16-mblen unistr/u16-mbsnlen unistr/u16-mbtouc unistr/u16-mbtouc-unsafe unistr/u16-mbtoucr unistr/u16-move unistr/u16-next unistr/u16-prev unistr/u16-set unistr/u16-startswith unistr/u16-stpcpy unistr/u16-stpncpy unistr/u16-strcat unistr/u16-strchr unistr/u16-strcmp unistr/u16-strcoll unistr/u16-strcpy unistr/u16-strcspn unistr/u16-strdup unistr/u16-strlen unistr/u16-strmblen unistr/u16-strmbtouc unistr/u16-strncat unistr/u16-strncmp unistr/u16-strncpy unistr/u16-strnlen unistr/u16-strpbrk unistr/u16-strrchr unistr/u16-strspn unistr/u16-strstr unistr/u16-strtok unistr/u16-to-u32 unistr/u16-to-u8 unistr/u16-uctomb unistr/u32-check unistr/u32-chr unistr/u32-cmp unistr/u32-cmp2 unistr/u32-cpy unistr/u32-cpy-alloc unistr/u32-endswith unistr/u32-mblen unistr/u32-mbsnlen unistr/u32-mbtouc unistr/u32-mbtouc-unsafe unistr/u32-mbtoucr unistr/u32-move unistr/u32-next unistr/u32-prev unistr/u32-set unistr/u32-startswith unistr/u32-stpcpy unistr/u32-stpncpy unistr/u32-strcat unistr/u32-strchr unistr/u32-strcmp unistr/u32-strcoll unistr/u32-strcpy unistr/u32-strcspn unistr/u32-strdup unistr/u32-strlen unistr/u32-strmblen unistr/u32-strmbtouc unistr/u32-strncat unistr/u32-strncmp unistr/u32-strncpy unistr/u32-strnlen unistr/u32-strpbrk unistr/u32-strrchr unistr/u32-strspn unistr/u32-strstr unistr/u32-strtok unistr/u32-to-u16 unistr/u32-to-u8 unistr/u32-uctomb unistr/u8-check unistr/u8-chr unistr/u8-cmp unistr/u8-cmp2 unistr/u8-cpy unistr/u8-cpy-alloc unistr/u8-endswith unistr/u8-mblen unistr/u8-mbsnlen unistr/u8-mbtouc unistr/u8-mbtouc-unsafe unistr/u8-mbtoucr unistr/u8-move unistr/u8-next unistr/u8-prev unistr/u8-set unistr/u8-startswith unistr/u8-stpcpy unistr/u8-stpncpy unistr/u8-strcat unistr/u8-strchr unistr/u8-strcmp unistr/u8-strcoll unistr/u8-strcpy unistr/u8-strcspn unistr/u8-strdup unistr/u8-strlen unistr/u8-strmblen unistr/u8-strmbtouc unistr/u8-strncat unistr/u8-strncmp unistr/u8-strncpy unistr/u8-strnlen unistr/u8-strpbrk unistr/u8-strrchr unistr/u8-strspn unistr/u8-strstr unistr/u8-strtok unistr/u8-to-u16 unistr/u8-to-u32 unistr/u8-uctomb unitypes uniwbrk/base uniwbrk/u16-wordbreaks uniwbrk/u32-wordbreaks uniwbrk/u8-wordbreaks uniwbrk/ulc-wordbreaks uniwbrk/wordbreak-property uniwidth/base uniwidth/u16-strwidth uniwidth/u16-width uniwidth/u32-strwidth uniwidth/u32-width uniwidth/u8-strwidth uniwidth/u8-width uniwidth/width +# gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libunistring --source-base=lib --m4-base=gnulib-m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --lgpl --makefile-name=Makefile.gnulib --libtool --macro-prefix=gl relocatable-lib-lgpl unicase/base unicase/empty-prefix-context unicase/empty-suffix-context unicase/locale-language unicase/tolower unicase/totitle unicase/toupper unicase/u16-casecmp unicase/u16-casecoll unicase/u16-casefold unicase/u16-casexfrm unicase/u16-ct-casefold unicase/u16-ct-tolower unicase/u16-ct-totitle unicase/u16-ct-toupper unicase/u16-is-cased unicase/u16-is-casefolded unicase/u16-is-lowercase unicase/u16-is-titlecase unicase/u16-is-uppercase unicase/u16-tolower unicase/u16-totitle unicase/u16-toupper unicase/u32-casecmp unicase/u32-casecoll unicase/u32-casefold unicase/u32-casexfrm unicase/u32-ct-casefold unicase/u32-ct-tolower unicase/u32-ct-totitle unicase/u32-ct-toupper unicase/u32-is-cased unicase/u32-is-casefolded unicase/u32-is-lowercase unicase/u32-is-titlecase unicase/u32-is-uppercase unicase/u32-tolower unicase/u32-totitle unicase/u32-toupper unicase/u8-casecmp unicase/u8-casecoll unicase/u8-casefold unicase/u8-casexfrm unicase/u8-ct-casefold unicase/u8-ct-tolower unicase/u8-ct-totitle unicase/u8-ct-toupper unicase/u8-is-cased unicase/u8-is-casefolded unicase/u8-is-lowercase unicase/u8-is-titlecase unicase/u8-is-uppercase unicase/u8-tolower unicase/u8-totitle unicase/u8-toupper unicase/ulc-casecmp unicase/ulc-casecoll unicase/ulc-casexfrm uniconv/base uniconv/u16-conv-from-enc uniconv/u16-conv-to-enc uniconv/u16-strconv-from-enc uniconv/u16-strconv-from-locale uniconv/u16-strconv-to-enc uniconv/u16-strconv-to-locale uniconv/u32-conv-from-enc uniconv/u32-conv-to-enc uniconv/u32-strconv-from-enc uniconv/u32-strconv-from-locale uniconv/u32-strconv-to-enc uniconv/u32-strconv-to-locale uniconv/u8-conv-from-enc uniconv/u8-conv-to-enc uniconv/u8-strconv-from-enc uniconv/u8-strconv-from-locale uniconv/u8-strconv-to-enc uniconv/u8-strconv-to-locale unictype/base unictype/bidicategory-all unictype/block-all unictype/category-all unictype/combining-class unictype/ctype-alnum unictype/ctype-alpha unictype/ctype-blank unictype/ctype-cntrl unictype/ctype-digit unictype/ctype-graph unictype/ctype-lower unictype/ctype-print unictype/ctype-punct unictype/ctype-space unictype/ctype-upper unictype/ctype-xdigit unictype/decimal-digit unictype/digit unictype/mirror unictype/numeric unictype/property-all unictype/scripts-all unictype/syntax-c-ident unictype/syntax-c-whitespace unictype/syntax-java-ident unictype/syntax-java-whitespace unilbrk/base unilbrk/u16-possible-linebreaks unilbrk/u16-width-linebreaks unilbrk/u32-possible-linebreaks unilbrk/u32-width-linebreaks unilbrk/u8-possible-linebreaks unilbrk/u8-width-linebreaks unilbrk/ulc-possible-linebreaks unilbrk/ulc-width-linebreaks uniname/base uniname/uniname uninorm/base uninorm/canonical-decomposition uninorm/composition uninorm/decomposition uninorm/filter uninorm/nfc uninorm/nfd uninorm/nfkc uninorm/nfkd uninorm/u16-normalize uninorm/u16-normcmp uninorm/u16-normcoll uninorm/u16-normxfrm uninorm/u32-normalize uninorm/u32-normcmp uninorm/u32-normcoll uninorm/u32-normxfrm uninorm/u8-normalize uninorm/u8-normcmp uninorm/u8-normcoll uninorm/u8-normxfrm unistdio/base unistdio/u16-asnprintf unistdio/u16-asprintf unistdio/u16-snprintf unistdio/u16-sprintf unistdio/u16-u16-asnprintf unistdio/u16-u16-asprintf unistdio/u16-u16-snprintf unistdio/u16-u16-sprintf unistdio/u16-u16-vasnprintf unistdio/u16-u16-vasprintf unistdio/u16-u16-vsnprintf unistdio/u16-u16-vsprintf unistdio/u16-vasnprintf unistdio/u16-vasprintf unistdio/u16-vsnprintf unistdio/u16-vsprintf unistdio/u32-asnprintf unistdio/u32-asprintf unistdio/u32-snprintf unistdio/u32-sprintf unistdio/u32-u32-asnprintf unistdio/u32-u32-asprintf unistdio/u32-u32-snprintf unistdio/u32-u32-sprintf unistdio/u32-u32-vasnprintf unistdio/u32-u32-vasprintf unistdio/u32-u32-vsnprintf unistdio/u32-u32-vsprintf unistdio/u32-vasnprintf unistdio/u32-vasprintf unistdio/u32-vsnprintf unistdio/u32-vsprintf unistdio/u8-asnprintf unistdio/u8-asprintf unistdio/u8-snprintf unistdio/u8-sprintf unistdio/u8-u8-asnprintf unistdio/u8-u8-asprintf unistdio/u8-u8-snprintf unistdio/u8-u8-sprintf unistdio/u8-u8-vasnprintf unistdio/u8-u8-vasprintf unistdio/u8-u8-vsnprintf unistdio/u8-u8-vsprintf unistdio/u8-vasnprintf unistdio/u8-vasprintf unistdio/u8-vsnprintf unistdio/u8-vsprintf unistdio/ulc-asnprintf unistdio/ulc-asprintf unistdio/ulc-fprintf unistdio/ulc-snprintf unistdio/ulc-sprintf unistdio/ulc-vasnprintf unistdio/ulc-vasprintf unistdio/ulc-vfprintf unistdio/ulc-vsnprintf unistdio/ulc-vsprintf unistr/base unistr/u16-check unistr/u16-chr unistr/u16-cmp unistr/u16-cmp2 unistr/u16-cpy unistr/u16-cpy-alloc unistr/u16-endswith unistr/u16-mblen unistr/u16-mbsnlen unistr/u16-mbtouc unistr/u16-mbtouc-unsafe unistr/u16-mbtoucr unistr/u16-move unistr/u16-next unistr/u16-prev unistr/u16-set unistr/u16-startswith unistr/u16-stpcpy unistr/u16-stpncpy unistr/u16-strcat unistr/u16-strchr unistr/u16-strcmp unistr/u16-strcoll unistr/u16-strcpy unistr/u16-strcspn unistr/u16-strdup unistr/u16-strlen unistr/u16-strmblen unistr/u16-strmbtouc unistr/u16-strncat unistr/u16-strncmp unistr/u16-strncpy unistr/u16-strnlen unistr/u16-strpbrk unistr/u16-strrchr unistr/u16-strspn unistr/u16-strstr unistr/u16-strtok unistr/u16-to-u32 unistr/u16-to-u8 unistr/u16-uctomb unistr/u32-check unistr/u32-chr unistr/u32-cmp unistr/u32-cmp2 unistr/u32-cpy unistr/u32-cpy-alloc unistr/u32-endswith unistr/u32-mblen unistr/u32-mbsnlen unistr/u32-mbtouc unistr/u32-mbtouc-unsafe unistr/u32-mbtoucr unistr/u32-move unistr/u32-next unistr/u32-prev unistr/u32-set unistr/u32-startswith unistr/u32-stpcpy unistr/u32-stpncpy unistr/u32-strcat unistr/u32-strchr unistr/u32-strcmp unistr/u32-strcoll unistr/u32-strcpy unistr/u32-strcspn unistr/u32-strdup unistr/u32-strlen unistr/u32-strmblen unistr/u32-strmbtouc unistr/u32-strncat unistr/u32-strncmp unistr/u32-strncpy unistr/u32-strnlen unistr/u32-strpbrk unistr/u32-strrchr unistr/u32-strspn unistr/u32-strstr unistr/u32-strtok unistr/u32-to-u16 unistr/u32-to-u8 unistr/u32-uctomb unistr/u8-check unistr/u8-chr unistr/u8-cmp unistr/u8-cmp2 unistr/u8-cpy unistr/u8-cpy-alloc unistr/u8-endswith unistr/u8-mblen unistr/u8-mbsnlen unistr/u8-mbtouc unistr/u8-mbtouc-unsafe unistr/u8-mbtoucr unistr/u8-move unistr/u8-next unistr/u8-prev unistr/u8-set unistr/u8-startswith unistr/u8-stpcpy unistr/u8-stpncpy unistr/u8-strcat unistr/u8-strchr unistr/u8-strcmp unistr/u8-strcoll unistr/u8-strcpy unistr/u8-strcspn unistr/u8-strdup unistr/u8-strlen unistr/u8-strmblen unistr/u8-strmbtouc unistr/u8-strncat unistr/u8-strncmp unistr/u8-strncpy unistr/u8-strnlen unistr/u8-strpbrk unistr/u8-strrchr unistr/u8-strspn unistr/u8-strstr unistr/u8-strtok unistr/u8-to-u16 unistr/u8-to-u32 unistr/u8-uctomb unitypes uniwbrk/base uniwbrk/u16-wordbreaks uniwbrk/u32-wordbreaks uniwbrk/u8-wordbreaks uniwbrk/ulc-wordbreaks uniwbrk/wordbreak-property uniwidth/base uniwidth/u16-strwidth uniwidth/u16-width uniwidth/u32-strwidth uniwidth/u32-width uniwidth/u8-strwidth uniwidth/u8-width uniwidth/width # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([gnulib-local]) @@ -126,7 +126,6 @@ gl_MODULES([ unictype/syntax-java-ident unictype/syntax-java-whitespace unilbrk/base - unilbrk/tables unilbrk/u16-possible-linebreaks unilbrk/u16-width-linebreaks unilbrk/u32-possible-linebreaks @@ -139,7 +138,6 @@ gl_MODULES([ uniname/uniname uninorm/base uninorm/canonical-decomposition - uninorm/compat-decomposition uninorm/composition uninorm/decomposition uninorm/filter diff --git a/gnulib-m4/gnulib-common.m4 b/gnulib-m4/gnulib-common.m4 index c8fda203..4c7ac30d 100644 --- a/gnulib-m4/gnulib-common.m4 +++ b/gnulib-m4/gnulib-common.m4 @@ -1,5 +1,5 @@ -# gnulib-common.m4 serial 11 -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +# gnulib-common.m4 serial 20 +dnl Copyright (C) 2007-2010 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. @@ -23,23 +23,83 @@ AC_DEFUN([gl_COMMON_BODY], [ # define __GNUC_STDC_INLINE__ 1 #endif]) AH_VERBATIM([unused_parameter], -[/* Define as a marker that can be attached to function parameter declarations - for parameters that are not used. This helps to reduce warnings, such as - from GCC -Wunused-parameter. */ +[/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _UNUSED_PARAMETER_ __attribute__ ((__unused__)) +# define _GL_UNUSED __attribute__ ((__unused__)) #else -# define _UNUSED_PARAMETER_ +# define _GL_UNUSED #endif +/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name + is a misnomer outside of parameter lists. */ +#define _UNUSED_PARAMETER_ _GL_UNUSED ]) + dnl Preparation for running test programs: + dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not + dnl to /dev/tty, so they can be redirected to log files. Such diagnostics + dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N. + LIBC_FATAL_STDERR_=1 + export LIBC_FATAL_STDERR_ +]) + +# gl_MODULE_INDICATOR_CONDITION +# expands to a C preprocessor expression that evaluates to 1 or 0, depending +# whether a gnulib module that has been requested shall be considered present +# or not. +AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1]) + +# gl_MODULE_INDICATOR_SET_VARIABLE([modulename]) +# sets the shell variable that indicates the presence of the given module to +# a C preprocessor expression that will evaluate to 1. +AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], +[ + GNULIB_[]m4_translit([[$1]], + [abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION ]) # gl_MODULE_INDICATOR([modulename]) -# defines a C macro indicating the presence of the given module. +# defines a C macro indicating the presence of the given module +# in a location where it can be used. +# | Value | Value | +# | in lib/ | in tests/ | +# --------------------------------------------+---------+-----------+ +# Module present among main modules: | 1 | 1 | +# --------------------------------------------+---------+-----------+ +# Module present among tests-related modules: | 0 | 1 | +# --------------------------------------------+---------+-----------+ +# Module not present at all: | 0 | 0 | +# --------------------------------------------+---------+-----------+ AC_DEFUN([gl_MODULE_INDICATOR], [ - AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], - [Define to 1 when using the gnulib module ]$1[.]) + AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]], + [abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), + [gl_MODULE_INDICATOR_CONDITION], + [Define to a C preprocessor expression that evaluates to 1 or 0, + depending whether the gnulib module $1 shall be considered present.]) +]) + +# gl_MODULE_INDICATOR_FOR_TESTS([modulename]) +# defines a C macro indicating the presence of the given module +# in lib or tests. This is useful to determine whether the module +# should be tested. +# | Value | Value | +# | in lib/ | in tests/ | +# --------------------------------------------+---------+-----------+ +# Module present among main modules: | 1 | 1 | +# --------------------------------------------+---------+-----------+ +# Module present among tests-related modules: | 1 | 1 | +# --------------------------------------------+---------+-----------+ +# Module not present at all: | 0 | 0 | +# --------------------------------------------+---------+-----------+ +AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], +[ + AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]], + [abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], + [Define to 1 when the gnulib module $1 should be tested.]) ]) # m4_foreach_w @@ -49,10 +109,25 @@ m4_ifndef([m4_foreach_w], [m4_define([m4_foreach_w], [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) +# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) +# ---------------------------------------------------- +# Backport of autoconf-2.63b's macro. +# Remove this macro when we can assume autoconf >= 2.64. +m4_ifndef([AS_VAR_IF], +[m4_define([AS_VAR_IF], +[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) + # AC_PROG_MKDIR_P -# is a backport of autoconf-2.60's AC_PROG_MKDIR_P. -# Remove this macro when we can assume autoconf >= 2.60. -m4_ifdef([AC_PROG_MKDIR_P], [], [ +# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix +# 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. +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], + m4_defn([AC_PROG_MKDIR_P])[ + AC_SUBST([MKDIR_P])])], [ + dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. AC_DEFUN_ONCE([AC_PROG_MKDIR_P], [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake MKDIR_P='$(mkdir_p)' @@ -63,6 +138,7 @@ m4_ifdef([AC_PROG_MKDIR_P], [], [ # 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_DEFUN([AC_C_RESTRICT], [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], [ac_cv_c_restrict=no @@ -70,13 +146,13 @@ AC_DEFUN([AC_C_RESTRICT], for ac_kw in __restrict __restrict__ _Restrict restrict; do AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; + int foo (int_ptr $ac_kw ip) { + return ip[0]; }]], [[int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t)]])], + int * $ac_kw t = s; + t[0] = 0; + return foo(t)]])], [ac_cv_c_restrict=$ac_kw]) test "$ac_cv_c_restrict" != no && break done @@ -100,6 +176,7 @@ AC_DEFUN([AC_C_RESTRICT], *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; esac ]) +]) # gl_BIGENDIAN # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. diff --git a/gnulib-m4/gnulib-comp.m4 b/gnulib-m4/gnulib-comp.m4 index 39e7d193..21284a4c 100644 --- a/gnulib-m4/gnulib-comp.m4 +++ b/gnulib-m4/gnulib-comp.m4 @@ -1,5 +1,5 @@ # DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2009 Free Software Foundation, Inc. +# Copyright (C) 2002-2010 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General @@ -26,8 +26,983 @@ AC_DEFUN([gl_EARLY], m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable AC_REQUIRE([AC_PROG_RANLIB]) AC_REQUIRE([AM_PROG_CC_C_O]) + # Code from module alloca-opt: + # Code from module alloca-opt-tests: + # Code from module arg-nonnull: + # Code from module array-mergesort: + # Code from module array-mergesort-tests: + # Code from module c++defs: + # Code from module c-ctype: + # Code from module c-ctype-tests: + # Code from module c-strcase: + # Code from module c-strcase-tests: + # Code from module c-strcaseeq: + # Code from module configmake: + # Code from module environ: + # Code from module environ-tests: + # Code from module errno: + # Code from module errno-tests: + # Code from module error: + # Code from module exitfail: + # Code from module extensions: AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + # Code from module float: + # Code from module fpieee: AC_REQUIRE([gl_FP_IEEE]) + # Code from module fpucw: + # Code from module frexpl-nolibm: + # Code from module frexpl-nolibm-tests: + # Code from module fseterr: + # Code from module fseterr-tests: + # Code from module getpagesize: + # Code from module gettext-h: + # Code from module gperf: + # Code from module havelib: + # Code from module iconv: + # Code from module iconv-h: + # Code from module iconv-h-tests: + # Code from module iconv-tests: + # Code from module iconv_open: + # Code from module include_next: + # Code from module inline: + # Code from module intprops: + # Code from module isnand-nolibm: + # Code from module isnand-nolibm-tests: + # Code from module isnanf-nolibm: + # Code from module isnanf-nolibm-tests: + # Code from module isnanl-nolibm: + # Code from module isnanl-nolibm-tests: + # Code from module localcharset: + # Code from module locale: + # Code from module locale-tests: + # Code from module localename: + # Code from module localename-tests: + # Code from module lock: + # Code from module lock-tests: + # Code from module malloc-posix: + # Code from module malloca: + # Code from module malloca-tests: + # Code from module math: + # Code from module math-tests: + # Code from module mbchar: + # Code from module mbiter: + # Code from module mbrtowc: + # Code from module mbrtowc-tests: + # Code from module mbsinit: + # Code from module mbsinit-tests: + # Code from module mbsnlen: + # Code from module memchr: + # Code from module memchr-tests: + # Code from module memcmp2: + # Code from module memxfrm: + # Code from module minmax: + # Code from module multiarch: + # Code from module nocrash: + # Code from module printf-frexp: + # Code from module printf-frexp-tests: + # Code from module printf-frexpl: + # Code from module printf-frexpl-tests: + # Code from module printf-safe: + # Code from module progname: + # Code from module putenv: + # Code from module relocatable-lib-lgpl: + # Code from module setenv: + # Code from module setenv-tests: + # Code from module signbit: + # Code from module signbit-tests: + # Code from module size_max: + # Code from module stdbool: + # Code from module stdbool-tests: + # Code from module stddef: + # Code from module stddef-tests: + # Code from module stdint: + # Code from module stdint-tests: + # Code from module stdlib: + # Code from module stdlib-tests: + # Code from module streq: + # Code from module strerror: + # Code from module strerror-tests: + # Code from module striconveh: + # Code from module striconveh-tests: + # Code from module striconveha: + # Code from module striconveha-tests: + # Code from module string: + # Code from module string-tests: + # Code from module strncat: + # Code from module strncat-tests: + # Code from module thread: + # Code from module threadlib: + gl_THREADLIB_EARLY + # Code from module unicase/base: + # Code from module unicase/cased: + # Code from module unicase/cased-tests: + # Code from module unicase/empty-prefix-context: + # Code from module unicase/empty-suffix-context: + # Code from module unicase/ignorable: + # Code from module unicase/ignorable-tests: + # Code from module unicase/locale-language: + # Code from module unicase/locale-language-tests: + # Code from module unicase/special-casing: + # Code from module unicase/tocasefold: + # Code from module unicase/tolower: + # Code from module unicase/tolower-tests: + # Code from module unicase/totitle: + # Code from module unicase/totitle-tests: + # Code from module unicase/toupper: + # Code from module unicase/toupper-tests: + # Code from module unicase/u16-casecmp: + # Code from module unicase/u16-casecmp-tests: + # Code from module unicase/u16-casecoll: + # Code from module unicase/u16-casecoll-tests: + # Code from module unicase/u16-casefold: + # Code from module unicase/u16-casefold-tests: + # Code from module unicase/u16-casemap: + # Code from module unicase/u16-casexfrm: + # Code from module unicase/u16-ct-casefold: + # Code from module unicase/u16-ct-tolower: + # Code from module unicase/u16-ct-totitle: + # Code from module unicase/u16-ct-toupper: + # Code from module unicase/u16-is-cased: + # Code from module unicase/u16-is-cased-tests: + # Code from module unicase/u16-is-casefolded: + # Code from module unicase/u16-is-casefolded-tests: + # Code from module unicase/u16-is-invariant: + # Code from module unicase/u16-is-lowercase: + # Code from module unicase/u16-is-lowercase-tests: + # Code from module unicase/u16-is-titlecase: + # Code from module unicase/u16-is-titlecase-tests: + # Code from module unicase/u16-is-uppercase: + # Code from module unicase/u16-is-uppercase-tests: + # Code from module unicase/u16-tolower: + # Code from module unicase/u16-tolower-tests: + # Code from module unicase/u16-totitle: + # Code from module unicase/u16-totitle-tests: + # Code from module unicase/u16-toupper: + # Code from module unicase/u16-toupper-tests: + # Code from module unicase/u32-casecmp: + # Code from module unicase/u32-casecmp-tests: + # Code from module unicase/u32-casecoll: + # Code from module unicase/u32-casecoll-tests: + # Code from module unicase/u32-casefold: + # Code from module unicase/u32-casefold-tests: + # Code from module unicase/u32-casemap: + # Code from module unicase/u32-casexfrm: + # Code from module unicase/u32-ct-casefold: + # Code from module unicase/u32-ct-tolower: + # Code from module unicase/u32-ct-totitle: + # Code from module unicase/u32-ct-toupper: + # Code from module unicase/u32-is-cased: + # Code from module unicase/u32-is-cased-tests: + # Code from module unicase/u32-is-casefolded: + # Code from module unicase/u32-is-casefolded-tests: + # Code from module unicase/u32-is-invariant: + # Code from module unicase/u32-is-lowercase: + # Code from module unicase/u32-is-lowercase-tests: + # Code from module unicase/u32-is-titlecase: + # Code from module unicase/u32-is-titlecase-tests: + # Code from module unicase/u32-is-uppercase: + # Code from module unicase/u32-is-uppercase-tests: + # Code from module unicase/u32-tolower: + # Code from module unicase/u32-tolower-tests: + # Code from module unicase/u32-totitle: + # Code from module unicase/u32-totitle-tests: + # Code from module unicase/u32-toupper: + # Code from module unicase/u32-toupper-tests: + # Code from module unicase/u8-casecmp: + # Code from module unicase/u8-casecmp-tests: + # Code from module unicase/u8-casecoll: + # Code from module unicase/u8-casecoll-tests: + # Code from module unicase/u8-casefold: + # Code from module unicase/u8-casefold-tests: + # Code from module unicase/u8-casemap: + # Code from module unicase/u8-casexfrm: + # Code from module unicase/u8-ct-casefold: + # Code from module unicase/u8-ct-tolower: + # Code from module unicase/u8-ct-totitle: + # Code from module unicase/u8-ct-toupper: + # Code from module unicase/u8-is-cased: + # Code from module unicase/u8-is-cased-tests: + # Code from module unicase/u8-is-casefolded: + # Code from module unicase/u8-is-casefolded-tests: + # Code from module unicase/u8-is-invariant: + # Code from module unicase/u8-is-lowercase: + # Code from module unicase/u8-is-lowercase-tests: + # Code from module unicase/u8-is-titlecase: + # Code from module unicase/u8-is-titlecase-tests: + # Code from module unicase/u8-is-uppercase: + # Code from module unicase/u8-is-uppercase-tests: + # Code from module unicase/u8-tolower: + # Code from module unicase/u8-tolower-tests: + # Code from module unicase/u8-totitle: + # Code from module unicase/u8-totitle-tests: + # Code from module unicase/u8-toupper: + # Code from module unicase/u8-toupper-tests: + # Code from module unicase/ulc-casecmp: + # Code from module unicase/ulc-casecmp-tests: + # Code from module unicase/ulc-casecoll: + # Code from module unicase/ulc-casecoll-tests: + # Code from module unicase/ulc-casexfrm: + # Code from module uniconv/base: + # Code from module uniconv/u16-conv-from-enc: + # Code from module uniconv/u16-conv-from-enc-tests: + # Code from module uniconv/u16-conv-to-enc: + # Code from module uniconv/u16-conv-to-enc-tests: + # Code from module uniconv/u16-strconv-from-enc: + # Code from module uniconv/u16-strconv-from-enc-tests: + # Code from module uniconv/u16-strconv-from-locale: + # Code from module uniconv/u16-strconv-to-enc: + # Code from module uniconv/u16-strconv-to-enc-tests: + # Code from module uniconv/u16-strconv-to-locale: + # Code from module uniconv/u32-conv-from-enc: + # Code from module uniconv/u32-conv-from-enc-tests: + # Code from module uniconv/u32-conv-to-enc: + # Code from module uniconv/u32-conv-to-enc-tests: + # Code from module uniconv/u32-strconv-from-enc: + # Code from module uniconv/u32-strconv-from-enc-tests: + # Code from module uniconv/u32-strconv-from-locale: + # Code from module uniconv/u32-strconv-to-enc: + # Code from module uniconv/u32-strconv-to-enc-tests: + # Code from module uniconv/u32-strconv-to-locale: + # Code from module uniconv/u8-conv-from-enc: + # Code from module uniconv/u8-conv-from-enc-tests: + # Code from module uniconv/u8-conv-to-enc: + # Code from module uniconv/u8-conv-to-enc-tests: + # Code from module uniconv/u8-strconv-from-enc: + # Code from module uniconv/u8-strconv-from-enc-tests: + # Code from module uniconv/u8-strconv-from-locale: + # Code from module uniconv/u8-strconv-to-enc: + # Code from module uniconv/u8-strconv-to-enc-tests: + # Code from module uniconv/u8-strconv-to-locale: + # Code from module unictype/base: + # Code from module unictype/bidicategory-all: + # Code from module unictype/bidicategory-byname: + # Code from module unictype/bidicategory-byname-tests: + # Code from module unictype/bidicategory-name: + # Code from module unictype/bidicategory-name-tests: + # Code from module unictype/bidicategory-of: + # Code from module unictype/bidicategory-of-tests: + # Code from module unictype/bidicategory-test: + # Code from module unictype/bidicategory-test-tests: + # Code from module unictype/block-all: + # Code from module unictype/block-list: + # Code from module unictype/block-list-tests: + # Code from module unictype/block-of: + # Code from module unictype/block-of-tests: + # Code from module unictype/block-test: + # Code from module unictype/block-test-tests: + # Code from module unictype/category-C: + # Code from module unictype/category-C-tests: + # Code from module unictype/category-Cc: + # Code from module unictype/category-Cc-tests: + # Code from module unictype/category-Cf: + # Code from module unictype/category-Cf-tests: + # Code from module unictype/category-Cn: + # Code from module unictype/category-Cn-tests: + # Code from module unictype/category-Co: + # Code from module unictype/category-Co-tests: + # Code from module unictype/category-Cs: + # Code from module unictype/category-Cs-tests: + # Code from module unictype/category-L: + # Code from module unictype/category-L-tests: + # Code from module unictype/category-Ll: + # Code from module unictype/category-Ll-tests: + # Code from module unictype/category-Lm: + # Code from module unictype/category-Lm-tests: + # Code from module unictype/category-Lo: + # Code from module unictype/category-Lo-tests: + # Code from module unictype/category-Lt: + # Code from module unictype/category-Lt-tests: + # Code from module unictype/category-Lu: + # Code from module unictype/category-Lu-tests: + # Code from module unictype/category-M: + # Code from module unictype/category-M-tests: + # Code from module unictype/category-Mc: + # Code from module unictype/category-Mc-tests: + # Code from module unictype/category-Me: + # Code from module unictype/category-Me-tests: + # Code from module unictype/category-Mn: + # Code from module unictype/category-Mn-tests: + # Code from module unictype/category-N: + # Code from module unictype/category-N-tests: + # Code from module unictype/category-Nd: + # Code from module unictype/category-Nd-tests: + # Code from module unictype/category-Nl: + # Code from module unictype/category-Nl-tests: + # Code from module unictype/category-No: + # Code from module unictype/category-No-tests: + # Code from module unictype/category-P: + # Code from module unictype/category-P-tests: + # Code from module unictype/category-Pc: + # Code from module unictype/category-Pc-tests: + # Code from module unictype/category-Pd: + # Code from module unictype/category-Pd-tests: + # Code from module unictype/category-Pe: + # Code from module unictype/category-Pe-tests: + # Code from module unictype/category-Pf: + # Code from module unictype/category-Pf-tests: + # Code from module unictype/category-Pi: + # Code from module unictype/category-Pi-tests: + # Code from module unictype/category-Po: + # Code from module unictype/category-Po-tests: + # Code from module unictype/category-Ps: + # Code from module unictype/category-Ps-tests: + # Code from module unictype/category-S: + # Code from module unictype/category-S-tests: + # Code from module unictype/category-Sc: + # Code from module unictype/category-Sc-tests: + # Code from module unictype/category-Sk: + # Code from module unictype/category-Sk-tests: + # Code from module unictype/category-Sm: + # Code from module unictype/category-Sm-tests: + # Code from module unictype/category-So: + # Code from module unictype/category-So-tests: + # Code from module unictype/category-Z: + # Code from module unictype/category-Z-tests: + # Code from module unictype/category-Zl: + # Code from module unictype/category-Zl-tests: + # Code from module unictype/category-Zp: + # Code from module unictype/category-Zp-tests: + # Code from module unictype/category-Zs: + # Code from module unictype/category-Zs-tests: + # Code from module unictype/category-all: + # Code from module unictype/category-and: + # Code from module unictype/category-and-not: + # Code from module unictype/category-and-not-tests: + # Code from module unictype/category-and-tests: + # Code from module unictype/category-byname: + # Code from module unictype/category-byname-tests: + # Code from module unictype/category-name: + # Code from module unictype/category-name-tests: + # Code from module unictype/category-none: + # Code from module unictype/category-none-tests: + # Code from module unictype/category-of: + # Code from module unictype/category-of-tests: + # Code from module unictype/category-or: + # Code from module unictype/category-or-tests: + # Code from module unictype/category-test: + # Code from module unictype/category-test-withtable: + # Code from module unictype/category-test-withtable-tests: + # Code from module unictype/combining-class: + # Code from module unictype/combining-class-tests: + # Code from module unictype/ctype-alnum: + # Code from module unictype/ctype-alnum-tests: + # Code from module unictype/ctype-alpha: + # Code from module unictype/ctype-alpha-tests: + # Code from module unictype/ctype-blank: + # Code from module unictype/ctype-blank-tests: + # Code from module unictype/ctype-cntrl: + # Code from module unictype/ctype-cntrl-tests: + # Code from module unictype/ctype-digit: + # Code from module unictype/ctype-digit-tests: + # Code from module unictype/ctype-graph: + # Code from module unictype/ctype-graph-tests: + # Code from module unictype/ctype-lower: + # Code from module unictype/ctype-lower-tests: + # Code from module unictype/ctype-print: + # Code from module unictype/ctype-print-tests: + # Code from module unictype/ctype-punct: + # Code from module unictype/ctype-punct-tests: + # Code from module unictype/ctype-space: + # Code from module unictype/ctype-space-tests: + # Code from module unictype/ctype-upper: + # Code from module unictype/ctype-upper-tests: + # Code from module unictype/ctype-xdigit: + # Code from module unictype/ctype-xdigit-tests: + # Code from module unictype/decimal-digit: + # Code from module unictype/decimal-digit-tests: + # Code from module unictype/digit: + # Code from module unictype/digit-tests: + # Code from module unictype/mirror: + # Code from module unictype/mirror-tests: + # Code from module unictype/numeric: + # Code from module unictype/numeric-tests: + # Code from module unictype/property-all: + # Code from module unictype/property-alphabetic: + # Code from module unictype/property-alphabetic-tests: + # Code from module unictype/property-ascii-hex-digit: + # Code from module unictype/property-ascii-hex-digit-tests: + # Code from module unictype/property-bidi-arabic-digit: + # Code from module unictype/property-bidi-arabic-digit-tests: + # Code from module unictype/property-bidi-arabic-right-to-left: + # Code from module unictype/property-bidi-arabic-right-to-left-tests: + # Code from module unictype/property-bidi-block-separator: + # Code from module unictype/property-bidi-block-separator-tests: + # Code from module unictype/property-bidi-boundary-neutral: + # Code from module unictype/property-bidi-boundary-neutral-tests: + # Code from module unictype/property-bidi-common-separator: + # Code from module unictype/property-bidi-common-separator-tests: + # Code from module unictype/property-bidi-control: + # Code from module unictype/property-bidi-control-tests: + # Code from module unictype/property-bidi-embedding-or-override: + # Code from module unictype/property-bidi-embedding-or-override-tests: + # Code from module unictype/property-bidi-eur-num-separator: + # Code from module unictype/property-bidi-eur-num-separator-tests: + # Code from module unictype/property-bidi-eur-num-terminator: + # Code from module unictype/property-bidi-eur-num-terminator-tests: + # Code from module unictype/property-bidi-european-digit: + # Code from module unictype/property-bidi-european-digit-tests: + # Code from module unictype/property-bidi-hebrew-right-to-left: + # Code from module unictype/property-bidi-hebrew-right-to-left-tests: + # Code from module unictype/property-bidi-left-to-right: + # Code from module unictype/property-bidi-left-to-right-tests: + # Code from module unictype/property-bidi-non-spacing-mark: + # Code from module unictype/property-bidi-non-spacing-mark-tests: + # Code from module unictype/property-bidi-other-neutral: + # Code from module unictype/property-bidi-other-neutral-tests: + # Code from module unictype/property-bidi-pdf: + # Code from module unictype/property-bidi-pdf-tests: + # Code from module unictype/property-bidi-segment-separator: + # Code from module unictype/property-bidi-segment-separator-tests: + # Code from module unictype/property-bidi-whitespace: + # Code from module unictype/property-bidi-whitespace-tests: + # Code from module unictype/property-byname: + # Code from module unictype/property-byname-tests: + # Code from module unictype/property-combining: + # Code from module unictype/property-combining-tests: + # Code from module unictype/property-composite: + # Code from module unictype/property-composite-tests: + # Code from module unictype/property-currency-symbol: + # Code from module unictype/property-currency-symbol-tests: + # Code from module unictype/property-dash: + # Code from module unictype/property-dash-tests: + # Code from module unictype/property-decimal-digit: + # Code from module unictype/property-decimal-digit-tests: + # Code from module unictype/property-default-ignorable-code-point: + # Code from module unictype/property-default-ignorable-code-point-tests: + # Code from module unictype/property-deprecated: + # Code from module unictype/property-deprecated-tests: + # Code from module unictype/property-diacritic: + # Code from module unictype/property-diacritic-tests: + # Code from module unictype/property-extender: + # Code from module unictype/property-extender-tests: + # Code from module unictype/property-format-control: + # Code from module unictype/property-format-control-tests: + # Code from module unictype/property-grapheme-base: + # Code from module unictype/property-grapheme-base-tests: + # Code from module unictype/property-grapheme-extend: + # Code from module unictype/property-grapheme-extend-tests: + # Code from module unictype/property-grapheme-link: + # Code from module unictype/property-grapheme-link-tests: + # Code from module unictype/property-hex-digit: + # Code from module unictype/property-hex-digit-tests: + # Code from module unictype/property-hyphen: + # Code from module unictype/property-hyphen-tests: + # Code from module unictype/property-id-continue: + # Code from module unictype/property-id-continue-tests: + # Code from module unictype/property-id-start: + # Code from module unictype/property-id-start-tests: + # Code from module unictype/property-ideographic: + # Code from module unictype/property-ideographic-tests: + # Code from module unictype/property-ids-binary-operator: + # Code from module unictype/property-ids-binary-operator-tests: + # Code from module unictype/property-ids-trinary-operator: + # Code from module unictype/property-ids-trinary-operator-tests: + # Code from module unictype/property-ignorable-control: + # Code from module unictype/property-ignorable-control-tests: + # Code from module unictype/property-iso-control: + # Code from module unictype/property-iso-control-tests: + # Code from module unictype/property-join-control: + # Code from module unictype/property-join-control-tests: + # Code from module unictype/property-left-of-pair: + # Code from module unictype/property-left-of-pair-tests: + # Code from module unictype/property-line-separator: + # Code from module unictype/property-line-separator-tests: + # Code from module unictype/property-logical-order-exception: + # Code from module unictype/property-logical-order-exception-tests: + # Code from module unictype/property-lowercase: + # Code from module unictype/property-lowercase-tests: + # Code from module unictype/property-math: + # Code from module unictype/property-math-tests: + # Code from module unictype/property-non-break: + # Code from module unictype/property-non-break-tests: + # Code from module unictype/property-not-a-character: + # Code from module unictype/property-not-a-character-tests: + # Code from module unictype/property-numeric: + # Code from module unictype/property-numeric-tests: + # Code from module unictype/property-other-alphabetic: + # Code from module unictype/property-other-alphabetic-tests: + # Code from module unictype/property-other-default-ignorable-code-point: + # Code from module unictype/property-other-default-ignorable-code-point-tests: + # Code from module unictype/property-other-grapheme-extend: + # Code from module unictype/property-other-grapheme-extend-tests: + # Code from module unictype/property-other-id-continue: + # Code from module unictype/property-other-id-continue-tests: + # Code from module unictype/property-other-id-start: + # Code from module unictype/property-other-id-start-tests: + # Code from module unictype/property-other-lowercase: + # Code from module unictype/property-other-lowercase-tests: + # Code from module unictype/property-other-math: + # Code from module unictype/property-other-math-tests: + # Code from module unictype/property-other-uppercase: + # Code from module unictype/property-other-uppercase-tests: + # Code from module unictype/property-paired-punctuation: + # Code from module unictype/property-paired-punctuation-tests: + # Code from module unictype/property-paragraph-separator: + # Code from module unictype/property-paragraph-separator-tests: + # Code from module unictype/property-pattern-syntax: + # Code from module unictype/property-pattern-syntax-tests: + # Code from module unictype/property-pattern-white-space: + # Code from module unictype/property-pattern-white-space-tests: + # Code from module unictype/property-private-use: + # Code from module unictype/property-private-use-tests: + # Code from module unictype/property-punctuation: + # Code from module unictype/property-punctuation-tests: + # Code from module unictype/property-quotation-mark: + # Code from module unictype/property-quotation-mark-tests: + # Code from module unictype/property-radical: + # Code from module unictype/property-radical-tests: + # Code from module unictype/property-sentence-terminal: + # Code from module unictype/property-sentence-terminal-tests: + # Code from module unictype/property-soft-dotted: + # Code from module unictype/property-soft-dotted-tests: + # Code from module unictype/property-space: + # Code from module unictype/property-space-tests: + # Code from module unictype/property-terminal-punctuation: + # Code from module unictype/property-terminal-punctuation-tests: + # Code from module unictype/property-test: + # Code from module unictype/property-test-tests: + # Code from module unictype/property-titlecase: + # Code from module unictype/property-titlecase-tests: + # Code from module unictype/property-unassigned-code-value: + # Code from module unictype/property-unassigned-code-value-tests: + # Code from module unictype/property-unified-ideograph: + # Code from module unictype/property-unified-ideograph-tests: + # Code from module unictype/property-uppercase: + # Code from module unictype/property-uppercase-tests: + # Code from module unictype/property-variation-selector: + # Code from module unictype/property-variation-selector-tests: + # Code from module unictype/property-white-space: + # Code from module unictype/property-white-space-tests: + # Code from module unictype/property-xid-continue: + # Code from module unictype/property-xid-continue-tests: + # Code from module unictype/property-xid-start: + # Code from module unictype/property-xid-start-tests: + # Code from module unictype/property-zero-width: + # Code from module unictype/property-zero-width-tests: + # Code from module unictype/scripts: + # Code from module unictype/scripts-all: + # Code from module unictype/scripts-tests: + # Code from module unictype/syntax-c-ident: + # Code from module unictype/syntax-c-ident-tests: + # Code from module unictype/syntax-c-whitespace: + # Code from module unictype/syntax-c-whitespace-tests: + # Code from module unictype/syntax-java-ident: + # Code from module unictype/syntax-java-ident-tests: + # Code from module unictype/syntax-java-whitespace: + # Code from module unictype/syntax-java-whitespace-tests: + # Code from module unilbrk/base: + # Code from module unilbrk/tables: + # Code from module unilbrk/u16-possible-linebreaks: + # Code from module unilbrk/u16-possible-linebreaks-tests: + # Code from module unilbrk/u16-width-linebreaks: + # Code from module unilbrk/u16-width-linebreaks-tests: + # Code from module unilbrk/u32-possible-linebreaks: + # Code from module unilbrk/u32-possible-linebreaks-tests: + # Code from module unilbrk/u32-width-linebreaks: + # Code from module unilbrk/u32-width-linebreaks-tests: + # Code from module unilbrk/u8-possible-linebreaks: + # Code from module unilbrk/u8-possible-linebreaks-tests: + # Code from module unilbrk/u8-width-linebreaks: + # Code from module unilbrk/u8-width-linebreaks-tests: + # Code from module unilbrk/ulc-common: + # Code from module unilbrk/ulc-possible-linebreaks: + # Code from module unilbrk/ulc-possible-linebreaks-tests: + # Code from module unilbrk/ulc-width-linebreaks: + # Code from module unilbrk/ulc-width-linebreaks-tests: + # Code from module uniname/base: + # Code from module uniname/uniname: + # Code from module uniname/uniname-tests: + # Code from module uninorm/base: + # Code from module uninorm/canonical-decomposition: + # Code from module uninorm/canonical-decomposition-tests: + # Code from module uninorm/compat-decomposition: + # Code from module uninorm/compat-decomposition-tests: + # Code from module uninorm/composition: + # Code from module uninorm/composition-tests: + # Code from module uninorm/decompose-internal: + # Code from module uninorm/decomposing-form: + # Code from module uninorm/decomposing-form-tests: + # Code from module uninorm/decomposition: + # Code from module uninorm/decomposition-table: + # Code from module uninorm/decomposition-tests: + # Code from module uninorm/filter: + # Code from module uninorm/filter-tests: + # Code from module uninorm/nfc: + # Code from module uninorm/nfc-tests: + # Code from module uninorm/nfd: + # Code from module uninorm/nfd-tests: + # Code from module uninorm/nfkc: + # Code from module uninorm/nfkc-tests: + # Code from module uninorm/nfkd: + # Code from module uninorm/nfkd-tests: + # Code from module uninorm/u16-normalize: + # Code from module uninorm/u16-normcmp: + # Code from module uninorm/u16-normcmp-tests: + # Code from module uninorm/u16-normcoll: + # Code from module uninorm/u16-normcoll-tests: + # Code from module uninorm/u16-normxfrm: + # Code from module uninorm/u32-normalize: + # Code from module uninorm/u32-normcmp: + # Code from module uninorm/u32-normcmp-tests: + # Code from module uninorm/u32-normcoll: + # Code from module uninorm/u32-normcoll-tests: + # Code from module uninorm/u32-normxfrm: + # Code from module uninorm/u8-normalize: + # Code from module uninorm/u8-normcmp: + # Code from module uninorm/u8-normcmp-tests: + # Code from module uninorm/u8-normcoll: + # Code from module uninorm/u8-normcoll-tests: + # Code from module uninorm/u8-normxfrm: + # Code from module unistd: + # Code from module unistd-tests: + # Code from module unistdio/base: + # Code from module unistdio/u-printf-args: + # Code from module unistdio/u16-asnprintf: + # Code from module unistdio/u16-asnprintf-tests: + # Code from module unistdio/u16-asprintf: + # Code from module unistdio/u16-printf-parse: + # Code from module unistdio/u16-snprintf: + # Code from module unistdio/u16-sprintf: + # Code from module unistdio/u16-u16-asnprintf: + # Code from module unistdio/u16-u16-asprintf: + # Code from module unistdio/u16-u16-snprintf: + # Code from module unistdio/u16-u16-sprintf: + # Code from module unistdio/u16-u16-vasnprintf: + # Code from module unistdio/u16-u16-vasprintf: + # Code from module unistdio/u16-u16-vsnprintf: + # Code from module unistdio/u16-u16-vsprintf: + # Code from module unistdio/u16-vasnprintf: + # Code from module unistdio/u16-vasnprintf-tests: + # Code from module unistdio/u16-vasprintf: + # Code from module unistdio/u16-vasprintf-tests: + # Code from module unistdio/u16-vsnprintf: + # Code from module unistdio/u16-vsnprintf-tests: + # Code from module unistdio/u16-vsprintf: + # Code from module unistdio/u16-vsprintf-tests: + # Code from module unistdio/u32-asnprintf: + # Code from module unistdio/u32-asnprintf-tests: + # Code from module unistdio/u32-asprintf: + # Code from module unistdio/u32-printf-parse: + # Code from module unistdio/u32-snprintf: + # Code from module unistdio/u32-sprintf: + # Code from module unistdio/u32-u32-asnprintf: + # Code from module unistdio/u32-u32-asprintf: + # Code from module unistdio/u32-u32-snprintf: + # Code from module unistdio/u32-u32-sprintf: + # Code from module unistdio/u32-u32-vasnprintf: + # Code from module unistdio/u32-u32-vasprintf: + # Code from module unistdio/u32-u32-vsnprintf: + # Code from module unistdio/u32-u32-vsprintf: + # Code from module unistdio/u32-vasnprintf: + # Code from module unistdio/u32-vasnprintf-tests: + # Code from module unistdio/u32-vasprintf: + # Code from module unistdio/u32-vasprintf-tests: + # Code from module unistdio/u32-vsnprintf: + # Code from module unistdio/u32-vsnprintf-tests: + # Code from module unistdio/u32-vsprintf: + # Code from module unistdio/u32-vsprintf-tests: + # Code from module unistdio/u8-asnprintf: + # Code from module unistdio/u8-asnprintf-tests: + # Code from module unistdio/u8-asprintf: + # Code from module unistdio/u8-printf-parse: + # Code from module unistdio/u8-snprintf: + # Code from module unistdio/u8-sprintf: + # Code from module unistdio/u8-u8-asnprintf: + # Code from module unistdio/u8-u8-asprintf: + # Code from module unistdio/u8-u8-snprintf: + # Code from module unistdio/u8-u8-sprintf: + # Code from module unistdio/u8-u8-vasnprintf: + # Code from module unistdio/u8-u8-vasprintf: + # Code from module unistdio/u8-u8-vsnprintf: + # Code from module unistdio/u8-u8-vsprintf: + # Code from module unistdio/u8-vasnprintf: + # Code from module unistdio/u8-vasnprintf-tests: + # Code from module unistdio/u8-vasprintf: + # Code from module unistdio/u8-vasprintf-tests: + # Code from module unistdio/u8-vsnprintf: + # Code from module unistdio/u8-vsnprintf-tests: + # Code from module unistdio/u8-vsprintf: + # Code from module unistdio/u8-vsprintf-tests: + # Code from module unistdio/ulc-asnprintf: + # Code from module unistdio/ulc-asnprintf-tests: + # Code from module unistdio/ulc-asprintf: + # Code from module unistdio/ulc-fprintf: + # Code from module unistdio/ulc-printf-parse: + # Code from module unistdio/ulc-snprintf: + # Code from module unistdio/ulc-sprintf: + # Code from module unistdio/ulc-vasnprintf: + # Code from module unistdio/ulc-vasnprintf-tests: + # Code from module unistdio/ulc-vasprintf: + # Code from module unistdio/ulc-vasprintf-tests: + # Code from module unistdio/ulc-vfprintf: + # Code from module unistdio/ulc-vsnprintf: + # Code from module unistdio/ulc-vsnprintf-tests: + # Code from module unistdio/ulc-vsprintf: + # Code from module unistdio/ulc-vsprintf-tests: + # Code from module unistr/base: + # Code from module unistr/u16-check: + # Code from module unistr/u16-check-tests: + # Code from module unistr/u16-chr: + # Code from module unistr/u16-chr-tests: + # Code from module unistr/u16-cmp: + # Code from module unistr/u16-cmp-tests: + # Code from module unistr/u16-cmp2: + # Code from module unistr/u16-cmp2-tests: + # Code from module unistr/u16-cpy: + # Code from module unistr/u16-cpy-alloc: + # Code from module unistr/u16-cpy-alloc-tests: + # Code from module unistr/u16-cpy-tests: + # Code from module unistr/u16-endswith: + # Code from module unistr/u16-mblen: + # Code from module unistr/u16-mblen-tests: + # Code from module unistr/u16-mbsnlen: + # Code from module unistr/u16-mbsnlen-tests: + # Code from module unistr/u16-mbtouc: + # Code from module unistr/u16-mbtouc-tests: + # Code from module unistr/u16-mbtouc-unsafe: + # Code from module unistr/u16-mbtouc-unsafe-tests: + # Code from module unistr/u16-mbtoucr: + # Code from module unistr/u16-mbtoucr-tests: + # Code from module unistr/u16-move: + # Code from module unistr/u16-move-tests: + # Code from module unistr/u16-next: + # Code from module unistr/u16-next-tests: + # Code from module unistr/u16-prev: + # Code from module unistr/u16-prev-tests: + # Code from module unistr/u16-set: + # Code from module unistr/u16-set-tests: + # Code from module unistr/u16-startswith: + # Code from module unistr/u16-stpcpy: + # Code from module unistr/u16-stpcpy-tests: + # Code from module unistr/u16-stpncpy: + # Code from module unistr/u16-stpncpy-tests: + # Code from module unistr/u16-strcat: + # Code from module unistr/u16-strcat-tests: + # Code from module unistr/u16-strchr: + # Code from module unistr/u16-strcmp: + # Code from module unistr/u16-strcmp-tests: + # Code from module unistr/u16-strcoll: + # Code from module unistr/u16-strcoll-tests: + # Code from module unistr/u16-strcpy: + # Code from module unistr/u16-strcpy-tests: + # Code from module unistr/u16-strcspn: + # Code from module unistr/u16-strdup: + # Code from module unistr/u16-strdup-tests: + # Code from module unistr/u16-strlen: + # Code from module unistr/u16-strlen-tests: + # Code from module unistr/u16-strmblen: + # Code from module unistr/u16-strmblen-tests: + # Code from module unistr/u16-strmbtouc: + # Code from module unistr/u16-strmbtouc-tests: + # Code from module unistr/u16-strncat: + # Code from module unistr/u16-strncat-tests: + # Code from module unistr/u16-strncmp: + # Code from module unistr/u16-strncmp-tests: + # Code from module unistr/u16-strncpy: + # Code from module unistr/u16-strncpy-tests: + # Code from module unistr/u16-strnlen: + # Code from module unistr/u16-strnlen-tests: + # Code from module unistr/u16-strpbrk: + # Code from module unistr/u16-strrchr: + # Code from module unistr/u16-strspn: + # Code from module unistr/u16-strstr: + # Code from module unistr/u16-strtok: + # Code from module unistr/u16-to-u32: + # Code from module unistr/u16-to-u32-tests: + # Code from module unistr/u16-to-u8: + # Code from module unistr/u16-to-u8-tests: + # Code from module unistr/u16-uctomb: + # Code from module unistr/u16-uctomb-tests: + # Code from module unistr/u32-check: + # Code from module unistr/u32-check-tests: + # Code from module unistr/u32-chr: + # Code from module unistr/u32-chr-tests: + # Code from module unistr/u32-cmp: + # Code from module unistr/u32-cmp-tests: + # Code from module unistr/u32-cmp2: + # Code from module unistr/u32-cmp2-tests: + # Code from module unistr/u32-cpy: + # Code from module unistr/u32-cpy-alloc: + # Code from module unistr/u32-cpy-alloc-tests: + # Code from module unistr/u32-cpy-tests: + # Code from module unistr/u32-endswith: + # Code from module unistr/u32-mblen: + # Code from module unistr/u32-mblen-tests: + # Code from module unistr/u32-mbsnlen: + # Code from module unistr/u32-mbsnlen-tests: + # Code from module unistr/u32-mbtouc: + # Code from module unistr/u32-mbtouc-tests: + # Code from module unistr/u32-mbtouc-unsafe: + # Code from module unistr/u32-mbtouc-unsafe-tests: + # Code from module unistr/u32-mbtoucr: + # Code from module unistr/u32-mbtoucr-tests: + # Code from module unistr/u32-move: + # Code from module unistr/u32-move-tests: + # Code from module unistr/u32-next: + # Code from module unistr/u32-next-tests: + # Code from module unistr/u32-prev: + # Code from module unistr/u32-prev-tests: + # Code from module unistr/u32-set: + # Code from module unistr/u32-set-tests: + # Code from module unistr/u32-startswith: + # Code from module unistr/u32-stpcpy: + # Code from module unistr/u32-stpcpy-tests: + # Code from module unistr/u32-stpncpy: + # Code from module unistr/u32-stpncpy-tests: + # Code from module unistr/u32-strcat: + # Code from module unistr/u32-strcat-tests: + # Code from module unistr/u32-strchr: + # Code from module unistr/u32-strcmp: + # Code from module unistr/u32-strcmp-tests: + # Code from module unistr/u32-strcoll: + # Code from module unistr/u32-strcoll-tests: + # Code from module unistr/u32-strcpy: + # Code from module unistr/u32-strcpy-tests: + # Code from module unistr/u32-strcspn: + # Code from module unistr/u32-strdup: + # Code from module unistr/u32-strdup-tests: + # Code from module unistr/u32-strlen: + # Code from module unistr/u32-strlen-tests: + # Code from module unistr/u32-strmblen: + # Code from module unistr/u32-strmblen-tests: + # Code from module unistr/u32-strmbtouc: + # Code from module unistr/u32-strmbtouc-tests: + # Code from module unistr/u32-strncat: + # Code from module unistr/u32-strncat-tests: + # Code from module unistr/u32-strncmp: + # Code from module unistr/u32-strncmp-tests: + # Code from module unistr/u32-strncpy: + # Code from module unistr/u32-strncpy-tests: + # Code from module unistr/u32-strnlen: + # Code from module unistr/u32-strnlen-tests: + # Code from module unistr/u32-strpbrk: + # Code from module unistr/u32-strrchr: + # Code from module unistr/u32-strspn: + # Code from module unistr/u32-strstr: + # Code from module unistr/u32-strtok: + # Code from module unistr/u32-to-u16: + # Code from module unistr/u32-to-u16-tests: + # Code from module unistr/u32-to-u8: + # Code from module unistr/u32-to-u8-tests: + # Code from module unistr/u32-uctomb: + # Code from module unistr/u32-uctomb-tests: + # Code from module unistr/u8-check: + # Code from module unistr/u8-check-tests: + # Code from module unistr/u8-chr: + # Code from module unistr/u8-chr-tests: + # Code from module unistr/u8-cmp: + # Code from module unistr/u8-cmp-tests: + # Code from module unistr/u8-cmp2: + # Code from module unistr/u8-cmp2-tests: + # Code from module unistr/u8-cpy: + # Code from module unistr/u8-cpy-alloc: + # Code from module unistr/u8-cpy-alloc-tests: + # Code from module unistr/u8-cpy-tests: + # Code from module unistr/u8-endswith: + # Code from module unistr/u8-mblen: + # Code from module unistr/u8-mblen-tests: + # Code from module unistr/u8-mbsnlen: + # Code from module unistr/u8-mbsnlen-tests: + # Code from module unistr/u8-mbtouc: + # Code from module unistr/u8-mbtouc-tests: + # Code from module unistr/u8-mbtouc-unsafe: + # Code from module unistr/u8-mbtouc-unsafe-tests: + # Code from module unistr/u8-mbtoucr: + # Code from module unistr/u8-mbtoucr-tests: + # Code from module unistr/u8-move: + # Code from module unistr/u8-move-tests: + # Code from module unistr/u8-next: + # Code from module unistr/u8-next-tests: + # Code from module unistr/u8-prev: + # Code from module unistr/u8-prev-tests: + # Code from module unistr/u8-set: + # Code from module unistr/u8-set-tests: + # Code from module unistr/u8-startswith: + # Code from module unistr/u8-stpcpy: + # Code from module unistr/u8-stpcpy-tests: + # Code from module unistr/u8-stpncpy: + # Code from module unistr/u8-stpncpy-tests: + # Code from module unistr/u8-strcat: + # Code from module unistr/u8-strcat-tests: + # Code from module unistr/u8-strchr: + # Code from module unistr/u8-strcmp: + # Code from module unistr/u8-strcmp-tests: + # Code from module unistr/u8-strcoll: + # Code from module unistr/u8-strcoll-tests: + # Code from module unistr/u8-strcpy: + # Code from module unistr/u8-strcpy-tests: + # Code from module unistr/u8-strcspn: + # Code from module unistr/u8-strdup: + # Code from module unistr/u8-strdup-tests: + # Code from module unistr/u8-strlen: + # Code from module unistr/u8-strlen-tests: + # Code from module unistr/u8-strmblen: + # Code from module unistr/u8-strmblen-tests: + # Code from module unistr/u8-strmbtouc: + # Code from module unistr/u8-strmbtouc-tests: + # Code from module unistr/u8-strncat: + # Code from module unistr/u8-strncat-tests: + # Code from module unistr/u8-strncmp: + # Code from module unistr/u8-strncmp-tests: + # Code from module unistr/u8-strncpy: + # Code from module unistr/u8-strncpy-tests: + # Code from module unistr/u8-strnlen: + # Code from module unistr/u8-strnlen-tests: + # Code from module unistr/u8-strpbrk: + # Code from module unistr/u8-strrchr: + # Code from module unistr/u8-strspn: + # Code from module unistr/u8-strstr: + # Code from module unistr/u8-strtok: + # Code from module unistr/u8-to-u16: + # Code from module unistr/u8-to-u16-tests: + # Code from module unistr/u8-to-u32: + # Code from module unistr/u8-to-u32-tests: + # Code from module unistr/u8-uctomb: + # Code from module unistr/u8-uctomb-tests: + # Code from module unitypes: + # Code from module uniwbrk/base: + # Code from module uniwbrk/table: + # Code from module uniwbrk/u16-wordbreaks: + # Code from module uniwbrk/u16-wordbreaks-tests: + # Code from module uniwbrk/u32-wordbreaks: + # Code from module uniwbrk/u32-wordbreaks-tests: + # Code from module uniwbrk/u8-wordbreaks: + # Code from module uniwbrk/u8-wordbreaks-tests: + # Code from module uniwbrk/ulc-wordbreaks: + # Code from module uniwbrk/ulc-wordbreaks-tests: + # Code from module uniwbrk/wordbreak-property: + # Code from module uniwidth/base: + # Code from module uniwidth/u16-strwidth: + # Code from module uniwidth/u16-strwidth-tests: + # Code from module uniwidth/u16-width: + # Code from module uniwidth/u16-width-tests: + # Code from module uniwidth/u32-strwidth: + # Code from module uniwidth/u32-strwidth-tests: + # Code from module uniwidth/u32-width: + # Code from module uniwidth/u32-width-tests: + # Code from module uniwidth/u8-strwidth: + # Code from module uniwidth/u8-strwidth-tests: + # Code from module uniwidth/u8-width: + # Code from module uniwidth/u8-width-tests: + # Code from module uniwidth/width: + # Code from module uniwidth/width-tests: + # Code from module unsetenv: + # Code from module unsetenv-tests: + # Code from module unused-parameter: + # Code from module verify: + # Code from module warn-on-use: + # Code from module wchar: + # Code from module wchar-tests: + # Code from module wctob: + # Code from module wctype: + # Code from module wctype-tests: + # Code from module wcwidth: + # Code from module wcwidth-tests: + # Code from module xalloc: + # Code from module xalloc-die: + # Code from module xalloc-die-tests: + # Code from module xsize: + # Code from module yield: ]) # This macro should be invoked from ./configure.ac, in the section @@ -36,6 +1011,7 @@ AC_DEFUN([gl_INIT], [ AM_CONDITIONAL([GL_COND_LIBTOOL], [true]) gl_cond_libtool=true + gl_m4_base='gnulib-m4' m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) @@ -43,97 +1019,752 @@ AC_DEFUN([gl_INIT], m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='lib' + # Code from module alloca-opt: gl_FUNC_ALLOCA - gl_FUNC_DUP2 - gl_UNISTD_MODULE_INDICATOR([dup2]) + # Code from module arg-nonnull: + # Code from module array-mergesort: + # Code from module c++defs: + # Code from module c-ctype: + # Code from module c-strcase: + # Code from module c-strcaseeq: + # Code from module configmake: + # Code from module errno: gl_HEADER_ERRNO_H + # Code from module extensions: + # Code from module float: gl_FLOAT_H + # Code from module fpieee: + # Code from module fpucw: + # Code from module frexpl-nolibm: gl_FUNC_FREXPL_NO_LIBM gl_MATH_MODULE_INDICATOR([frexpl]) - gl_FUNC_GETPAGESIZE - gl_UNISTD_MODULE_INDICATOR([getpagesize]) + # Code from module fseterr: + # Code from module gperf: + # Code from module havelib: + # Code from module iconv: AM_ICONV + # Code from module iconv-h: gl_ICONV_H + # Code from module iconv_open: gl_FUNC_ICONV_OPEN + # Code from module include_next: + # Code from module inline: gl_INLINE + # Code from module isnand-nolibm: gl_FUNC_ISNAND_NO_LIBM + # Code from module isnanf-nolibm: gl_FUNC_ISNANF_NO_LIBM + # Code from module isnanl-nolibm: gl_FUNC_ISNANL_NO_LIBM + # Code from module localcharset: gl_LOCALCHARSET LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) + # Code from module localename: gl_LOCALENAME + # Code from module lock: + gl_LOCK + # Code from module malloc-posix: gl_FUNC_MALLOC_POSIX gl_STDLIB_MODULE_INDICATOR([malloc-posix]) + # Code from module malloca: gl_MALLOCA + # Code from module math: gl_MATH_H + # Code from module mbchar: gl_MBCHAR + # Code from module mbiter: gl_MBITER + # Code from module mbrtowc: gl_FUNC_MBRTOWC gl_WCHAR_MODULE_INDICATOR([mbrtowc]) + # Code from module mbsinit: gl_FUNC_MBSINIT gl_WCHAR_MODULE_INDICATOR([mbsinit]) + # Code from module mbsnlen: gl_STRING_MODULE_INDICATOR([mbsnlen]) + # Code from module memchr: gl_FUNC_MEMCHR gl_STRING_MODULE_INDICATOR([memchr]) + # Code from module memcmp2: + # Code from module memxfrm: + # Code from module minmax: gl_MINMAX + # Code from module multiarch: gl_MULTIARCH + # Code from module nocrash: + # Code from module printf-frexp: gl_FUNC_PRINTF_FREXP + # Code from module printf-frexpl: gl_FUNC_PRINTF_FREXPL + # Code from module printf-safe: m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes]) + # Code from module relocatable-lib-lgpl: gl_RELOCATABLE_LIBRARY + # Code from module signbit: gl_SIGNBIT gl_MATH_MODULE_INDICATOR([signbit]) + # Code from module size_max: gl_SIZE_MAX + # Code from module stdbool: AM_STDBOOL_H + # Code from module stddef: gl_STDDEF_H + # Code from module stdint: gl_STDINT_H + # Code from module stdlib: gl_STDLIB_H + # Code from module streq: + # Code from module striconveh: if test $gl_cond_libtool = false; then gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV" gl_libdeps="$gl_libdeps $LIBICONV" fi + # Code from module striconveha: + # Code from module string: gl_HEADER_STRING_H + # Code from module strncat: + gl_FUNC_STRNCAT + gl_STRING_MODULE_INDICATOR([strncat]) + # Code from module threadlib: + gl_THREADLIB + # Code from module unicase/base: + # Code from module unicase/cased: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unicase/empty-prefix-context: + # Code from module unicase/empty-suffix-context: + # Code from module unicase/ignorable: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unicase/locale-language: + # Code from module unicase/special-casing: + # Code from module unicase/tocasefold: + # Code from module unicase/tolower: + # Code from module unicase/totitle: + # Code from module unicase/toupper: + # Code from module unicase/u16-casecmp: + # Code from module unicase/u16-casecoll: + # Code from module unicase/u16-casefold: + # Code from module unicase/u16-casemap: + # Code from module unicase/u16-casexfrm: + # Code from module unicase/u16-ct-casefold: + # Code from module unicase/u16-ct-tolower: + # Code from module unicase/u16-ct-totitle: + # Code from module unicase/u16-ct-toupper: + # Code from module unicase/u16-is-cased: + # Code from module unicase/u16-is-casefolded: + # Code from module unicase/u16-is-invariant: + # Code from module unicase/u16-is-lowercase: + # Code from module unicase/u16-is-titlecase: + # Code from module unicase/u16-is-uppercase: + # Code from module unicase/u16-tolower: + # Code from module unicase/u16-totitle: + # Code from module unicase/u16-toupper: + # Code from module unicase/u32-casecmp: + # Code from module unicase/u32-casecoll: + # Code from module unicase/u32-casefold: + # Code from module unicase/u32-casemap: + # Code from module unicase/u32-casexfrm: + # Code from module unicase/u32-ct-casefold: + # Code from module unicase/u32-ct-tolower: + # Code from module unicase/u32-ct-totitle: + # Code from module unicase/u32-ct-toupper: + # Code from module unicase/u32-is-cased: + # Code from module unicase/u32-is-casefolded: + # Code from module unicase/u32-is-invariant: + # Code from module unicase/u32-is-lowercase: + # Code from module unicase/u32-is-titlecase: + # Code from module unicase/u32-is-uppercase: + # Code from module unicase/u32-tolower: + # Code from module unicase/u32-totitle: + # Code from module unicase/u32-toupper: + # Code from module unicase/u8-casecmp: + # Code from module unicase/u8-casecoll: + # Code from module unicase/u8-casefold: + # Code from module unicase/u8-casemap: + # Code from module unicase/u8-casexfrm: + # Code from module unicase/u8-ct-casefold: + # Code from module unicase/u8-ct-tolower: + # Code from module unicase/u8-ct-totitle: + # Code from module unicase/u8-ct-toupper: + # Code from module unicase/u8-is-cased: + # Code from module unicase/u8-is-casefolded: + # Code from module unicase/u8-is-invariant: + # Code from module unicase/u8-is-lowercase: + # Code from module unicase/u8-is-titlecase: + # Code from module unicase/u8-is-uppercase: + # Code from module unicase/u8-tolower: + # Code from module unicase/u8-totitle: + # Code from module unicase/u8-toupper: + # Code from module unicase/ulc-casecmp: + # Code from module unicase/ulc-casecoll: + # Code from module unicase/ulc-casexfrm: + # Code from module uniconv/base: + # Code from module uniconv/u16-conv-from-enc: AC_REQUIRE([gl_BIGENDIAN]) + # Code from module uniconv/u16-conv-to-enc: AC_REQUIRE([gl_BIGENDIAN]) + # Code from module uniconv/u16-strconv-from-enc: + # Code from module uniconv/u16-strconv-from-locale: + # Code from module uniconv/u16-strconv-to-enc: AC_REQUIRE([gl_BIGENDIAN]) + # Code from module uniconv/u16-strconv-to-locale: + # Code from module uniconv/u32-conv-from-enc: + # Code from module uniconv/u32-conv-to-enc: + # Code from module uniconv/u32-strconv-from-enc: + # Code from module uniconv/u32-strconv-from-locale: + # Code from module uniconv/u32-strconv-to-enc: + # Code from module uniconv/u32-strconv-to-locale: + # Code from module uniconv/u8-conv-from-enc: + # Code from module uniconv/u8-conv-to-enc: + # Code from module uniconv/u8-strconv-from-enc: + # Code from module uniconv/u8-strconv-from-locale: + # Code from module uniconv/u8-strconv-to-enc: + # Code from module uniconv/u8-strconv-to-locale: + # Code from module unictype/base: + # Code from module unictype/bidicategory-all: + # Code from module unictype/bidicategory-byname: + # Code from module unictype/bidicategory-name: + # Code from module unictype/bidicategory-of: + # Code from module unictype/bidicategory-test: + # Code from module unictype/block-all: + # Code from module unictype/block-list: + # Code from module unictype/block-of: + # Code from module unictype/block-test: + # Code from module unictype/category-C: + # Code from module unictype/category-Cc: + # Code from module unictype/category-Cf: + # Code from module unictype/category-Cn: + # Code from module unictype/category-Co: + # Code from module unictype/category-Cs: + # Code from module unictype/category-L: + # Code from module unictype/category-Ll: + # Code from module unictype/category-Lm: + # Code from module unictype/category-Lo: + # Code from module unictype/category-Lt: + # Code from module unictype/category-Lu: + # Code from module unictype/category-M: + # Code from module unictype/category-Mc: + # Code from module unictype/category-Me: + # Code from module unictype/category-Mn: + # Code from module unictype/category-N: + # Code from module unictype/category-Nd: + # Code from module unictype/category-Nl: + # Code from module unictype/category-No: + # Code from module unictype/category-P: + # Code from module unictype/category-Pc: + # Code from module unictype/category-Pd: + # Code from module unictype/category-Pe: + # Code from module unictype/category-Pf: + # Code from module unictype/category-Pi: + # Code from module unictype/category-Po: + # Code from module unictype/category-Ps: + # Code from module unictype/category-S: + # Code from module unictype/category-Sc: + # Code from module unictype/category-Sk: + # Code from module unictype/category-Sm: + # Code from module unictype/category-So: + # Code from module unictype/category-Z: + # Code from module unictype/category-Zl: + # Code from module unictype/category-Zp: + # Code from module unictype/category-Zs: + # Code from module unictype/category-all: + # Code from module unictype/category-and: + # Code from module unictype/category-and-not: + # Code from module unictype/category-byname: + # Code from module unictype/category-name: + # Code from module unictype/category-none: + # Code from module unictype/category-of: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/category-or: + # Code from module unictype/category-test: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/category-test-withtable: + # Code from module unictype/combining-class: + # Code from module unictype/ctype-alnum: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/ctype-alpha: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/ctype-blank: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/ctype-cntrl: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/ctype-digit: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/ctype-graph: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/ctype-lower: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/ctype-print: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/ctype-punct: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/ctype-space: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/ctype-upper: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/ctype-xdigit: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/decimal-digit: + # Code from module unictype/digit: + # Code from module unictype/mirror: + # Code from module unictype/numeric: + # Code from module unictype/property-all: + # Code from module unictype/property-alphabetic: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-ascii-hex-digit: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-arabic-digit: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-arabic-right-to-left: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-block-separator: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-boundary-neutral: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-common-separator: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-control: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-embedding-or-override: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-eur-num-separator: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-eur-num-terminator: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-european-digit: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-hebrew-right-to-left: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-left-to-right: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-non-spacing-mark: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-other-neutral: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-pdf: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-segment-separator: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-bidi-whitespace: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-byname: + # Code from module unictype/property-combining: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-composite: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-currency-symbol: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-dash: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-decimal-digit: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-default-ignorable-code-point: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-deprecated: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-diacritic: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-extender: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-format-control: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-grapheme-base: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-grapheme-extend: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-grapheme-link: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-hex-digit: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-hyphen: AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-id-continue: AC_REQUIRE([AC_C_INLINE]) - gl_MODULE_INDICATOR([uninorm/u16-normalize]) - gl_MODULE_INDICATOR([uninorm/u32-normalize]) - gl_MODULE_INDICATOR([uninorm/u8-normalize]) + # Code from module unictype/property-id-start: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-ideographic: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-ids-binary-operator: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-ids-trinary-operator: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-ignorable-control: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-iso-control: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-join-control: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-left-of-pair: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-line-separator: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-logical-order-exception: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-lowercase: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-math: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-non-break: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-not-a-character: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-numeric: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-other-alphabetic: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-other-default-ignorable-code-point: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-other-grapheme-extend: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-other-id-continue: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-other-id-start: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-other-lowercase: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-other-math: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-other-uppercase: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-paired-punctuation: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-paragraph-separator: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-pattern-syntax: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-pattern-white-space: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-private-use: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-punctuation: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-quotation-mark: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-radical: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-sentence-terminal: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-soft-dotted: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-space: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-terminal-punctuation: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-test: + # Code from module unictype/property-titlecase: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-unassigned-code-value: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-unified-ideograph: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-uppercase: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-variation-selector: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-white-space: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-xid-continue: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-xid-start: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/property-zero-width: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/scripts: + # Code from module unictype/scripts-all: + # Code from module unictype/syntax-c-ident: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/syntax-c-whitespace: + # Code from module unictype/syntax-java-ident: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unictype/syntax-java-whitespace: + # Code from module unilbrk/base: + # Code from module unilbrk/tables: + AC_REQUIRE([AC_C_INLINE]) + # Code from module unilbrk/u16-possible-linebreaks: + # Code from module unilbrk/u16-width-linebreaks: + # Code from module unilbrk/u32-possible-linebreaks: + # Code from module unilbrk/u32-width-linebreaks: + # Code from module unilbrk/u8-possible-linebreaks: + # Code from module unilbrk/u8-width-linebreaks: + # Code from module unilbrk/ulc-common: + # Code from module unilbrk/ulc-possible-linebreaks: + # Code from module unilbrk/ulc-width-linebreaks: + # Code from module uniname/base: + # Code from module uniname/uniname: + # Code from module uninorm/base: + # Code from module uninorm/canonical-decomposition: + # Code from module uninorm/compat-decomposition: + # Code from module uninorm/composition: + # Code from module uninorm/decompose-internal: + # Code from module uninorm/decomposing-form: + # Code from module uninorm/decomposition: + # Code from module uninorm/decomposition-table: + AC_REQUIRE([AC_C_INLINE]) + # Code from module uninorm/filter: + # Code from module uninorm/nfc: + # Code from module uninorm/nfd: + # Code from module uninorm/nfkc: + # Code from module uninorm/nfkd: + # Code from module uninorm/u16-normalize: + gl_MODULE_INDICATOR_FOR_TESTS([uninorm/u16-normalize]) + # Code from module uninorm/u16-normcmp: + # Code from module uninorm/u16-normcoll: + # Code from module uninorm/u16-normxfrm: + # Code from module uninorm/u32-normalize: + gl_MODULE_INDICATOR_FOR_TESTS([uninorm/u32-normalize]) + # Code from module uninorm/u32-normcmp: + # Code from module uninorm/u32-normcoll: + # Code from module uninorm/u32-normxfrm: + # Code from module uninorm/u8-normalize: + gl_MODULE_INDICATOR_FOR_TESTS([uninorm/u8-normalize]) + # Code from module uninorm/u8-normcmp: + # Code from module uninorm/u8-normcoll: + # Code from module uninorm/u8-normxfrm: + # Code from module unistd: gl_UNISTD_H + # Code from module unistdio/base: + # Code from module unistdio/u-printf-args: gl_PREREQ_PRINTF_ARGS + # Code from module unistdio/u16-asnprintf: + # Code from module unistdio/u16-asprintf: + # Code from module unistdio/u16-printf-parse: gl_PREREQ_PRINTF_PARSE + # Code from module unistdio/u16-snprintf: + # Code from module unistdio/u16-sprintf: + # Code from module unistdio/u16-u16-asnprintf: + # Code from module unistdio/u16-u16-asprintf: + # Code from module unistdio/u16-u16-snprintf: + # Code from module unistdio/u16-u16-sprintf: + # Code from module unistdio/u16-u16-vasnprintf: gl_PREREQ_VASNPRINTF_WITH_EXTRAS + # Code from module unistdio/u16-u16-vasprintf: + # Code from module unistdio/u16-u16-vsnprintf: + # Code from module unistdio/u16-u16-vsprintf: + # Code from module unistdio/u16-vasnprintf: gl_PREREQ_VASNPRINTF_WITH_EXTRAS + # Code from module unistdio/u16-vasprintf: + # Code from module unistdio/u16-vsnprintf: + # Code from module unistdio/u16-vsprintf: + # Code from module unistdio/u32-asnprintf: + # Code from module unistdio/u32-asprintf: + # Code from module unistdio/u32-printf-parse: gl_PREREQ_PRINTF_PARSE + # Code from module unistdio/u32-snprintf: + # Code from module unistdio/u32-sprintf: + # Code from module unistdio/u32-u32-asnprintf: + # Code from module unistdio/u32-u32-asprintf: + # Code from module unistdio/u32-u32-snprintf: + # Code from module unistdio/u32-u32-sprintf: + # Code from module unistdio/u32-u32-vasnprintf: gl_PREREQ_VASNPRINTF_WITH_EXTRAS + # Code from module unistdio/u32-u32-vasprintf: + # Code from module unistdio/u32-u32-vsnprintf: + # Code from module unistdio/u32-u32-vsprintf: + # Code from module unistdio/u32-vasnprintf: gl_PREREQ_VASNPRINTF_WITH_EXTRAS + # Code from module unistdio/u32-vasprintf: + # Code from module unistdio/u32-vsnprintf: + # Code from module unistdio/u32-vsprintf: + # Code from module unistdio/u8-asnprintf: + # Code from module unistdio/u8-asprintf: + # Code from module unistdio/u8-printf-parse: gl_PREREQ_PRINTF_PARSE + # Code from module unistdio/u8-snprintf: + # Code from module unistdio/u8-sprintf: + # Code from module unistdio/u8-u8-asnprintf: + # Code from module unistdio/u8-u8-asprintf: + # Code from module unistdio/u8-u8-snprintf: + # Code from module unistdio/u8-u8-sprintf: + # Code from module unistdio/u8-u8-vasnprintf: gl_PREREQ_VASNPRINTF_WITH_EXTRAS + # Code from module unistdio/u8-u8-vasprintf: + # Code from module unistdio/u8-u8-vsnprintf: + # Code from module unistdio/u8-u8-vsprintf: + # Code from module unistdio/u8-vasnprintf: gl_PREREQ_VASNPRINTF_WITH_EXTRAS + # Code from module unistdio/u8-vasprintf: + # Code from module unistdio/u8-vsnprintf: + # Code from module unistdio/u8-vsprintf: + # Code from module unistdio/ulc-asnprintf: + # Code from module unistdio/ulc-asprintf: + # Code from module unistdio/ulc-fprintf: + # Code from module unistdio/ulc-printf-parse: gl_PREREQ_PRINTF_PARSE + # Code from module unistdio/ulc-snprintf: + # Code from module unistdio/ulc-sprintf: + # Code from module unistdio/ulc-vasnprintf: gl_PREREQ_VASNPRINTF_WITH_EXTRAS + # Code from module unistdio/ulc-vasprintf: + # Code from module unistdio/ulc-vfprintf: + # Code from module unistdio/ulc-vsnprintf: + # Code from module unistdio/ulc-vsprintf: + # Code from module unistr/base: + # Code from module unistr/u16-check: + # Code from module unistr/u16-chr: + # Code from module unistr/u16-cmp: + # Code from module unistr/u16-cmp2: + # Code from module unistr/u16-cpy: + # Code from module unistr/u16-cpy-alloc: + # Code from module unistr/u16-endswith: + # Code from module unistr/u16-mblen: + # Code from module unistr/u16-mbsnlen: + # Code from module unistr/u16-mbtouc: gl_MODULE_INDICATOR([unistr/u16-mbtouc]) + # Code from module unistr/u16-mbtouc-unsafe: gl_MODULE_INDICATOR([unistr/u16-mbtouc-unsafe]) + # Code from module unistr/u16-mbtoucr: gl_MODULE_INDICATOR([unistr/u16-mbtoucr]) + # Code from module unistr/u16-move: + # Code from module unistr/u16-next: + # Code from module unistr/u16-prev: + # Code from module unistr/u16-set: + # Code from module unistr/u16-startswith: + # Code from module unistr/u16-stpcpy: + # Code from module unistr/u16-stpncpy: + # Code from module unistr/u16-strcat: + # Code from module unistr/u16-strchr: + # Code from module unistr/u16-strcmp: + # Code from module unistr/u16-strcoll: + # Code from module unistr/u16-strcpy: + # Code from module unistr/u16-strcspn: + # Code from module unistr/u16-strdup: + # Code from module unistr/u16-strlen: + # Code from module unistr/u16-strmblen: + # Code from module unistr/u16-strmbtouc: + # Code from module unistr/u16-strncat: + # Code from module unistr/u16-strncmp: + # Code from module unistr/u16-strncpy: + # Code from module unistr/u16-strnlen: + # Code from module unistr/u16-strpbrk: + # Code from module unistr/u16-strrchr: + # Code from module unistr/u16-strspn: + # Code from module unistr/u16-strstr: + # Code from module unistr/u16-strtok: + # Code from module unistr/u16-to-u32: + # Code from module unistr/u16-to-u8: + # Code from module unistr/u16-uctomb: gl_MODULE_INDICATOR([unistr/u16-uctomb]) + # Code from module unistr/u32-check: + # Code from module unistr/u32-chr: + # Code from module unistr/u32-cmp: + # Code from module unistr/u32-cmp2: + # Code from module unistr/u32-cpy: + # Code from module unistr/u32-cpy-alloc: + # Code from module unistr/u32-endswith: + # Code from module unistr/u32-mblen: + # Code from module unistr/u32-mbsnlen: + # Code from module unistr/u32-mbtouc: gl_MODULE_INDICATOR([unistr/u32-mbtouc]) + # Code from module unistr/u32-mbtouc-unsafe: gl_MODULE_INDICATOR([unistr/u32-mbtouc-unsafe]) + # Code from module unistr/u32-mbtoucr: gl_MODULE_INDICATOR([unistr/u32-mbtoucr]) + # Code from module unistr/u32-move: + # Code from module unistr/u32-next: + # Code from module unistr/u32-prev: + # Code from module unistr/u32-set: + # Code from module unistr/u32-startswith: + # Code from module unistr/u32-stpcpy: + # Code from module unistr/u32-stpncpy: + # Code from module unistr/u32-strcat: + # Code from module unistr/u32-strchr: + # Code from module unistr/u32-strcmp: + # Code from module unistr/u32-strcoll: + # Code from module unistr/u32-strcpy: + # Code from module unistr/u32-strcspn: + # Code from module unistr/u32-strdup: + # Code from module unistr/u32-strlen: + # Code from module unistr/u32-strmblen: + # Code from module unistr/u32-strmbtouc: + # Code from module unistr/u32-strncat: + # Code from module unistr/u32-strncmp: + # Code from module unistr/u32-strncpy: + # Code from module unistr/u32-strnlen: + # Code from module unistr/u32-strpbrk: + # Code from module unistr/u32-strrchr: + # Code from module unistr/u32-strspn: + # Code from module unistr/u32-strstr: + # Code from module unistr/u32-strtok: + # Code from module unistr/u32-to-u16: + # Code from module unistr/u32-to-u8: + # Code from module unistr/u32-uctomb: gl_MODULE_INDICATOR([unistr/u32-uctomb]) + # Code from module unistr/u8-check: + # Code from module unistr/u8-chr: + # Code from module unistr/u8-cmp: + # Code from module unistr/u8-cmp2: + # Code from module unistr/u8-cpy: + # Code from module unistr/u8-cpy-alloc: + # Code from module unistr/u8-endswith: + # Code from module unistr/u8-mblen: + # Code from module unistr/u8-mbsnlen: + # Code from module unistr/u8-mbtouc: gl_MODULE_INDICATOR([unistr/u8-mbtouc]) + # Code from module unistr/u8-mbtouc-unsafe: gl_MODULE_INDICATOR([unistr/u8-mbtouc-unsafe]) + # Code from module unistr/u8-mbtoucr: gl_MODULE_INDICATOR([unistr/u8-mbtoucr]) + # Code from module unistr/u8-move: + # Code from module unistr/u8-next: + # Code from module unistr/u8-prev: + # Code from module unistr/u8-set: + # Code from module unistr/u8-startswith: + # Code from module unistr/u8-stpcpy: AC_CHECK_FUNCS_ONCE([stpcpy]) + # Code from module unistr/u8-stpncpy: + # Code from module unistr/u8-strcat: + # Code from module unistr/u8-strchr: + # Code from module unistr/u8-strcmp: + # Code from module unistr/u8-strcoll: + # Code from module unistr/u8-strcpy: + # Code from module unistr/u8-strcspn: + # Code from module unistr/u8-strdup: AC_CHECK_FUNCS_ONCE([strdup]) + # Code from module unistr/u8-strlen: + # Code from module unistr/u8-strmblen: + # Code from module unistr/u8-strmbtouc: + # Code from module unistr/u8-strncat: + # Code from module unistr/u8-strncmp: + # Code from module unistr/u8-strncpy: + # Code from module unistr/u8-strnlen: + # Code from module unistr/u8-strpbrk: + # Code from module unistr/u8-strrchr: + # Code from module unistr/u8-strspn: + # Code from module unistr/u8-strstr: + # Code from module unistr/u8-strtok: + # Code from module unistr/u8-to-u16: + # Code from module unistr/u8-to-u32: + # Code from module unistr/u8-uctomb: gl_MODULE_INDICATOR([unistr/u8-uctomb]) + # Code from module unitypes: + # Code from module uniwbrk/base: + # Code from module uniwbrk/table: + # Code from module uniwbrk/u16-wordbreaks: + # Code from module uniwbrk/u32-wordbreaks: + # Code from module uniwbrk/u8-wordbreaks: + # Code from module uniwbrk/ulc-wordbreaks: + # Code from module uniwbrk/wordbreak-property: + # Code from module uniwidth/base: + # Code from module uniwidth/u16-strwidth: + # Code from module uniwidth/u16-width: + # Code from module uniwidth/u32-strwidth: + # Code from module uniwidth/u32-width: + # Code from module uniwidth/u8-strwidth: + # Code from module uniwidth/u8-width: + # Code from module uniwidth/width: + # Code from module unused-parameter: + # Code from module verify: + # Code from module warn-on-use: + # Code from module wchar: gl_WCHAR_H + # Code from module wctype: gl_WCTYPE_H + # Code from module wcwidth: gl_FUNC_WCWIDTH gl_WCHAR_MODULE_INDICATOR([wcwidth]) + # Code from module xsize: gl_XSIZE + # End of code from modules m4_ifval(gl_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || for gl_file in ]gl_LIBSOURCES_LIST[ ; do @@ -156,7 +1787,7 @@ AC_DEFUN([gl_INIT], if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do + for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done @@ -173,6 +1804,12 @@ AC_DEFUN([gl_INIT], m4_pushdef([gltests_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='tests' +changequote(,)dnl + gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS +changequote([, ])dnl + AC_SUBST([gltests_WITNESS]) + gl_module_indicator_condition=$gltests_WITNESS + m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) gt_LOCALE_FR gt_LOCALE_TR_UTF8 gl_ENVIRON @@ -181,22 +1818,25 @@ AC_DEFUN([gl_INIT], m4_ifdef([AM_XGETTEXT_OPTION], [AM_][XGETTEXT_OPTION([--flag=error:3:c-format]) AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])]) - gl_EXITFAIL - gl_FCNTL_H + gl_FUNC_GETPAGESIZE + gl_UNISTD_MODULE_INDICATOR([getpagesize]) AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) gl_DOUBLE_EXPONENT_LOCATION gl_FLOAT_EXPONENT_LOCATION gl_LONG_DOUBLE_EXPONENT_LOCATION gl_LOCALE_H + AC_CHECK_FUNCS_ONCE([newlocale]) + AC_CHECK_FUNCS_ONCE([newlocale]) gt_LOCALE_FR gt_LOCALE_FR_UTF8 gt_LOCALE_JA gt_LOCALE_ZH_CN gt_LOCALE_FR_UTF8 - gl_FUNC_OPEN - gl_MODULE_INDICATOR([open]) - gl_FCNTL_MODULE_INDICATOR([open]) + AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>]) + AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>]) + gl_FUNC_PUTENV + gl_STDLIB_MODULE_INDICATOR([putenv]) gl_FUNC_SETENV gl_STDLIB_MODULE_INDICATOR([setenv]) AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION]) @@ -206,6 +1846,10 @@ AC_DEFUN([gl_INIT], gt_TYPE_WINT_T gl_FUNC_STRERROR gl_STRING_MODULE_INDICATOR([strerror]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_THREAD gt_LOCALE_FR gt_LOCALE_FR_UTF8 gt_LOCALE_JA @@ -227,12 +1871,68 @@ AC_DEFUN([gl_INIT], gt_LOCALE_FR_UTF8 gt_LOCALE_FR gt_LOCALE_FR_UTF8 + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) gt_LOCALE_FR gl_FUNC_UNSETENV gl_STDLIB_MODULE_INDICATOR([unsetenv]) gl_FUNC_WCTOB gl_WCHAR_MODULE_INDICATOR([wctob]) gl_XALLOC + gl_YIELD + m4_popdef([gl_MODULE_INDICATOR_CONDITION]) m4_ifval(gltests_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || for gl_file in ]gltests_LIBSOURCES_LIST[ ; do @@ -255,7 +1955,7 @@ AC_DEFUN([gl_INIT], if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do + for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done @@ -324,8 +2024,11 @@ AC_DEFUN([gltests_LIBSOURCES], [ # 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([gl_FILE_LIST], [ + build-aux/arg-nonnull.h + build-aux/c++defs.h build-aux/config.rpath - build-aux/link-warning.h + build-aux/unused-parameter.h + build-aux/warn-on-use.h doc/relocatable.texi lib/alloca.in.h lib/array-mergesort.h @@ -336,7 +2039,6 @@ AC_DEFUN([gl_FILE_LIST], [ lib/c-strcaseeq.h lib/c-strncasecmp.c lib/config.charset - lib/dup2.c lib/errno.in.h lib/float+.h lib/float.in.h @@ -345,12 +2047,15 @@ AC_DEFUN([gl_FILE_LIST], [ lib/frexpl.c lib/fseterr.c lib/fseterr.h - lib/getpagesize.c + lib/glthread/lock.c + lib/glthread/lock.h + lib/glthread/threadlib.c lib/iconv.in.h lib/iconv_open-aix.gperf lib/iconv_open-hpux.gperf lib/iconv_open-irix.gperf lib/iconv_open-osf.gperf + lib/iconv_open-solaris.gperf lib/iconv_open.c lib/iconveh.h lib/isnan.c @@ -409,6 +2114,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/striconveha.c lib/striconveha.h lib/string.in.h + lib/strncat.c lib/unicase.h lib/unicase/cased.c lib/unicase/cased.h @@ -1132,17 +2838,15 @@ AC_DEFUN([gl_FILE_LIST], [ m4/00gnulib.m4 m4/alloca.m4 m4/codeset.m4 - m4/dup2.m4 m4/eealloc.m4 m4/environ.m4 m4/errno_h.m4 m4/error.m4 - m4/exitfail.m4 m4/exponentd.m4 m4/exponentf.m4 m4/exponentl.m4 m4/extensions.m4 - m4/fcntl_h.m4 + m4/fcntl-o.m4 m4/float_h.m4 m4/fpieee.m4 m4/frexp.m4 @@ -1173,6 +2877,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/locale-zh.m4 m4/locale_h.m4 m4/localename.m4 + m4/lock.m4 m4/longlong.m4 m4/malloc.m4 m4/malloca.m4 @@ -1185,13 +2890,12 @@ AC_DEFUN([gl_FILE_LIST], [ m4/memchr.m4 m4/minmax.m4 m4/mmap-anon.m4 - m4/mode_t.m4 m4/multiarch.m4 m4/nocrash.m4 - m4/open.m4 m4/printf-frexp.m4 m4/printf-frexpl.m4 m4/printf.m4 + m4/putenv.m4 m4/relocatable-lib.m4 m4/setenv.m4 m4/signbit.m4 @@ -1203,29 +2907,36 @@ AC_DEFUN([gl_FILE_LIST], [ m4/stdlib_h.m4 m4/strerror.m4 m4/string_h.m4 + m4/strncat.m4 + m4/thread.m4 + m4/threadlib.m4 m4/unistd_h.m4 m4/vasnprintf.m4 - m4/wchar.m4 + m4/warn-on-use.m4 + m4/wchar_h.m4 m4/wchar_t.m4 m4/wctob.m4 - m4/wctype.m4 + m4/wctype_h.m4 m4/wcwidth.m4 m4/wint_t.m4 m4/xalloc.m4 m4/xsize.m4 + m4/yield.m4 + tests/init.sh + tests/macros.h tests/nan.h + tests/signature.h tests/test-alloca-opt.c tests/test-array-mergesort.c tests/test-c-ctype.c tests/test-c-strcase.sh tests/test-c-strcasecmp.c tests/test-c-strncasecmp.c - tests/test-dup2.c tests/test-environ.c tests/test-errno.c - tests/test-fcntl.c tests/test-frexpl.c tests/test-fseterr.c + tests/test-iconv-h.c tests/test-iconv.c tests/test-isnand-nolibm.c tests/test-isnand.h @@ -1235,6 +2946,7 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-isnanl.h tests/test-locale.c tests/test-localename.c + tests/test-lock.c tests/test-malloca.c tests/test-math.c tests/test-mbrtowc.c @@ -1245,9 +2957,9 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-mbsinit.c tests/test-mbsinit.sh tests/test-memchr.c - tests/test-open.c tests/test-printf-frexp.c tests/test-printf-frexpl.c + tests/test-setenv.c tests/test-signbit.c tests/test-stdbool.c tests/test-stddef.c @@ -1257,10 +2969,14 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-striconveh.c tests/test-striconveha.c tests/test-string.c + tests/test-strncat.c tests/test-unistd.c + tests/test-unsetenv.c tests/test-wchar.c tests/test-wctype.c tests/test-wcwidth.c + tests/test-xalloc-die.c + tests/test-xalloc-die.sh tests/unicase/test-casecmp.h tests/unicase/test-cased.c tests/unicase/test-ignorable.c @@ -1586,6 +3302,125 @@ AC_DEFUN([gl_FILE_LIST], [ tests/unistdio/test-ulc-vasprintf1.c tests/unistdio/test-ulc-vsnprintf1.c tests/unistdio/test-ulc-vsprintf1.c + tests/unistr/test-chr.h + tests/unistr/test-cmp.h + tests/unistr/test-cmp2.h + tests/unistr/test-cpy-alloc.h + tests/unistr/test-cpy.h + tests/unistr/test-move.h + tests/unistr/test-set.h + tests/unistr/test-stpcpy.h + tests/unistr/test-stpncpy.h + tests/unistr/test-strcat.h + tests/unistr/test-strcmp.h + tests/unistr/test-strcpy.h + tests/unistr/test-strdup.h + tests/unistr/test-strncat.h + tests/unistr/test-strncmp.h + tests/unistr/test-strncpy.h + tests/unistr/test-strnlen.h + tests/unistr/test-u16-check.c + tests/unistr/test-u16-chr.c + tests/unistr/test-u16-cmp.c + tests/unistr/test-u16-cmp2.c + tests/unistr/test-u16-cpy-alloc.c + tests/unistr/test-u16-cpy.c + tests/unistr/test-u16-mblen.c + tests/unistr/test-u16-mbsnlen.c + tests/unistr/test-u16-mbtouc-unsafe.c + tests/unistr/test-u16-mbtouc.c + tests/unistr/test-u16-mbtouc.h + tests/unistr/test-u16-mbtoucr.c + tests/unistr/test-u16-move.c + tests/unistr/test-u16-next.c + tests/unistr/test-u16-prev.c + tests/unistr/test-u16-set.c + tests/unistr/test-u16-stpcpy.c + tests/unistr/test-u16-stpncpy.c + tests/unistr/test-u16-strcat.c + tests/unistr/test-u16-strcmp.c + tests/unistr/test-u16-strcmp.h + tests/unistr/test-u16-strcoll.c + tests/unistr/test-u16-strcpy.c + tests/unistr/test-u16-strdup.c + tests/unistr/test-u16-strlen.c + tests/unistr/test-u16-strmblen.c + tests/unistr/test-u16-strmbtouc.c + tests/unistr/test-u16-strncat.c + tests/unistr/test-u16-strncmp.c + tests/unistr/test-u16-strncpy.c + tests/unistr/test-u16-strnlen.c + tests/unistr/test-u16-to-u32.c + tests/unistr/test-u16-to-u8.c + tests/unistr/test-u16-uctomb.c + tests/unistr/test-u32-check.c + tests/unistr/test-u32-chr.c + tests/unistr/test-u32-cmp.c + tests/unistr/test-u32-cmp2.c + tests/unistr/test-u32-cpy-alloc.c + tests/unistr/test-u32-cpy.c + tests/unistr/test-u32-mblen.c + tests/unistr/test-u32-mbsnlen.c + tests/unistr/test-u32-mbtouc-unsafe.c + tests/unistr/test-u32-mbtouc.c + tests/unistr/test-u32-mbtouc.h + tests/unistr/test-u32-mbtoucr.c + tests/unistr/test-u32-move.c + tests/unistr/test-u32-next.c + tests/unistr/test-u32-prev.c + tests/unistr/test-u32-set.c + tests/unistr/test-u32-stpcpy.c + tests/unistr/test-u32-stpncpy.c + tests/unistr/test-u32-strcat.c + tests/unistr/test-u32-strcmp.c + tests/unistr/test-u32-strcmp.h + tests/unistr/test-u32-strcoll.c + tests/unistr/test-u32-strcpy.c + tests/unistr/test-u32-strdup.c + tests/unistr/test-u32-strlen.c + tests/unistr/test-u32-strmblen.c + tests/unistr/test-u32-strmbtouc.c + tests/unistr/test-u32-strncat.c + tests/unistr/test-u32-strncmp.c + tests/unistr/test-u32-strncpy.c + tests/unistr/test-u32-strnlen.c + tests/unistr/test-u32-to-u16.c + tests/unistr/test-u32-to-u8.c + tests/unistr/test-u32-uctomb.c + tests/unistr/test-u8-check.c + tests/unistr/test-u8-chr.c + tests/unistr/test-u8-cmp.c + tests/unistr/test-u8-cmp2.c + tests/unistr/test-u8-cpy-alloc.c + tests/unistr/test-u8-cpy.c + tests/unistr/test-u8-mblen.c + tests/unistr/test-u8-mbsnlen.c + tests/unistr/test-u8-mbtouc-unsafe.c + tests/unistr/test-u8-mbtouc.c + tests/unistr/test-u8-mbtouc.h + tests/unistr/test-u8-mbtoucr.c + tests/unistr/test-u8-move.c + tests/unistr/test-u8-next.c + tests/unistr/test-u8-prev.c + tests/unistr/test-u8-set.c + tests/unistr/test-u8-stpcpy.c + tests/unistr/test-u8-stpncpy.c + tests/unistr/test-u8-strcat.c + tests/unistr/test-u8-strcmp.c + tests/unistr/test-u8-strcmp.h + tests/unistr/test-u8-strcoll.c + tests/unistr/test-u8-strcpy.c + tests/unistr/test-u8-strdup.c + tests/unistr/test-u8-strlen.c + tests/unistr/test-u8-strmblen.c + tests/unistr/test-u8-strmbtouc.c + tests/unistr/test-u8-strncat.c + tests/unistr/test-u8-strncmp.c + tests/unistr/test-u8-strncpy.c + tests/unistr/test-u8-strnlen.c + tests/unistr/test-u8-to-u16.c + tests/unistr/test-u8-to-u32.c + tests/unistr/test-u8-uctomb.c tests/uniwbrk/test-u16-wordbreaks.c tests/uniwbrk/test-u32-wordbreaks.c tests/uniwbrk/test-u8-wordbreaks.c @@ -1605,13 +3440,16 @@ AC_DEFUN([gl_FILE_LIST], [ tests=lib/error.h tests=lib/exitfail.c tests=lib/exitfail.h - tests=lib/fcntl.in.h + tests=lib/getpagesize.c tests=lib/gettext.h + tests=lib/glthread/thread.c + tests=lib/glthread/thread.h + tests=lib/glthread/yield.h tests=lib/intprops.h tests=lib/locale.in.h - tests=lib/open.c tests=lib/progname.c tests=lib/progname.h + tests=lib/putenv.c tests=lib/setenv.c tests=lib/strerror.c tests=lib/unsetenv.c diff --git a/gnulib-m4/iconv.m4 b/gnulib-m4/iconv.m4 index ce21b0b8..f46ff142 100644 --- a/gnulib-m4/iconv.m4 +++ b/gnulib-m4/iconv.m4 @@ -1,5 +1,5 @@ -# iconv.m4 serial AM8 (gettext-0.18) -dnl Copyright (C) 2000-2002, 2007-2009 Free Software Foundation, Inc. +# iconv.m4 serial 9 (gettext-0.18) +dnl Copyright (C) 2000-2002, 2007-2010 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,7 +58,7 @@ AC_DEFUN([AM_ICONV_LINK], ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ - dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. + dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" @@ -87,6 +87,25 @@ int main () return 1; } } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\263"; + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { diff --git a/gnulib-m4/iconv_h.m4 b/gnulib-m4/iconv_h.m4 index bc05b055..7366cb98 100644 --- a/gnulib-m4/iconv_h.m4 +++ b/gnulib-m4/iconv_h.m4 @@ -1,5 +1,5 @@ -# iconv_h.m4 serial 4 -dnl Copyright (C) 2007-2008 Free Software Foundation, Inc. +# iconv_h.m4 serial 6 +dnl Copyright (C) 2007-2010 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,6 +7,9 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_ICONV_H], [ AC_REQUIRE([gl_ICONV_H_DEFAULTS]) + + dnl Execute this unconditionally, because ICONV_H may be set by other + dnl modules, after this code is executed. gl_CHECK_NEXT_HEADERS([iconv.h]) ]) @@ -21,7 +24,7 @@ AC_DEFUN([gl_ICONV_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_ICONV_H_DEFAULTS]) - GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) AC_DEFUN([gl_ICONV_H_DEFAULTS], diff --git a/gnulib-m4/iconv_open.m4 b/gnulib-m4/iconv_open.m4 index c7b948e9..60f62ca5 100644 --- a/gnulib-m4/iconv_open.m4 +++ b/gnulib-m4/iconv_open.m4 @@ -1,5 +1,5 @@ -# iconv_open.m4 serial 5 -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +# iconv_open.m4 serial 7 +dnl Copyright (C) 2007-2010 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,6 +10,8 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN], AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_ICONV_H_DEFAULTS]) if test "$am_cv_func_iconv" = yes; then + dnl Provide the <iconv.h> override, for the sake of the C++ aliases. + gl_REPLACE_ICONV_H dnl Test whether iconv_open accepts standardized encoding names. dnl We know that GNU libiconv and GNU libc do. AC_EGREP_CPP([gnu_iconv], [ @@ -21,10 +23,11 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN], if test $gl_func_iconv_gnu = no; then iconv_flavor= case "$host_os" in - aix*) iconv_flavor=ICONV_FLAVOR_AIX ;; - irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;; - hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;; - osf*) iconv_flavor=ICONV_FLAVOR_OSF ;; + aix*) iconv_flavor=ICONV_FLAVOR_AIX ;; + irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;; + hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;; + osf*) iconv_flavor=ICONV_FLAVOR_OSF ;; + solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;; esac if test -n "$iconv_flavor"; then AC_DEFINE_UNQUOTED([ICONV_FLAVOR], [$iconv_flavor], @@ -89,8 +92,8 @@ int main () outptr = buf; outbytesleft = sizeof (buf); res = iconv (cd, - (ICONV_CONST char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); + (ICONV_CONST char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); ASSERT (res == 0 && inbytesleft == 0); ASSERT (outptr == buf + (sizeof (expected) - 1)); ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0); @@ -116,8 +119,8 @@ int main () outptr = buf; outbytesleft = sizeof (buf); res = iconv (cd, - (ICONV_CONST char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); + (ICONV_CONST char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); ASSERT (res == 0 && inbytesleft == 0); ASSERT (outptr == buf + (sizeof (expected) - 1)); ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0); @@ -143,8 +146,8 @@ int main () outptr = buf; outbytesleft = sizeof (buf); res = iconv (cd, - (ICONV_CONST char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); + (ICONV_CONST char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); ASSERT (res == 0 && inbytesleft == 0); ASSERT (outptr == buf + (sizeof (expected) - 1)); ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0); @@ -170,8 +173,8 @@ int main () outptr = buf; outbytesleft = sizeof (buf); res = iconv (cd, - (ICONV_CONST char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); + (ICONV_CONST char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); ASSERT (res == 0 && inbytesleft == 0); ASSERT (outptr == buf + (sizeof (expected) - 1)); ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0); @@ -198,8 +201,8 @@ int main () outptr = buf; outbytesleft = sizeof (buf); res = iconv (cd, - (ICONV_CONST char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); + (ICONV_CONST char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); ASSERT (res == 0 && inbytesleft == 0); ASSERT (outptr == buf + (sizeof (expected) - 1)); ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0); diff --git a/gnulib-m4/include_next.m4 b/gnulib-m4/include_next.m4 index 5e22ded9..c7e0672f 100644 --- a/gnulib-m4/include_next.m4 +++ b/gnulib-m4/include_next.m4 @@ -1,5 +1,5 @@ # include_next.m4 serial 14 -dnl Copyright (C) 2006-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2010 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. @@ -109,11 +109,11 @@ EOF # be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # That way, a header file with the following line: -# #@INCLUDE_NEXT@ @NEXT_FOO_H@ +# #@INCLUDE_NEXT@ @NEXT_FOO_H@ # or -# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ +# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ # behaves (after sed substitution) as if it contained -# #include_next <foo.h> +# #include_next <foo.h> # even if the compiler does not support include_next. # The three "///" are to pacify Sun C 5.8, which otherwise would say # "warning: #include of /usr/include/... may be non-portable". @@ -129,46 +129,46 @@ AC_DEFUN([gl_CHECK_NEXT_HEADERS], m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_next_header], - [gl_cv_next_]m4_defn([gl_HEADER_NAME])) + [gl_cv_next_]m4_defn([gl_HEADER_NAME])) if test $gl_cv_have_include_next = yes; then AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) else AC_CACHE_CHECK( - [absolute name of <]m4_defn([gl_HEADER_NAME])[>], - m4_defn([gl_next_header]), - [AS_VAR_PUSHDEF([gl_header_exists], - [ac_cv_header_]m4_defn([gl_HEADER_NAME])) - if test AS_VAR_GET(gl_header_exists) = yes; then - AC_LANG_CONFTEST( - [AC_LANG_SOURCE( - [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] - )]) - dnl AIX "xlc -E" and "cc -E" omit #line directives for header files - dnl that contain only a #include of other header files and no - dnl non-comment tokens of their own. This leads to a failure to - dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h> - dnl and others. The workaround is to force preservation of comments - dnl through option -C. This ensures all necessary #line directives - dnl are present. GCC supports option -C as well. - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - dnl eval is necessary to expand gl_absname_cpp. - dnl Ultrix and Pyramid sh refuse to redirect output of eval, - dnl so use subshell. - AS_VAR_SET([gl_next_header], - ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | - sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ - s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"']) - else - AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) - fi - AS_VAR_POPDEF([gl_header_exists])]) + [absolute name of <]m4_defn([gl_HEADER_NAME])[>], + m4_defn([gl_next_header]), + [AS_VAR_PUSHDEF([gl_header_exists], + [ac_cv_header_]m4_defn([gl_HEADER_NAME])) + if test AS_VAR_GET(gl_header_exists) = yes; then + AC_LANG_CONFTEST( + [AC_LANG_SOURCE( + [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] + )]) + dnl AIX "xlc -E" and "cc -E" omit #line directives for header files + dnl that contain only a #include of other header files and no + dnl non-comment tokens of their own. This leads to a failure to + dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h> + dnl and others. The workaround is to force preservation of comments + dnl through option -C. This ensures all necessary #line directives + dnl are present. GCC supports option -C as well. + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + dnl eval is necessary to expand gl_absname_cpp. + dnl Ultrix and Pyramid sh refuse to redirect output of eval, + dnl so use subshell. + AS_VAR_SET([gl_next_header], + ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | + sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ + s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"']) + else + AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) + fi + AS_VAR_POPDEF([gl_header_exists])]) fi AC_SUBST( AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), diff --git a/gnulib-m4/inline.m4 b/gnulib-m4/inline.m4 index cee51099..4ef768de 100644 --- a/gnulib-m4/inline.m4 +++ b/gnulib-m4/inline.m4 @@ -1,5 +1,5 @@ # inline.m4 serial 4 -dnl Copyright (C) 2006, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2009, 2010 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/gnulib-m4/intlmacosx.m4 b/gnulib-m4/intlmacosx.m4 index c24837c4..dd910259 100644 --- a/gnulib-m4/intlmacosx.m4 +++ b/gnulib-m4/intlmacosx.m4 @@ -1,5 +1,5 @@ # intlmacosx.m4 serial 3 (gettext-0.18) -dnl Copyright (C) 2004-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2010 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/gnulib-m4/intmax_t.m4 b/gnulib-m4/intmax_t.m4 index 264cb571..975caac5 100644 --- a/gnulib-m4/intmax_t.m4 +++ b/gnulib-m4/intmax_t.m4 @@ -1,5 +1,6 @@ # intmax_t.m4 serial 7 -dnl Copyright (C) 1997-2004, 2006-2007, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2004, 2006-2007, 2009-2010 Free Software Foundation, +dnl 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/gnulib-m4/inttypes_h.m4 b/gnulib-m4/inttypes_h.m4 index f4ca1602..782d77ed 100644 --- a/gnulib-m4/inttypes_h.m4 +++ b/gnulib-m4/inttypes_h.m4 @@ -1,5 +1,5 @@ # inttypes_h.m4 serial 9 -dnl Copyright (C) 1997-2004, 2006, 2008, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2004, 2006, 2008-2010 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/gnulib-m4/isnand.m4 b/gnulib-m4/isnand.m4 index c823c2ce..cd916284 100644 --- a/gnulib-m4/isnand.m4 +++ b/gnulib-m4/isnand.m4 @@ -1,5 +1,5 @@ # isnand.m4 serial 6 -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2010 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/gnulib-m4/isnanf.m4 b/gnulib-m4/isnanf.m4 index 2ad8f945..1509fb44 100644 --- a/gnulib-m4/isnanf.m4 +++ b/gnulib-m4/isnanf.m4 @@ -1,5 +1,5 @@ # isnanf.m4 serial 10 -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2010 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/gnulib-m4/isnanl.m4 b/gnulib-m4/isnanl.m4 index e3029f5c..25daecae 100644 --- a/gnulib-m4/isnanl.m4 +++ b/gnulib-m4/isnanl.m4 @@ -1,5 +1,5 @@ # isnanl.m4 serial 12 -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2010 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/gnulib-m4/lcmessage.m4 b/gnulib-m4/lcmessage.m4 index fa8e4167..1a705431 100644 --- a/gnulib-m4/lcmessage.m4 +++ b/gnulib-m4/lcmessage.m4 @@ -1,5 +1,6 @@ # lcmessage.m4 serial 6 (gettext-0.18) -dnl Copyright (C) 1995-2002, 2004-2005, 2008, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 1995-2002, 2004-2005, 2008-2010 Free Software Foundation, +dnl 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/gnulib-m4/ldexpl.m4 b/gnulib-m4/ldexpl.m4 index 8ba85c61..d84b50ff 100644 --- a/gnulib-m4/ldexpl.m4 +++ b/gnulib-m4/ldexpl.m4 @@ -1,5 +1,5 @@ -# ldexpl.m4 serial 4 -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +# ldexpl.m4 serial 5 +dnl Copyright (C) 2007-2010 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,54 +7,56 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_LDEXPL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) + dnl Check whether it's declared. + dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>. + AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [#include <math.h>]) LDEXPL_LIBM= - AC_CACHE_CHECK([whether ldexpl() can be used without linking with libm], - [gl_cv_func_ldexpl_no_libm], - [ - AC_TRY_LINK([#include <math.h> - long double x;], - [return ldexpl (x, -1) > 0;], - [gl_cv_func_ldexpl_no_libm=yes], - [gl_cv_func_ldexpl_no_libm=no]) - ]) - if test $gl_cv_func_ldexpl_no_libm = no; then - AC_CACHE_CHECK([whether ldexpl() can be used with libm], - [gl_cv_func_ldexpl_in_libm], + if test $HAVE_DECL_LDEXPL = 1; then + AC_CACHE_CHECK([whether ldexpl() can be used without linking with libm], + [gl_cv_func_ldexpl_no_libm], [ - save_LIBS="$LIBS" - LIBS="$LIBS -lm" AC_TRY_LINK([#include <math.h> long double x;], [return ldexpl (x, -1) > 0;], - [gl_cv_func_ldexpl_in_libm=yes], - [gl_cv_func_ldexpl_in_libm=no]) - LIBS="$save_LIBS" + [gl_cv_func_ldexpl_no_libm=yes], + [gl_cv_func_ldexpl_no_libm=no]) ]) - if test $gl_cv_func_ldexpl_in_libm = yes; then - LDEXPL_LIBM=-lm + if test $gl_cv_func_ldexpl_no_libm = no; then + AC_CACHE_CHECK([whether ldexpl() can be used with libm], + [gl_cv_func_ldexpl_in_libm], + [ + save_LIBS="$LIBS" + LIBS="$LIBS -lm" + AC_TRY_LINK([#include <math.h> + long double x;], + [return ldexpl (x, -1) > 0;], + [gl_cv_func_ldexpl_in_libm=yes], + [gl_cv_func_ldexpl_in_libm=no]) + LIBS="$save_LIBS" + ]) + if test $gl_cv_func_ldexpl_in_libm = yes; then + LDEXPL_LIBM=-lm + fi + fi + if test $gl_cv_func_ldexpl_no_libm = yes \ + || test $gl_cv_func_ldexpl_in_libm = yes; then + save_LIBS="$LIBS" + LIBS="$LIBS $LDEXPL_LIBM" + gl_FUNC_LDEXPL_WORKS + LIBS="$save_LIBS" + case "$gl_cv_func_ldexpl_works" in + *yes) gl_func_ldexpl=yes ;; + *) gl_func_ldexpl=no; REPLACE_LDEXPL=1; LDEXPL_LIBM= ;; + esac + else + gl_func_ldexpl=no + fi + if test $gl_func_ldexpl = yes; then + AC_DEFINE([HAVE_LDEXPL], [1], + [Define if the ldexpl() function is available.]) fi fi - if test $gl_cv_func_ldexpl_no_libm = yes \ - || test $gl_cv_func_ldexpl_in_libm = yes; then - save_LIBS="$LIBS" - LIBS="$LIBS $LDEXPL_LIBM" - gl_FUNC_LDEXPL_WORKS - LIBS="$save_LIBS" - case "$gl_cv_func_ldexpl_works" in - *yes) gl_func_ldexpl=yes ;; - *) gl_func_ldexpl=no; REPLACE_LDEXPL=1; LDEXPL_LIBM= ;; - esac - else - gl_func_ldexpl=no - fi - if test $gl_func_ldexpl = yes; then - AC_DEFINE([HAVE_LDEXPL], [1], - [Define if the ldexpl() function is available.]) - dnl Also check whether it's declared. - dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>. - AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [#include <math.h>]) - else - HAVE_DECL_LDEXPL=0 + if test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; then AC_LIBOBJ([ldexpl]) fi AC_SUBST([LDEXPL_LIBM]) diff --git a/gnulib-m4/lib-ld.m4 b/gnulib-m4/lib-ld.m4 index e4863f2c..ebb30528 100644 --- a/gnulib-m4/lib-ld.m4 +++ b/gnulib-m4/lib-ld.m4 @@ -1,5 +1,5 @@ # lib-ld.m4 serial 4 (gettext-0.18) -dnl Copyright (C) 1996-2003, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 1996-2003, 2009-2010 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. @@ -59,7 +59,7 @@ if test "$GCC" = yes; then # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; @@ -89,9 +89,9 @@ AC_CACHE_VAL([acl_cv_path_LD], # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; + test "$with_gnu_ld" != no && break ;; *) - test "$with_gnu_ld" != yes && break ;; + test "$with_gnu_ld" != yes && break ;; esac fi done diff --git a/gnulib-m4/lib-link.m4 b/gnulib-m4/lib-link.m4 index 2f8b7ff3..c73bd8e3 100644 --- a/gnulib-m4/lib-link.m4 +++ b/gnulib-m4/lib-link.m4 @@ -1,5 +1,5 @@ -# lib-link.m4 serial 20 (gettext-0.18) -dnl Copyright (C) 2001-2009 Free Software Foundation, Inc. +# lib-link.m4 serial 21 (gettext-0.18) +dnl Copyright (C) 2001-2010 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. @@ -74,7 +74,17 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" - LIBS="$LIBS $LIB[]NAME" + dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, + dnl because these -l options might require -L options that are present in + dnl LIBS. -l options benefit only from the -L options listed before it. + dnl Otherwise, add it to the front of LIBS, because it may be a static + dnl library that depends on another static library that is present in LIBS. + dnl Static libraries benefit only from the static libraries listed after + dnl it. + case " $LIB[]NAME" in + *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; + *) LIBS="$LIB[]NAME $LIBS" ;; + esac AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) diff --git a/gnulib-m4/lib-prefix.m4 b/gnulib-m4/lib-prefix.m4 index 4b7ee335..1601ceae 100644 --- a/gnulib-m4/lib-prefix.m4 +++ b/gnulib-m4/lib-prefix.m4 @@ -1,5 +1,5 @@ # lib-prefix.m4 serial 7 (gettext-0.18) -dnl Copyright (C) 2001-2005, 2008-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2005, 2008-2010 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/gnulib-m4/localcharset.m4 b/gnulib-m4/localcharset.m4 index e9601041..ee2e801b 100644 --- a/gnulib-m4/localcharset.m4 +++ b/gnulib-m4/localcharset.m4 @@ -1,5 +1,5 @@ -# localcharset.m4 serial 6 -dnl Copyright (C) 2002, 2004, 2006, 2009 Free Software Foundation, Inc. +# localcharset.m4 serial 7 +dnl Copyright (C) 2002, 2004, 2006, 2009, 2010 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. @@ -8,6 +8,7 @@ AC_DEFUN([gl_LOCALCHARSET], [ dnl Prerequisites of lib/localcharset.c. AC_REQUIRE([AM_LANGINFO_CODESET]) + AC_REQUIRE([gl_FCNTL_O_FLAGS]) AC_CHECK_DECLS_ONCE([getc_unlocked]) dnl Prerequisites of the lib/Makefile.am snippet. diff --git a/gnulib-m4/locale-fr.m4 b/gnulib-m4/locale-fr.m4 index 653a5bc2..001f5390 100644 --- a/gnulib-m4/locale-fr.m4 +++ b/gnulib-m4/locale-fr.m4 @@ -1,5 +1,5 @@ # locale-fr.m4 serial 11 -dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2010 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/gnulib-m4/locale-ja.m4 b/gnulib-m4/locale-ja.m4 index 93605764..0eedaf14 100644 --- a/gnulib-m4/locale-ja.m4 +++ b/gnulib-m4/locale-ja.m4 @@ -1,5 +1,5 @@ # locale-ja.m4 serial 7 -dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2010 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/gnulib-m4/locale-tr.m4 b/gnulib-m4/locale-tr.m4 index 6162f65c..404c063c 100644 --- a/gnulib-m4/locale-tr.m4 +++ b/gnulib-m4/locale-tr.m4 @@ -1,5 +1,5 @@ # locale-tr.m4 serial 6 -dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2010 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/gnulib-m4/locale-zh.m4 b/gnulib-m4/locale-zh.m4 index 36a5f1df..777fd141 100644 --- a/gnulib-m4/locale-zh.m4 +++ b/gnulib-m4/locale-zh.m4 @@ -1,5 +1,5 @@ # locale-zh.m4 serial 6 -dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2010 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/gnulib-m4/locale_h.m4 b/gnulib-m4/locale_h.m4 index 86123670..18a119b8 100644 --- a/gnulib-m4/locale_h.m4 +++ b/gnulib-m4/locale_h.m4 @@ -1,26 +1,92 @@ -# locale_h.m4 serial 3 -dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc. +# locale_h.m4 serial 10 +dnl Copyright (C) 2007, 2009-2010 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_LOCALE_H], [ - AC_CACHE_CHECK([whether locale.h conforms to POSIX], - [gl_cv_header_working_locale_h], - [AC_TRY_COMPILE([#include <locale.h> -int x = LC_MESSAGES;], [], - [gl_cv_header_working_locale_h=yes], - [gl_cv_header_working_locale_h=no])]) + 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_LOCALE_H_DEFAULTS]) + + dnl Persuade glibc <locale.h> to define locale_t. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) dnl If <stddef.h> is replaced, then <locale.h> must also be replaced. AC_REQUIRE([gl_STDDEF_H]) - if test $gl_cv_header_working_locale_h = yes && test -z "$STDDEF_H"; then - LOCALE_H= + AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001], + [gl_cv_header_locale_h_posix2001], + [AC_TRY_COMPILE([#include <locale.h> +int x = LC_MESSAGES;], [], + [gl_cv_header_locale_h_posix2001=yes], + [gl_cv_header_locale_h_posix2001=no])]) + + dnl Check for <xlocale.h>. + AC_CHECK_HEADERS_ONCE([xlocale.h]) + if test $ac_cv_header_xlocale_h = yes; then + HAVE_XLOCALE_H=1 + dnl Check whether use of locale_t requires inclusion of <xlocale.h>, + dnl e.g. on MacOS X 10.5. If <locale.h> does not define locale_t by + dnl itself, we assume that <xlocale.h> will do so. + AC_CACHE_CHECK([whether locale.h defines locale_t], + [gl_cv_header_locale_has_locale_t], + [AC_TRY_COMPILE([#include <locale.h> +locale_t x;], [], + [gl_cv_header_locale_has_locale_t=yes], + [gl_cv_header_locale_has_locale_t=no]) + ]) + if test $gl_cv_header_locale_has_locale_t = yes; then + gl_cv_header_locale_h_needs_xlocale_h=no + else + gl_cv_header_locale_h_needs_xlocale_h=yes + fi else - gl_CHECK_NEXT_HEADERS([locale.h]) - LOCALE_H=locale.h + HAVE_XLOCALE_H=0 + gl_cv_header_locale_h_needs_xlocale_h=no fi - AC_SUBST([LOCALE_H]) + AC_SUBST([HAVE_XLOCALE_H]) + + dnl <locale.h> is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([locale.h]) + + if test -n "$STDDEF_H" \ + || test $gl_cv_header_locale_h_posix2001 = no \ + || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then + gl_REPLACE_LOCALE_H + fi + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include <locale.h> +/* Some systems provide declarations in a non-standard header. */ +#if HAVE_XLOCALE_H +# include <xlocale.h> +#endif + ]], [duplocale]) +]) + +dnl Unconditionally enables the replacement of <locale.h>. +AC_DEFUN([gl_REPLACE_LOCALE_H], +[ + dnl This is a no-op, because <locale.h> is always overridden. + : +]) + +AC_DEFUN([gl_LOCALE_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_LOCALE_H_DEFAULTS], +[ + GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE]) + REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE]) ]) diff --git a/gnulib-m4/localename.m4 b/gnulib-m4/localename.m4 index 94e9705d..9ff5eea2 100644 --- a/gnulib-m4/localename.m4 +++ b/gnulib-m4/localename.m4 @@ -1,5 +1,5 @@ -# localename.m4 serial 1 -dnl Copyright (C) 2007 Free Software Foundation, Inc. +# localename.m4 serial 2 +dnl Copyright (C) 2007, 2009, 2010 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. @@ -8,5 +8,5 @@ AC_DEFUN([gl_LOCALENAME], [ AC_REQUIRE([gt_LC_MESSAGES]) AC_REQUIRE([gt_INTL_MACOSX]) - AC_CHECK_FUNCS([setlocale]) + AC_CHECK_FUNCS([setlocale uselocale]) ]) diff --git a/gnulib-m4/lock.m4 b/gnulib-m4/lock.m4 new file mode 100644 index 00000000..9da8465e --- /dev/null +++ b/gnulib-m4/lock.m4 @@ -0,0 +1,37 @@ +# lock.m4 serial 10 (gettext-0.18) +dnl Copyright (C) 2005-2010 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 Bruno Haible. + +AC_DEFUN([gl_LOCK], +[ + AC_REQUIRE([gl_THREADLIB]) + if test "$gl_threads_api" = posix; then + # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the + # pthread_rwlock_* functions. + AC_CHECK_TYPE([pthread_rwlock_t], + [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], + [Define if the POSIX multithreading library has read/write locks.])], + [], + [#include <pthread.h>]) + # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. + AC_TRY_COMPILE([#include <pthread.h>], + [#if __FreeBSD__ == 4 +error "No, in FreeBSD 4.0 recursive mutexes actually don't work." +#else +int x = (int)PTHREAD_MUTEX_RECURSIVE; +return !x; +#endif], + [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], + [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])]) + fi + gl_PREREQ_LOCK +]) + +# Prerequisites of lib/lock.c. +AC_DEFUN([gl_PREREQ_LOCK], [ + AC_REQUIRE([AC_C_INLINE]) +]) diff --git a/gnulib-m4/longlong.m4 b/gnulib-m4/longlong.m4 index eedc8d56..cca3c1a9 100644 --- a/gnulib-m4/longlong.m4 +++ b/gnulib-m4/longlong.m4 @@ -1,5 +1,5 @@ # longlong.m4 serial 14 -dnl Copyright (C) 1999-2007, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 1999-2007, 2009-2010 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. @@ -20,30 +20,30 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT], [AC_LINK_IFELSE( [_AC_TYPE_LONG_LONG_SNIPPET], [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. - dnl If cross compiling, assume the bug isn't important, since - dnl nobody cross compiles for this platform as far as we know. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include <limits.h> - @%:@ifndef LLONG_MAX - @%:@ define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - @%:@ define LLONG_MAX (HALF - 1 + HALF) - @%:@endif]], - [[long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0;]])], - [ac_cv_type_long_long_int=yes], - [ac_cv_type_long_long_int=no], - [ac_cv_type_long_long_int=yes])], + dnl If cross compiling, assume the bug isn't important, since + dnl nobody cross compiles for this platform as far as we know. + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[@%:@include <limits.h> + @%:@ifndef LLONG_MAX + @%:@ define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + @%:@ define LLONG_MAX (HALF - 1 + HALF) + @%:@endif]], + [[long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0;]])], + [ac_cv_type_long_long_int=yes], + [ac_cv_type_long_long_int=no], + [ac_cv_type_long_long_int=yes])], [ac_cv_type_long_long_int=no])]) if test $ac_cv_type_long_long_int = yes; then AC_DEFINE([HAVE_LONG_LONG_INT], [1], @@ -83,24 +83,24 @@ AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], [ AC_LANG_PROGRAM( [[/* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; + ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; + ? 1 : -1)]; int i = 63;]], [[/* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull));]]) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull));]]) ]) diff --git a/gnulib-m4/malloc.m4 b/gnulib-m4/malloc.m4 index 80701716..910ac922 100644 --- a/gnulib-m4/malloc.m4 +++ b/gnulib-m4/malloc.m4 @@ -1,5 +1,5 @@ # malloc.m4 serial 9 -dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009, 2010 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/gnulib-m4/malloca.m4 b/gnulib-m4/malloca.m4 index 2841ae83..e07c6d93 100644 --- a/gnulib-m4/malloca.m4 +++ b/gnulib-m4/malloca.m4 @@ -1,5 +1,6 @@ # malloca.m4 serial 1 -dnl Copyright (C) 2003-2004, 2006-2007 Free Software Foundation, Inc. +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2010 Free Software Foundation, +dnl 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/gnulib-m4/math_h.m4 b/gnulib-m4/math_h.m4 index d941bc33..2d89ca3f 100644 --- a/gnulib-m4/math_h.m4 +++ b/gnulib-m4/math_h.m4 @@ -1,5 +1,5 @@ -# math_h.m4 serial 14 -dnl Copyright (C) 2007-2008 Free Software Foundation, Inc. +# math_h.m4 serial 21 +dnl Copyright (C) 2007-2010 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. @@ -8,6 +8,8 @@ AC_DEFUN([gl_MATH_H], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([math.h]) + AC_REQUIRE([AC_C_INLINE]) + AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]], [[/* Solaris 10 has a broken definition of NAN. Other platforms @@ -15,9 +17,9 @@ AC_DEFUN([gl_MATH_H], test only needs to fail when NAN is provided but wrong. */ float f = 1.0f; #ifdef NAN - f = NAN; + f = NAN; #endif - return f == 0;]])], + return f == 0;]])], [gl_cv_header_math_nan_works=yes], [gl_cv_header_math_nan_works=no])]) if test $gl_cv_header_math_nan_works = no; then @@ -26,26 +28,39 @@ AC_DEFUN([gl_MATH_H], AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]], [[/* Solaris 10 has a broken definition of HUGE_VAL. */ - double d = HUGE_VAL; - return d == 0;]])], + double d = HUGE_VAL; + return d == 0;]])], [gl_cv_header_math_huge_val_works=yes], [gl_cv_header_math_huge_val_works=no])]) if test $gl_cv_header_math_huge_val_works = no; then REPLACE_HUGE_VAL=1 fi + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include <math.h> + ]], [acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl + ldexpl logb logl round roundf roundl sinl sqrtl tanl trunc truncf truncl]) ]) AC_DEFUN([gl_MATH_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_MATH_H_DEFAULTS]) - GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_MATH_H_DEFAULTS], [ + GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL]) + GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL]) + GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL]) GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF]) GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL]) + GNULIB_COSL=0; AC_SUBST([GNULIB_COSL]) + GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL]) GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF]) GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL]) GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) @@ -57,31 +72,53 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND]) GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL]) GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) - GNULIB_MATHL=0; AC_SUBST([GNULIB_MATHL]) + GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB]) + GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL]) GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF]) GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL]) GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT]) + GNULIB_SINL=0; AC_SUBST([GNULIB_SINL]) + GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL]) + GNULIB_TANL=0; AC_SUBST([GNULIB_TANL]) GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC]) GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL]) + HAVE_ASINL=1; AC_SUBST([HAVE_ASINL]) + HAVE_ATANL=1; AC_SUBST([HAVE_ATANL]) + HAVE_COSL=1; AC_SUBST([HAVE_COSL]) + HAVE_EXPL=1; AC_SUBST([HAVE_EXPL]) HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF]) HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND]) HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL]) + HAVE_LOGL=1; AC_SUBST([HAVE_LOGL]) + HAVE_SINL=1; AC_SUBST([HAVE_SINL]) + HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL]) + HAVE_TANL=1; AC_SUBST([HAVE_TANL]) HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) + HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF]) + HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL]) HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL]) HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) + HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF]) + HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL]) HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) + HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB]) HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) + HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND]) + HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF]) + HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL]) HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL]) HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL]) HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL]) HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) + HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL]) REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF]) diff --git a/gnulib-m4/mbchar.m4 b/gnulib-m4/mbchar.m4 index e73e2b4b..116ce7e5 100644 --- a/gnulib-m4/mbchar.m4 +++ b/gnulib-m4/mbchar.m4 @@ -1,5 +1,5 @@ -# mbchar.m4 serial 7 -dnl Copyright (C) 2005-2007 Free Software Foundation, Inc. +# mbchar.m4 serial 8 +dnl Copyright (C) 2005-2007, 2009-2010 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,4 +10,5 @@ dnl From Bruno Haible. AC_DEFUN([gl_MBCHAR], [ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([AC_C_INLINE]) ]) diff --git a/gnulib-m4/mbiter.m4 b/gnulib-m4/mbiter.m4 index 88ba5694..34810507 100644 --- a/gnulib-m4/mbiter.m4 +++ b/gnulib-m4/mbiter.m4 @@ -1,5 +1,5 @@ -# mbiter.m4 serial 4 -dnl Copyright (C) 2005, 2008 Free Software Foundation, Inc. +# mbiter.m4 serial 5 +dnl Copyright (C) 2005, 2008, 2009, 2010 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. @@ -9,6 +9,7 @@ dnl From Bruno Haible. AC_DEFUN([gl_MBITER], [ + AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) dnl The following line is that so the user can test HAVE_MBRTOWC before dnl #include "mbiter.h" or "mbuiter.h". It can be removed in 2010. diff --git a/gnulib-m4/mbrtowc.m4 b/gnulib-m4/mbrtowc.m4 index 2fddcc8a..606de5c9 100644 --- a/gnulib-m4/mbrtowc.m4 +++ b/gnulib-m4/mbrtowc.m4 @@ -1,5 +1,6 @@ -# mbrtowc.m4 serial 16 -dnl Copyright (C) 2001-2002, 2004-2005, 2008, 2009 Free Software Foundation, Inc. +# mbrtowc.m4 serial 17 +dnl Copyright (C) 2001-2002, 2004-2005, 2008-2010 Free Software Foundation, +dnl 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,38 +11,39 @@ AC_DEFUN([gl_FUNC_MBRTOWC], AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBRTOWC=1 - fi + AC_CHECK_FUNCS_ONCE([mbrtowc]) if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 - fi - if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then - gl_MBRTOWC_NULL_ARG - gl_MBRTOWC_RETVAL - gl_MBRTOWC_NUL_RETVAL - case "$gl_cv_func_mbrtowc_null_arg" in - *yes) ;; - *) AC_DEFINE([MBRTOWC_NULL_ARG_BUG], [1], - [Define if the mbrtowc function has the NULL string argument bug.]) - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_retval" in - *yes) ;; - *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1], - [Define if the mbrtowc function returns a wrong return value.]) - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_nul_retval" in - *yes) ;; - *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1], - [Define if the mbrtowc function does not return 0 for a NUL character.]) - REPLACE_MBRTOWC=1 - ;; - esac + else + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_MBRTOWC=1 + else + gl_MBRTOWC_NULL_ARG + gl_MBRTOWC_RETVAL + gl_MBRTOWC_NUL_RETVAL + case "$gl_cv_func_mbrtowc_null_arg" in + *yes) ;; + *) AC_DEFINE([MBRTOWC_NULL_ARG_BUG], [1], + [Define if the mbrtowc function has the NULL string argument bug.]) + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_retval" in + *yes) ;; + *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1], + [Define if the mbrtowc function returns a wrong return value.]) + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_nul_retval" in + *yes) ;; + *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1], + [Define if the mbrtowc function does not return 0 for a NUL character.]) + REPLACE_MBRTOWC=1 + ;; + esac + fi fi if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then gl_REPLACE_WCHAR_H diff --git a/gnulib-m4/mbsinit.m4 b/gnulib-m4/mbsinit.m4 index 03b055cd..46c106fc 100644 --- a/gnulib-m4/mbsinit.m4 +++ b/gnulib-m4/mbsinit.m4 @@ -1,5 +1,5 @@ -# mbsinit.m4 serial 3 -dnl Copyright (C) 2008 Free Software Foundation, Inc. +# mbsinit.m4 serial 4 +dnl Copyright (C) 2008, 2010 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,12 +10,14 @@ AC_DEFUN([gl_FUNC_MBSINIT], AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBSINIT=1 - fi + AC_CHECK_FUNCS_ONCE([mbsinit]) if test $ac_cv_func_mbsinit = no; then HAVE_MBSINIT=0 + else + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_MBSINIT=1 + fi fi if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then gl_REPLACE_WCHAR_H diff --git a/gnulib-m4/mbstate_t.m4 b/gnulib-m4/mbstate_t.m4 index d4ec6f0f..3e2df29f 100644 --- a/gnulib-m4/mbstate_t.m4 +++ b/gnulib-m4/mbstate_t.m4 @@ -1,5 +1,5 @@ # mbstate_t.m4 serial 12 -dnl Copyright (C) 2000-2002, 2008, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2008-2010 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. @@ -18,17 +18,17 @@ AC_DEFUN([AC_TYPE_MBSTATE_T], AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t], [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT[ -# include <wchar.h>]], - [[mbstate_t x; return sizeof x;]])], - [ac_cv_type_mbstate_t=yes], - [ac_cv_type_mbstate_t=no])]) + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT[ +# include <wchar.h>]], + [[mbstate_t x; return sizeof x;]])], + [ac_cv_type_mbstate_t=yes], + [ac_cv_type_mbstate_t=no])]) if test $ac_cv_type_mbstate_t = yes; then AC_DEFINE([HAVE_MBSTATE_T], [1], - [Define to 1 if <wchar.h> declares mbstate_t.]) + [Define to 1 if <wchar.h> declares mbstate_t.]) else AC_DEFINE([mbstate_t], [int], - [Define to a type if <wchar.h> does not define.]) + [Define to a type if <wchar.h> does not define.]) fi ]) diff --git a/gnulib-m4/memchr.m4 b/gnulib-m4/memchr.m4 index 1194bac2..ab773b81 100644 --- a/gnulib-m4/memchr.m4 +++ b/gnulib-m4/memchr.m4 @@ -1,5 +1,5 @@ -# memchr.m4 serial 7 -dnl Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc. +# memchr.m4 serial 8 +dnl Copyright (C) 2002-2004, 2009-2010 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. @@ -13,12 +13,7 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR], dnl These days, we assume memchr is present. But just in case... AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_REPLACE_FUNCS([memchr]) - if test $ac_cv_func_memchr = no; then - gl_PREREQ_MEMCHR - REPLACE_MEMCHR=1 - fi - + AC_CHECK_FUNCS_ONCE([memchr]) if test $ac_cv_func_memchr = yes; then # Detect platform-specific bugs in some versions of glibc: # memchr should not dereference anything with length 0 @@ -53,11 +48,11 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR], { int pagesize = getpagesize (); char *two_pages = - (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, - flags, fd, 0); + (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, + flags, fd, 0); if (two_pages != (char *)(-1) - && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) - fence = two_pages + pagesize; + && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) + fence = two_pages + pagesize; } #endif if (fence) @@ -73,10 +68,14 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR], [dnl Be pessimistic for now. gl_cv_func_memchr_works="guessing no"])]) if test "$gl_cv_func_memchr_works" != yes; then - gl_PREREQ_MEMCHR REPLACE_MEMCHR=1 - AC_LIBOBJ([memchr]) fi + else + HAVE_MEMCHR=0 + fi + if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then + AC_LIBOBJ([memchr]) + gl_PREREQ_MEMCHR fi ]) diff --git a/gnulib-m4/minmax.m4 b/gnulib-m4/minmax.m4 index d2993fba..d9e9cecf 100644 --- a/gnulib-m4/minmax.m4 +++ b/gnulib-m4/minmax.m4 @@ -1,5 +1,5 @@ # minmax.m4 serial 3 -dnl Copyright (C) 2005, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2009, 2010 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/gnulib-m4/mmap-anon.m4 b/gnulib-m4/mmap-anon.m4 index 14b6270d..a6b7b9ac 100644 --- a/gnulib-m4/mmap-anon.m4 +++ b/gnulib-m4/mmap-anon.m4 @@ -1,5 +1,5 @@ # mmap-anon.m4 serial 8 -dnl Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2007, 2009-2010 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/gnulib-m4/mode_t.m4 b/gnulib-m4/mode_t.m4 deleted file mode 100644 index a4dd694d..00000000 --- a/gnulib-m4/mode_t.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# mode_t.m4 serial 1 -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, -dnl with or without modifications, as long as this notice is preserved. - -# For using mode_t, it's sufficient to use AC_TYPE_MODE_T and -# include <sys/types.h>. - -# Define PROMOTED_MODE_T to the type that is the result of "default argument -# promotion" (ISO C 6.5.2.2.(6)) of the type mode_t. -AC_DEFUN([gl_PROMOTED_TYPE_MODE_T], -[ - AC_REQUIRE([AC_TYPE_MODE_T]) - AC_CACHE_CHECK([for promoted mode_t type], [gl_cv_promoted_mode_t], [ - dnl Assume mode_t promotes to 'int' if and only if it is smaller than 'int', - dnl and to itself otherwise. This assumption is not guaranteed by the ISO C - dnl standard, but we don't know of any real-world counterexamples. - AC_TRY_COMPILE([#include <sys/types.h>], - [typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];], - [gl_cv_promoted_mode_t='int'], - [gl_cv_promoted_mode_t='mode_t']) - ]) - AC_DEFINE_UNQUOTED([PROMOTED_MODE_T], [$gl_cv_promoted_mode_t], - [Define to the type that is the result of default argument promotions of type mode_t.]) -]) diff --git a/gnulib-m4/multiarch.m4 b/gnulib-m4/multiarch.m4 index ec377bac..389bd2bb 100644 --- a/gnulib-m4/multiarch.m4 +++ b/gnulib-m4/multiarch.m4 @@ -1,5 +1,5 @@ # multiarch.m4 serial 5 -dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2008, 2009, 2010 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/gnulib-m4/nocrash.m4 b/gnulib-m4/nocrash.m4 index 8626ea0b..efbcfa6a 100644 --- a/gnulib-m4/nocrash.m4 +++ b/gnulib-m4/nocrash.m4 @@ -1,5 +1,5 @@ # nocrash.m4 serial 2 -dnl Copyright (C) 2005, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2009, 2010 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/gnulib-m4/open.m4 b/gnulib-m4/open.m4 deleted file mode 100644 index c0eb8e86..00000000 --- a/gnulib-m4/open.m4 +++ /dev/null @@ -1,65 +0,0 @@ -# open.m4 serial 7 -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. - -AC_DEFUN([gl_FUNC_OPEN], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - mingw* | pw*) - gl_REPLACE_OPEN - ;; - *) - dnl open("foo/") should not create a file when the file name has a - dnl trailing slash. - AC_CACHE_CHECK([whether open recognizes a trailing slash], - [gl_cv_func_open_slash], - [ - AC_TRY_RUN([ -#include <fcntl.h> -#if HAVE_UNISTD_H -# include <unistd.h> -#endif -int main () -{ - return open ("conftest.sl/", O_CREAT, 0600) >= 0; -}], [gl_cv_func_open_slash=yes], [gl_cv_func_open_slash=no], - [ -changequote(,)dnl - case "$host_os" in - solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;; - hpux*) gl_cv_func_open_slash="guessing no" ;; - *) gl_cv_func_open_slash="guessing yes" ;; - esac -changequote([,])dnl - ]) - rm -f conftest.sl - ]) - case "$gl_cv_func_open_slash" in - *no) - AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1], - [Define to 1 if open() fails to recognize a trailing slash.]) - gl_REPLACE_OPEN - ;; - esac - ;; - esac -]) - -AC_DEFUN([gl_REPLACE_OPEN], -[ - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) - REPLACE_OPEN=1 - AC_LIBOBJ([open]) - gl_PREREQ_OPEN -]) - -# Prerequisites of lib/open.c. -AC_DEFUN([gl_PREREQ_OPEN], -[ - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T]) - : -]) diff --git a/gnulib-m4/printf-frexp.m4 b/gnulib-m4/printf-frexp.m4 index fa0aa158..c42391a4 100644 --- a/gnulib-m4/printf-frexp.m4 +++ b/gnulib-m4/printf-frexp.m4 @@ -1,5 +1,5 @@ # printf-frexp.m4 serial 3 -dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009, 2010 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/gnulib-m4/printf-frexpl.m4 b/gnulib-m4/printf-frexpl.m4 index f2eb2004..14ffe1fc 100644 --- a/gnulib-m4/printf-frexpl.m4 +++ b/gnulib-m4/printf-frexpl.m4 @@ -1,5 +1,5 @@ # printf-frexpl.m4 serial 6 -dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009, 2010 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/gnulib-m4/printf.m4 b/gnulib-m4/printf.m4 index 87aa45c5..ebca5364 100644 --- a/gnulib-m4/printf.m4 +++ b/gnulib-m4/printf.m4 @@ -1,5 +1,5 @@ # printf.m4 serial 33 -dnl Copyright (C) 2003, 2007-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007-2010 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/gnulib-m4/putenv.m4 b/gnulib-m4/putenv.m4 new file mode 100644 index 00000000..dd9140c0 --- /dev/null +++ b/gnulib-m4/putenv.m4 @@ -0,0 +1,41 @@ +# putenv.m4 serial 16 +dnl Copyright (C) 2002-2010 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 Jim Meyering. +dnl +dnl Check whether putenv ("FOO") removes FOO from the environment. +dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that. + +AC_DEFUN([gl_FUNC_PUTENV], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_CACHE_CHECK([for putenv compatible with GNU and SVID], + [gl_cv_func_svid_putenv], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[ + /* Put it in env. */ + if (putenv ("CONFTEST_putenv=val")) + return 1; + + /* Try to remove it. */ + if (putenv ("CONFTEST_putenv")) + return 1; + + /* Make sure it was deleted. */ + if (getenv ("CONFTEST_putenv") != 0) + return 1; + + return 0; + ]])], + gl_cv_func_svid_putenv=yes, + gl_cv_func_svid_putenv=no, + dnl When crosscompiling, assume putenv is broken. + gl_cv_func_svid_putenv=no) + ]) + if test $gl_cv_func_svid_putenv = no; then + REPLACE_PUTENV=1 + AC_LIBOBJ([putenv]) + fi +]) diff --git a/gnulib-m4/relocatable-lib.m4 b/gnulib-m4/relocatable-lib.m4 index fd99cdae..c1923786 100644 --- a/gnulib-m4/relocatable-lib.m4 +++ b/gnulib-m4/relocatable-lib.m4 @@ -1,5 +1,5 @@ -# relocatable-lib.m4 serial 4 -dnl Copyright (C) 2003, 2005-2007, 2009 Free Software Foundation, Inc. +# relocatable-lib.m4 serial 5 +dnl Copyright (C) 2003, 2005-2007, 2009-2010 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. @@ -27,7 +27,8 @@ AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY], [Define to the value of ${prefix}, as a string.]) if test $RELOCATABLE = yes; then AC_DEFINE([ENABLE_RELOCATABLE], [1], - [Define to 1 if the package shall run at any location in the filesystem.]) + [Define to 1 if the package shall run at any location in the file + system.]) fi ]) @@ -43,7 +44,8 @@ AC_DEFUN([gl_RELOCATABLE_NOP], [ AC_MSG_CHECKING([whether to activate relocatable installation]) AC_ARG_ENABLE([relocatable], - [ --enable-relocatable install a package that can be moved in the filesystem], + [AS_HELP_STRING([--enable-relocatable], + [install a package that can be moved in the file system])], [if test "$enableval" != no; then RELOCATABLE=yes else diff --git a/gnulib-m4/setenv.m4 b/gnulib-m4/setenv.m4 index e28407ee..58f6d138 100644 --- a/gnulib-m4/setenv.m4 +++ b/gnulib-m4/setenv.m4 @@ -1,17 +1,14 @@ -# setenv.m4 serial 11 -dnl Copyright (C) 2001-2004, 2006-2009 Free Software Foundation, Inc. +# setenv.m4 serial 16 +dnl Copyright (C) 2001-2004, 2006-2010 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_FUNC_SETENV], [ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([setenv]) - if test $ac_cv_func_setenv = no; then - HAVE_SETENV=0 + AC_REQUIRE([gl_FUNC_SETENV_SEPARATE]) + if test $HAVE_SETENV$REPLACE_SETENV != 10; then AC_LIBOBJ([setenv]) - gl_PREREQ_SETENV fi ]) @@ -22,6 +19,25 @@ AC_DEFUN([gl_FUNC_SETENV_SEPARATE], AC_CHECK_FUNCS_ONCE([setenv]) if test $ac_cv_func_setenv = no; then HAVE_SETENV=0 + else + AC_CACHE_CHECK([whether setenv validates arguments], + [gl_cv_func_setenv_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ + #include <stdlib.h> + #include <errno.h> + #include <string.h> + ]], [[ + if (setenv ("", "", 0) != -1) return 1; + if (errno != EINVAL) return 2; + if (setenv ("a", "=", 1) != 0) return 3; + if (strcmp (getenv ("a"), "=") != 0) return 4; + ]])], + [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no], + [gl_cv_func_setenv_works="guessing no"])]) + if test "$gl_cv_func_setenv_works" != yes; then + REPLACE_SETENV=1 + AC_LIBOBJ([setenv]) + fi fi gl_PREREQ_SETENV ]) @@ -35,6 +51,7 @@ AC_DEFUN([gl_FUNC_UNSETENV], AC_LIBOBJ([unsetenv]) gl_PREREQ_UNSETENV else + dnl Some BSDs return void, failing to do error checking. AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret], [AC_TRY_COMPILE([#include <stdlib.h> extern @@ -48,7 +65,30 @@ int unsetenv(); #endif ], , gt_cv_func_unsetenv_ret='int', gt_cv_func_unsetenv_ret='void')]) if test $gt_cv_func_unsetenv_ret = 'void'; then - VOID_UNSETENV=1 + AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void + instead of int.]) + REPLACE_UNSETENV=1 + AC_LIBOBJ([unsetenv]) + fi + + dnl Solaris 10 unsetenv does not remove all copies of a name. + AC_CACHE_CHECK([whether unsetenv works on duplicates], + [gl_cv_func_unsetenv_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ + #include <stdlib.h> + ]], [[ + char entry[] = "b=2"; + if (putenv ((char *) "a=1")) return 1; + if (putenv (entry)) return 2; + entry[0] = 'a'; + unsetenv ("a"); + if (getenv ("a")) return 3; + ]])], + [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no], + [gl_cv_func_unsetenv_works="guessing no"])]) + if test "$gl_cv_func_unsetenv_works" != yes; then + REPLACE_UNSETENV=1 + AC_LIBOBJ([unsetenv]) fi fi ]) diff --git a/gnulib-m4/signbit.m4 b/gnulib-m4/signbit.m4 index 233bf2a3..56ff825f 100644 --- a/gnulib-m4/signbit.m4 +++ b/gnulib-m4/signbit.m4 @@ -1,5 +1,5 @@ # signbit.m4 serial 6 -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2010 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/gnulib-m4/size_max.m4 b/gnulib-m4/size_max.m4 index 35bd3d6a..ce992db1 100644 --- a/gnulib-m4/size_max.m4 +++ b/gnulib-m4/size_max.m4 @@ -1,5 +1,5 @@ # size_max.m4 serial 9 -dnl Copyright (C) 2003, 2005-2006, 2008-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2006, 2008-2010 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/gnulib-m4/stdbool.m4 b/gnulib-m4/stdbool.m4 index 57c804a8..3d672d74 100644 --- a/gnulib-m4/stdbool.m4 +++ b/gnulib-m4/stdbool.m4 @@ -1,6 +1,6 @@ # Check for stdbool.h that conforms to C99. -dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2010 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. @@ -38,77 +38,77 @@ AC_DEFUN([AC_HEADER_STDBOOL], [AC_CACHE_CHECK([for stdbool.h that conforms to C99], [ac_cv_header_stdbool_h], [AC_TRY_COMPILE( - [ - #include <stdbool.h> - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif + [ + #include <stdbool.h> + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif - struct s { _Bool s: 1; _Bool t; } s; + struct s { _Bool s: 1; _Bool t; } s; - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - bool e = &s; - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - #if defined __xlc__ || defined __GNUC__ - /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 - reported by James Lemley on 2005-10-05; see - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - This test is not quite right, since xlc is allowed to - reject this program, as the initializer for xlcbug is - not one of the forms that C requires support for. - However, doing the test right would require a run-time - test, and that would make cross-compilation harder. - Let us hope that IBM fixes the xlc bug, and also adds - support for this kind of constant expression. In the - meantime, this test will reject xlc, which is OK, since - our stdbool.h substitute should suffice. We also test - this with GCC, where it should work, to detect more - quickly whether someone messes up the test in the - future. */ - char digs[] = "0123456789"; - int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); - #endif - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; - ], - [ - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - ], - [ac_cv_header_stdbool_h=yes], - [ac_cv_header_stdbool_h=no])]) + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + bool e = &s; + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + #if defined __xlc__ || defined __GNUC__ + /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 + reported by James Lemley on 2005-10-05; see + http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html + This test is not quite right, since xlc is allowed to + reject this program, as the initializer for xlcbug is + not one of the forms that C requires support for. + However, doing the test right would require a run-time + test, and that would make cross-compilation harder. + Let us hope that IBM fixes the xlc bug, and also adds + support for this kind of constant expression. In the + meantime, this test will reject xlc, which is OK, since + our stdbool.h substitute should suffice. We also test + this with GCC, where it should work, to detect more + quickly whether someone messes up the test in the + future. */ + char digs[] = "0123456789"; + int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); + #endif + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; + ], + [ + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); + ], + [ac_cv_header_stdbool_h=yes], + [ac_cv_header_stdbool_h=no])]) AC_CHECK_TYPES([_Bool]) if test $ac_cv_header_stdbool_h = yes; then AC_DEFINE([HAVE_STDBOOL_H], [1], [Define to 1 if stdbool.h conforms to C99.]) diff --git a/gnulib-m4/stddef_h.m4 b/gnulib-m4/stddef_h.m4 index 682e9c62..c3ae5694 100644 --- a/gnulib-m4/stddef_h.m4 +++ b/gnulib-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 1 -dnl Copyright (C) 2009 Free Software Foundation, Inc. +# stddef_h.m4 serial 2 +dnl Copyright (C) 2009, 2010 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,7 @@ AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) - GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) AC_DEFUN([gl_STDDEF_H_DEFAULTS], diff --git a/gnulib-m4/stdint.m4 b/gnulib-m4/stdint.m4 index a2e8bdd6..1cc57e6e 100644 --- a/gnulib-m4/stdint.m4 +++ b/gnulib-m4/stdint.m4 @@ -1,5 +1,5 @@ # stdint.m4 serial 34 -dnl Copyright (C) 2001-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2010 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. @@ -396,12 +396,12 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + i64) gltype1='__int64';; + u) gltype1='unsigned int';; + ul) gltype1='unsigned long int';; + ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac AC_COMPILE_IFELSE( diff --git a/gnulib-m4/stdint_h.m4 b/gnulib-m4/stdint_h.m4 index 82f0c244..b8e3c6cc 100644 --- a/gnulib-m4/stdint_h.m4 +++ b/gnulib-m4/stdint_h.m4 @@ -1,5 +1,5 @@ # stdint_h.m4 serial 8 -dnl Copyright (C) 1997-2004, 2006, 2008, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2004, 2006, 2008-2010 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/gnulib-m4/stdlib_h.m4 b/gnulib-m4/stdlib_h.m4 index b295f16b..dd84796d 100644 --- a/gnulib-m4/stdlib_h.m4 +++ b/gnulib-m4/stdlib_h.m4 @@ -1,5 +1,5 @@ -# stdlib_h.m4 serial 15 -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +# stdlib_h.m4 serial 28 +dnl Copyright (C) 2007-2010 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,41 +22,75 @@ AC_DEFUN([gl_STDLIB_H], # include <random.h> #endif ]]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use, and which is not + dnl guaranteed by C89. + gl_WARN_ON_USE_PREPARE([[#include <stdlib.h> +#if HAVE_SYS_LOADAVG_H +# include <sys/loadavg.h> +#endif +#if HAVE_RANDOM_H +# include <random.h> +#endif + ]], [atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp + mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r + setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt + unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_STDLIB_H_DEFAULTS], [ - GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) - GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) - GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) + GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) + GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) + GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT]) + GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) + GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) + GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) + GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) + GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) + GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) + GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) + GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX]) + HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) + HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) + HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX]) HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) - HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX]) + HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) + HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) + HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) + HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) + HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) + HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX]) + HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) @@ -64,10 +98,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) + HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV]) - HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) + REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) + REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) + REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) - VOID_UNSETENV=0; AC_SUBST([VOID_UNSETENV]) + REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) ]) diff --git a/gnulib-m4/strerror.m4 b/gnulib-m4/strerror.m4 index 8c16ca9a..1649b245 100644 --- a/gnulib-m4/strerror.m4 +++ b/gnulib-m4/strerror.m4 @@ -1,5 +1,5 @@ # strerror.m4 serial 9 -dnl Copyright (C) 2002, 2007-2008 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2007-2010 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/gnulib-m4/string_h.m4 b/gnulib-m4/string_h.m4 index 11f09c8b..1977aecf 100644 --- a/gnulib-m4/string_h.m4 +++ b/gnulib-m4/string_h.m4 @@ -1,11 +1,11 @@ # Configure a GNU-like replacement for <string.h>. -# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 2007-2010 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. -# serial 7 +# serial 17 # Written by Paul Eggert. @@ -21,13 +21,24 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY], AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([string.h]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use, and which is not + dnl guaranteed by C89. + gl_WARN_ON_USE_PREPARE([[#include <string.h> + ]], + [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup + strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal + strverscmp]) ]) AC_DEFUN([gl_STRING_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], @@ -41,6 +52,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) + GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT]) GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) @@ -64,31 +76,37 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) - GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) + GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) + HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) 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]) - HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) - HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) - HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) - HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) - HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) - HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) - HAVE_STRNDUP=1; AC_SUBST([HAVE_STRNDUP]) - HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) - HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) - HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) - 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]) - HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) - HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) - REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) - REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) - REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) - REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) - REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) - REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) - REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) + HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) + HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) + HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) + HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) + HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) + HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) + HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) + HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) + HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) + HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) + HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) + HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) + 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_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) + HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) + REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) + REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) + REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY]) + REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) + REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) + REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) + REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) + REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) + REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) + REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) + REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) + REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) + UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) ]) diff --git a/gnulib-m4/strncat.m4 b/gnulib-m4/strncat.m4 new file mode 100644 index 00000000..e4ff70e3 --- /dev/null +++ b/gnulib-m4/strncat.m4 @@ -0,0 +1,106 @@ +# strncat.m4 serial 1 +dnl Copyright (C) 2002-2004, 2009-2010 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_ONCE([gl_FUNC_STRNCAT], +[ + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Check for prerequisites for memory fence checks. + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + + dnl Detect bug in Solaris 8..10 on SPARC: + dnl strncat should not dereference more than n bytes, but always dereferences + dnl n+1 bytes if the first n bytes don't contain a NUL byte. + dnl Assume that strncat works on platforms that lack mprotect. + AC_CACHE_CHECK([whether strncat works], [gl_cv_func_strncat_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include <string.h> +#if HAVE_SYS_MMAN_H +# include <fcntl.h> +# include <unistd.h> +# include <sys/types.h> +# include <sys/mman.h> +# ifndef MAP_FILE +# define MAP_FILE 0 +# endif +#endif +]], [[ + char *fence = NULL; +#if HAVE_SYS_MMAN_H && HAVE_MPROTECT +# if HAVE_MAP_ANONYMOUS + const int flags = MAP_ANONYMOUS | MAP_PRIVATE; + const int fd = -1; +# else /* !HAVE_MAP_ANONYMOUS */ + const int flags = MAP_FILE | MAP_PRIVATE; + int fd = open ("/dev/zero", O_RDONLY, 0666); + if (fd >= 0) +# endif + { + int pagesize = getpagesize (); + char *two_pages = + (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, + flags, fd, 0); + if (two_pages != (char *)(-1) + && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) + fence = two_pages + pagesize; + } +#endif + if (fence) + { + char dest[8]; + + dest[0] = '*'; + dest[1] = 'a'; + dest[2] = '\0'; + dest[3] = 'w'; + dest[4] = 'x'; + dest[5] = 'y'; + dest[6] = 'z'; + + *(fence - 3) = '7'; + *(fence - 2) = '2'; + *(fence - 1) = '9'; + + if (strncat (dest + 1, fence - 3, 3) != dest + 1) + return 1; + if (dest[0] != '*') + return 2; + if (dest[1] != 'a' + || dest[2] != '7' || dest[3] != '2' || dest[4] != '9' + || dest[5] != '\0') + return 3; + if (dest[6] != 'z') + return 4; + } + return 0; +]])], [gl_cv_func_strncat_works=yes], [gl_cv_func_strncat_works=no], + [ + case "$host_os" in + # Guess no on Solaris. + solaris*) gl_cv_func_strncat_works="guessing no";; + # Guess yes otherwise. + *) gl_cv_func_strncat_works="guessing yes";; + esac + ]) + ]) + case "$gl_cv_func_strncat_works" in + *yes) ;; + *) + REPLACE_STRNCAT=1 + AC_LIBOBJ([strncat]) + gl_PREREQ_STRNCAT + ;; + esac +]) + +# Prerequisites of lib/strncat.c. +AC_DEFUN([gl_PREREQ_STRNCAT], [ + : +]) diff --git a/gnulib-m4/thread.m4 b/gnulib-m4/thread.m4 new file mode 100644 index 00000000..8e79075b --- /dev/null +++ b/gnulib-m4/thread.m4 @@ -0,0 +1,18 @@ +# thread.m4 serial 2 +dnl Copyright (C) 2008, 2009, 2010 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_THREAD], +[ + AC_REQUIRE([gl_THREADLIB]) + AC_REQUIRE([AC_C_INLINE]) + + if test $gl_threads_api = posix; then + gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBMULTITHREAD" + AC_CHECK_FUNCS([pthread_atfork]) + LIBS="$gl_save_LIBS" + fi +]) diff --git a/gnulib-m4/threadlib.m4 b/gnulib-m4/threadlib.m4 new file mode 100644 index 00000000..05cc4ffa --- /dev/null +++ b/gnulib-m4/threadlib.m4 @@ -0,0 +1,347 @@ +# threadlib.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 2005-2010 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 Bruno Haible. + +dnl gl_THREADLIB +dnl ------------ +dnl Tests for a multithreading library to be used. +dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, +dnl USE_PTH_THREADS, USE_WIN32_THREADS +dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use +dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with +dnl libtool). +dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for +dnl programs that really need multithread functionality. The difference +dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak +dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". +dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for +dnl multithread-safe programs. + +AC_DEFUN([gl_THREADLIB_EARLY], +[ + AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) +]) + +dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once. + +AC_DEFUN([gl_THREADLIB_EARLY_BODY], +[ + dnl Ordering constraints: This macro modifies CPPFLAGS in a way that + dnl influences the result of the autoconf tests that test for *_unlocked + dnl declarations, on AIX 5 at least. Therefore it must come early. + AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl + AC_BEFORE([$0], [gl_ARGP])dnl + + AC_REQUIRE([AC_CANONICAL_HOST]) + 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. + m4_divert_text([DEFAULTS], [gl_use_threads_default=]) + AC_ARG_ENABLE([threads], +AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API]) +AC_HELP_STRING([--disable-threads], [build without multithread safety]), + [gl_use_threads=$enableval], + [if test -n "$gl_use_threads_default"; then + gl_use_threads="$gl_use_threads_default" + else +changequote(,)dnl + case "$host_os" in + dnl Disable multithreading by default on OSF/1, because it interferes + dnl with fork()/exec(): When msgexec is linked with -lpthread, its + dnl child process gets an endless segmentation fault inside execvp(). + dnl Disable multithreading by default on Cygwin 1.5.x, because it has + dnl bugs that lead to endless loops or crashes. See + dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>. + osf*) gl_use_threads=no ;; + cygwin*) + case `uname -r` in + 1.[0-5].*) gl_use_threads=no ;; + *) gl_use_threads=yes ;; + esac + ;; + *) gl_use_threads=yes ;; + esac +changequote([,])dnl + fi + ]) + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # For using <pthread.h>: + case "$host_os" in + osf*) + # On OSF/1, the compiler needs the flag -D_REENTRANT so that it + # groks <pthread.h>. cc also understands the flag -pthread, but + # we don't use it because 1. gcc-2.95 doesn't understand -pthread, + # 2. putting a flag into CPPFLAGS that has an effect on the linker + # causes the AC_TRY_LINK test below to succeed unexpectedly, + # leading to wrong values of LIBTHREAD and LTLIBTHREAD. + CPPFLAGS="$CPPFLAGS -D_REENTRANT" + ;; + esac + # Some systems optimize for single-threaded programs by default, and + # need special flags to disable these optimizations. For example, the + # definition of 'errno' in <errno.h>. + case "$host_os" in + aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; + solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; + esac + fi +]) + +dnl The guts of gl_THREADLIB. Needs to be expanded only once. + +AC_DEFUN([gl_THREADLIB_BODY], +[ + AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) + gl_threads_api=none + LIBTHREAD= + LTLIBTHREAD= + LIBMULTITHREAD= + LTLIBMULTITHREAD= + if test "$gl_use_threads" != no; then + dnl Check whether the compiler and linker support weak declarations. + AC_CACHE_CHECK([whether imported symbols can be declared weak], + [gl_cv_have_weak], + [gl_cv_have_weak=no + dnl First, test whether the compiler accepts it syntactically. + AC_TRY_LINK([extern void xyzzy (); +#pragma weak xyzzy], [xyzzy();], [gl_cv_have_weak=maybe]) + if test $gl_cv_have_weak = maybe; then + dnl Second, test whether it actually works. On Cygwin 1.7.2, with + dnl gcc 4.3, symbols declared weak always evaluate to the address 0. + AC_TRY_RUN([ +#include <stdio.h> +#pragma weak fputs +int main () +{ + return (fputs == NULL); +}], [gl_cv_have_weak=yes], [gl_cv_have_weak=no], + [dnl When cross-compiling, assume that only ELF platforms support + dnl weak symbols. + AC_EGREP_CPP([Extensible Linking Format], + [#ifdef __ELF__ + Extensible Linking Format + #endif + ], + [gl_cv_have_weak="guessing yes"], + [gl_cv_have_weak="guessing no"]) + ]) + fi + ]) + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that + # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY. + AC_CHECK_HEADER([pthread.h], + [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) + if test "$gl_have_pthread_h" = yes; then + # Other possible tests: + # -lpthreads (FSU threads, PCthreads) + # -lgthreads + gl_have_pthread= + # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist + # in libc. IRIX 6.5 has the first one in both libc and libpthread, but + # the second one only in libpthread, and lock.c needs it. + AC_TRY_LINK([#include <pthread.h>], + [pthread_mutex_lock((pthread_mutex_t*)0); + pthread_mutexattr_init((pthread_mutexattr_t*)0);], + [gl_have_pthread=yes]) + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) + if test -n "$gl_have_pthread"; then + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + AC_CHECK_LIB([pthread], [pthread_kill], + [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread + # On Solaris and HP-UX, most pthread functions exist also in libc. + # Therefore pthread_in_use() needs to actually try to create a + # thread: pthread_create from libc will fail, whereas + # pthread_create will actually create a thread. + case "$host_os" in + solaris* | hpux*) + AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], + [Define if the pthread_in_use() detection is hard.]) + esac + ]) + else + # Some library is needed. Try libpthread and libc_r. + AC_CHECK_LIB([pthread], [pthread_kill], + [gl_have_pthread=yes + LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) + if test -z "$gl_have_pthread"; then + # For FreeBSD 4. + AC_CHECK_LIB([c_r], [pthread_kill], + [gl_have_pthread=yes + LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r + LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) + fi + fi + if test -n "$gl_have_pthread"; then + gl_threads_api=posix + AC_DEFINE([USE_POSIX_THREADS], [1], + [Define if the POSIX multithreading library can be used.]) + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], + [Define if references to the POSIX multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + fi + if test -z "$gl_have_pthread"; then + if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then + gl_have_solaristhread= + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lthread" + AC_TRY_LINK([#include <thread.h> +#include <synch.h>], + [thr_self();], + [gl_have_solaristhread=yes]) + LIBS="$gl_save_LIBS" + if test -n "$gl_have_solaristhread"; then + gl_threads_api=solaris + LIBTHREAD=-lthread + LTLIBTHREAD=-lthread + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + AC_DEFINE([USE_SOLARIS_THREADS], [1], + [Define if the old Solaris multithreading library can be used.]) + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1], + [Define if references to the old Solaris multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + if test "$gl_use_threads" = pth; then + gl_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_LINKFLAGS([pth]) + gl_have_pth= + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lpth" + AC_TRY_LINK([#include <pth.h>], [pth_self();], [gl_have_pth=yes]) + LIBS="$gl_save_LIBS" + if test -n "$gl_have_pth"; then + gl_threads_api=pth + LIBTHREAD="$LIBPTH" + LTLIBTHREAD="$LTLIBPTH" + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + AC_DEFINE([USE_PTH_THREADS], [1], + [Define if the GNU Pth multithreading library can be used.]) + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_PTH_THREADS_WEAK], [1], + [Define if references to the GNU Pth multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + else + CPPFLAGS="$gl_save_CPPFLAGS" + fi + fi + if test -z "$gl_have_pthread"; then + if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=win32 + AC_DEFINE([USE_WIN32_THREADS], [1], + [Define if the Win32 multithreading API can be used.]) + fi + fi + fi + fi + AC_MSG_CHECKING([for multithread API to use]) + AC_MSG_RESULT([$gl_threads_api]) + AC_SUBST([LIBTHREAD]) + AC_SUBST([LTLIBTHREAD]) + AC_SUBST([LIBMULTITHREAD]) + AC_SUBST([LTLIBMULTITHREAD]) +]) + +AC_DEFUN([gl_THREADLIB], +[ + AC_REQUIRE([gl_THREADLIB_EARLY]) + AC_REQUIRE([gl_THREADLIB_BODY]) +]) + + +dnl gl_DISABLE_THREADS +dnl ------------------ +dnl Sets the gl_THREADLIB default so that threads are not used by default. +dnl The user can still override it at installation time, by using the +dnl configure option '--enable-threads'. + +AC_DEFUN([gl_DISABLE_THREADS], [ + m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no]) +]) + + +dnl Survey of platforms: +dnl +dnl Platform Available Compiler Supports test-lock +dnl flavours option weak result +dnl --------------- --------- --------- -------- --------- +dnl Linux 2.4/glibc posix -lpthread Y OK +dnl +dnl GNU Hurd/glibc posix +dnl +dnl FreeBSD 5.3 posix -lc_r Y +dnl posix -lkse ? Y +dnl posix -lpthread ? Y +dnl posix -lthr Y +dnl +dnl FreeBSD 5.2 posix -lc_r Y +dnl posix -lkse Y +dnl posix -lthr Y +dnl +dnl FreeBSD 4.0,4.10 posix -lc_r Y OK +dnl +dnl NetBSD 1.6 -- +dnl +dnl OpenBSD 3.4 posix -lpthread Y OK +dnl +dnl MacOS X 10.[123] posix -lpthread Y OK +dnl +dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK +dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK +dnl +dnl HP-UX 11 posix -lpthread N (cc) OK +dnl Y (gcc) +dnl +dnl IRIX 6.5 posix -lpthread Y 0.5 +dnl +dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK +dnl +dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK +dnl -lpthread (gcc) Y +dnl +dnl Cygwin posix -lpthread Y OK +dnl +dnl Any of the above pth -lpth 0.0 +dnl +dnl Mingw win32 N OK +dnl +dnl BeOS 5 -- +dnl +dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is +dnl turned off: +dnl OK if all three tests terminate OK, +dnl 0.5 if the first test terminates OK but the second one loops endlessly, +dnl 0.0 if the first test already loops endlessly. diff --git a/gnulib-m4/unistd_h.m4 b/gnulib-m4/unistd_h.m4 index d7a89e13..b26d0a92 100644 --- a/gnulib-m4/unistd_h.m4 +++ b/gnulib-m4/unistd_h.m4 @@ -1,5 +1,5 @@ -# unistd_h.m4 serial 19 -dnl Copyright (C) 2006-2009 Free Software Foundation, Inc. +# unistd_h.m4 serial 46 +dnl Copyright (C) 2006-2010 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,6 +11,7 @@ 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]) @@ -21,13 +22,33 @@ AC_DEFUN([gl_UNISTD_H], HAVE_UNISTD_H=0 fi AC_SUBST([HAVE_UNISTD_H]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include <unistd.h> +/* Some systems declare various items in the wrong headers. */ +#ifndef __GLIBC__ +# include <fcntl.h> +# include <stdio.h> +# include <stdlib.h> +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# include <io.h> +# endif +#endif + ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat + fsync ftruncate getcwd getdomainname getdtablesize getgroups + gethostname getlogin getlogin_r getpagesize getusershell setusershell + endusershell lchown link linkat lseek pipe2 pread readlink readlinkat + rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep]) ]) AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_UNISTD_H_DEFAULTS], @@ -35,51 +56,98 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) + GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3]) GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) + GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT]) GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) + GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT]) GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) + GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS]) GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) + GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) + GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) + GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) + GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) + GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) + GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) + GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) + GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) + GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT]) GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) + GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) + GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT]) + GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP]) GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) + HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) + HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) + HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) + HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) HAVE_GETDOMAINNAME=1; AC_SUBST([HAVE_GETDOMAINNAME]) HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) + HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) + HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) - HAVE_GETUSERSHELL=1; AC_SUBST([HAVE_GETUSERSHELL]) + HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) HAVE_LINK=1; AC_SUBST([HAVE_LINK]) + HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) + HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) + HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) + HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) + HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) + HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) + HAVE_TTYNAME_R=1; AC_SUBST([HAVE_TTYNAME_R]) + HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) + HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) + HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) + HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) + REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) - REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR]) + REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) + REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) + REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) + REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) + REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) + REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) + REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) + REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) + REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) + REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) + REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) + REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) + REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; diff --git a/gnulib-m4/vasnprintf.m4 b/gnulib-m4/vasnprintf.m4 index 3a1d1e01..ebe3c52c 100644 --- a/gnulib-m4/vasnprintf.m4 +++ b/gnulib-m4/vasnprintf.m4 @@ -1,5 +1,5 @@ -# vasnprintf.m4 serial 29 -dnl Copyright (C) 2002-2004, 2006-2009 Free Software Foundation, Inc. +# vasnprintf.m4 serial 31 +dnl Copyright (C) 2002-2004, 2006-2010 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. @@ -54,6 +54,7 @@ AC_DEFUN([gl_PREREQ_PRINTF_PARSE], # Prerequisites of lib/vasnprintf.c. AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], [ + AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([AC_FUNC_ALLOCA]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) @@ -62,6 +63,17 @@ AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], dnl Use the _snprintf function only if it is declared (because on NetBSD it dnl is defined as a weak alias of snprintf; we prefer to use the latter). AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>]) + dnl We can avoid a lot of code by assuming that snprintf's return value + dnl conforms to ISO C99. So check that. + AC_REQUIRE([gl_SNPRINTF_RETVAL_C99]) + case "$gl_cv_func_snprintf_retval_c99" in + *yes) + AC_DEFINE([HAVE_SNPRINTF_RETVAL_C99], [1], + [Define if the return value of the snprintf function is the number of + of bytes (excluding the terminating NUL) that would have been produced + if the buffer had been large enough.]) + ;; + esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting 'long double' diff --git a/gnulib-m4/warn-on-use.m4 b/gnulib-m4/warn-on-use.m4 new file mode 100644 index 00000000..42daae87 --- /dev/null +++ b/gnulib-m4/warn-on-use.m4 @@ -0,0 +1,45 @@ +# warn-on-use.m4 serial 2 +dnl Copyright (C) 2010 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. + +# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) +# --------------------------------------- +# For each whitespace-separated element in the list of NAMES, define +# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES +# even after being undefined as a macro. +# +# See warn-on-use.h for some hints on how to poison function names, as +# well as ideas on poisoning global variables and macros. NAMES may +# include global variables, but remember that only functions work with +# _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single +# header, but if the replacement header pulls in other headers because +# some systems declare functions in the wrong header, then INCLUDES +# should do likewise. +# +# If you assume C89, then it is generally safe to assume declarations +# for functions declared in that standard (such as gets) without +# needing gl_WARN_ON_USE_PREPARE. +AC_DEFUN([gl_WARN_ON_USE_PREPARE], +[ + m4_foreach_w([gl_decl], [$2], + [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), + [Define to 1 if ]m4_defn([gl_decl])[ is declared even after + undefining macros.])])dnl + for gl_func in m4_flatten([$2]); do + AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl + AC_CACHE_CHECK([whether $gl_func is declared without a macro], + gl_Symbol, + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], +[@%:@undef $gl_func + (void) $gl_func;])], + [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) + AS_VAR_IF(gl_Symbol, [yes], + [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) + dnl shortcut - if the raw declaration exists, then set a cache + dnl variable to allow skipping any later AC_CHECK_DECL efforts + eval ac_cv_have_decl_$gl_func=yes]) + AS_VAR_POPDEF([gl_Symbol])dnl + done +]) diff --git a/gnulib-m4/wchar.m4 b/gnulib-m4/wchar_h.m4 index ce53a45c..8cae82dd 100644 --- a/gnulib-m4/wchar.m4 +++ b/gnulib-m4/wchar_h.m4 @@ -1,23 +1,30 @@ dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues. -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2010 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 Written by Eric Blake. -# wchar.m4 serial 25 +# wchar_h.m4 serial 33 AC_DEFUN([gl_WCHAR_H], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - AC_CACHE_CHECK([whether <wchar.h> is standalone], - [gl_cv_header_wchar_h_standalone], - [AC_COMPILE_IFELSE([[#include <wchar.h> -wchar_t w;]], - [gl_cv_header_wchar_h_standalone=yes], - [gl_cv_header_wchar_h_standalone=no])]) + AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) + dnl Prepare for creating substitute <wchar.h>. + dnl Check for <wchar.h> (missing in Linux uClibc when built without wide + dnl character support). + dnl <wchar.h> is always overridden, because of GNULIB_POSIXCHECK. + AC_CHECK_HEADERS_ONCE([wchar.h]) + gl_CHECK_NEXT_HEADERS([wchar.h]) + if test $ac_cv_header_wchar_h = yes; then + HAVE_WCHAR_H=1 + else + HAVE_WCHAR_H=0 + fi + AC_SUBST([HAVE_WCHAR_H]) AC_REQUIRE([gt_TYPE_WINT_T]) if test $gt_cv_c_wint_t = yes; then @@ -27,39 +34,82 @@ wchar_t w;]], fi AC_SUBST([HAVE_WINT_T]) - dnl If <stddef.h> is replaced, then <wchar.h> must also be replaced. - AC_REQUIRE([gl_STDDEF_H]) - - if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes || test -n "$STDDEF_H"; then - WCHAR_H=wchar.h - fi + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[ +/* Some systems require additional headers. */ +#ifndef __GLIBC__ +# include <stddef.h> +# include <stdio.h> +# include <time.h> +#endif +#include <wchar.h> + ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb + wcsrtombs wcsnrtombs wcwidth]) +]) - dnl Prepare for creating substitute <wchar.h>. - dnl Do it always: WCHAR_H may be empty here but can be set later. - dnl Check for <wchar.h> (missing in Linux uClibc when built without wide - dnl character support). - AC_CHECK_HEADERS_ONCE([wchar.h]) - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 +dnl Check whether <wchar.h> is usable at all. +AC_DEFUN([gl_WCHAR_H_INLINE_OK], +[ + dnl Test whether <wchar.h> suffers due to the transition from '__inline' to + dnl 'gnu_inline'. See <http://sourceware.org/bugzilla/show_bug.cgi?id=4022> + dnl and <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary, + dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and + dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>. + AC_CACHE_CHECK([whether <wchar.h> uses 'inline' correctly], + [gl_cv_header_wchar_h_correct_inline], + [gl_cv_header_wchar_h_correct_inline=yes + AC_LANG_CONFTEST([ + AC_LANG_SOURCE([[#define wcstod renamed_wcstod +#include <wchar.h> +extern int zero (void); +int main () { return zero(); } +]])]) + if AC_TRY_EVAL([ac_compile]); then + mv conftest.$ac_objext conftest1.$ac_objext + AC_LANG_CONFTEST([ + AC_LANG_SOURCE([[#define wcstod renamed_wcstod +#include <wchar.h> +int zero (void) { return 0; } +]])]) + if AC_TRY_EVAL([ac_compile]); then + mv conftest.$ac_objext conftest2.$ac_objext + if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then + : + else + gl_cv_header_wchar_h_correct_inline=no + fi + fi + fi + rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext + ]) + if test $gl_cv_header_wchar_h_correct_inline = no; then + AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). +This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in +C99 mode. You have four options: + - Add the flag -fgnu89-inline to CC and reconfigure, or + - Fix your include files, using parts of + <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or + - Use a gcc version older than 4.3, or + - Don't use the flags -std=c99 or -std=gnu99. +Configuration aborted.]) fi - AC_SUBST([HAVE_WCHAR_H]) - gl_CHECK_NEXT_HEADERS([wchar.h]) ]) dnl Unconditionally enables the replacement of <wchar.h>. AC_DEFUN([gl_REPLACE_WCHAR_H], [ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - WCHAR_H=wchar.h + dnl This is a no-op, because <wchar.h> is always overridden. + : ]) AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_WCHAR_H_DEFAULTS], @@ -99,5 +149,4 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS], REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS]) REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS]) REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) - WCHAR_H=''; AC_SUBST([WCHAR_H]) ]) diff --git a/gnulib-m4/wchar_t.m4 b/gnulib-m4/wchar_t.m4 index fb27a7f6..ed804e66 100644 --- a/gnulib-m4/wchar_t.m4 +++ b/gnulib-m4/wchar_t.m4 @@ -1,5 +1,5 @@ # wchar_t.m4 serial 3 (gettext-0.18) -dnl Copyright (C) 2002-2003, 2008, 2009 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2003, 2008-2010 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/gnulib-m4/wctob.m4 b/gnulib-m4/wctob.m4 index 39270c9d..3af3cc7b 100644 --- a/gnulib-m4/wctob.m4 +++ b/gnulib-m4/wctob.m4 @@ -1,5 +1,5 @@ -# wctob.m4 serial 4 -dnl Copyright (C) 2008-2009 Free Software Foundation, Inc. +# wctob.m4 serial 5 +dnl Copyright (C) 2008-2010 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. @@ -17,6 +17,8 @@ AC_DEFUN([gl_FUNC_WCTOB], else dnl Solaris 9 has the wctob() function but it does not work. + dnl Cygwin 1.7.2 has the wctob() function but it clobbers caller-owned + dnl registers, see <http://cygwin.com/ml/cygwin/2010-05/msg00015.html>. AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles @@ -27,14 +29,35 @@ AC_DEFUN([gl_FUNC_WCTOB], dnl is present. changequote(,)dnl case "$host_os" in - # Guess no on Solaris <= 9. - solaris2.[1-9] | solaris2.[1-9].*) + # Guess no on Solaris <= 9 and Cygwin. + solaris2.[1-9] | solaris2.[1-9].* | cygwin*) gl_cv_func_wctob_works="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_wctob_works="guessing yes" ;; esac changequote([,])dnl - if test $LOCALE_FR != none; then + case "$host_os" in + cygwin*) + AC_TRY_RUN([ +#include <locale.h> +#include <wchar.h> + +register long global __asm__ ("%ebx"); + +int main () +{ + setlocale (LC_ALL, "en_US.UTF-8"); + + global = 0x12345678; + if (wctob (0x00FC) != -1) + return 1; + if (global != 0x12345678) + return 2; + return 0; +}], [:], [gl_cv_func_wctob_works=no], [:]) + ;; + esac + if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then AC_TRY_RUN([ #include <locale.h> #include <string.h> diff --git a/gnulib-m4/wctype.m4 b/gnulib-m4/wctype_h.m4 index 6a1b6f07..32924514 100644 --- a/gnulib-m4/wctype.m4 +++ b/gnulib-m4/wctype_h.m4 @@ -1,8 +1,8 @@ -# wctype.m4 serial 2 +# wctype_h.m4 serial 6 dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it. -dnl Copyright (C) 2006-2008 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2010 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. @@ -12,6 +12,7 @@ dnl Written by Paul Eggert. AC_DEFUN([gl_WCTYPE_H], [ AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS_ONCE([iswcntrl]) if test $ac_cv_func_iswcntrl = yes; then HAVE_ISWCNTRL=1 @@ -19,6 +20,13 @@ AC_DEFUN([gl_WCTYPE_H], HAVE_ISWCNTRL=0 fi AC_SUBST([HAVE_ISWCNTRL]) + AC_CHECK_FUNCS_ONCE([iswblank]) + if test $ac_cv_func_iswblank = yes; then + HAVE_ISWBLANK=1 + else + HAVE_ISWBLANK=0 + fi + AC_SUBST([HAVE_ISWBLANK]) AC_CHECK_HEADERS_ONCE([wctype.h]) AC_REQUIRE([AC_C_INLINE]) @@ -30,40 +38,34 @@ AC_DEFUN([gl_WCTYPE_H], fi AC_SUBST([HAVE_WINT_T]) - WCTYPE_H=wctype.h if test $ac_cv_header_wctype_h = yes; then if test $ac_cv_func_iswcntrl = yes; then dnl Linux libc5 has an iswprint function that returns 0 for all arguments. dnl The other functions are likely broken in the same way. AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works], [ - AC_TRY_RUN([#include <stddef.h> - #include <stdio.h> - #include <time.h> - #include <wchar.h> - #include <wctype.h> - int main () { return iswprint ('x') == 0; }], + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include <stddef.h> + #include <stdio.h> + #include <time.h> + #include <wchar.h> + #include <wctype.h> + int main () { return iswprint ('x') == 0; }]])], [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no], - [AC_TRY_COMPILE([#include <stdlib.h> + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h> #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. - #endif], [], + #endif]], [])], [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no]) ]) ]) - if test $gl_cv_func_iswcntrl_works = yes; then - WCTYPE_H= - fi fi - dnl Compute NEXT_WCTYPE_H even if WCTYPE_H is empty, - dnl for the benefit of builds from non-distclean directories. gl_CHECK_NEXT_HEADERS([wctype.h]) HAVE_WCTYPE_H=1 else HAVE_WCTYPE_H=0 fi AC_SUBST([HAVE_WCTYPE_H]) - AC_SUBST([WCTYPE_H]) if test "$gl_cv_func_iswcntrl_works" = no; then REPLACE_ISWCNTRL=1 diff --git a/gnulib-m4/wcwidth.m4 b/gnulib-m4/wcwidth.m4 index 9cacb56f..acceba54 100644 --- a/gnulib-m4/wcwidth.m4 +++ b/gnulib-m4/wcwidth.m4 @@ -1,5 +1,5 @@ -# wcwidth.m4 serial 15 -dnl Copyright (C) 2006-2009 Free Software Foundation, Inc. +# wcwidth.m4 serial 16 +dnl Copyright (C) 2006-2010 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. @@ -34,9 +34,7 @@ AC_DEFUN([gl_FUNC_WCWIDTH], HAVE_DECL_WCWIDTH=0 fi - if test $ac_cv_func_wcwidth = no; then - REPLACE_WCWIDTH=1 - else + if test $ac_cv_func_wcwidth = yes; then dnl On MacOS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1. dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1. dnl This leads to bugs in 'ls' (coreutils). @@ -84,11 +82,13 @@ changequote([,])dnl *no) REPLACE_WCWIDTH=1 ;; esac fi - if test $REPLACE_WCWIDTH = 1; then + if test $ac_cv_func_wcwidth != yes || test $REPLACE_WCWIDTH = 1; then AC_LIBOBJ([wcwidth]) fi - - if test $REPLACE_WCWIDTH = 1 || test $HAVE_DECL_WCWIDTH = 0; then + if test $ac_cv_func_wcwidth != yes || test $REPLACE_WCWIDTH = 1 \ + || test $HAVE_DECL_WCWIDTH = 0; then gl_REPLACE_WCHAR_H fi + dnl We don't substitute HAVE_WCWIDTH. We assume that if the system does not + dnl have the wcwidth function, then it does not declare it. ]) diff --git a/gnulib-m4/wint_t.m4 b/gnulib-m4/wint_t.m4 index 47a4363d..a6c7d15c 100644 --- a/gnulib-m4/wint_t.m4 +++ b/gnulib-m4/wint_t.m4 @@ -1,5 +1,5 @@ # wint_t.m4 serial 4 (gettext-0.18) -dnl Copyright (C) 2003, 2007-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007-2010 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/gnulib-m4/xalloc.m4 b/gnulib-m4/xalloc.m4 index 837a948c..83247fe3 100644 --- a/gnulib-m4/xalloc.m4 +++ b/gnulib-m4/xalloc.m4 @@ -1,5 +1,6 @@ # xalloc.m4 serial 16 -dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free Software +dnl 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/gnulib-m4/xsize.m4 b/gnulib-m4/xsize.m4 index 631893cf..b653693a 100644 --- a/gnulib-m4/xsize.m4 +++ b/gnulib-m4/xsize.m4 @@ -1,5 +1,5 @@ # xsize.m4 serial 4 -dnl Copyright (C) 2003-2004, 2008 Free Software Foundation, Inc. +dnl Copyright (C) 2003-2004, 2008-2010 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/gnulib-m4/yield.m4 b/gnulib-m4/yield.m4 new file mode 100644 index 00000000..7a543e4e --- /dev/null +++ b/gnulib-m4/yield.m4 @@ -0,0 +1,19 @@ +# yield.m4 serial 2 +dnl Copyright (C) 2005-2010 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_YIELD], +[ + AC_REQUIRE([gl_THREADLIB]) + dnl On some systems, sched_yield is in librt, rather than in libpthread. + YIELD_LIB= + if test $gl_threads_api = posix; then + dnl Solaris has sched_yield in librt, not in libpthread or libc. + AC_CHECK_LIB([rt], [sched_yield], [YIELD_LIB=-lrt], + [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt. + AC_CHECK_LIB([posix4], [sched_yield], [YIELD_LIB=-lposix4])]) + fi + AC_SUBST([YIELD_LIB]) +]) |