X-Git-Url: https://git.cworth.org/git?p=tar;a=blobdiff_plain;f=configure;fp=configure;h=391e3d6dbce5c932515ab8bab6ed464260a4ade5;hp=07f25273c5b7d5716cd70bba007a4baa63b17fde;hb=ee168310ec4227174ace489bf5f81f8c2f91cde0;hpb=22f1eb8bc17e5be72dd23d42d6aaa60196ac22e6 diff --git a/configure b/configure index 07f2527..391e3d6 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for GNU tar 1.23. +# Generated by GNU Autoconf 2.63 for GNU tar 1.24. # # Report bugs to . # @@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='GNU tar' PACKAGE_TARNAME='tar' -PACKAGE_VERSION='1.23' -PACKAGE_STRING='GNU tar 1.23' +PACKAGE_VERSION='1.24' +PACKAGE_STRING='GNU tar 1.24' PACKAGE_BUGREPORT='bug-tar@gnu.org' ac_unique_file="src/tar.c" @@ -680,18 +680,26 @@ PU_RMT_PROG LIB_SETSOCKOPT LIBGNU_LTLIBDEPS LIBGNU_LIBDEPS +gltests_WITNESS REPLACE_ISWCNTRL HAVE_WCTYPE_H NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H NEXT_WCTYPE_H +REPLACE_ISWBLANK +HAVE_ISWBLANK HAVE_ISWCNTRL HAVE_WINT_T HAVE_WCHAR_H NEXT_AS_FIRST_DIRECTIVE_WCHAR_H NEXT_WCHAR_H +LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE +LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE +LIBUNISTRING_UNIWIDTH_H +LIBUNISTRING_UNITYPES_H HAVE_UNISTD_H NEXT_AS_FIRST_DIRECTIVE_UNISTD_H NEXT_UNISTD_H +PTHREAD_H_DEFINES_STRUCT_TIMESPEC SYS_TIME_H_DEFINES_STRUCT_TIMESPEC TIME_H_DEFINES_STRUCT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_TIME_H @@ -713,6 +721,7 @@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H NEXT_STDLIB_H NEXT_AS_FIRST_DIRECTIVE_STDIO_H NEXT_STDIO_H +ASM_SYMBOL_PREFIX NEXT_AS_FIRST_DIRECTIVE_STDDEF_H NEXT_STDDEF_H STDDEF_H @@ -722,10 +731,14 @@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H NEXT_STDARG_H STDARG_H REPLACE_TIMEGM -REPLACE_STRPTIME REPLACE_NANOSLEEP REPLACE_MKTIME REPLACE_LOCALTIME_R +HAVE_TIMEGM +HAVE_STRPTIME +HAVE_NANOSLEEP +HAVE_LOCALTIME_R +GNULIB_TIME_R GNULIB_TIMEGM GNULIB_STRPTIME GNULIB_NANOSLEEP @@ -733,16 +746,18 @@ GNULIB_MKTIME UNDEFINE_STRTOK_R REPLACE_STRTOK_R REPLACE_STRSIGNAL +REPLACE_STRNLEN REPLACE_STRNDUP +REPLACE_STRNCAT REPLACE_STRERROR REPLACE_STRCASESTR REPLACE_STRSTR REPLACE_STRDUP +REPLACE_STPNCPY REPLACE_MEMMEM REPLACE_MEMCHR HAVE_STRVERSCMP HAVE_DECL_STRSIGNAL -HAVE_DECL_STRERROR HAVE_DECL_STRTOK_R HAVE_STRCASESTR HAVE_STRSEP @@ -757,6 +772,7 @@ HAVE_RAWMEMCHR HAVE_DECL_MEMRCHR HAVE_MEMPCPY HAVE_DECL_MEMMEM +HAVE_MEMCHR HAVE_MBSLEN GNULIB_STRVERSCMP GNULIB_STRSIGNAL @@ -782,6 +798,7 @@ GNULIB_STRSEP GNULIB_STRPBRK GNULIB_STRNLEN GNULIB_STRNDUP +GNULIB_STRNCAT GNULIB_STRDUP GNULIB_STRCHRNUL GNULIB_STPNCPY @@ -796,7 +813,9 @@ LOCALE_ZH_CN LOCALE_JA LOCALCHARSET_TESTS_ENVIRONMENT GLIBC21 +HAVE_LANGINFO_YESEXPR HAVE_LANGINFO_ERA +HAVE_LANGINFO_T_FMT_AMPM HAVE_LANGINFO_CODESET HAVE_LANGINFO_H NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H @@ -844,6 +863,8 @@ HAVE_SYS_TYPES_H HAVE_INTTYPES_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT +HAVE__BOOL +STDBOOL_H NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H NEXT_SYS_TIME_H REPLACE_GETTIMEOFDAY @@ -856,8 +877,6 @@ LIBINTL HAVE_GETOPT_H NEXT_AS_FIRST_DIRECTIVE_GETOPT_H NEXT_GETOPT_H -HAVE__BOOL -STDBOOL_H FNMATCH_H FLOAT_H NEXT_AS_FIRST_DIRECTIVE_FLOAT_H @@ -870,6 +889,7 @@ REPLACE_VPRINTF REPLACE_VFPRINTF REPLACE_VDPRINTF REPLACE_VASPRINTF +REPLACE_TMPFILE REPLACE_STDIO_WRITE_FUNCS REPLACE_SPRINTF REPLACE_SNPRINTF @@ -896,6 +916,8 @@ REPLACE_DPRINTF HAVE_VDPRINTF HAVE_VASPRINTF HAVE_RENAMEAT +HAVE_FTELLO +HAVE_FSEEKO HAVE_DPRINTF HAVE_DECL_VSNPRINTF HAVE_DECL_SNPRINTF @@ -911,6 +933,7 @@ GNULIB_VFPRINTF_POSIX GNULIB_VFPRINTF GNULIB_VDPRINTF GNULIB_VASPRINTF +GNULIB_TMPFILE GNULIB_STDIO_H_SIGPIPE GNULIB_SPRINTF_POSIX GNULIB_SNPRINTF @@ -994,15 +1017,18 @@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H NEXT_ERRNO_H NEXT_AS_FIRST_DIRECTIVE_DIRENT_H NEXT_DIRENT_H +PRAGMA_COLUMNS PRAGMA_SYSTEM_HEADER INCLUDE_NEXT_AS_FIRST_DIRECTIVE INCLUDE_NEXT REPLACE_OPENDIR REPLACE_FDOPENDIR +REPLACE_DIRFD REPLACE_CLOSEDIR HAVE_ALPHASORT HAVE_SCANDIR HAVE_FDOPENDIR +HAVE_DECL_FDOPENDIR HAVE_DECL_DIRFD GNULIB_ALPHASORT GNULIB_SCANDIR @@ -1015,10 +1041,12 @@ REPLACE_WRITE REPLACE_USLEEP REPLACE_UNLINKAT REPLACE_UNLINK +REPLACE_TTYNAME_R REPLACE_SYMLINK REPLACE_SLEEP REPLACE_RMDIR REPLACE_READLINK +REPLACE_PWRITE REPLACE_PREAD REPLACE_LSEEK REPLACE_LINKAT @@ -1028,28 +1056,30 @@ REPLACE_GETPAGESIZE REPLACE_GETGROUPS REPLACE_GETCWD REPLACE_FCHOWNAT -REPLACE_FCHDIR REPLACE_DUP2 REPLACE_DUP REPLACE_CLOSE REPLACE_CHOWN -HAVE_USLEEP -HAVE_UNLINKAT HAVE_SYS_PARAM_H HAVE_OS_H +HAVE_DECL_GETUSERSHELL +HAVE_DECL_GETPAGESIZE HAVE_DECL_GETLOGIN_R HAVE_DECL_ENVIRON +HAVE_USLEEP +HAVE_UNLINKAT +HAVE_TTYNAME_R HAVE_SYMLINKAT HAVE_SYMLINK HAVE_SLEEP HAVE_READLINKAT HAVE_READLINK +HAVE_PWRITE HAVE_PREAD HAVE_PIPE2 HAVE_LINKAT HAVE_LINK HAVE_LCHOWN -HAVE_GETUSERSHELL HAVE_GETPAGESIZE HAVE_GETLOGIN HAVE_GETHOSTNAME @@ -1059,6 +1089,7 @@ HAVE_GETDOMAINNAME HAVE_FTRUNCATE HAVE_FSYNC HAVE_FCHOWNAT +HAVE_FCHDIR HAVE_FACCESSAT HAVE_EUIDACCESS HAVE_DUP3 @@ -1070,12 +1101,14 @@ GNULIB_UNLINKAT GNULIB_UNLINK GNULIB_UNISTD_H_SIGPIPE GNULIB_UNISTD_H_GETOPT +GNULIB_TTYNAME_R GNULIB_SYMLINKAT GNULIB_SYMLINK GNULIB_SLEEP GNULIB_RMDIR GNULIB_READLINKAT GNULIB_READLINK +GNULIB_PWRITE GNULIB_PREAD GNULIB_PIPE2 GNULIB_LSEEK @@ -1106,10 +1139,14 @@ REPLACE_UNSETENV REPLACE_STRTOD REPLACE_SETENV REPLACE_REALPATH +REPLACE_REALLOC REPLACE_PUTENV REPLACE_MKSTEMP +REPLACE_MALLOC REPLACE_CANONICALIZE_FILE_NAME +REPLACE_CALLOC HAVE_UNSETENV +HAVE_UNLOCKPT HAVE_SYS_LOADAVG_H HAVE_STRUCT_RANDOM_DATA HAVE_STRTOULL @@ -1118,19 +1155,22 @@ HAVE_STRTOD HAVE_SETENV HAVE_RPMATCH HAVE_REALPATH -HAVE_REALLOC_POSIX HAVE_RANDOM_R +HAVE_PTSNAME HAVE_MKSTEMPS +HAVE_MKSTEMP HAVE_MKOSTEMPS HAVE_MKOSTEMP HAVE_MKDTEMP -HAVE_MALLOC_POSIX +HAVE_GRANTPT HAVE_GETSUBOPT HAVE_DECL_GETLOADAVG HAVE_CANONICALIZE_FILE_NAME -HAVE_CALLOC_POSIX HAVE_ATOLL +HAVE__EXIT GNULIB_UNSETENV +GNULIB_UNLOCKPT +GNULIB_SYSTEM_POSIX GNULIB_STRTOULL GNULIB_STRTOLL GNULIB_STRTOD @@ -1140,17 +1180,20 @@ GNULIB_REALPATH GNULIB_REALLOC_POSIX GNULIB_RANDOM_R GNULIB_PUTENV +GNULIB_PTSNAME GNULIB_MKSTEMPS GNULIB_MKSTEMP GNULIB_MKOSTEMPS GNULIB_MKOSTEMP GNULIB_MKDTEMP GNULIB_MALLOC_POSIX +GNULIB_GRANTPT GNULIB_GETSUBOPT GNULIB_GETLOADAVG GNULIB_CANONICALIZE_FILE_NAME GNULIB_CALLOC_POSIX GNULIB_ATOLL +GNULIB__EXIT LOCALE_FR REPLACE_WCWIDTH REPLACE_WCSNRTOMBS @@ -1876,7 +1919,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU tar 1.23 to adapt to many kinds of systems. +\`configure' configures GNU tar 1.24 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1946,7 +1989,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU tar 1.23:";; + short | recursive ) echo "Configuration of GNU tar 1.24:";; esac cat <<\_ACEOF @@ -2084,7 +2127,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU tar configure 1.23 +GNU tar configure 1.24 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -2098,7 +2141,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU tar $as_me 1.23, which was +It was created by GNU tar $as_me 1.24, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2381,10 +2424,8 @@ ac_header_list="$ac_header_list memory.h" ac_header_list="$ac_header_list net/errno.h" ac_header_list="$ac_header_list sgtty.h" ac_header_list="$ac_header_list string.h" -ac_header_list="$ac_header_list stropts.h" ac_header_list="$ac_header_list sys/param.h" ac_header_list="$ac_header_list sys/device.h" -ac_header_list="$ac_header_list sys/filio.h" ac_header_list="$ac_header_list sys/gentape.h" ac_header_list="$ac_header_list sys/inet.h" ac_header_list="$ac_header_list sys/io/trioctl.h" @@ -2401,6 +2442,8 @@ ac_header_list="$ac_header_list linewrap.h" ac_func_list="$ac_func_list pathconf" ac_func_list="$ac_func_list btowc" ac_func_list="$ac_func_list canonicalize_file_name" +ac_func_list="$ac_func_list getcwd" +ac_func_list="$ac_func_list readlink" ac_func_list="$ac_func_list realpath" ac_func_list="$ac_func_list chown" ac_func_list="$ac_func_list fchown" @@ -2410,11 +2453,11 @@ ac_func_list="$ac_func_list dup2" ac_header_list="$ac_header_list errno.h" ac_func_list="$ac_func_list fchdir" ac_func_list="$ac_func_list fcntl" +ac_func_list="$ac_func_list mempcpy" ac_header_list="$ac_header_list float.h" ac_func_list="$ac_func_list isblank" ac_func_list="$ac_func_list iswctype" ac_func_list="$ac_func_list mbsrtowcs" -ac_func_list="$ac_func_list mempcpy" ac_func_list="$ac_func_list wmemchr" ac_func_list="$ac_func_list wmemcpy" ac_func_list="$ac_func_list wmempcpy" @@ -2422,7 +2465,7 @@ ac_header_list="$ac_header_list wctype.h" gl_fnmatch_required=GNU ac_header_list="$ac_header_list stdio_ext.h" ac_func_list="$ac_func_list __fpending" -ac_func_list="$ac_func_list ftruncate" +ac_func_list="$ac_func_list futimens" ac_func_list="$ac_func_list getdelim" ac_func_list="$ac_func_list getdtablesize" gl_getopt_required=GNU @@ -2434,45 +2477,58 @@ ac_header_list="$ac_header_list wchar.h" ac_header_list="$ac_header_list inttypes.h" ac_header_list="$ac_header_list langinfo.h" ac_func_list="$ac_func_list lchmod" +ac_func_list="$ac_func_list link" +ac_func_list="$ac_func_list linkat" +ac_func_list="$ac_func_list symlink" ac_func_list="$ac_func_list lstat" ac_func_list="$ac_func_list mbsinit" ac_func_list="$ac_func_list mbrtowc" ac_header_list="$ac_header_list sys/mman.h" ac_func_list="$ac_func_list mprotect" +ac_func_list="$ac_func_list memchr" +ac_func_list="$ac_func_list mkfifo" +ac_func_list="$ac_func_list mkfifoat" +ac_func_list="$ac_func_list mknodat" +ac_func_list="$ac_func_list mknod" ac_func_list="$ac_func_list alarm" ac_func_list="$ac_func_list nl_langinfo" -ac_func_list="$ac_func_list readlink" +ac_header_list="$ac_header_list priv.h" +ac_func_list="$ac_func_list readlinkat" ac_func_list="$ac_func_list wcscoll" +ac_func_list="$ac_func_list renameat" ac_func_list="$ac_func_list setenv" ac_func_list="$ac_func_list sleep" ac_header_list="$ac_header_list stdarg.h" ac_header_list="$ac_header_list stddef.h" ac_header_list="$ac_header_list stdio.h" ac_header_list="$ac_header_list stdlib.h" +ac_func_list="$ac_func_list strdup" ac_header_list="$ac_header_list sys/socket.h" ac_header_list="$ac_header_list strings.h" ac_func_list="$ac_func_list strndup" +ac_func_list="$ac_func_list symlinkat" ac_header_list="$ac_header_list sys/stat.h" ac_header_list="$ac_header_list sysexits.h" ac_header_list="$ac_header_list time.h" +ac_func_list="$ac_func_list localtime_r" ac_func_list="$ac_func_list pipe" -ac_header_list="$ac_header_list priv.h" ac_header_list="$ac_header_list utime.h" ac_func_list="$ac_func_list futimes" ac_func_list="$ac_func_list futimesat" -ac_func_list="$ac_func_list futimens" ac_func_list="$ac_func_list utimensat" ac_func_list="$ac_func_list lutimes" ac_func_list="$ac_func_list vasnprintf" ac_func_list="$ac_func_list wcrtomb" ac_func_list="$ac_func_list iswcntrl" +ac_func_list="$ac_func_list iswblank" ac_func_list="$ac_func_list wcwidth" ac_header_list="$ac_header_list netdb.h" ac_header_list="$ac_header_list sys/wait.h" ac_header_list="$ac_header_list pwd.h" ac_header_list="$ac_header_list grp.h" -ac_func_list="$ac_func_list mkfifo" ac_func_list="$ac_func_list setlocale" +ac_func_list="$ac_func_list fchmod" +ac_func_list="$ac_func_list fsync" gt_needs="$gt_needs need-formatstring-macros" # Check that the precious variables saved in the cache have kept the same # value. @@ -3063,7 +3119,7 @@ fi # Define the identity of the package. PACKAGE='tar' - VERSION='1.23' + VERSION='1.24' cat >>confdefs.h <<_ACEOF @@ -6028,9 +6084,206 @@ esac - - - + # Code from module alloca: + # Code from module alloca-opt: + # Code from module areadlink: + # Code from module areadlinkat: + # Code from module arg-nonnull: + # Code from module argmatch: + # Code from module argp: + # Code from module argp-version-etc: + # Code from module backupfile: + # Code from module bitrotate: + # Code from module btowc: + # Code from module c++defs: + # Code from module c-ctype: + # Code from module canonicalize-lgpl: + # Code from module chdir-long: + # Code from module chown: + # Code from module clock-time: + # Code from module cloexec: + # Code from module close: + # Code from module close-hook: + # Code from module close-stream: + # Code from module closeout: + # Code from module configmake: + # Code from module d-ino: + # Code from module dirent: + # Code from module dirent-safer: + # Code from module dirfd: + # Code from module dirname: + # Code from module dirname-lgpl: + # Code from module double-slash-root: + # Code from module dup2: + # Code from module environ: + # Code from module errno: + # Code from module error: + # Code from module exclude: + # Code from module exitfail: + # Code from module extensions: + + # Code from module fchdir: + # Code from module fclose: + # Code from module fcntl: + # Code from module fcntl-h: + # Code from module fdopendir: + # Code from module fdutimensat: + # Code from module fileblocks: + # Code from module filenamecat-lgpl: + # Code from module float: + # Code from module fnmatch: + # Code from module fnmatch-gnu: + # Code from module fpending: + # Code from module fseeko: + + # Code from module full-write: + # Code from module futimens: + # Code from module getcwd: + # Code from module getdelim: + # Code from module getdtablesize: + # Code from module getline: + # Code from module getopt-gnu: + # Code from module getopt-posix: + # Code from module getpagesize: + # Code from module gettext: + # Code from module gettext-h: + # Code from module gettime: + # Code from module gettimeofday: + # Code from module gitlog-to-changelog: + # Code from module hash: + # Code from module havelib: + # Code from module human: + # Code from module include_next: + # Code from module inline: + # Code from module intprops: + # Code from module inttostr: + # Code from module inttypes: + # Code from module langinfo: + # Code from module lchown: + # Code from module link: + # Code from module link-follow: + # Code from module linkat: + # Code from module localcharset: + # Code from module lseek: + # Code from module lstat: + # Code from module malloc-gnu: + # Code from module malloc-posix: + # Code from module malloca: + # Code from module mbchar: + # Code from module mbrtowc: + # Code from module mbscasecmp: + # Code from module mbsinit: + # Code from module mbsrtowcs: + # Code from module mbuiter: + # Code from module memchr: + # Code from module mempcpy: + # Code from module memrchr: + # Code from module mkdir: + # Code from module mkdtemp: + # Code from module mkfifo: + # Code from module mkfifoat: + # Code from module mknod: + # Code from module mktime: + # Code from module modechange: + # Code from module multiarch: + # Code from module nl_langinfo: + # Code from module obstack: + # Code from module open: + # Code from module openat: + # Code from module openat-die: + # Code from module parse-datetime: + # Code from module pathmax: + # Code from module priv-set: + # Code from module progname: + # Code from module quote: + # Code from module quotearg: + # Code from module quotearg-simple: + # Code from module rawmemchr: + # Code from module readlink: + # Code from module readlinkat: + # Code from module realloc-posix: + # Code from module regex: + # Code from module rename: + # Code from module renameat: + # Code from module rmdir: + # Code from module rpmatch: + # Code from module safe-read: + # Code from module safe-write: + # Code from module same-inode: + # Code from module save-cwd: + # Code from module savedir: + # Code from module setenv: + # Code from module size_max: + # Code from module sleep: + # Code from module snprintf: + # Code from module ssize_t: + # Code from module stat: + # Code from module stat-macros: + # Code from module stat-time: + # Code from module stdarg: + + # Code from module stdbool: + # Code from module stddef: + # Code from module stdint: + # Code from module stdio: + # Code from module stdlib: + # Code from module stpcpy: + # Code from module strcase: + # Code from module strchrnul: + # Code from module strdup-posix: + # Code from module streq: + # Code from module strerror: + # Code from module string: + # Code from module strings: + # Code from module strndup: + # Code from module strnlen: + # Code from module strnlen1: + # Code from module strtoimax: + # Code from module strtol: + # Code from module strtoll: + # Code from module strtoul: + # Code from module strtoull: + # Code from module strtoumax: + # Code from module symlink: + # Code from module symlinkat: + # Code from module sys_stat: + # Code from module sys_time: + # Code from module sysexits: + # Code from module tempname: + # Code from module time: + # Code from module time_r: + # Code from module timespec: + # Code from module unistd: + # Code from module unistd-safer: + # Code from module unitypes: + # Code from module uniwidth/base: + # Code from module uniwidth/width: + # Code from module unlink: + # Code from module unlinkdir: + # Code from module unlocked-io: + # Code from module unsetenv: + # Code from module utimens: + # Code from module utimensat: + # Code from module vasnprintf: + # Code from module vasprintf: + # Code from module verify: + # Code from module version-etc: + # Code from module version-etc-fsf: + # Code from module vsnprintf: + # Code from module warn-on-use: + # Code from module wchar: + # Code from module wcrtomb: + # Code from module wctype: + # Code from module wcwidth: + # Code from module write: + # Code from module xalloc: + # Code from module xalloc-die: + # Code from module xgetcwd: + # Code from module xsize: + # Code from module xstrndup: + # Code from module xstrtol: + # Code from module xstrtoumax: + # Code from module xvasprintf: # Check whether --enable-largefile was given. @@ -6766,14 +7019,6 @@ done - - - - - - - - @@ -8768,7 +9013,7 @@ int main () { int x = sizeof (ssize_t *) + sizeof (ssize_t); - return !x; + return !x; ; return 0; } @@ -8819,6 +9064,8 @@ _ACEOF + LIBC_FATAL_STDERR_=1 + export LIBC_FATAL_STDERR_ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! @@ -9216,16 +9463,16 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ 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 main () { 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) ; return 0; } @@ -10845,11 +11092,14 @@ int main () { is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) return 1; } #endif @@ -10921,6 +11171,10 @@ $as_echo "$gt_cv_locale_fr" >&6; } + + + + { $as_echo "$as_me:$LINENO: checking whether // is distinct from /" >&5 $as_echo_n "checking whether // is distinct from /... " >&6; } if test "${gl_cv_double_slash_root+set}" = set; then @@ -11052,17 +11306,41 @@ _ACEOF fi + + + + + + + + + + + + + + + + + + + + + + GNULIB__EXIT=0; GNULIB_ATOLL=0; GNULIB_CALLOC_POSIX=0; GNULIB_CANONICALIZE_FILE_NAME=0; GNULIB_GETLOADAVG=0; GNULIB_GETSUBOPT=0; + GNULIB_GRANTPT=0; GNULIB_MALLOC_POSIX=0; GNULIB_MKDTEMP=0; GNULIB_MKOSTEMP=0; GNULIB_MKOSTEMPS=0; GNULIB_MKSTEMP=0; GNULIB_MKSTEMPS=0; + GNULIB_PTSNAME=0; GNULIB_PUTENV=0; GNULIB_RANDOM_R=0; GNULIB_REALLOC_POSIX=0; @@ -11072,19 +11350,22 @@ _ACEOF GNULIB_STRTOD=0; GNULIB_STRTOLL=0; GNULIB_STRTOULL=0; + GNULIB_SYSTEM_POSIX=0; + GNULIB_UNLOCKPT=0; GNULIB_UNSETENV=0; - HAVE_ATOLL=1; - HAVE_CALLOC_POSIX=1; + HAVE__EXIT=1; + HAVE_ATOLL=1; HAVE_CANONICALIZE_FILE_NAME=1; HAVE_DECL_GETLOADAVG=1; HAVE_GETSUBOPT=1; - HAVE_MALLOC_POSIX=1; + HAVE_GRANTPT=1; HAVE_MKDTEMP=1; HAVE_MKOSTEMP=1; HAVE_MKOSTEMPS=1; + HAVE_MKSTEMP=1; HAVE_MKSTEMPS=1; + HAVE_PTSNAME=1; HAVE_RANDOM_R=1; - HAVE_REALLOC_POSIX=1; HAVE_REALPATH=1; HAVE_RPMATCH=1; HAVE_SETENV=1; @@ -11093,10 +11374,14 @@ _ACEOF HAVE_STRTOULL=1; HAVE_STRUCT_RANDOM_DATA=1; HAVE_SYS_LOADAVG_H=0; + HAVE_UNLOCKPT=1; HAVE_UNSETENV=1; + REPLACE_CALLOC=0; REPLACE_CANONICALIZE_FILE_NAME=0; + REPLACE_MALLOC=0; REPLACE_MKSTEMP=0; REPLACE_PUTENV=0; + REPLACE_REALLOC=0; REPLACE_REALPATH=0; REPLACE_SETENV=0; REPLACE_STRTOD=0; @@ -11129,12 +11414,14 @@ _ACEOF GNULIB_LSEEK=0; GNULIB_PIPE2=0; GNULIB_PREAD=0; + GNULIB_PWRITE=0; GNULIB_READLINK=0; GNULIB_READLINKAT=0; GNULIB_RMDIR=0; GNULIB_SLEEP=0; GNULIB_SYMLINK=0; GNULIB_SYMLINKAT=0; + GNULIB_TTYNAME_R=0; GNULIB_UNISTD_H_GETOPT=0; GNULIB_UNISTD_H_SIGPIPE=0; GNULIB_UNLINK=0; @@ -11146,6 +11433,7 @@ _ACEOF HAVE_DUP3=1; HAVE_EUIDACCESS=1; HAVE_FACCESSAT=1; + HAVE_FCHDIR=1; HAVE_FCHOWNAT=1; HAVE_FSYNC=1; HAVE_FTRUNCATE=1; @@ -11155,28 +11443,30 @@ _ACEOF HAVE_GETHOSTNAME=1; HAVE_GETLOGIN=1; HAVE_GETPAGESIZE=1; - HAVE_GETUSERSHELL=1; HAVE_LCHOWN=1; HAVE_LINK=1; HAVE_LINKAT=1; HAVE_PIPE2=1; HAVE_PREAD=1; + HAVE_PWRITE=1; HAVE_READLINK=1; HAVE_READLINKAT=1; HAVE_SLEEP=1; HAVE_SYMLINK=1; HAVE_SYMLINKAT=1; + HAVE_TTYNAME_R=1; + HAVE_UNLINKAT=1; + HAVE_USLEEP=1; HAVE_DECL_ENVIRON=1; HAVE_DECL_GETLOGIN_R=1; + HAVE_DECL_GETPAGESIZE=1; + HAVE_DECL_GETUSERSHELL=1; HAVE_OS_H=0; HAVE_SYS_PARAM_H=0; - HAVE_UNLINKAT=1; - HAVE_USLEEP=1; REPLACE_CHOWN=0; REPLACE_CLOSE=0; REPLACE_DUP=0; REPLACE_DUP2=0; - REPLACE_FCHDIR=0; REPLACE_FCHOWNAT=0; REPLACE_GETCWD=0; REPLACE_GETGROUPS=0; @@ -11186,10 +11476,12 @@ _ACEOF REPLACE_LINKAT=0; REPLACE_LSEEK=0; REPLACE_PREAD=0; + REPLACE_PWRITE=0; REPLACE_READLINK=0; REPLACE_RMDIR=0; REPLACE_SLEEP=0; REPLACE_SYMLINK=0; + REPLACE_TTYNAME_R=0; REPLACE_UNLINK=0; REPLACE_UNLINKAT=0; REPLACE_USLEEP=0; @@ -11588,7 +11880,7 @@ _ACEOF fi - { $as_echo "$as_me:$LINENO: checking whether chown honors trailing slash" >&5 + { $as_echo "$as_me:$LINENO: checking whether chown honors trailing slash" >&5 $as_echo_n "checking whether chown honors trailing slash... " >&6; } if test "${gl_cv_func_chown_slash_works+set}" = set; then $as_echo_n "(cached) " >&6 @@ -11792,10 +12084,12 @@ _ACEOF GNULIB_SCANDIR=0; GNULIB_ALPHASORT=0; HAVE_DECL_DIRFD=1; + HAVE_DECL_FDOPENDIR=1; HAVE_FDOPENDIR=1; HAVE_SCANDIR=1; HAVE_ALPHASORT=1; REPLACE_CLOSEDIR=0; + REPLACE_DIRFD=0; REPLACE_FDOPENDIR=0; REPLACE_OPENDIR=0; @@ -11921,6 +12215,41 @@ $as_echo "$gl_cv_have_include_next" >&6; } + { $as_echo "$as_me:$LINENO: checking whether system header files limit the line length" >&5 +$as_echo_n "checking whether system header files limit the line length... " >&6; } +if test "${gl_cv_pragma_columns+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef __TANDEM +choke me +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "choke me" >/dev/null 2>&1; then + gl_cv_pragma_columns=yes +else + gl_cv_pragma_columns=no +fi +rm -f conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_pragma_columns" >&5 +$as_echo "$gl_cv_pragma_columns" >&6; } + if test $gl_cv_pragma_columns = yes; then + PRAGMA_COLUMNS="#pragma COLUMNS 10000" + else + PRAGMA_COLUMNS= + fi + @@ -11982,7 +12311,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - extern struct { int foo; } environ; + extern struct { int foo; } environ; int main () { @@ -12080,6 +12409,9 @@ booboo #if !defined ESTALE booboo #endif +#if !defined EDQUOT +booboo +#endif #if !defined ECANCELED booboo #endif @@ -13871,6 +14203,7 @@ _ACEOF GNULIB_SNPRINTF=0; GNULIB_SPRINTF_POSIX=0; GNULIB_STDIO_H_SIGPIPE=0; + GNULIB_TMPFILE=0; GNULIB_VASPRINTF=0; GNULIB_VDPRINTF=0; GNULIB_VFPRINTF=0; @@ -13886,6 +14219,8 @@ _ACEOF HAVE_DECL_SNPRINTF=1; HAVE_DECL_VSNPRINTF=1; HAVE_DPRINTF=1; + HAVE_FSEEKO=1; + HAVE_FTELLO=1; HAVE_RENAMEAT=1; HAVE_VASPRINTF=1; HAVE_VDPRINTF=1; @@ -13912,6 +14247,7 @@ _ACEOF REPLACE_SNPRINTF=0; REPLACE_SPRINTF=0; REPLACE_STDIO_WRITE_FUNCS=0; + REPLACE_TMPFILE=0; REPLACE_VASPRINTF=0; REPLACE_VDPRINTF=0; REPLACE_VFPRINTF=0; @@ -14053,6 +14389,8 @@ _ACEOF + + { $as_echo "$as_me:$LINENO: checking for mbstate_t" >&5 $as_echo_n "checking for mbstate_t... " >&6; } if test "${ac_cv_type_mbstate_t+set}" = set; then @@ -14137,6 +14475,68 @@ _ACEOF + + + + + { $as_echo "$as_me:$LINENO: checking for fseeko" >&5 +$as_echo_n "checking for fseeko... " >&6; } +if test "${gl_cv_func_fseeko+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +fseeko (stdin, 0, 0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + gl_cv_func_fseeko=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_fseeko=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fseeko" >&5 +$as_echo "$gl_cv_func_fseeko" >&6; } { $as_echo "$as_me:$LINENO: checking whether stdin defaults to large file offsets" >&5 @@ -14366,163 +14766,11 @@ _ACEOF fi -{ $as_echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 -$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if test "${ac_cv_header_stdbool_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - #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; - - 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; - -int -main () -{ - - *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); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdbool_h=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdbool_h=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 -$as_echo "$ac_cv_header_stdbool_h" >&6; } - { $as_echo "$as_me:$LINENO: checking for _Bool" >&5 -$as_echo_n "checking for _Bool... " >&6; } -if test "${ac_cv_type__Bool+set}" = set; then +{ $as_echo "$as_me:$LINENO: checking whether getdelim is declared" >&5 +$as_echo_n "checking whether getdelim is declared... " >&6; } +if test "${ac_cv_have_decl_getdelim+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_cv_type__Bool=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (_Bool)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14533,8 +14781,10 @@ $ac_includes_default int main () { -if (sizeof ((_Bool))) - return 0; +#ifndef getdelim + (void) getdelim; +#endif + ; return 0; } @@ -14557,72 +14807,41 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type__Bool=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_have_decl_getdelim=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_have_decl_getdelim=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 -$as_echo "$ac_cv_type__Bool" >&6; } -if test "x$ac_cv_type__Bool" = x""yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getdelim" >&5 +$as_echo "$ac_cv_have_decl_getdelim" >&6; } +if test "x$ac_cv_have_decl_getdelim" = x""yes; then cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 +#define HAVE_DECL_GETDELIM 1 _ACEOF -fi - - if test $ac_cv_header_stdbool_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_STDBOOL_H 1 +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETDELIM 0 _ACEOF - fi - - - - # Define two additional variables used in the Makefile substitution. - - if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' - else - STDBOOL_H='stdbool.h' - fi - - - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi - +fi - # getdate.y works with bison only. - : ${YACC='bison -y'} - { $as_echo "$as_me:$LINENO: checking for compound literals" >&5 -$as_echo_n "checking for compound literals... " >&6; } -if test "${gl_cv_compound_literals+set}" = set; then +{ $as_echo "$as_me:$LINENO: checking whether getline is declared" >&5 +$as_echo_n "checking whether getline is declared... " >&6; } +if test "${ac_cv_have_decl_getline+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -14631,315 +14850,14 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -struct s { int i, j; }; +$ac_includes_default int main () { -struct s t = (struct s) { 3, 4 }; - if (t.i != 0) return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gl_cv_compound_literals=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gl_cv_compound_literals=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_compound_literals" >&5 -$as_echo "$gl_cv_compound_literals" >&6; } - if test $gl_cv_compound_literals = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_COMPOUND_LITERALS 1 -_ACEOF - - fi - -{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include - -int -main () -{ -struct tm tm; - int *p = &tm.tm_sec; - return !p; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_struct_tm=time.h -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_struct_tm=sys/time.h -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -$as_echo "$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -cat >>confdefs.h <<\_ACEOF -#define TM_IN_SYS_TIME 1 -_ACEOF - -fi - - - { $as_echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5 -$as_echo_n "checking for struct tm.tm_gmtoff... " >&6; } -if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -static struct tm ac_aggr; -if (ac_aggr.tm_gmtoff) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_tm_tm_gmtoff=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -static struct tm ac_aggr; -if (sizeof ac_aggr.tm_gmtoff) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_tm_tm_gmtoff=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_member_struct_tm_tm_gmtoff=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5 -$as_echo "$ac_cv_member_struct_tm_tm_gmtoff" >&6; } -if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TM_GMTOFF 1 -_ACEOF - -fi - - -{ $as_echo "$as_me:$LINENO: checking whether getdelim is declared" >&5 -$as_echo_n "checking whether getdelim is declared... " >&6; } -if test "${ac_cv_have_decl_getdelim+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef getdelim - (void) getdelim; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_getdelim=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl_getdelim=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getdelim" >&5 -$as_echo "$ac_cv_have_decl_getdelim" >&6; } -if test "x$ac_cv_have_decl_getdelim" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETDELIM 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETDELIM 0 -_ACEOF - - -fi - - - - - - -{ $as_echo "$as_me:$LINENO: checking whether getline is declared" >&5 -$as_echo_n "checking whether getline is declared... " >&6; } -if test "${ac_cv_have_decl_getline+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef getline - (void) getline; -#endif - +#ifndef getline + (void) getline; +#endif + ; return 0; } @@ -15335,7 +15253,7 @@ done fi - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + if test -z "$gl_replace_getopt"; then { $as_echo "$as_me:$LINENO: checking whether optreset is declared" >&5 $as_echo_n "checking whether optreset is declared... " >&6; } if test "${ac_cv_have_decl_optreset+set}" = set; then @@ -15402,13 +15320,83 @@ else #define HAVE_DECL_OPTRESET 0 _ACEOF +{ $as_echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5 +$as_echo_n "checking whether getopt_clip is declared... " >&6; } +if test "${ac_cv_have_decl_getopt_clip+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef getopt_clip + (void) getopt_clip; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_getopt_clip=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_getopt_clip=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5 +$as_echo "$ac_cv_have_decl_getopt_clip" >&6; } +if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETOPT_CLIP 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETOPT_CLIP 0 +_ACEOF + + +fi + + fi fi - if test -z "$gl_replace_getopt"; then + if test -z "$gl_replace_getopt"; then { $as_echo "$as_me:$LINENO: checking whether getopt is POSIX compatible" >&5 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } if test "${gl_cv_func_getopt_posix+set}" = set; then @@ -15417,8 +15405,9 @@ else if test "$cross_compiling" = yes; then case "$host_os" in - mingw*) gl_cv_func_getopt_posix="guessing no";; - *) gl_cv_func_getopt_posix="guessing yes";; + mingw*) gl_cv_func_getopt_posix="guessing no";; + darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; + *) gl_cv_func_getopt_posix="guessing yes";; esac else @@ -15433,7 +15422,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include -#if !HAVE_DECL_OPTRESET +#if !HAVE_DECL_OPTRESET && !HAVE_DECL_GETOPT_CLIP # define OPTIND_MIN 0 #else # define OPTIND_MIN 1 @@ -15501,6 +15490,20 @@ main () if (!(optind == 1)) return 12; } + /* Detect MacOS 10.5, AIX 7.1 bug. */ + { + char *argv[3] = { "program", "-ab", NULL }; + optind = OPTIND_MIN; + opterr = 0; + if (getopt (2, argv, "ab:") != 'a') + return 13; + if (getopt (2, argv, "ab:") != '?') + return 14; + if (optopt != 'b') + return 15; + if (optind != 2) + return 16; + } return 0; } @@ -15561,7 +15564,14 @@ else # optstring is necessary for programs like m4 that have POSIX-mandated # semantics for supporting options interspersed with files. # Also, since getopt_long is a GNU extension, we require optind=0. - gl_had_POSIXLY_CORRECT=${POSIXLY_CORRECT:+yes} + # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; + # so take care to revert to the correct (non-)export state. + gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' + case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" &5 @@ -15732,6 +15753,9 @@ fi + + + GNULIB_GETTIMEOFDAY=0; HAVE_GETTIMEOFDAY=1; HAVE_STRUCT_TIMEVAL=1; @@ -15950,6 +15974,236 @@ fi +{ $as_echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 +$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } +if test "${ac_cv_header_stdbool_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + #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; + + 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]; + /* See body of main program for 'e'. */ + 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 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _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]; + /* 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; + +int +main () +{ + + bool e = &s; + *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); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdbool_h=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdbool_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 +$as_echo "$ac_cv_header_stdbool_h" >&6; } + { $as_echo "$as_me:$LINENO: checking for _Bool" >&5 +$as_echo_n "checking for _Bool... " >&6; } +if test "${ac_cv_type__Bool+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type__Bool=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof (_Bool)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof ((_Bool))) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type__Bool=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 +$as_echo "$ac_cv_type__Bool" >&6; } +if test "x$ac_cv_type__Bool" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE__BOOL 1 +_ACEOF + + +fi + + if test $ac_cv_header_stdbool_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STDBOOL_H 1 +_ACEOF + + fi + + + + # Define two additional variables used in the Makefile substitution. + + if test "$ac_cv_header_stdbool_h" = yes; then + STDBOOL_H='' + else + STDBOOL_H='stdbool.h' + fi + + + if test "$ac_cv_type__Bool" = yes; then + HAVE__BOOL=1 + else + HAVE__BOOL=0 + fi + + { $as_echo "$as_me:$LINENO: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } @@ -18164,6 +18418,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include #ifdef PRId32 char *p = PRId32; @@ -18519,10 +18774,22 @@ fi - { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 -$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; } -if test "${ac_cv_gnu_library_2_1+set}" = set; then + + + { $as_echo "$as_me:$LINENO: checking whether lstat correctly handles trailing slash" >&5 +$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } +if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then $as_echo_n "(cached) " >&6 +else + rm -f conftest.sym conftest.file + echo >conftest.file + if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then + if test "$cross_compiling" = yes; then + # When cross-compiling, be pessimistic so we will end up using the + # replacement version of lstat that checks for trailing slashes and + # calls lstat a second time when necessary. + ac_cv_func_lstat_dereferences_slashed_symlink=no + else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18530,44 +18797,101 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default +int +main () +{ +struct stat sbuf; + /* Linux will dereference the symlink and fail, as required by + POSIX. That is better in the sense that it means we will not + have to compile and use the lstat wrapper. */ + return lstat ("conftest.sym/", &sbuf) == 0; -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif - + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky GNU user" >/dev/null 2>&1; then - ac_cv_gnu_library_2_1=yes +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_lstat_dereferences_slashed_symlink=yes else - ac_cv_gnu_library_2_1=no + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_lstat_dereferences_slashed_symlink=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest* + else + # If the 'ln -s' command failed, then we probably don't even + # have an lstat function. + ac_cv_func_lstat_dereferences_slashed_symlink=no + fi + rm -f conftest.sym conftest.file fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 -$as_echo "$ac_cv_gnu_library_2_1" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 +$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } + test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && - GLIBC21="$ac_cv_gnu_library_2_1" +cat >>confdefs.h <<_ACEOF +#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 +_ACEOF + if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then -{ $as_echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 -$as_echo_n "checking whether lstat dereferences a symlink specified with a trailing slash... " >&6; } -if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then + + + + + + gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" + + fi + + + + + + { $as_echo "$as_me:$LINENO: checking whether unlink honors trailing slashes" >&5 +$as_echo_n "checking whether unlink honors trailing slashes... " >&6; } +if test "${gl_cv_func_unlink_honors_slashes+set}" = set; then $as_echo_n "(cached) " >&6 else - rm -f conftest.sym conftest.file -echo >conftest.file -if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then - ac_cv_func_lstat_dereferences_slashed_symlink=no + touch conftest.file + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + ln -s conftest.file conftest.lnk + fi + if test "$cross_compiling" = yes; then + gl_cv_func_unlink_honors_slashes="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -18575,15 +18899,17 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#include + #include + int main () { -struct stat sbuf; - /* Linux will dereference the symlink and fail. - That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; +if (!unlink ("conftest.file/") || errno != ENOTDIR) return 1; +#if HAVE_LSTAT + if (!unlink ("conftest.lnk/") || errno != ENOTDIR) return 2; +#endif + ; return 0; } @@ -18610,51 +18936,635 @@ $as_echo "$ac_try_echo") >&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_lstat_dereferences_slashed_symlink=yes + gl_cv_func_unlink_honors_slashes=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_func_lstat_dereferences_slashed_symlink=no +gl_cv_func_unlink_honors_slashes=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + rm -f conftest.file conftest.lnk +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_unlink_honors_slashes" >&5 +$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; } + { $as_echo "$as_me:$LINENO: checking whether unlink of a parent directory fails is it should" >&5 +$as_echo_n "checking whether unlink of a parent directory fails is it should... " >&6; } +if test "${gl_cv_func_unlink_parent_fails+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case "$host_os" in + darwin*) + if { + # Use the mktemp program if available. If not available, hide the error + # message. + tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" + } || + { + # Use a simple mkdir command. It is guaranteed to fail if the directory + # already exists. $RANDOM is bash specific and expands to empty in shells + # other than bash, ksh and zsh. Its use does not increase security; + # rather, it minimizes the probability of failure in a very cluttered /tmp + # directory. + tmp=/tmp/gt$$-$RANDOM + (umask 077 && mkdir "$tmp") + }; then + mkdir "$tmp/subdir" + GL_SUBDIR_FOR_UNLINK="$tmp/subdir" + export GL_SUBDIR_FOR_UNLINK + if test "$cross_compiling" = yes; then + gl_cv_func_unlink_parent_fails="guessing no" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + #include + int main () + { + if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0) + return 1; + return unlink ("..") == 0; + } + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_unlink_parent_fails=yes else - # If the `ln -s' command failed, then we probably don't even - # have an lstat function. - ac_cv_func_lstat_dereferences_slashed_symlink=no + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gl_cv_func_unlink_parent_fails=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.sym conftest.file + + + unset GL_SUBDIR_FOR_UNLINK + rm -rf "$tmp" + else + gl_cv_func_unlink_parent_fails="guessing no" + fi + ;; + *) + gl_cv_func_unlink_parent_fails="guessing yes" + ;; + esac fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_unlink_parent_fails" >&5 +$as_echo "$gl_cv_func_unlink_parent_fails" >&6; } + case "$gl_cv_func_unlink_parent_fails" in + *no) -test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && +cat >>confdefs.h <<\_ACEOF +#define UNLINK_PARENT_BUG 1 +_ACEOF -cat >>confdefs.h <<_ACEOF -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 + ;; + esac + if test "$gl_cv_func_unlink_honors_slashes" != yes \ + || { case "$gl_cv_func_unlink_parent_fails" in + *yes) false;; + *no) true;; + esac + }; then + REPLACE_UNLINK=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext" + + fi + + + + GNULIB_OPENAT=1 + + + GNULIB_FCHMODAT=1 + GNULIB_FSTATAT=1 + GNULIB_MKDIRAT=1 + + + GNULIB_FCHOWNAT=1 + GNULIB_UNLINKAT=1 + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +for ac_func in fchmodat fstatat mkdirat openat unlinkat +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $ac_func +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" +fi +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +fi +done + + + + + case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in + yes+yes) + # GNU/Hurd has unlinkat, but it has the same bug as unlink. + if test $REPLACE_UNLINK = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" + + REPLACE_UNLINKAT=1 + fi ;; + yes+*) + # Solaris 9 has *at functions, but uniformly mishandles trailing + # slash in all of them. + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" + + REPLACE_OPENAT=1 - gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" + + + + + + + gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" + + REPLACE_FSTATAT=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" + + REPLACE_UNLINKAT=1 + ;; + *) + HAVE_OPENAT=0 + HAVE_UNLINKAT=0 # No known system with unlinkat but not openat + HAVE_FSTATAT=0 # No known system with fstatat but not openat + + + + : +;; + esac + if test $ac_cv_func_fchmodat != yes; then + HAVE_FCHMODAT=0 + fi + if test $ac_cv_func_mkdirat != yes; then + HAVE_MKDIRAT=0 + fi + + + { $as_echo "$as_me:$LINENO: checking for fchownat" >&5 +$as_echo_n "checking for fchownat... " >&6; } +if test "${ac_cv_func_fchownat+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define fchownat to an innocuous variant, in case declares fchownat. + For example, HP-UX 11i declares gettimeofday. */ +#define fchownat innocuous_fchownat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char fchownat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef fchownat + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char fchownat (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_fchownat || defined __stub___fchownat +choke me +#endif + +int +main () +{ +return fchownat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_fchownat=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_fchownat=no fi +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fchownat" >&5 +$as_echo "$ac_cv_func_fchownat" >&6; } +if test "x$ac_cv_func_fchownat" = x""yes; then + + { $as_echo "$as_me:$LINENO: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5 +$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; } +if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + gl_dangle=conftest.dangle + # Remove any remnants of a previous test. + rm -f $gl_dangle + # Arrange for deletion of the temporary file this test creates. + ac_clean_files="$ac_clean_files $gl_dangle" + ln -s conftest.no-such $gl_dangle + if test "$cross_compiling" = yes; then + gl_cv_func_fchownat_nofollow_works=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include +#include +#include +int +main () +{ + return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), + AT_SYMLINK_NOFOLLOW) != 0 + && errno == ENOENT); +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_fchownat_nofollow_works=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gl_cv_func_fchownat_nofollow_works=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fchownat_nofollow_works" >&5 +$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; } + if test $gl_cv_func_fchownat_nofollow_works = no; then + REPLACE_FCHOWNAT=1 + +cat >>confdefs.h <<\_ACEOF +#define FCHOWNAT_NOFOLLOW_BUG 1 +_ACEOF + + +fi + + + if test $REPLACE_CHOWN = 1; then + REPLACE_FCHOWNAT=1 + fi +else + HAVE_FCHOWNAT=0 +fi + + if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext" + + fi + + + + + + + + { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 +$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; } +if test "${ac_cv_gnu_library_2_1+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky GNU user" >/dev/null 2>&1; then + ac_cv_gnu_library_2_1=yes +else + ac_cv_gnu_library_2_1=no +fi +rm -f conftest* + + + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 +$as_echo "$ac_cv_gnu_library_2_1" >&6; } + + GLIBC21="$ac_cv_gnu_library_2_1" + + + + { $as_echo "$as_me:$LINENO: checking whether malloc, realloc, calloc are POSIX compliant" >&5 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } @@ -18673,8 +19583,8 @@ int main () { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - choke me - #endif + choke me + #endif ; return 0; @@ -18983,11 +19893,14 @@ int main () is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) return 1; } #endif @@ -19002,7 +19915,7 @@ int main () if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding. */ + This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) @@ -19098,11 +20011,14 @@ int main () is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) return 1; } #endif @@ -19113,7 +20029,7 @@ int main () if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding. */ + This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) @@ -19272,6 +20188,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } GNULIB_STPNCPY=0; GNULIB_STRCHRNUL=0; GNULIB_STRDUP=0; + GNULIB_STRNCAT=0; GNULIB_STRNDUP=0; GNULIB_STRNLEN=0; GNULIB_STRPBRK=0; @@ -19297,7 +20214,8 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } GNULIB_STRSIGNAL=0; GNULIB_STRVERSCMP=0; HAVE_MBSLEN=0; - HAVE_DECL_MEMMEM=1; + HAVE_MEMCHR=1; + HAVE_DECL_MEMMEM=1; HAVE_MEMPCPY=1; HAVE_DECL_MEMRCHR=1; HAVE_RAWMEMCHR=1; @@ -19311,16 +20229,18 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } HAVE_STRSEP=1; HAVE_STRCASESTR=1; HAVE_DECL_STRTOK_R=1; - HAVE_DECL_STRERROR=1; HAVE_DECL_STRSIGNAL=1; HAVE_STRVERSCMP=1; REPLACE_MEMCHR=0; REPLACE_MEMMEM=0; + REPLACE_STPNCPY=0; REPLACE_STRDUP=0; REPLACE_STRSTR=0; REPLACE_STRCASESTR=0; REPLACE_STRERROR=0; + REPLACE_STRNCAT=0; REPLACE_STRNDUP=0; + REPLACE_STRNLEN=0; REPLACE_STRSIGNAL=0; REPLACE_STRTOK_R=0; UNDEFINE_STRTOK_R=0; @@ -19404,6 +20324,8 @@ _ACEOF + + # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. @@ -19579,271 +20501,6 @@ _ACEOF - - - - -for ac_func in memchr -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - -fi -done - - - if test $ac_cv_func_memchr = no; then - - -for ac_header in bp-sym.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to bug-tar@gnu.org ## -## ------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - REPLACE_MEMCHR=1 - fi if test $ac_cv_func_memchr = yes; then # Detect platform-specific bugs in some versions of glibc: @@ -19910,6 +20567,8 @@ main () strcpy (fence - 9, "12345678"); if (memchr (fence - 9, 0, 79) != fence - 1) return 2; + if (memchr (fence - 1, 0, 3) != fence - 1) + return 3; } return 0; @@ -19957,6 +20616,22 @@ fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_memchr_works" >&5 $as_echo "$gl_cv_func_memchr_works" >&6; } if test "$gl_cv_func_memchr_works" != yes; then + REPLACE_MEMCHR=1 + fi + else + HAVE_MEMCHR=0 + fi + if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" + for ac_header in bp-sym.h @@ -20110,18 +20785,6 @@ fi done - REPLACE_MEMCHR=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" - - fi fi { $as_echo "$as_me:$LINENO: checking whether memrchr is declared" >&5 @@ -20165,64 +20828,192 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_have_decl_memrchr=yes + ac_cv_have_decl_memrchr=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_memrchr=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_memrchr" >&5 +$as_echo "$ac_cv_have_decl_memrchr" >&6; } +if test "x$ac_cv_have_decl_memrchr" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MEMRCHR 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MEMRCHR 0 +_ACEOF + + +fi + + + + + + + + + + + + GNULIB_MKTIME=0; + GNULIB_NANOSLEEP=0; + GNULIB_STRPTIME=0; + GNULIB_TIMEGM=0; + GNULIB_TIME_R=0; + HAVE_LOCALTIME_R=1; + HAVE_NANOSLEEP=1; + HAVE_STRPTIME=1; + HAVE_TIMEGM=1; + REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; + REPLACE_MKTIME=GNULIB_PORTCHECK; + REPLACE_NANOSLEEP=GNULIB_PORTCHECK; + REPLACE_TIMEGM=GNULIB_PORTCHECK; + + + + + + + # parse-datetime.y works with bison only. + : ${YACC='bison -y'} + + + { $as_echo "$as_me:$LINENO: checking for compound literals" >&5 +$as_echo_n "checking for compound literals... " >&6; } +if test "${gl_cv_compound_literals+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +struct s { int i, j; }; +int +main () +{ +struct s t = (struct s) { 3, 4 }; + if (t.i != 0) return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_compound_literals=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_memrchr=no + gl_cv_compound_literals=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_memrchr" >&5 -$as_echo "$ac_cv_have_decl_memrchr" >&6; } -if test "x$ac_cv_have_decl_memrchr" = x""yes; then +{ $as_echo "$as_me:$LINENO: result: $gl_cv_compound_literals" >&5 +$as_echo "$gl_cv_compound_literals" >&6; } + if test $gl_cv_compound_literals = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MEMRCHR 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_COMPOUND_LITERALS 1 _ACEOF + fi +{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if test "${ac_cv_struct_tm+set}" = set; then + $as_echo_n "(cached) " >&6 else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MEMRCHR 0 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_struct_tm=time.h +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_struct_tm=sys/time.h fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then +cat >>confdefs.h <<\_ACEOF +#define TM_IN_SYS_TIME 1 +_ACEOF - GNULIB_MKTIME=0; - GNULIB_NANOSLEEP=0; - GNULIB_STRPTIME=0; - GNULIB_TIMEGM=0; - REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; - REPLACE_MKTIME=GNULIB_PORTCHECK; - REPLACE_NANOSLEEP=GNULIB_PORTCHECK; - REPLACE_STRPTIME=GNULIB_PORTCHECK; - REPLACE_TIMEGM=GNULIB_PORTCHECK; - - - - - - +fi - { $as_echo "$as_me:$LINENO: checking whether unlink honors trailing slashes" >&5 -$as_echo_n "checking whether unlink honors trailing slashes... " >&6; } -if test "${gl_cv_func_unlink_works+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5 +$as_echo_n "checking for struct tm.tm_gmtoff... " >&6; } +if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then $as_echo_n "(cached) " >&6 -else - touch conftest.file - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - ln -s conftest.file conftest.lnk - fi - if test "$cross_compiling" = yes; then - gl_cv_func_unlink_works="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20230,74 +21021,104 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - #include +#include int main () { -if (!unlink ("conftest.file/") || errno != ENOTDIR) return 1; -#if HAVE_LSTAT - if (!unlink ("conftest.lnk/") || errno != ENOTDIR) return 2; -#endif - +static struct tm ac_aggr; +if (ac_aggr.tm_gmtoff) +return 0; ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_tm_tm_gmtoff=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +static struct tm ac_aggr; +if (sizeof ac_aggr.tm_gmtoff) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gl_cv_func_unlink_works=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_tm_tm_gmtoff=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -gl_cv_func_unlink_works=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + ac_cv_member_struct_tm_tm_gmtoff=no fi - - rm -f conftest.file conftest.lnk +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_unlink_works" >&5 -$as_echo "$gl_cv_func_unlink_works" >&6; } - if test x"$gl_cv_func_unlink_works" != xyes; then - REPLACE_UNLINK=1 - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5 +$as_echo "$ac_cv_member_struct_tm_tm_gmtoff" >&6; } +if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_TM_GMTOFF 1 +_ACEOF +fi - gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext" - fi @@ -20333,6 +21154,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include + #include int main () @@ -20754,7 +21576,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - wchar_t foo = (wchar_t)'\0'; + wchar_t foo = (wchar_t)'\0'; int main () { @@ -20804,6 +21626,48 @@ _ACEOF + { $as_echo "$as_me:$LINENO: checking whether C symbols are prefixed with underscore at the linker level" >&5 +$as_echo_n "checking whether C symbols are prefixed with underscore at the linker level... " >&6; } +if test "${gl_cv_prog_as_underscore+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null 2>&1 + if grep _foo conftest.s >/dev/null ; then + gl_cv_prog_as_underscore=yes + else + gl_cv_prog_as_underscore=no + fi + rm -f conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_prog_as_underscore" >&5 +$as_echo "$gl_cv_prog_as_underscore" >&6; } + if test $gl_cv_prog_as_underscore = yes; then + USER_LABEL_PREFIX=_ + else + USER_LABEL_PREFIX= + fi + +cat >>confdefs.h <<_ACEOF +#define USER_LABEL_PREFIX $USER_LABEL_PREFIX +_ACEOF + + ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"' + + + @@ -20811,6 +21675,8 @@ _ACEOF HAVE_STRCASECMP=1; HAVE_DECL_STRNCASECMP=1; + + { $as_echo "$as_me:$LINENO: checking whether strdup is declared" >&5 $as_echo_n "checking whether strdup is declared... " >&6; } if test "${ac_cv_have_decl_strdup+set}" = set; then @@ -21315,7 +22181,8 @@ $as_echo "$gl_cv_next_string_h" >&6; } - for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do + + for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } @@ -21676,6 +22543,8 @@ fi + + { $as_echo "$as_me:$LINENO: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then @@ -21730,6 +22599,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else @@ -21786,6 +22656,61 @@ fi $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + { $as_echo "$as_me:$LINENO: checking for struct timespec in " >&5 +$as_echo_n "checking for struct timespec in ... " >&6; } +if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_sys_struct_timespec_in_pthread_h=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_sys_struct_timespec_in_pthread_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 +$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } + if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + fi fi fi @@ -21805,6 +22730,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } + if test $gl_cv_have_include_next = yes; then gl_cv_next_time_h='<'time.h'>' else @@ -21863,6 +22789,35 @@ $as_echo "$gl_cv_next_time_h" >&6; } + + + + + +gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} +i\ +0 +q +' +gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} +i\ +0 +q +' +gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} +i\ +0 +q +' + + + if test "$HAVE_LIBUNISTRING" = yes; then + LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` + LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` + LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` + fi + + { $as_echo "$as_me:$LINENO: checking whether the utimes function works" >&5 $as_echo_n "checking whether the utimes function works... " >&6; } if test "${gl_cv_func_working_utimes+set}" = set; then @@ -22066,8 +23021,6 @@ _ACEOF - - { $as_echo "$as_me:$LINENO: checking for wint_t" >&5 $as_echo_n "checking for wint_t... " >&6; } if test "${gt_cv_c_wint_t+set}" = set; then @@ -22088,7 +23041,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include #include - wint_t foo = (wchar_t)'\0'; + wint_t foo = (wchar_t)'\0'; int main () { @@ -22147,8 +23100,10 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include #include + int main () { @@ -22208,7 +23163,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include + #include int main () { @@ -22337,6 +23292,107 @@ _ACEOF + { $as_echo "$as_me:$LINENO: checking whether snprintf returns a byte count as in C99" >&5 +$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; } +if test "${gl_cv_func_snprintf_retval_c99+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then + + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on FreeBSD >= 5. + freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on MacOS X >= 10.3. + darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; + darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on OpenBSD >= 3.9. + openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) + gl_cv_func_snprintf_retval_c99="guessing no";; + openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on Solaris >= 2.6. + solaris2.[0-5]*) gl_cv_func_snprintf_retval_c99="guessing no";; + solaris*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on AIX >= 4. + aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; + aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on NetBSD >= 3. + netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) + gl_cv_func_snprintf_retval_c99="guessing no";; + netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_snprintf_retval_c99="guessing no";; + esac + +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +static char buf[100]; +int main () +{ + strcpy (buf, "ABCDEF"); + if (snprintf (buf, 3, "%d %d", 4567, 89) != 7) + return 1; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_snprintf_retval_c99=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gl_cv_func_snprintf_retval_c99=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_retval_c99" >&5 +$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } + + + + + @@ -22517,6 +23573,16 @@ fi + case "$gl_cv_func_snprintf_retval_c99" in + *yes) + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SNPRINTF_RETVAL_C99 1 +_ACEOF + + ;; + esac + { $as_echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5 $as_echo_n "checking whether vsnprintf is declared... " >&6; } if test "${ac_cv_have_decl_vsnprintf+set}" = set; then @@ -22592,6 +23658,77 @@ fi +{ $as_echo "$as_me:$LINENO: checking whether iswblank is declared" >&5 +$as_echo_n "checking whether iswblank is declared... " >&6; } +if test "${ac_cv_have_decl_iswblank+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef iswblank + (void) iswblank; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_iswblank=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_iswblank=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_iswblank" >&5 +$as_echo "$ac_cv_have_decl_iswblank" >&6; } +if test "x$ac_cv_have_decl_iswblank" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISWBLANK 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISWBLANK 0 +_ACEOF + + +fi + + + + if false; then GL_COND_LIBTOOL_TRUE= @@ -22604,6 +23741,7 @@ fi gl_cond_libtool=false gl_libdeps= gl_ltlibdeps= + gl_m4_base='m4' @@ -22614,6 +23752,8 @@ fi gl_source_base='gnu' + # Code from module alloca: + # Code from module alloca-opt: @@ -22670,6 +23810,17 @@ _ACEOF fi + # Code from module areadlink: + # Code from module areadlinkat: + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_AREADLINKAT 1 +_ACEOF + + + # Code from module arg-nonnull: + # Code from module argmatch: @@ -22682,6 +23833,7 @@ _ACEOF gl_LIBOBJS="$gl_LIBOBJS argmatch.$ac_objext" + # Code from module argp: @@ -22878,7 +24030,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { - program_invocation_name = "test"; +program_invocation_name = "test"; ; return 0; } @@ -22909,13 +24061,13 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PROGRAM_INVOCATION_NAME 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -22935,7 +24087,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { - program_invocation_short_name = "test"; +program_invocation_short_name = "test"; ; return 0; } @@ -22966,13 +24118,13 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -23057,6 +24209,8 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format" + # Code from module argp-version-etc: + # Code from module backupfile: @@ -23079,7 +24233,9 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + # Code from module bitrotate: + # Code from module btowc: @@ -23097,7 +24253,82 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - { $as_echo "$as_me:$LINENO: checking whether btowc(EOF) is correct" >&5 + + { $as_echo "$as_me:$LINENO: checking whether btowc(0) is correct" >&5 +$as_echo_n "checking whether btowc(0) is correct... " >&6; } +if test "${gl_cv_func_btowc_nul+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then + + case "$host_os" in + # Guess no on Cygwin. + cygwin*) gl_cv_func_btowc_nul="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_btowc_nul="guessing yes" ;; + esac + +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include +int main () +{ + if (btowc ('\0') != 0) + return 1; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_btowc_nul=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gl_cv_func_btowc_nul=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_btowc_nul" >&5 +$as_echo "$gl_cv_func_btowc_nul" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether btowc(EOF) is correct" >&5 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; } if test "${gl_cv_func_btowc_eof+set}" = set; then $as_echo_n "(cached) " >&6 @@ -23175,6 +24406,11 @@ fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_btowc_eof" >&5 $as_echo "$gl_cv_func_btowc_eof" >&6; } + + case "$gl_cv_func_btowc_nul" in + *yes) ;; + *) REPLACE_BTOWC=1 ;; + esac case "$gl_cv_func_btowc_eof" in *yes) ;; *) REPLACE_BTOWC=1 ;; @@ -23201,17 +24437,24 @@ $as_echo "$gl_cv_func_btowc_eof" >&6; } + GNULIB_BTOWC=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_BTOWC 1 +#define GNULIB_TEST_BTOWC 1 _ACEOF + # Code from module c++defs: + # Code from module c-ctype: + # Code from module canonicalize-lgpl: + if test $ac_cv_func_canonicalize_file_name = no; then + HAVE_CANONICALIZE_FILE_NAME=0 @@ -23219,9 +24462,15 @@ _ACEOF - gl_LIBOBJS="$gl_LIBOBJS canonicalize.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" + if test $ac_cv_func_realpath = no; then + HAVE_REALPATH=0 + elif test "$gl_cv_func_realpath_works" != yes; then + REPLACE_REALPATH=1 + fi + elif test "$gl_cv_func_realpath_works" != yes; then @@ -23230,31 +24479,46 @@ _ACEOF + gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" - if test $ac_cv_func_canonicalize_file_name = no; then - HAVE_CANONICALIZE_FILE_NAME=0 - elif test "$gl_cv_func_realpath_works" != yes; then + REPLACE_REALPATH=1 REPLACE_CANONICALIZE_FILE_NAME=1 fi -cat >>confdefs.h <<\_ACEOF -#define GNULIB_CANONICALIZE 1 +cat >>confdefs.h <<_ACEOF +#define GNULIB_CANONICALIZE_LGPL 1 _ACEOF + GNULIB_CANONICALIZE_FILE_NAME=1 + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1 +_ACEOF + + + + + + + GNULIB_REALPATH=1 + + + cat >>confdefs.h <<\_ACEOF -#define GNULIB_CANONICALIZE_FILE_NAME 1 +#define GNULIB_TEST_REALPATH 1 _ACEOF + # Code from module chdir-long: { $as_echo "$as_me:$LINENO: checking whether this system has an arbitrary file name length limit" >&5 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; } @@ -23302,18 +24566,22 @@ $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; } fi + # Code from module chown: + GNULIB_CHOWN=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_CHOWN 1 +#define GNULIB_TEST_CHOWN 1 _ACEOF + # Code from module clock-time: @@ -23518,6 +24786,28 @@ done LIBS=$gl_saved_libs + # Code from module cloexec: + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS cloexec.$ac_objext" + + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_CLOEXEC 1 +_ACEOF + + + # Code from module close: + @@ -23526,12 +24816,15 @@ done GNULIB_CLOSE=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_CLOSE 1 +#define GNULIB_TEST_CLOSE 1 _ACEOF + # Code from module close-hook: + # Code from module close-stream: @@ -23548,11 +24841,12 @@ _ACEOF -cat >>confdefs.h <<\_ACEOF +cat >>confdefs.h <<_ACEOF #define GNULIB_CLOSE_STREAM 1 _ACEOF + # Code from module closeout: @@ -23567,6 +24861,8 @@ _ACEOF : + # Code from module configmake: + # Code from module d-ino: { $as_echo "$as_me:$LINENO: checking for d_ino member in directory struct" >&5 $as_echo_n "checking for d_ino member in directory struct... " >&6; } if test "${gl_cv_struct_dirent_d_ino+set}" = set; then @@ -23649,6 +24945,7 @@ _ACEOF fi + # Code from module dirent: @@ -23789,6 +25086,7 @@ fi done + # Code from module dirent-safer: @@ -23809,11 +25107,12 @@ fi -cat >>confdefs.h <<\_ACEOF +cat >>confdefs.h <<_ACEOF #define GNULIB_DIRENT_SAFER 1 _ACEOF + # Code from module dirfd: @@ -24031,123 +25330,21 @@ fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_dirfd_macro" >&5 $as_echo "$gl_cv_func_dirfd_macro" >&6; } - # Use the replacement only if we have no function, macro, - # or declaration with that name. - if test $ac_cv_func_dirfd,$ac_cv_have_decl_dirfd,$gl_cv_func_dirfd_macro \ - = no,no,no; then - - - - - - - - - -for ac_func in dirfd -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func + # Use the replacement only if we have no function or macro with that name. + if test $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro = no,no; then + if test $ac_cv_have_decl_dirfd = yes; then + # If the system declares dirfd already, let's declare rpl_dirfd instead. + REPLACE_DIRFD=1 + fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -else - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" -fi -done + gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext" { $as_echo "$as_me:$LINENO: checking how to get the file descriptor associated with an open DIR*" >&5 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; } @@ -24228,15 +25425,18 @@ _ACEOF + GNULIB_DIRFD=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_DIRFD 1 +#define GNULIB_TEST_DIRFD 1 _ACEOF + # Code from module dirname: @@ -24262,11 +25462,12 @@ _ACEOF -cat >>confdefs.h <<\_ACEOF +cat >>confdefs.h <<_ACEOF #define GNULIB_DIRNAME 1 _ACEOF + # Code from module dirname-lgpl: @@ -24303,6 +25504,7 @@ _ACEOF + # Code from module double-slash-root: { $as_echo "$as_me:$LINENO: checking whether // is distinct from /" >&5 @@ -24344,6 +25546,7 @@ _ACEOF fi + # Code from module dup2: @@ -24474,27 +25677,35 @@ $as_echo "$gl_cv_func_dup2_works" >&6; } + GNULIB_DUP2=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_DUP2 1 +#define GNULIB_TEST_DUP2 1 _ACEOF + # Code from module environ: + GNULIB_ENVIRON=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_ENVIRON 1 +#define GNULIB_TEST_ENVIRON 1 _ACEOF + # Code from module errno: + + # Code from module error: @@ -24509,7 +25720,7 @@ _ACEOF -{ $as_echo "$as_me:$LINENO: checking for error_at_line" >&5 + { $as_echo "$as_me:$LINENO: checking for error_at_line" >&5 $as_echo_n "checking for error_at_line... " >&6; } if test "${ac_cv_lib_error_at_line+set}" = set; then $as_echo_n "(cached) " >&6 @@ -24564,7 +25775,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5 $as_echo "$ac_cv_lib_error_at_line" >&6; } -if test $ac_cv_lib_error_at_line = no; then + if test $ac_cv_lib_error_at_line = no; then @@ -24575,7 +25786,7 @@ if test $ac_cv_lib_error_at_line = no; then gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" -fi + fi @@ -24591,6 +25802,7 @@ fi XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format" + # Code from module exclude: @@ -24603,6 +25815,9 @@ fi gl_LIBOBJS="$gl_LIBOBJS exclude.$ac_objext" + # Code from module exitfail: + # Code from module extensions: + # Code from module fchdir: @@ -24614,7 +25829,7 @@ fi if test $ac_cv_func_fchdir = no; then - REPLACE_FCHDIR=1 + HAVE_FCHDIR=0 @@ -24799,15 +26014,19 @@ _ACEOF + GNULIB_FCHDIR=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_FCHDIR 1 +#define GNULIB_TEST_FCHDIR 1 _ACEOF + # Code from module fclose: + @@ -24815,12 +26034,14 @@ _ACEOF GNULIB_FCLOSE=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_FCLOSE 1 +#define GNULIB_TEST_FCLOSE 1 _ACEOF + # Code from module fcntl: @@ -25041,139 +26262,212 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - gl_cv_func_fcntl_f_dupfd_cloexec=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + gl_cv_func_fcntl_f_dupfd_cloexec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_fcntl_f_dupfd_cloexec=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 +$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } + if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then + + + + + + + + + if test $ac_cv_func_fcntl = no; then + HAVE_FCNTL=0 + else + REPLACE_FCNTL=1 + fi + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" + + + fi + fi + + + + + GNULIB_FCNTL=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_FCNTL 1 +_ACEOF + + + + # Code from module fcntl-h: + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_fcntl_h='<'fcntl.h'>' + else + { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_fcntl_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_fcntl_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/fcntl.h#{ + s#.*"\(.*/fcntl.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_fcntl_h='<'fcntl.h'>' + fi + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_fcntl_h" >&5 +$as_echo "$gl_cv_next_fcntl_h" >&6; } + fi + NEXT_FCNTL_H=$gl_cv_next_fcntl_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'fcntl.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_fcntl_h + fi + NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive + + + + + + + + for gl_func in fcntl openat; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_func_fcntl_f_dupfd_cloexec=no + eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 -$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } - if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then - - - - - - - - - if test $ac_cv_func_fcntl = no; then - HAVE_FCNTL=0 - else - REPLACE_FCNTL=1 - fi - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" - - - fi - fi - - - - GNULIB_FCNTL=1 - - -cat >>confdefs.h <<\_ACEOF -#define GNULIB_FCNTL 1 -_ACEOF - - - - - - - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_fcntl_h='<'fcntl.h'>' - else - { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_fcntl_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_fcntl_h = yes; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - +ac_res=`eval 'as_val=${'$as_gl_Symbol'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + as_val=`eval 'as_val=${'$as_gl_Symbol'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/fcntl.h#{ - s#.*"\(.*/fcntl.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_fcntl_h='<'fcntl.h'>' - fi + eval ac_cv_have_decl_$gl_func=yes fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_fcntl_h" >&5 -$as_echo "$gl_cv_next_fcntl_h" >&6; } - fi - NEXT_FCNTL_H=$gl_cv_next_fcntl_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'fcntl.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_fcntl_h - fi - NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive - - + done + # Code from module fdopendir: - for gl_func in fcntl openat; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking whether fdopendir is declared" >&5 +$as_echo_n "checking whether fdopendir is declared... " >&6; } +if test "${ac_cv_have_decl_fdopendir+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -25182,13 +26476,17 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + +#include + int main () { -#undef $gl_func - (void) $gl_func; +#ifndef fdopendir + (void) fdopendir; +#endif + ; return 0; } @@ -25211,33 +26509,32 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - eval "$as_gl_Symbol=yes" + ac_cv_have_decl_fdopendir=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_gl_Symbol=no" + ac_cv_have_decl_fdopendir=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_gl_Symbol'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - as_val=`eval 'as_val=${'$as_gl_Symbol'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdopendir" >&5 +$as_echo "$ac_cv_have_decl_fdopendir" >&6; } +if test "x$ac_cv_have_decl_fdopendir" = x""yes; then - eval ac_cv_have_decl_$gl_func=yes -fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FDOPENDIR 1 +_ACEOF - done +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FDOPENDIR 0 +_ACEOF +HAVE_DECL_FDOPENDIR=0 +fi @@ -25289,6 +26586,9 @@ cat >>conftest.$ac_ext <<_ACEOF #include #include +#if !HAVE_DECL_FDOPENDIR +extern DIR *fdopendir (int); +#endif int main () @@ -25359,16 +26659,34 @@ $as_echo "$gl_cv_func_fdopendir_works" >&6; } + GNULIB_FDOPENDIR=1 + cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_FDOPENDIR 1 +_ACEOF + + + + + +cat >>confdefs.h <<_ACEOF #define GNULIB_FDOPENDIR 1 _ACEOF + # Code from module fdutimensat: +cat >>confdefs.h <<_ACEOF +#define GNULIB_FDUTIMENSAT 1 +_ACEOF + + + # Code from module fileblocks: + { $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 $as_echo_n "checking for struct stat.st_blocks... " >&6; } if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then @@ -25501,12 +26819,33 @@ fi fi + # Code from module filenamecat-lgpl: + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS filenamecat-lgpl.$ac_objext" + + + + + + + + + + # Code from module float: FLOAT_H= case "$host_os" in - beos* | openbsd*) + beos* | openbsd* | mirbsd*) FLOAT_H=float.h @@ -25574,13 +26913,16 @@ $as_echo "$gl_cv_next_float_h" >&6; } esac + # Code from module fnmatch: FNMATCH_H= - gl_fnmatch_required_lowercase=`echo $gl_fnmatch_required | tr 'A-Z' 'a-z'` + gl_fnmatch_required_lowercase=` + echo $gl_fnmatch_required | tr '[A-Z]' '[a-z]' + ` gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" { $as_echo "$as_me:$LINENO: checking for working $gl_fnmatch_required fnmatch" >&5 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; } @@ -25820,11 +27162,13 @@ fi fi + # Code from module fnmatch-gnu: + # Code from module fpending: @@ -26026,75 +27370,40 @@ _ACEOF fi + # Code from module fseeko: + if test $gl_cv_func_fseeko = no; then + HAVE_FSEEKO=0 - { $as_echo "$as_me:$LINENO: checking for fseeko" >&5 -$as_echo_n "checking for fseeko... " >&6; } -if test "${gl_cv_func_fseeko+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include + if test $gl_cv_func_fseeko = yes; then + REPLACE_FSEEKO=1 + fi + + -int -main () -{ -fseeko (stdin, 0, 0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - gl_cv_func_fseeko=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_func_fseeko=no -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fseeko" >&5 -$as_echo "$gl_cv_func_fseeko" >&6; } - if test $gl_cv_func_fseeko = no \ - || test $gl_cv_var_stdin_large_offset = no; then + gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" + + + + else + if test $gl_cv_var_stdin_large_offset = no; then + + + + if test $gl_cv_func_fseeko = yes; then + REPLACE_FSEEKO=1 + fi @@ -26102,25 +27411,29 @@ $as_echo "$gl_cv_func_fseeko" >&6; } - gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" - REPLACE_FSEEKO=1 + fi fi + GNULIB_FSEEKO=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_FSEEKO 1 +#define GNULIB_TEST_FSEEKO 1 _ACEOF + # Code from module full-write: + # Code from module futimens: @@ -26130,9 +27443,8 @@ _ACEOF - if test $ac_cv_func_ftruncate = no; then - HAVE_FTRUNCATE=0 - + if test $ac_cv_func_futimens = no; then + HAVE_FUTIMENS=0 @@ -26140,17 +27452,17 @@ _ACEOF - gl_LIBOBJS="$gl_LIBOBJS ftruncate.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext" - -for ac_func in chsize -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + else + { $as_echo "$as_me:$LINENO: checking whether futimens works" >&5 +$as_echo_n "checking whether futimens works... " >&6; } +if test "${gl_cv_func_futimens_works+set}" = set; then $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + gl_cv_func_futimens_works="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26158,54 +27470,87 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +#include +#include +#include +#include -#ifdef __STDC__ -# include -#else -# include -#endif +int +main () +{ +struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } }; + int fd = creat ("conftest.file", 0600); + struct stat st; + if (fd < 0) return 1; + errno = 0; + if (futimens (AT_FDCWD, NULL) == 0) return 2; + if (errno != EBADF) return 3; + if (futimens (fd, ts)) return 4; + sleep (1); + ts[0].tv_nsec = UTIME_NOW; + ts[1].tv_nsec = UTIME_OMIT; + if (futimens (fd, ts)) return 5; + if (fstat (fd, &st)) return 6; + if (st.st_ctime < st.st_atime) return 7; -#undef $ac_func + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#ifdef __linux__ +/* The Linux kernel added futimens in 2.6.22, but has bugs with UTIME_OMIT + in several file systems as recently as 2.6.32. Always replace futimens + to support older kernels. */ choke me #endif int main () { -return $ac_func (); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -26214,75 +27559,62 @@ $as_echo "$ac_try_echo") >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" + } && test -s conftest.$ac_objext; then + gl_cv_func_futimens_works=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + gl_cv_func_futimens_works="needs runtime check" fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gl_cv_func_futimens_works=no +fi rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + + rm -f conftest.file fi -done +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_futimens_works" >&5 +$as_echo "$gl_cv_func_futimens_works" >&6; } + if test "$gl_cv_func_futimens_works" != yes; then + REPLACE_FUTIMENS=1 - case "$host_os" in - mingw*) - # Yes, we know mingw lacks ftruncate. - ;; - *) - # If someone lacks ftruncate, make configure fail, and request - # a bug report to inform us about it. - if test x"$SKIP_FTRUNCATE_CHECK" != xyes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: Your system lacks the ftruncate function. - Please report this, along with the output of \"uname -a\", to the - bug-coreutils@gnu.org mailing list. To continue past this point, - rerun configure with SKIP_FTRUNCATE_CHECK=yes. - E.g., ./configure SKIP_FTRUNCATE_CHECK=yes -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: Your system lacks the ftruncate function. - Please report this, along with the output of \"uname -a\", to the - bug-coreutils@gnu.org mailing list. To continue past this point, - rerun configure with SKIP_FTRUNCATE_CHECK=yes. - E.g., ./configure SKIP_FTRUNCATE_CHECK=yes -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - esac + + + + + + + gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext" + + fi fi - GNULIB_FTRUNCATE=1 + + GNULIB_FUTIMENS=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_FTRUNCATE 1 +#define GNULIB_TEST_FUTIMENS 1 _ACEOF + # Code from module getcwd: @@ -26596,468 +27928,44 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - { $as_echo "$as_me:$LINENO: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5 -$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; } -if test "${gl_cv_func_getcwd_abort_bug+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # Remove any remnants of a previous test. - rm -rf confdir-14B--- - # Arrange for deletion of the temporary directory this test creates. - ac_clean_files="$ac_clean_files confdir-14B---" - if test "$cross_compiling" = yes; then - gl_cv_func_getcwd_abort_bug=yes -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include -#include -#include - -/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ -#undef mkdir - -#ifndef S_IRWXU -# define S_IRWXU 0700 -#endif - -/* FIXME: skip the run-test altogether on systems without getpagesize. */ -#if ! HAVE_GETPAGESIZE -# define getpagesize() 0 -#endif - -/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than - the 16kB pagesize on ia64 linux. Those conditions make the code below - trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ -#define TARGET_LEN (5 * 1024) - -int -main () -{ - char const *dir_name = "confdir-14B---"; - char *cwd; - size_t initial_cwd_len; - int fail = 0; - size_t desired_depth; - size_t d; - - /* The bug is triggered when PATH_MAX < getpagesize (), so skip - this relative expensive and invasive test if that's not true. */ - if (getpagesize () <= PATH_MAX) - return 0; - - cwd = getcwd (NULL, 0); - if (cwd == NULL) - return 0; - - initial_cwd_len = strlen (cwd); - free (cwd); - desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) - / (1 + strlen (dir_name))); - for (d = 0; d < desired_depth; d++) - { - if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) - { - fail = 3; /* Unable to construct deep hierarchy. */ - break; - } - } - - /* If libc has the bug in question, this invocation of getcwd - results in a failed assertion. */ - cwd = getcwd (NULL, 0); - if (cwd == NULL) - fail = 4; /* getcwd failed. This is ok, and expected. */ - free (cwd); - - /* Call rmdir first, in case the above chdir failed. */ - rmdir (dir_name); - while (0 < d--) - { - if (chdir ("..") < 0) - break; - rmdir (dir_name); - } - - return 0; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gl_cv_func_getcwd_abort_bug=no -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -gl_cv_func_getcwd_abort_bug=yes -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - -fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_getcwd_abort_bug" >&5 -$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; } - if test $gl_cv_func_getcwd_abort_bug = yes; then - gl_abort_bug=yes -fi - -;; - esac - - case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in - *yes,yes,no) ;; - *) - REPLACE_GETCWD=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext" - - - - - : -;; - esac - - - - GNULIB_GETCWD=1 - - -cat >>confdefs.h <<\_ACEOF -#define GNULIB_GETCWD 1 -_ACEOF - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -$as_echo_n "checking for struct tm.tm_zone... " >&6; } -if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$ac_cv_struct_tm> - - -int -main () -{ -static struct tm ac_aggr; -if (ac_aggr.tm_zone) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_tm_tm_zone=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$ac_cv_struct_tm> - - -int -main () -{ -static struct tm ac_aggr; -if (sizeof ac_aggr.tm_zone) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_tm_tm_zone=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_member_struct_tm_tm_zone=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; } -if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TM_TM_ZONE 1 -_ACEOF - - -fi - -if test "$ac_cv_member_struct_tm_tm_zone" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TM_ZONE 1 -_ACEOF - -else - { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -$as_echo_n "checking whether tzname is declared... " >&6; } -if test "${ac_cv_have_decl_tzname+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef tzname - (void) tzname; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_tzname=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl_tzname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 -$as_echo "$ac_cv_have_decl_tzname" >&6; } -if test "x$ac_cv_have_decl_tzname" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 0 -_ACEOF - - -fi - - - { $as_echo "$as_me:$LINENO: checking for tzname" >&5 -$as_echo_n "checking for tzname... " >&6; } -if test "${ac_cv_var_tzname+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if !HAVE_DECL_TZNAME -extern char *tzname[]; -#endif - -int -main () -{ -return tzname[0][0]; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_var_tzname=yes + eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_var_tzname=no + eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -$as_echo "$ac_cv_var_tzname" >&6; } - if test $ac_cv_var_tzname = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TZNAME 1 +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - fi fi +done - - + { $as_echo "$as_me:$LINENO: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5 +$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; } +if test "${gl_cv_func_getcwd_abort_bug+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Remove any remnants of a previous test. + rm -rf confdir-14B--- + # Arrange for deletion of the temporary directory this test creates. + ac_clean_files="$ac_clean_files confdir-14B---" + if test "$cross_compiling" = yes; then + gl_cv_func_getcwd_abort_bug=yes +else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27065,52 +27973,166 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include /* for time_t */ -#include /* for CHAR_BIT, LONG_MIN, LONG_MAX */ -#define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) -#define TYPE_MAXIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) -typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1]; -typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1]; +#include +#include +#include +#include +#include + +/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ +#undef mkdir + +#ifndef S_IRWXU +# define S_IRWXU 0700 +#endif + +/* FIXME: skip the run-test altogether on systems without getpagesize. */ +#if ! HAVE_GETPAGESIZE +# define getpagesize() 0 +#endif + +/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than + the 16kB pagesize on ia64 linux. Those conditions make the code below + trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ +#define TARGET_LEN (5 * 1024) + +int +main () +{ + char const *dir_name = "confdir-14B---"; + char *cwd; + size_t initial_cwd_len; + int fail = 0; + size_t desired_depth; + size_t d; + + /* The bug is triggered when PATH_MAX < getpagesize (), so skip + this relative expensive and invasive test if that's not true. */ + if (getpagesize () <= PATH_MAX) + return 0; + + cwd = getcwd (NULL, 0); + if (cwd == NULL) + return 0; + + initial_cwd_len = strlen (cwd); + free (cwd); + desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) + / (1 + strlen (dir_name))); + for (d = 0; d < desired_depth; d++) + { + if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) + { + fail = 3; /* Unable to construct deep hierarchy. */ + break; + } + } + + /* If libc has the bug in question, this invocation of getcwd + results in a failed assertion. */ + cwd = getcwd (NULL, 0); + if (cwd == NULL) + fail = 4; /* getcwd failed. This is ok, and expected. */ + free (cwd); + + /* Call rmdir first, in case the above chdir failed. */ + rmdir (dir_name); + while (0 < d--) + { + if (chdir ("..") < 0) + break; + rmdir (dir_name); + } + + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - -cat >>confdefs.h <<\_ACEOF -#define TIME_T_FITS_IN_LONG_INT 1 -_ACEOF - - + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_getcwd_abort_bug=no else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) +gl_cv_func_getcwd_abort_bug=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_getcwd_abort_bug" >&5 +$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; } + if test $gl_cv_func_getcwd_abort_bug = yes; then + gl_abort_bug=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +;; + esac + + case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in + *yes,yes,no) ;; + *) + REPLACE_GETCWD=1 + + + + + gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext" + + + + + : +;; + esac + + + + + GNULIB_GETCWD=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_GETCWD 1 +_ACEOF + + + + # Code from module getdelim: + + + @@ -27431,15 +28453,18 @@ fi + GNULIB_GETDELIM=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_GETDELIM 1 +#define GNULIB_TEST_GETDELIM 1 _ACEOF + # Code from module getdtablesize: @@ -27464,15 +28489,18 @@ _ACEOF + GNULIB_GETDTABLESIZE=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_GETDTABLESIZE 1 +#define GNULIB_TEST_GETDTABLESIZE 1 _ACEOF + # Code from module getline: @@ -28029,15 +29057,18 @@ fi + GNULIB_GETLINE=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_GETLINE 1 +#define GNULIB_TEST_GETLINE 1 _ACEOF + # Code from module getopt-gnu: @@ -28046,10 +29077,11 @@ _ACEOF cat >>confdefs.h <<\_ACEOF -#define GNULIB_GETOPT_GNU 1 +#define GNULIB_TEST_GETOPT_GNU 1 _ACEOF + # Code from module getopt-posix: @@ -28100,6 +29132,7 @@ fi + # Code from module getpagesize: @@ -28530,21 +29563,85 @@ done ;; esac + { $as_echo "$as_me:$LINENO: checking whether getpagesize is declared" >&5 +$as_echo_n "checking whether getpagesize is declared... " >&6; } +if test "${ac_cv_have_decl_getpagesize+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef getpagesize + (void) getpagesize; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_getpagesize=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_getpagesize=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getpagesize" >&5 +$as_echo "$ac_cv_have_decl_getpagesize" >&6; } +if test "x$ac_cv_have_decl_getpagesize" = x""yes; then + : +else + HAVE_DECL_GETPAGESIZE=0 +fi + + GNULIB_GETPAGESIZE=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_GETPAGESIZE 1 +#define GNULIB_TEST_GETPAGESIZE 1 _ACEOF + # Code from module gettext: + # Code from module gettext-h: + # Code from module gettime: @@ -28568,6 +29665,7 @@ _ACEOF + # Code from module gettimeofday: @@ -29594,15 +30692,19 @@ _ACEOF + GNULIB_GETTIMEOFDAY=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_GETTIMEOFDAY 1 +#define GNULIB_TEST_GETTIMEOFDAY 1 _ACEOF + # Code from module gitlog-to-changelog: + # Code from module hash: @@ -29617,6 +30719,8 @@ _ACEOF + # Code from module havelib: + # Code from module human: @@ -29631,6 +30735,8 @@ _ACEOF : + # Code from module include_next: + # Code from module inline: { $as_echo "$as_me:$LINENO: checking whether the compiler generally respects inline" >&5 @@ -29677,68 +30783,29 @@ $as_echo "$ac_try_echo") >&5 test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_c_inline_effective=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gl_cv_c_inline_effective=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - -fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_c_inline_effective" >&5 -$as_echo "$gl_cv_c_inline_effective" >&6; } - if test $gl_cv_c_inline_effective = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INLINE 1 -_ACEOF - - fi - - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS imaxtostr.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS offtostr.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS umaxtostr.$ac_objext" - - - - +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + gl_cv_c_inline_effective=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_c_inline_effective" >&5 +$as_echo "$gl_cv_c_inline_effective" >&6; } + if test $gl_cv_c_inline_effective = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_INLINE 1 +_ACEOF - gl_LIBOBJS="$gl_LIBOBJS uinttostr.$ac_objext" + fi + # Code from module intprops: + # Code from module inttostr: @@ -29749,6 +30816,7 @@ _ACEOF : : + # Code from module inttypes: @@ -30149,30 +31217,532 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes + gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 +$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; } + if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then + INT32_MAX_LT_INTMAX_MAX=1; + else + INT32_MAX_LT_INTMAX_MAX=0; + fi + + + if test $APPLE_UNIVERSAL_BUILD = 0; then + + { $as_echo "$as_me:$LINENO: checking whether INT64_MAX == LONG_MAX" >&5 +$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; } +if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Work also in C++ mode. */ + #define __STDC_LIMIT_MACROS 1 + + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + + #include + #if HAVE_STDINT_H + #include + #endif + + #if defined INT64_MAX + #define CONDITION (INT64_MAX == LONG_MAX) + #elif HAVE_LONG_LONG_INT + #define CONDITION (sizeof (long long int) == sizeof (long int)) + #else + #define CONDITION 0 + #endif + int test[CONDITION ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_test_INT64_MAX_EQ_LONG_MAX=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 +$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; } + if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then + INT64_MAX_EQ_LONG_MAX=1; + else + INT64_MAX_EQ_LONG_MAX=0; + fi + + + else + INT64_MAX_EQ_LONG_MAX=-1 + fi + + { $as_echo "$as_me:$LINENO: checking whether UINT32_MAX < UINTMAX_MAX" >&5 +$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } +if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Work also in C++ mode. */ + #define __STDC_LIMIT_MACROS 1 + + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + + #include + #if HAVE_STDINT_H + #include + #endif + + #if defined UINT32_MAX && defined UINTMAX_MAX + #define CONDITION (UINT32_MAX < UINTMAX_MAX) + #elif HAVE_LONG_LONG_INT + #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) + #else + #define CONDITION 0 + #endif + int test[CONDITION ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 +$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; } + if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then + UINT32_MAX_LT_UINTMAX_MAX=1; + else + UINT32_MAX_LT_UINTMAX_MAX=0; + fi + + + if test $APPLE_UNIVERSAL_BUILD = 0; then + + { $as_echo "$as_me:$LINENO: checking whether UINT64_MAX == ULONG_MAX" >&5 +$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; } +if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Work also in C++ mode. */ + #define __STDC_LIMIT_MACROS 1 + + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + + #include + #if HAVE_STDINT_H + #include + #endif + + #if defined UINT64_MAX + #define CONDITION (UINT64_MAX == ULONG_MAX) + #elif HAVE_LONG_LONG_INT + #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) + #else + #define CONDITION 0 + #endif + int test[CONDITION ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 +$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } + if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then + UINT64_MAX_EQ_ULONG_MAX=1; + else + UINT64_MAX_EQ_ULONG_MAX=0; + fi + + + else + UINT64_MAX_EQ_ULONG_MAX=-1 + fi + + + + + + + for gl_func in imaxabs imaxdiv strtoimax strtoumax; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_gl_Symbol=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_gl_Symbol=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_gl_Symbol'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + as_val=`eval 'as_val=${'$as_gl_Symbol'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + + eval ac_cv_have_decl_$gl_func=yes +fi + + done + + + # Code from module langinfo: + + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_langinfo_h='<'langinfo.h'>' + else + { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_langinfo_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_langinfo_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/langinfo.h#{ + s#.*"\(.*/langinfo.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_langinfo_h='<'langinfo.h'>' + fi + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_langinfo_h" >&5 +$as_echo "$gl_cv_next_langinfo_h" >&6; } + fi + NEXT_LANGINFO_H=$gl_cv_next_langinfo_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'langinfo.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_langinfo_h + fi + NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive + + + + + HAVE_LANGINFO_CODESET=0 + HAVE_LANGINFO_T_FMT_AMPM=0 + HAVE_LANGINFO_ERA=0 + HAVE_LANGINFO_YESEXPR=0 + + + + + + + if test $ac_cv_header_langinfo_h = yes; then + HAVE_LANGINFO_H=1 + { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines CODESET" >&5 +$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; } +if test "${gl_cv_header_langinfo_codeset+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int a = CODESET; + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_header_langinfo_codeset=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_header_langinfo_codeset=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_codeset" >&5 +$as_echo "$gl_cv_header_langinfo_codeset" >&6; } + if test $gl_cv_header_langinfo_codeset = yes; then + HAVE_LANGINFO_CODESET=1 + fi + { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines T_FMT_AMPM" >&5 +$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; } +if test "${gl_cv_header_langinfo_t_fmt_ampm+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int a = T_FMT_AMPM; + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_header_langinfo_t_fmt_ampm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no + gl_cv_header_langinfo_t_fmt_ampm=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 -$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; } - if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then - INT32_MAX_LT_INTMAX_MAX=1; - else - INT32_MAX_LT_INTMAX_MAX=0; - fi - - - if test $APPLE_UNIVERSAL_BUILD = 0; then - { $as_echo "$as_me:$LINENO: checking whether INT64_MAX == LONG_MAX" >&5 -$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; } -if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5 +$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; } + if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then + HAVE_LANGINFO_T_FMT_AMPM=1 + fi + { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines ERA" >&5 +$as_echo_n "checking whether langinfo.h defines ERA... " >&6; } +if test "${gl_cv_header_langinfo_era+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -30181,25 +31751,9 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Work also in C++ mode. */ - #define __STDC_LIMIT_MACROS 1 - - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H - - #include - #if HAVE_STDINT_H - #include - #endif +#include +int a = ERA; - #if defined INT64_MAX - #define CONDITION (INT64_MAX == LONG_MAX) - #elif HAVE_LONG_LONG_INT - #define CONDITION (sizeof (long long int) == sizeof (long int)) - #else - #define CONDITION 0 - #endif - int test[CONDITION ? 1 : -1]; int main () { @@ -30226,32 +31780,25 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes + gl_cv_header_langinfo_era=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_test_INT64_MAX_EQ_LONG_MAX=no + gl_cv_header_langinfo_era=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 -$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; } - if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then - INT64_MAX_EQ_LONG_MAX=1; - else - INT64_MAX_EQ_LONG_MAX=0; - fi - - else - INT64_MAX_EQ_LONG_MAX=-1 - fi - - { $as_echo "$as_me:$LINENO: checking whether UINT32_MAX < UINTMAX_MAX" >&5 -$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } -if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_era" >&5 +$as_echo "$gl_cv_header_langinfo_era" >&6; } + if test $gl_cv_header_langinfo_era = yes; then + HAVE_LANGINFO_ERA=1 + fi + { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines YESEXPR" >&5 +$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; } +if test "${gl_cv_header_langinfo_yesexpr+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -30260,25 +31807,9 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Work also in C++ mode. */ - #define __STDC_LIMIT_MACROS 1 - - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H - - #include - #if HAVE_STDINT_H - #include - #endif +#include +int a = YESEXPR; - #if defined UINT32_MAX && defined UINTMAX_MAX - #define CONDITION (UINT32_MAX < UINTMAX_MAX) - #elif HAVE_LONG_LONG_INT - #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) - #else - #define CONDITION 0 - #endif - int test[CONDITION ? 1 : -1]; int main () { @@ -30305,30 +31836,38 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes + gl_cv_header_langinfo_yesexpr=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no + gl_cv_header_langinfo_yesexpr=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 -$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; } - if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then - UINT32_MAX_LT_UINTMAX_MAX=1; +{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_yesexpr" >&5 +$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; } + if test $gl_cv_header_langinfo_yesexpr = yes; then + HAVE_LANGINFO_YESEXPR=1 + fi else - UINT32_MAX_LT_UINTMAX_MAX=0; + HAVE_LANGINFO_H=0 fi - if test $APPLE_UNIVERSAL_BUILD = 0; then - { $as_echo "$as_me:$LINENO: checking whether UINT64_MAX == ULONG_MAX" >&5 -$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; } -if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then + + + + + + for gl_func in nl_langinfo; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -30337,29 +31876,13 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Work also in C++ mode. */ - #define __STDC_LIMIT_MACROS 1 - - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H - - #include - #if HAVE_STDINT_H - #include - #endif +#include - #if defined UINT64_MAX - #define CONDITION (UINT64_MAX == ULONG_MAX) - #elif HAVE_LONG_LONG_INT - #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) - #else - #define CONDITION 0 - #endif - int test[CONDITION ? 1 : -1]; int main () { - +#undef $gl_func + (void) $gl_func; ; return 0; } @@ -30382,39 +31905,58 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes + eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no + eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 -$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } - if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then - UINT64_MAX_EQ_ULONG_MAX=1; - else - UINT64_MAX_EQ_ULONG_MAX=0; - fi +ac_res=`eval 'as_val=${'$as_gl_Symbol'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + as_val=`eval 'as_val=${'$as_gl_Symbol'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + eval ac_cv_have_decl_$gl_func=yes +fi - else - UINT64_MAX_EQ_ULONG_MAX=-1 - fi + done + # Code from module lchown: - for gl_func in imaxabs imaxdiv strtoimax strtoumax; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then + + + + + + + + + + + + + + +for ac_func in lchown +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -30423,26 +31965,54 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif int main () { -#undef $gl_func - (void) $gl_func; +return $ac_func (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -30451,35 +32021,45 @@ $as_echo "$ac_try_echo") >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_gl_Symbol=yes" + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_gl_Symbol=no" + eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_gl_Symbol'} +ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - as_val=`eval 'as_val=${'$as_gl_Symbol'} +as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - eval ac_cv_have_decl_$gl_func=yes -fi +else - done + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +fi +done + if test $ac_cv_func_lchown = no; then + HAVE_LCHOWN=0 + elif test "$gl_cv_func_chown_slash_works" != yes \ + || test "$gl_cv_func_chown_ctime_works" != yes; then @@ -30488,79 +32068,58 @@ fi + gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext" + REPLACE_LCHOWN=1 + fi + GNULIB_LCHOWN=1 - if test $gl_cv_have_include_next = yes; then - gl_cv_next_langinfo_h='<'langinfo.h'>' - else - { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_langinfo_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test $ac_cv_header_langinfo_h = yes; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_LCHOWN 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/langinfo.h#{ - s#.*"\(.*/langinfo.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_langinfo_h='<'langinfo.h'>' - fi -fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_langinfo_h" >&5 -$as_echo "$gl_cv_next_langinfo_h" >&6; } - fi - NEXT_LANGINFO_H=$gl_cv_next_langinfo_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'langinfo.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_langinfo_h - fi - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive + # Code from module link: - HAVE_LANGINFO_CODESET=0 - HAVE_LANGINFO_ERA=0 + if test $ac_cv_func_link = no; then + HAVE_LINK=0 - if test $ac_cv_header_langinfo_h = yes; then - HAVE_LANGINFO_H=1 - { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines CODESET" >&5 -$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; } -if test "${gl_cv_header_langinfo_codeset+set}" = set; then + + + + + + + gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext" + + else + { $as_echo "$as_me:$LINENO: checking whether link handles trailing slash correctly" >&5 +$as_echo_n "checking whether link handles trailing slash correctly... " >&6; } +if test "${gl_cv_func_link_works+set}" = set; then $as_echo_n "(cached) " >&6 +else + touch conftest.a + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + ln -s conftest.a conftest.lnk + fi + if test "$cross_compiling" = yes; then + gl_cv_func_link_works="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -30568,69 +32127,275 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int a = CODESET; +#include int main () { +if (!link ("conftest.a", "conftest.b/")) return 1; +#if HAVE_LSTAT + if (!link ("conftest.lnk/", "conftest.b")) return 2; +#endif ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gl_cv_header_langinfo_codeset=yes + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_link_works=yes else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_header_langinfo_codeset=no +( exit $ac_status ) +gl_cv_func_link_works=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + rm -f conftest.a conftest.b conftest.lnk fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_codeset" >&5 -$as_echo "$gl_cv_header_langinfo_codeset" >&6; } - if test $gl_cv_header_langinfo_codeset = yes; then - HAVE_LANGINFO_CODESET=1 +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_link_works" >&5 +$as_echo "$gl_cv_func_link_works" >&6; } + if test "$gl_cv_func_link_works" != yes; then + REPLACE_LINK=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext" + fi - { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines ERA" >&5 -$as_echo_n "checking whether langinfo.h defines ERA... " >&6; } -if test "${gl_cv_header_langinfo_era+set}" = set; then + fi + + + + + GNULIB_LINK=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_LINK 1 +_ACEOF + + + + # Code from module link-follow: + + + + + + + gl_link_follows_symlinks=0 # assume GNU behavior + if test $ac_cv_func_readlink = yes; then + { $as_echo "$as_me:$LINENO: checking whether link(2) dereferences a symlink" >&5 +$as_echo_n "checking whether link(2) dereferences a symlink... " >&6; } +if test "${gl_cv_func_link_follows_symlink+set}" = set; then $as_echo_n "(cached) " >&6 else + + # Create a regular file. + echo > conftest.file + if test "$cross_compiling" = yes; then + gl_cv_func_link_follows_symlink=unknown +else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int a = ERA; + +# include +# include +# include +# include + +# define SAME_INODE(Stat_buf_1, Stat_buf_2) \ + ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ + && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev) + + int + main () + { + const char *file = "conftest.file"; + const char *sym = "conftest.sym"; + const char *hard = "conftest.hard"; + struct stat sb_file, sb_hard; + + /* Create a symlink to the regular file. */ + if (symlink (file, sym)) + return 2; + + /* Create a hard link to that symlink. */ + if (link (sym, hard)) + return 3; + + if (lstat (hard, &sb_hard)) + return 4; + if (lstat (file, &sb_file)) + return 5; + + /* If the dev/inode of hard and file are the same, then + the link call followed the symlink. */ + return SAME_INODE (sb_hard, sb_file) ? 1 : 0; + } + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_link_follows_symlink=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + gl_cv_func_link_follows_symlink=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + rm -f conftest.file conftest.sym conftest.hard + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_link_follows_symlink" >&5 +$as_echo "$gl_cv_func_link_follows_symlink" >&6; } + case $gl_cv_func_link_follows_symlink in + yes) gl_link_follows_symlinks=1 ;; + no) ;; # already defaulted to 0 + *) gl_link_follows_symlinks=-1 ;; + esac + fi + +cat >>confdefs.h <<_ACEOF +#define LINK_FOLLOWS_SYMLINKS $gl_link_follows_symlinks +_ACEOF + + + # Code from module linkat: + + + + + + + + + + + + + + + + + + + + + if test $ac_cv_func_linkat = no; then + HAVE_LINKAT=0 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext" + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext" + + else + { $as_echo "$as_me:$LINENO: checking whether linkat(,AT_SYMLINK_FOLLOW) works" >&5 +$as_echo_n "checking whether linkat(,AT_SYMLINK_FOLLOW) works... " >&6; } +if test "${gl_cv_func_linkat_follow+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rm -rf conftest.f1 conftest.f2 + touch conftest.f1 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#ifdef __linux__ +/* Linux added linkat in 2.6.16, but did not add AT_SYMLINK_FOLLOW + until 2.6.18. Always replace linkat to support older kernels. */ +choke me +#endif int main () { - +return linkat (AT_FDCWD, "conftest.f1", AT_FDCWD, "conftest.f2", + AT_SYMLINK_FOLLOW); ; return 0; } @@ -30653,37 +32418,32 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - gl_cv_header_langinfo_era=yes + gl_cv_func_linkat_follow=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_header_langinfo_era=no + gl_cv_func_linkat_follow="need runtime check" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - + rm -rf conftest.f1 conftest.f2 fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_era" >&5 -$as_echo "$gl_cv_header_langinfo_era" >&6; } - if test $gl_cv_header_langinfo_era = yes; then - HAVE_LANGINFO_ERA=1 - fi - else - HAVE_LANGINFO_H=0 - fi - - - - - - - for gl_func in nl_langinfo; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_linkat_follow" >&5 +$as_echo "$gl_cv_func_linkat_follow" >&6; } + { $as_echo "$as_me:$LINENO: checking whether linkat handles trailing slash correctly" >&5 +$as_echo_n "checking whether linkat handles trailing slash correctly... " >&6; } +if test "${gl_cv_func_linkat_slash+set}" = set; then $as_echo_n "(cached) " >&6 +else + rm -rf conftest.a conftest.b conftest.c conftest.d + if test "$cross_compiling" = yes; then + # Guess yes on glibc systems, no otherwise. + case "$host_os" in + *-gnu*) gl_cv_func_linkat_slash="guessing yes";; + *) gl_cv_func_linkat_slash="guessing no";; + esac + else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -30691,213 +32451,122 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include + #include + #include + #include int main () { -#undef $gl_func - (void) $gl_func; +int fd; + int err; + int ret; + /* Create a regular file. */ + fd = open ("conftest.a", O_CREAT | O_EXCL | O_WRONLY, 0600); + if (fd < 0) + return 1; + if (write (fd, "hello", 5) < 5) + return 2; + if (close (fd) < 0) + return 3; + /* Test whether hard links are supported on the current + device. */ + if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.b", + AT_SYMLINK_FOLLOW) < 0) + return 0; + /* Test whether a trailing "/" is treated like "/.". */ + if (linkat (AT_FDCWD, "conftest.a/", AT_FDCWD, "conftest.c", + AT_SYMLINK_FOLLOW) == 0) + return 4; + if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.d/", + AT_SYMLINK_FOLLOW) == 0) + return 5; + return 0; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_gl_Symbol=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_gl_Symbol=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_gl_Symbol'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - as_val=`eval 'as_val=${'$as_gl_Symbol'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - - done - - - - - - - - - - - - - - - - - - - - -for ac_func in lchown -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_try") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" + (exit $ac_status); }; }; then + gl_cv_func_linkat_slash=yes else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +( exit $ac_status ) +gl_cv_func_linkat_slash=no fi - rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + rm -rf conftest.a conftest.b conftest.c conftest.d fi -done +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_linkat_slash" >&5 +$as_echo "$gl_cv_func_linkat_slash" >&6; } + case "$gl_cv_func_linkat_slash" in + *yes) gl_linkat_slash_bug=0 ;; + *) gl_linkat_slash_bug=1 ;; + esac + if test "$gl_cv_func_linkat_follow" != yes \ + || test $gl_linkat_slash_bug = 1; then + REPLACE_LINKAT=1 - if test $ac_cv_func_lchown = no; then - HAVE_LCHOWN=0 - elif test "$gl_cv_func_chown_slash_works" != yes \ - || test "$gl_cv_func_chown_ctime_works" != yes; then + gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext" - gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext" +cat >>confdefs.h <<_ACEOF +#define LINKAT_TRAILING_SLASH_BUG $gl_linkat_slash_bug +_ACEOF - REPLACE_LCHOWN=1 + fi fi - GNULIB_LCHOWN=1 + + GNULIB_LINKAT=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_LCHOWN 1 +#define GNULIB_TEST_LINKAT 1 _ACEOF + # Code from module localcharset: @@ -30911,6 +32580,7 @@ _ACEOF LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" + # Code from module lseek: @@ -30921,14 +32591,24 @@ if test "${gl_cv_func_lseek_pipe+set}" = set; then else if test $cross_compiling = no; then cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include /* for off_t */ #include /* for SEEK_CUR */ #include -int main () +int +main () { + /* Exit with success only if stdin is seekable. */ return lseek (0, (off_t)0, SEEK_CUR) < 0; + + ; + return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext @@ -30972,6 +32652,11 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__ /* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */ @@ -31033,15 +32718,18 @@ _ACEOF + GNULIB_LSEEK=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_LSEEK 1 +#define GNULIB_TEST_LSEEK 1 _ACEOF + # Code from module lstat: @@ -31063,15 +32751,20 @@ _ACEOF + GNULIB_LSTAT=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_LSTAT 1 +#define GNULIB_TEST_LSTAT 1 _ACEOF + # Code from module malloc-gnu: + + for ac_header in stdlib.h do @@ -31293,12 +32986,12 @@ $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 1 +#define HAVE_MALLOC_GNU 1 _ACEOF else cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 0 +#define HAVE_MALLOC_GNU 0 _ACEOF @@ -31309,26 +33002,28 @@ _ACEOF + gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" + REPLACE_MALLOC=1 -cat >>confdefs.h <<\_ACEOF -#define malloc rpl_malloc -_ACEOF fi -cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<_ACEOF #define GNULIB_MALLOC_GNU 1 _ACEOF + # Code from module malloc-posix: + + if test $gl_cv_func_malloc_posix = yes; then - HAVE_MALLOC_POSIX=1 cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC_POSIX 1 @@ -31343,9 +33038,11 @@ _ACEOF + gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" - HAVE_MALLOC_POSIX=0 + REPLACE_MALLOC=1 + fi @@ -31354,20 +33051,24 @@ _ACEOF GNULIB_MALLOC_POSIX=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_MALLOC_POSIX 1 +#define GNULIB_TEST_MALLOC_POSIX 1 _ACEOF + # Code from module malloca: + # Code from module mbchar: + # Code from module mbrtowc: @@ -31399,10 +33100,10 @@ if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then else case "$host_os" in - # Guess no on AIX and OSF/1. - osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; + # Guess no on AIX and OSF/1. + aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then @@ -31585,9 +33286,7 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } fi - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBRTOWC=1 - fi + @@ -31596,8 +33295,10 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 - fi - if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then + else + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_MBRTOWC=1 + else @@ -31880,36 +33581,37 @@ fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_nul_retval" >&5 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } - case "$gl_cv_func_mbrtowc_null_arg" in - *yes) ;; - *) + case "$gl_cv_func_mbrtowc_null_arg" in + *yes) ;; + *) cat >>confdefs.h <<\_ACEOF #define MBRTOWC_NULL_ARG_BUG 1 _ACEOF - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_retval" in - *yes) ;; - *) + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_retval" in + *yes) ;; + *) cat >>confdefs.h <<\_ACEOF #define MBRTOWC_RETVAL_BUG 1 _ACEOF - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_nul_retval" in - *yes) ;; - *) + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_nul_retval" in + *yes) ;; + *) cat >>confdefs.h <<\_ACEOF #define MBRTOWC_NUL_RETVAL_BUG 1 _ACEOF - REPLACE_MBRTOWC=1 - ;; - esac + REPLACE_MBRTOWC=1 + ;; + esac + fi fi if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then @@ -31932,26 +33634,32 @@ _ACEOF + GNULIB_MBRTOWC=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_MBRTOWC 1 +#define GNULIB_TEST_MBRTOWC 1 _ACEOF + # Code from module mbscasecmp: + GNULIB_MBSCASECMP=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_MBSCASECMP 1 +#define GNULIB_TEST_MBSCASECMP 1 _ACEOF + # Code from module mbsinit: @@ -31983,10 +33691,10 @@ if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then else case "$host_os" in - # Guess no on AIX and OSF/1. - osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; + # Guess no on AIX and OSF/1. + aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then @@ -32169,9 +33877,7 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } fi - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBSINIT=1 - fi + @@ -32180,6 +33886,10 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } 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 @@ -32202,15 +33912,18 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } + GNULIB_MBSINIT=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_MBSINIT 1 +#define GNULIB_TEST_MBSINIT 1 _ACEOF + # Code from module mbsrtowcs: @@ -32242,10 +33955,10 @@ if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then else case "$host_os" in - # Guess no on AIX and OSF/1. - osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; + # Guess no on AIX and OSF/1. + aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then @@ -32428,9 +34141,7 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } fi - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBSRTOWCS=1 - fi + @@ -32439,8 +34150,10 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } if test $ac_cv_func_mbsrtowcs = no; then HAVE_MBSRTOWCS=0 - fi - if test $HAVE_MBSRTOWCS != 0 && test $REPLACE_MBSRTOWCS != 1; then + else + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_MBSRTOWCS=1 + else @@ -32563,10 +34276,11 @@ fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbsrtowcs_works" >&5 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } - case "$gl_cv_func_mbsrtowcs_works" in - *yes) ;; - *) REPLACE_MBSRTOWCS=1 ;; - esac + case "$gl_cv_func_mbsrtowcs_works" in + *yes) ;; + *) REPLACE_MBSRTOWCS=1 ;; + esac + fi fi if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then @@ -32599,33 +34313,40 @@ $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } + GNULIB_MBSRTOWCS=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_MBSRTOWCS 1 +#define GNULIB_TEST_MBSRTOWCS 1 _ACEOF + # Code from module mbuiter: : + # Code from module memchr: + GNULIB_MEMCHR=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_MEMCHR 1 +#define GNULIB_TEST_MEMCHR 1 _ACEOF + # Code from module mempcpy: @@ -32755,15 +34476,18 @@ done + GNULIB_MEMPCPY=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_MEMPCPY 1 +#define GNULIB_TEST_MEMPCPY 1 _ACEOF + # Code from module memrchr: @@ -32896,15 +34620,18 @@ done + GNULIB_MEMRCHR=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_MEMRCHR 1 +#define GNULIB_TEST_MEMRCHR 1 _ACEOF + # Code from module mkdir: @@ -33083,6 +34810,7 @@ _ACEOF fi + # Code from module mkdtemp: @@ -33142,12 +34870,333 @@ choke me int main () { -return $ac_func (); +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + +fi +done + + + if test $ac_cv_func_mkdtemp = no; then + HAVE_MKDTEMP=0 + : + + fi + + + + + GNULIB_MKDTEMP=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_MKDTEMP 1 +_ACEOF + + + + # Code from module mkfifo: + + + + + + + + + if test $ac_cv_func_mkfifo = no; then + HAVE_MKFIFO=0 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext" + + else + + + + + + + { $as_echo "$as_me:$LINENO: checking whether mkfifo rejects trailing slashes" >&5 +$as_echo_n "checking whether mkfifo rejects trailing slashes... " >&6; } +if test "${gl_cv_func_mkfifo_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + ln -s conftest.tmp conftest.lnk + fi + if test "$cross_compiling" = yes; then + gl_cv_func_mkfifo_works="guessing no" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +if (!mkfifo ("conftest.tmp/", 0600)) return 1; +#if HAVE_LSTAT + if (!mkfifo ("conftest.lnk/", 0600)) return 2; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_mkfifo_works=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gl_cv_func_mkfifo_works=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + rm -f conftest.tmp conftest.lnk +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mkfifo_works" >&5 +$as_echo "$gl_cv_func_mkfifo_works" >&6; } + if test "$gl_cv_func_mkfifo_works" != yes; then + +cat >>confdefs.h <<\_ACEOF +#define MKFIFO_TRAILING_SLASH_BUG 1 +_ACEOF + + REPLACE_MKFIFO=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext" + + fi + fi + + + + + GNULIB_MKFIFO=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_MKFIFO 1 +_ACEOF + + + + # Code from module mkfifoat: + + + + + + + + + + + + + if test $ac_cv_func_mkfifoat = no; then + # No known system has mkfifoat but not mknodat + HAVE_MKFIFOAT=0 + HAVE_MKNODAT=0 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS mkfifoat.$ac_objext" + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS mknodat.$ac_objext" + + fi + + + + + GNULIB_MKFIFOAT=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_MKFIFOAT 1 +_ACEOF + + + + + + + GNULIB_MKNODAT=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_MKNODAT 1 +_ACEOF + + + + # Code from module mknod: + + + + + + + + + + + if test $ac_cv_func_mknod = no; then + HAVE_MKNOD=0 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext" + + else + { $as_echo "$as_me:$LINENO: checking whether mknod can create fifo without root privileges" >&5 +$as_echo_n "checking whether mknod can create fifo without root privileges... " >&6; } +if test "${gl_cv_func_mknod_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + gl_cv_func_mknod_works="guessing no" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +/* Indeterminate for super-user, assume no. Why are you running + configure as root, anyway? */ + if (!geteuid ()) return 99; + if (mknod ("conftest.fifo", S_IFIFO | 0600, 0)) return 2; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -33155,67 +35204,83 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_mknod_works=yes else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +( exit $ac_status ) +if test $? == 99 && test x"$FORCE_UNSAFE_CONFIGURE" = x; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check) +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + fi + gl_cv_func_mknod_works=no fi - rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + + + rm -f conftest.fifo +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mknod_works" >&5 +$as_echo "$gl_cv_func_mknod_works" >&6; } + if test "$gl_cv_func_mknod_works" != yes; then + +cat >>confdefs.h <<\_ACEOF +#define MKNOD_FIFO_BUG 1 _ACEOF -else + fi + if test $REPLACE_MKFIFO = 1 || test "$gl_cv_func_mknod_works" != yes; then + REPLACE_MKNOD=1 + + + - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" -fi -done - if test $ac_cv_func_mkdtemp = no; then - HAVE_MKDTEMP=0 - : + gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext" + + fi fi - GNULIB_MKDTEMP=1 + + GNULIB_MKNOD=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_MKDTEMP 1 +#define GNULIB_TEST_MKNOD 1 _ACEOF + # Code from module mktime: @@ -33496,15 +35561,18 @@ fi + GNULIB_MKTIME=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_MKTIME 1 +#define GNULIB_TEST_MKTIME 1 _ACEOF + # Code from module modechange: @@ -33517,60 +35585,534 @@ _ACEOF gl_LIBOBJS="$gl_LIBOBJS modechange.$ac_objext" + # Code from module multiarch: + + # Code from module nl_langinfo: + + + + + + + + + + if test $ac_cv_func_nl_langinfo = yes; then + if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then + : + else + REPLACE_NL_LANGINFO=1 + +cat >>confdefs.h <<\_ACEOF +#define REPLACE_NL_LANGINFO 1 +_ACEOF + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" + + fi + else + HAVE_NL_LANGINFO=0 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" + + fi + + + + + GNULIB_NL_LANGINFO=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_NL_LANGINFO 1 +_ACEOF + + + + # Code from module obstack: + + + + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for obstacks" >&5 +$as_echo_n "checking for obstacks... " >&6; } +if test "${ac_cv_func_obstack+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + #include "obstack.h" +int +main () +{ +struct obstack mem; + #define obstack_chunk_alloc malloc + #define obstack_chunk_free free + obstack_init (&mem); + obstack_free (&mem, 0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_obstack=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_obstack=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_obstack" >&5 +$as_echo "$ac_cv_func_obstack" >&6; } +if test $ac_cv_func_obstack = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_OBSTACK 1 +_ACEOF + +else + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext" + +fi + + # Code from module open: + + + case "$host_os" in + mingw* | pw*) + + + REPLACE_OPEN=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" + + + + + : + + + ;; + *) + + + + + + + { $as_echo "$as_me:$LINENO: checking whether open recognizes a trailing slash" >&5 +$as_echo_n "checking whether open recognizes a trailing slash... " >&6; } +if test "${gl_cv_func_open_slash+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + touch conftest.tmp + ln -s conftest.tmp conftest.lnk + fi + if test "$cross_compiling" = yes; then + + case "$host_os" in + freebsd* | aix* | hpux* | solaris2.[0-9]*) + gl_cv_func_open_slash="guessing no" ;; + *) + gl_cv_func_open_slash="guessing yes" ;; + esac + +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#if HAVE_UNISTD_H +# include +#endif +int main () +{ +#if HAVE_LSTAT + if (open ("conftest.lnk/", O_RDONLY) != -1) return 2; +#endif + return open ("conftest.sl/", O_CREAT, 0600) >= 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_open_slash=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gl_cv_func_open_slash=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + rm -f conftest.sl conftest.tmp conftest.lnk + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_open_slash" >&5 +$as_echo "$gl_cv_func_open_slash" >&6; } + case "$gl_cv_func_open_slash" in + *no) + +cat >>confdefs.h <<\_ACEOF +#define OPEN_TRAILING_SLASH_BUG 1 +_ACEOF + + + + REPLACE_OPEN=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" + + + + + : + + + ;; + esac + ;; + esac + + + + + GNULIB_OPEN=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_OPEN 1 +_ACEOF + + + + # Code from module openat: + + + GNULIB_OPENAT=1 + + + GNULIB_FCHMODAT=1 + GNULIB_FSTATAT=1 + GNULIB_MKDIRAT=1 + + + GNULIB_FCHOWNAT=1 + GNULIB_UNLINKAT=1 + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +for ac_func in fchmodat fstatat mkdirat openat unlinkat +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" +fi +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +else + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +fi +done + case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in + yes+yes) + # GNU/Hurd has unlinkat, but it has the same bug as unlink. + if test $REPLACE_UNLINK = 1; then - if test $ac_cv_func_nl_langinfo = yes; then - if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then - : - else - REPLACE_NL_LANGINFO=1 -cat >>confdefs.h <<\_ACEOF -#define REPLACE_NL_LANGINFO 1 -_ACEOF + gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" + REPLACE_UNLINKAT=1 + fi ;; + yes+*) + # Solaris 9 has *at functions, but uniformly mishandles trailing + # slash in all of them. - gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" - fi - else - HAVE_NL_LANGINFO=0 + gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" + REPLACE_OPENAT=1 - gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" - fi - GNULIB_NL_LANGINFO=1 -cat >>confdefs.h <<\_ACEOF -#define GNULIB_NL_LANGINFO 1 -_ACEOF + gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" + REPLACE_FSTATAT=1 @@ -33579,15 +36121,31 @@ _ACEOF + gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" + REPLACE_UNLINKAT=1 + ;; + *) + HAVE_OPENAT=0 + HAVE_UNLINKAT=0 # No known system with unlinkat but not openat + HAVE_FSTATAT=0 # No known system with fstatat but not openat + : +;; + esac + if test $ac_cv_func_fchmodat != yes; then + HAVE_FCHMODAT=0 + fi + if test $ac_cv_func_mkdirat != yes; then + HAVE_MKDIRAT=0 + fi -{ $as_echo "$as_me:$LINENO: checking for obstacks" >&5 -$as_echo_n "checking for obstacks... " >&6; } -if test "${ac_cv_func_obstack+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for fchownat" >&5 +$as_echo_n "checking for fchownat... " >&6; } +if test "${ac_cv_func_fchownat+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -33596,16 +36154,41 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - #include "obstack.h" +/* Define fchownat to an innocuous variant, in case declares fchownat. + For example, HP-UX 11i declares gettimeofday. */ +#define fchownat innocuous_fchownat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char fchownat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef fchownat + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char fchownat (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_fchownat || defined __stub___fchownat +choke me +#endif + int main () { -struct obstack mem; - #define obstack_chunk_alloc malloc - #define obstack_chunk_free free - obstack_init (&mem); - obstack_free (&mem, 0); +return fchownat (); ; return 0; } @@ -33631,89 +36214,36 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_func_obstack=yes + ac_cv_func_fchownat=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_obstack=no + ac_cv_func_fchownat=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_obstack" >&5 -$as_echo "$ac_cv_func_obstack" >&6; } -if test $ac_cv_func_obstack = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_OBSTACK 1 -_ACEOF - -else - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext" - -fi - - - - case "$host_os" in - mingw* | pw*) - - - REPLACE_OPEN=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" - - - - - : - - - ;; - *) - - - - - +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fchownat" >&5 +$as_echo "$ac_cv_func_fchownat" >&6; } +if test "x$ac_cv_func_fchownat" = x""yes; then - { $as_echo "$as_me:$LINENO: checking whether open recognizes a trailing slash" >&5 -$as_echo_n "checking whether open recognizes a trailing slash... " >&6; } -if test "${gl_cv_func_open_slash+set}" = set; then + { $as_echo "$as_me:$LINENO: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5 +$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; } +if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then $as_echo_n "(cached) " >&6 else - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - touch conftest.tmp - ln -s conftest.tmp conftest.lnk - fi - if test "$cross_compiling" = yes; then - - case "$host_os" in - freebsd*) gl_cv_func_open_slash="guessing no" ;; - 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 + gl_dangle=conftest.dangle + # Remove any remnants of a previous test. + rm -f $gl_dangle + # Arrange for deletion of the temporary file this test creates. + ac_clean_files="$ac_clean_files $gl_dangle" + ln -s conftest.no-such $gl_dangle + if test "$cross_compiling" = yes; then + gl_cv_func_fchownat_nofollow_works=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -33723,16 +36253,18 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#if HAVE_UNISTD_H -# include -#endif -int main () +#include +#include +#include +#include +int +main () { -#if HAVE_LSTAT - if (open ("conftest.lnk/", O_RDONLY) != -1) return 2; -#endif - return open ("conftest.sl/", O_CREAT, 0600) >= 0; + return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), + AT_SYMLINK_NOFOLLOW) != 0 + && errno == ENOENT); } + _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -33756,151 +36288,254 @@ $as_echo "$ac_try_echo") >&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gl_cv_func_open_slash=yes + gl_cv_func_fchownat_nofollow_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -gl_cv_func_open_slash=no +gl_cv_func_fchownat_nofollow_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - rm -f conftest.sl conftest.tmp conftest.lnk fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_open_slash" >&5 -$as_echo "$gl_cv_func_open_slash" >&6; } - case "$gl_cv_func_open_slash" in - *no) +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fchownat_nofollow_works" >&5 +$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; } + if test $gl_cv_func_fchownat_nofollow_works = no; then + REPLACE_FCHOWNAT=1 cat >>confdefs.h <<\_ACEOF -#define OPEN_TRAILING_SLASH_BUG 1 +#define FCHOWNAT_NOFOLLOW_BUG 1 _ACEOF - - REPLACE_OPEN=1 - - - +fi + if test $REPLACE_CHOWN = 1; then + REPLACE_FCHOWNAT=1 + fi +else + HAVE_FCHOWNAT=0 +fi + if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then - gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" - : - ;; - esac - ;; - esac + gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext" + fi -cat >>confdefs.h <<\_ACEOF -#define GNULIB_OPEN 1 -_ACEOF + # Code from module openat-die: + # Code from module parse-datetime: - GNULIB_OPEN=1 -cat >>confdefs.h <<\_ACEOF -#define GNULIB_OPEN 1 + { $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +$as_echo_n "checking for struct tm.tm_zone... " >&6; } +if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include <$ac_cv_struct_tm> +int +main () +{ +static struct tm ac_aggr; +if (ac_aggr.tm_zone) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_tm_tm_zone=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include <$ac_cv_struct_tm> - GNULIB_OPENAT=1 - - - GNULIB_FCHMODAT=1 - GNULIB_FSTATAT=1 - GNULIB_MKDIRAT=1 - - - GNULIB_FCHOWNAT=1 - GNULIB_UNLINKAT=1 - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +int +main () +{ +static struct tm ac_aggr; +if (sizeof ac_aggr.tm_zone) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_tm_tm_zone=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_member_struct_tm_tm_zone=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; } +if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TM_TM_ZONE 1 +_ACEOF +fi +if test "$ac_cv_member_struct_tm_tm_zone" = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_TM_ZONE 1 +_ACEOF +else + { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +$as_echo_n "checking whether tzname is declared... " >&6; } +if test "${ac_cv_have_decl_tzname+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +#ifndef tzname + (void) tzname; +#endif + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_tzname=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_decl_tzname=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +$as_echo "$ac_cv_have_decl_tzname" >&6; } +if test "x$ac_cv_have_decl_tzname" = x""yes; then +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 +_ACEOF +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF +fi -for ac_func in fchmodat fstatat mkdirat openat unlinkat -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for tzname" >&5 +$as_echo_n "checking for tzname... " >&6; } +if test "${ac_cv_var_tzname+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -33909,41 +36544,15 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me +#include +#if !HAVE_DECL_TZNAME +extern char *tzname[]; #endif int main () { -return $ac_func (); +return tzname[0][0]; ; return 0; } @@ -33969,169 +36578,57 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - eval "$as_ac_var=yes" + ac_cv_var_tzname=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + ac_cv_var_tzname=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else +{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +$as_echo "$ac_cv_var_tzname" >&6; } + if test $ac_cv_var_tzname = yes; then - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 +_ACEOF + fi fi -done - - - - - case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in - yes+yes) - # GNU/Hurd has unlinkat, but it has the same bug as unlink. - if test $REPLACE_UNLINK = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" - - REPLACE_UNLINKAT=1 - fi ;; - yes+*) - # Solaris 9 has *at functions, but uniformly mishandles trailing - # slash in all of them. - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" - - REPLACE_OPENAT=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" - - REPLACE_FSTATAT=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" - - REPLACE_UNLINKAT=1 - ;; - *) - HAVE_OPENAT=0 - HAVE_UNLINKAT=0 # No known system with unlinkat but not openat - HAVE_FSTATAT=0 # No known system with fstatat but not openat - - - : -;; - esac - if test $ac_cv_func_fchmodat != yes; then - HAVE_FCHMODAT=0 - fi - if test $ac_cv_func_mkdirat != yes; then - HAVE_MKDIRAT=0 - fi - { $as_echo "$as_me:$LINENO: checking for fchownat" >&5 -$as_echo_n "checking for fchownat... " >&6; } -if test "${ac_cv_func_fchownat+set}" = set; then - $as_echo_n "(cached) " >&6 -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define fchownat to an innocuous variant, in case declares fchownat. - For example, HP-UX 11i declares gettimeofday. */ -#define fchownat innocuous_fchownat - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char fchownat (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef fchownat - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char fchownat (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_fchownat || defined __stub___fchownat -choke me -#endif +#include /* for time_t */ +#include /* for CHAR_BIT, LONG_MIN, LONG_MAX */ +#define TYPE_MINIMUM(t) \ + ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) +#define TYPE_MAXIMUM(t) \ + ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) +typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1]; +typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1]; -int -main () -{ -return fchownat (); - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -34140,133 +36637,23 @@ $as_echo "$ac_try_echo") >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_fchownat=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_fchownat=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fchownat" >&5 -$as_echo "$ac_cv_func_fchownat" >&6; } -if test "x$ac_cv_func_fchownat" = x""yes; then - - { $as_echo "$as_me:$LINENO: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5 -$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; } -if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else + } && test -s conftest.$ac_objext; then - gl_dangle=conftest.dangle - # Remove any remnants of a previous test. - rm -f $gl_dangle - # Arrange for deletion of the temporary file this test creates. - ac_clean_files="$ac_clean_files $gl_dangle" - ln -s conftest.no-such $gl_dangle - if test "$cross_compiling" = yes; then - gl_cv_func_fchownat_nofollow_works=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<\_ACEOF +#define TIME_T_FITS_IN_LONG_INT 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -#include -int -main () -{ - return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), - AT_SYMLINK_NOFOLLOW) != 0 - && errno == ENOENT); -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gl_cv_func_fchownat_nofollow_works=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -gl_cv_func_fchownat_nofollow_works=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fchownat_nofollow_works" >&5 -$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; } - if test $gl_cv_func_fchownat_nofollow_works = no; then - REPLACE_FCHOWNAT=1 - -cat >>confdefs.h <<\_ACEOF -#define FCHOWNAT_NOFOLLOW_BUG 1 -_ACEOF - -fi - - -else - HAVE_FCHOWNAT=0 fi - if test $REPLACE_CHOWN = 1; then - REPLACE_FCHOWNAT=1 - fi - if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext" - - fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Code from module pathmax: @@ -34281,6 +36668,7 @@ fi + # Code from module priv-set: @@ -34385,6 +36773,13 @@ fi done + + + + + + + # Code from module progname: { $as_echo "$as_me:$LINENO: checking whether program_invocation_name is declared" >&5 $as_echo_n "checking whether program_invocation_name is declared... " >&6; } if test "${ac_cv_have_decl_program_invocation_name+set}" = set; then @@ -34525,6 +36920,7 @@ _ACEOF fi + # Code from module quote: @@ -34538,6 +36934,7 @@ fi + # Code from module quotearg: @@ -34550,6 +36947,8 @@ fi gl_LIBOBJS="$gl_LIBOBJS quotearg.$ac_objext" + # Code from module quotearg-simple: + # Code from module rawmemchr: @@ -34675,15 +37074,18 @@ done + GNULIB_RAWMEMCHR=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_RAWMEMCHR 1 +#define GNULIB_TEST_RAWMEMCHR 1 _ACEOF + # Code from module readlink: @@ -34862,19 +37264,60 @@ _ACEOF + GNULIB_READLINK=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_READLINK 1 +#define GNULIB_TEST_READLINK 1 _ACEOF + # Code from module readlinkat: + + + + + + + + + + + if test $ac_cv_func_readlinkat = no; then + HAVE_READLINKAT=0 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext" + + fi + + + + + GNULIB_READLINKAT=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_READLINKAT 1 +_ACEOF + + + + # Code from module realloc-posix: + if test $gl_cv_func_malloc_posix = yes; then - HAVE_REALLOC_POSIX=1 cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC_POSIX 1 @@ -34889,9 +37332,11 @@ _ACEOF + gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" - HAVE_REALLOC_POSIX=0 + REPLACE_REALLOC=1 + fi @@ -34900,12 +37345,14 @@ _ACEOF GNULIB_REALLOC_POSIX=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_REALLOC_POSIX 1 +#define GNULIB_TEST_REALLOC_POSIX 1 _ACEOF + # Code from module regex: @@ -35008,8 +37455,9 @@ static struct re_pattern_buffer regex; if (!s) return 1; - /* Ensure that [b-a] is diagnosed as invalid. */ - re_set_syntax (RE_SYNTAX_POSIX_EGREP); + /* Ensure that [b-a] is diagnosed as invalid, when + using RE_NO_EMPTY_RANGES. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[b-a]", 6, ®ex); if (s == 0) @@ -35069,12 +37517,17 @@ static struct re_pattern_buffer regex; if (! REG_STARTEND) return 1; - /* Reject hosts whose regoff_t values are too narrow. - These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t - and 32-bit int. */ +#if 0 + /* It would be nice to reject hosts whose regoff_t values are too + narrow (including glibc on hosts with 64-bit ptrdiff_t and + 32-bit int), but we should wait until glibc implements this + feature. Otherwise, support for equivalence classes and + multibyte collation symbols would always be broken except + when compiling --without-included-regex. */ if (sizeof (regoff_t) < sizeof (ptrdiff_t) || sizeof (regoff_t) < sizeof (ssize_t)) return 1; +#endif return 0; ; @@ -35461,6 +37914,7 @@ fi fi + # Code from module rename: @@ -35471,15 +37925,22 @@ fi - - -for ac_func in rmdir -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking whether rename honors trailing slash on destination" >&5 +$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; } +if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then $as_echo_n "(cached) " >&6 +else + rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk + touch conftest.f && mkdir conftest.d1 || + { { $as_echo "$as_me:$LINENO: error: cannot create temporary files" >&5 +$as_echo "$as_me: error: cannot create temporary files" >&2;} + { (exit 1); exit 1; }; } + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + ln -s conftest.f conftest.lnk + fi + if test "$cross_compiling" = yes; then + gl_cv_func_rename_slash_dst_works="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -35487,46 +37948,24 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif +# include +# include int main () { -return $ac_func (); +if (rename ("conftest.f", "conftest.f1/") == 0) return 1; + if (rename ("conftest.d1", "conftest.d2/") != 0) return 2; +#if HAVE_LSTAT + if (rename ("conftest.f", "conftest.lnk/") == 0) return 3; +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -35534,81 +37973,74 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_rename_slash_dst_works=yes else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +( exit $ac_status ) +gl_cv_func_rename_slash_dst_works=no fi - rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -else - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk fi -done +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_rename_slash_dst_works" >&5 +$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; } + if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then - if test $ac_cv_func_rmdir = no; then - REPLACE_RMDIR=1 - # If someone lacks rmdir, make configure fail, and request - # a bug report to inform us about it. - if test x"$SKIP_RMDIR_CHECK" != xyes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: Your system lacks the rmdir function. - Please report this, along with the output of \"uname -a\", to the - bug-coreutils@gnu.org mailing list. To continue past this point, - rerun configure with SKIP_RMDIR_CHECK=yes. - E.g., ./configure SKIP_RMDIR_CHECK=yes -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: Your system lacks the rmdir function. - Please report this, along with the output of \"uname -a\", to the - bug-coreutils@gnu.org mailing list. To continue past this point, - rerun configure with SKIP_RMDIR_CHECK=yes. - E.g., ./configure SKIP_RMDIR_CHECK=yes -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - else - { $as_echo "$as_me:$LINENO: checking whether rmdir works" >&5 -$as_echo_n "checking whether rmdir works... " >&6; } -if test "${gl_cv_func_rmdir_works+set}" = set; then + + + + + + + gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" + + REPLACE_RENAME=1 + +cat >>confdefs.h <<\_ACEOF +#define RENAME_TRAILING_SLASH_DEST_BUG 1 +_ACEOF + + fi + + { $as_echo "$as_me:$LINENO: checking whether rename honors trailing slash on source" >&5 +$as_echo_n "checking whether rename honors trailing slash on source... " >&6; } +if test "${gl_cv_func_rename_slash_src_works+set}" = set; then $as_echo_n "(cached) " >&6 else - mkdir conftest.dir - touch conftest.file - if test "$cross_compiling" = yes; then - gl_cv_func_rmdir_works="guessing no" + rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk + touch conftest.f && mkdir conftest.d1 || + { { $as_echo "$as_me:$LINENO: error: cannot create temporary files" >&5 +$as_echo "$as_me: error: cannot create temporary files" >&2;} + { (exit 1); exit 1; }; } + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + ln -s conftest.f conftest.lnk + fi + if test "$cross_compiling" = yes; then + gl_cv_func_rename_slash_src_works="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -35616,15 +38048,19 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - #include - #include + +# include +# include int main () { -return !rmdir ("conftest.file/") || errno != ENOTDIR - || !rmdir ("conftest.dir/./"); +if (rename ("conftest.f/", "conftest.d2") == 0) return 1; + if (rename ("conftest.d1/", "conftest.d2") != 0) return 2; +#if HAVE_LSTAT + if (rename ("conftest.lnk/", "conftest.f") == 0) return 3; +#endif + ; return 0; } @@ -35651,70 +38087,54 @@ $as_echo "$ac_try_echo") >&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gl_cv_func_rmdir_works=yes + gl_cv_func_rename_slash_src_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -gl_cv_func_rmdir_works=no +gl_cv_func_rename_slash_src_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - rm -rf conftest.dir conftest.file -fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_rmdir_works" >&5 -$as_echo "$gl_cv_func_rmdir_works" >&6; } - if test x"$gl_cv_func_rmdir_works" != xyes; then - REPLACE_RMDIR=1 - - + rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_rename_slash_src_works" >&5 +$as_echo "$gl_cv_func_rename_slash_src_works" >&6; } + if test "x$gl_cv_func_rename_slash_src_works" != xyes; then - gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext" - - fi - fi - GNULIB_RMDIR=1 + gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" + REPLACE_RENAME=1 cat >>confdefs.h <<\_ACEOF -#define GNULIB_RMDIR 1 +#define RENAME_TRAILING_SLASH_SOURCE_BUG 1 _ACEOF + fi - - - - - - - - - - - - - - -for ac_func in rpmatch -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking whether rename manages hard links correctly" >&5 +$as_echo_n "checking whether rename manages hard links correctly... " >&6; } +if test "${gl_cv_func_rename_link_works+set}" = set; then $as_echo_n "(cached) " >&6 +else + rm -rf conftest.f conftest.f1 + if touch conftest.f && ln conftest.f conftest.f1 && + set x `ls -i conftest.f conftest.f1` && test "" = ""; then + if test "$cross_compiling" = yes; then + gl_cv_func_rename_link_works="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -35722,46 +38142,23 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif +# include +# include +# include int main () { -return $ac_func (); +if (rename ("conftest.f", "conftest.f1")) return 1; + if (unlink ("conftest.f1")) return 2; + if (rename ("conftest.f", "conftest.f")) return 3; + if (rename ("conftest.f1", "conftest.f1") == 0) return 4; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -35769,57 +38166,73 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_rename_link_works=yes else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +( exit $ac_status ) +gl_cv_func_rename_link_works=no fi - rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -else - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + else + gl_cv_func_rename_link_works="guessing no" + fi + rm -rf conftest.f conftest.f1 fi -done +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_rename_link_works" >&5 +$as_echo "$gl_cv_func_rename_link_works" >&6; } + if test "x$gl_cv_func_rename_link_works" != xyes; then - if test $ac_cv_func_rpmatch = no; then - HAVE_RPMATCH=0 - { $as_echo "$as_me:$LINENO: checking for nl_langinfo and YESEXPR" >&5 -$as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; } -if test "${gl_cv_langinfo_yesexpr+set}" = set; then + + + + + + gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" + + REPLACE_RENAME=1 + +cat >>confdefs.h <<\_ACEOF +#define RENAME_HARD_LINK_BUG 1 +_ACEOF + + fi + + { $as_echo "$as_me:$LINENO: checking whether rename manages existing destinations correctly" >&5 +$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; } +if test "${gl_cv_func_rename_dest_works+set}" = set; then $as_echo_n "(cached) " >&6 +else + rm -rf conftest.f conftest.d1 conftest.d2 + touch conftest.f && mkdir conftest.d1 conftest.d2 || + { { $as_echo "$as_me:$LINENO: error: cannot create temporary files" >&5 +$as_echo "$as_me: error: cannot create temporary files" >&2;} + { (exit 1); exit 1; }; } + if test "$cross_compiling" = yes; then + gl_cv_func_rename_dest_works="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -35827,16 +38240,20 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + +# include +# include + int main () { -char* cs = nl_langinfo(YESEXPR); return !cs; +if (rename ("conftest.d1", "conftest.d2") != 0) return 1; + if (rename ("conftest.d2", "conftest.f") == 0) return 2; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -35844,52 +38261,40 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - gl_cv_langinfo_yesexpr=yes + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_rename_dest_works=yes else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_langinfo_yesexpr=no +( exit $ac_status ) +gl_cv_func_rename_dest_works=no fi - rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_langinfo_yesexpr" >&5 -$as_echo "$gl_cv_langinfo_yesexpr" >&6; } - if test $gl_cv_langinfo_yesexpr = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_LANGINFO_YESEXPR 1 -_ACEOF - - fi - - fi - - - - GNULIB_RPMATCH=1 + rm -rf conftest.f conftest.d1 conftest.d2 -cat >>confdefs.h <<\_ACEOF -#define GNULIB_RPMATCH 1 -_ACEOF +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_rename_dest_works" >&5 +$as_echo "$gl_cv_func_rename_dest_works" >&6; } + if test "x$gl_cv_func_rename_dest_works" != xyes; then @@ -35898,32 +38303,43 @@ _ACEOF + gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" + REPLACE_RENAME=1 +cat >>confdefs.h <<\_ACEOF +#define RENAME_DEST_EXISTS_BUG 1 +_ACEOF + fi - gl_LIBOBJS="$gl_LIBOBJS safe-read.$ac_objext" + GNULIB_RENAME=1 +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_RENAME 1 +_ACEOF + # Code from module renameat: - gl_LIBOBJS="$gl_LIBOBJS safe-write.$ac_objext" + if test $ac_cv_func_renameat = no; then + HAVE_RENAMEAT=0 @@ -35932,17 +38348,20 @@ _ACEOF + gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext" - gl_LIBOBJS="$gl_LIBOBJS same.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext" + elif test $REPLACE_RENAME = 1; then + REPLACE_RENAMEAT=1 @@ -35951,6 +38370,376 @@ _ACEOF + gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext" + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext" + + fi + + + + + GNULIB_RENAMEAT=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_RENAMEAT 1 +_ACEOF + + + + # Code from module rmdir: + + + + { $as_echo "$as_me:$LINENO: checking whether rmdir works" >&5 +$as_echo_n "checking whether rmdir works... " >&6; } +if test "${gl_cv_func_rmdir_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + mkdir conftest.dir + touch conftest.file + if test "$cross_compiling" = yes; then + gl_cv_func_rmdir_works="guessing no" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + #include + +int +main () +{ +return !rmdir ("conftest.file/") || errno != ENOTDIR + || !rmdir ("conftest.dir/./"); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_rmdir_works=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gl_cv_func_rmdir_works=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + rm -rf conftest.dir conftest.file +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_rmdir_works" >&5 +$as_echo "$gl_cv_func_rmdir_works" >&6; } + if test x"$gl_cv_func_rmdir_works" != xyes; then + REPLACE_RMDIR=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext" + + fi + + + + + GNULIB_RMDIR=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_RMDIR 1 +_ACEOF + + + + # Code from module rpmatch: + + + + + + + + + + + + + +for ac_func in rpmatch +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + +fi +done + + + if test $ac_cv_func_rpmatch = no; then + HAVE_RPMATCH=0 + + { $as_echo "$as_me:$LINENO: checking for nl_langinfo and YESEXPR" >&5 +$as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; } +if test "${gl_cv_langinfo_yesexpr+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +char* cs = nl_langinfo(YESEXPR); return !cs; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + gl_cv_langinfo_yesexpr=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_langinfo_yesexpr=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_langinfo_yesexpr" >&5 +$as_echo "$gl_cv_langinfo_yesexpr" >&6; } + if test $gl_cv_langinfo_yesexpr = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LANGINFO_YESEXPR 1 +_ACEOF + + fi + + fi + + + + + GNULIB_RPMATCH=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_RPMATCH 1 +_ACEOF + + + + # Code from module safe-read: + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS safe-read.$ac_objext" + + + + + + + # Code from module safe-write: + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS safe-write.$ac_objext" + + + + + + + + + # Code from module same-inode: + # Code from module save-cwd: + + + + @@ -35965,6 +38754,7 @@ _ACEOF + # Code from module savedir: @@ -35977,6 +38767,7 @@ _ACEOF gl_LIBOBJS="$gl_LIBOBJS savedir.$ac_objext" + # Code from module setenv: if test $HAVE_SETENV$REPLACE_SETENV != 10; then @@ -35994,15 +38785,18 @@ _ACEOF + GNULIB_SETENV=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_SETENV 1 +#define GNULIB_TEST_SETENV 1 _ACEOF + # Code from module size_max: for ac_header in stdint.h @@ -36838,8 +39632,8 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - extern size_t foo; - extern unsigned long foo; + extern size_t foo; + extern unsigned long foo; int main () @@ -36900,6 +39694,7 @@ _ACEOF + # Code from module sleep: { $as_echo "$as_me:$LINENO: checking whether sleep is declared" >&5 @@ -37088,15 +39883,18 @@ $as_echo "$gl_cv_func_sleep_works" >&6; } + GNULIB_SLEEP=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_SLEEP 1 +#define GNULIB_TEST_SLEEP 1 _ACEOF + # Code from module snprintf: gl_cv_func_snprintf_usable=no @@ -37304,15 +40102,18 @@ $as_echo "$gl_cv_func_snprintf_size1" >&6; } + GNULIB_SNPRINTF=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_SNPRINTF 1 +#define GNULIB_TEST_SNPRINTF 1 _ACEOF + # Code from module ssize_t: { $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 $as_echo_n "checking for ssize_t... " >&6; } @@ -37330,7 +40131,7 @@ int main () { int x = sizeof (ssize_t *) + sizeof (ssize_t); - return !x; + return !x; ; return 0; } @@ -37373,6 +40174,7 @@ _ACEOF fi + # Code from module stat: @@ -37554,15 +40356,19 @@ _ACEOF + GNULIB_STAT=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_STAT 1 +#define GNULIB_TEST_STAT 1 _ACEOF + # Code from module stat-macros: + # Code from module stat-time: @@ -38412,6 +41218,7 @@ fi fi + # Code from module stdarg: STDARG_H=''; NEXT_STDARG_H=''; @@ -38635,6 +41442,7 @@ _ACEOF fi fi + # Code from module stdbool: @@ -38654,6 +41462,7 @@ _ACEOF fi + # Code from module stddef: @@ -38782,6 +41591,7 @@ $as_echo "$gl_cv_next_stddef_h" >&6; } fi + # Code from module stdint: @@ -40514,6 +43324,8 @@ _ACEOF fi + # Code from module stdio: + @@ -40603,7 +43415,8 @@ $as_echo "$gl_cv_next_stdio_h" >&6; } - for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf vdprintf vsnprintf; do + + for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf tmpfile vdprintf vsnprintf; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } @@ -40672,6 +43485,7 @@ fi done + # Code from module stdlib: @@ -40941,7 +43755,11 @@ fi - for gl_func in atoll canonicalize_file_name getloadavg getsubopt mkdtemp mkostemp mkostemps mkstemp mkstemps random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unsetenv; do + + + + + for gl_func in _Exit 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; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } @@ -41016,6 +43834,7 @@ fi done + # Code from module stpcpy: @@ -41136,143 +43955,8 @@ fi done - if test $ac_cv_func_stpcpy = no; then - HAVE_STPCPY=0 - - : - - fi - - - - GNULIB_STPCPY=1 - - -cat >>confdefs.h <<\_ACEOF -#define GNULIB_STPCPY 1 -_ACEOF - - - - - - - - - - - - - - - -for ac_func in strcasecmp -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - -fi -done - - - if test $ac_cv_func_strcasecmp = no; then - HAVE_STRCASECMP=0 + if test $ac_cv_func_stpcpy = no; then + HAVE_STPCPY=0 : @@ -41281,15 +43965,30 @@ done + GNULIB_STPCPY=1 +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_STPCPY 1 +_ACEOF + # Code from module strcase: -for ac_func in strncasecmp + + + + + + + + + + +for ac_func in strcasecmp do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -41394,86 +44093,12 @@ fi done - if test $ac_cv_func_strncasecmp = no; then + if test $ac_cv_func_strcasecmp = no; then + HAVE_STRCASECMP=0 : fi - { $as_echo "$as_me:$LINENO: checking whether strncasecmp is declared" >&5 -$as_echo_n "checking whether strncasecmp is declared... " >&6; } -if test "${ac_cv_have_decl_strncasecmp+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef strncasecmp - (void) strncasecmp; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_strncasecmp=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl_strncasecmp=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strncasecmp" >&5 -$as_echo "$ac_cv_have_decl_strncasecmp" >&6; } -if test "x$ac_cv_have_decl_strncasecmp" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRNCASECMP 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRNCASECMP 0 -_ACEOF - - -fi - - - if test $ac_cv_have_decl_strncasecmp = no; then - HAVE_DECL_STRNCASECMP=0 - fi - - - @@ -41486,7 +44111,7 @@ fi -for ac_func in strchrnul +for ac_func in strncasecmp do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -41591,38 +44216,90 @@ fi done - if test $ac_cv_func_strchrnul = no; then - HAVE_STRCHRNUL=0 - : - fi - - + if test $ac_cv_func_strncasecmp = no; then - GNULIB_STRCHRNUL=1 + : + fi + { $as_echo "$as_me:$LINENO: checking whether strncasecmp is declared" >&5 +$as_echo_n "checking whether strncasecmp is declared... " >&6; } +if test "${ac_cv_have_decl_strncasecmp+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef strncasecmp + (void) strncasecmp; +#endif -cat >>confdefs.h <<\_ACEOF -#define GNULIB_STRCHRNUL 1 + ; + return 0; +} _ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_strncasecmp=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_decl_strncasecmp=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strncasecmp" >&5 +$as_echo "$ac_cv_have_decl_strncasecmp" >&6; } +if test "x$ac_cv_have_decl_strncasecmp" = x""yes; then +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNCASECMP 1 +_ACEOF +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNCASECMP 0 +_ACEOF - if test $gl_cv_func_malloc_posix != yes; then - REPLACE_STRDUP=1 +fi + if test $ac_cv_have_decl_strncasecmp = no; then + HAVE_DECL_STRNCASECMP=0 + fi + # Code from module strchrnul: - gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" - else @@ -41632,7 +44309,7 @@ _ACEOF -for ac_func in strdup +for ac_func in strchrnul do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -41737,6 +44414,61 @@ fi done + if test $ac_cv_func_strchrnul = no; then + HAVE_STRCHRNUL=0 + : + fi + + + + + GNULIB_STRCHRNUL=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_STRCHRNUL 1 +_ACEOF + + + + # Code from module strdup-posix: + + + + + + + + + + if test $ac_cv_func_strdup = yes; then + if test $gl_cv_func_malloc_posix != yes; then + REPLACE_STRDUP=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" + + : + fi + else + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" + + : fi @@ -41745,19 +44477,22 @@ done if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi - : + GNULIB_STRDUP=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_STRDUP 1 +#define GNULIB_TEST_STRDUP 1 _ACEOF + # Code from module streq: + # Code from module strerror: if test $REPLACE_STRERROR = 1; then @@ -41780,21 +44515,26 @@ _ACEOF + GNULIB_STRERROR=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_STRERROR 1 +#define GNULIB_TEST_STRERROR 1 _ACEOF + # Code from module string: + # Code from module strings: + # Code from module strndup: @@ -41821,10 +44561,12 @@ if test "${gl_cv_func_strndup_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then - case $host_os in - aix*) gl_cv_func_strndup_works="guessing no";; - *) gl_cv_func_strndup_works="guessing yes";; + + case $host_os in + aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; + *) gl_cv_func_strndup_works="guessing yes";; esac + else cat >conftest.$ac_ext <<_ACEOF @@ -41920,15 +44662,19 @@ $as_echo "$gl_cv_func_strndup_works" >&6; } + GNULIB_STRNDUP=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_STRNDUP 1 +#define GNULIB_TEST_STRNDUP 1 _ACEOF + # Code from module strnlen: + @@ -41939,9 +44685,8 @@ _ACEOF if test $ac_cv_have_decl_strnlen = no; then HAVE_DECL_STRNLEN=0 - fi - - { $as_echo "$as_me:$LINENO: checking for working strnlen" >&5 + else + { $as_echo "$as_me:$LINENO: checking for working strnlen" >&5 $as_echo_n "checking for working strnlen... " >&6; } if test "${ac_cv_func_strnlen_working+set}" = set; then $as_echo_n "(cached) " >&6 @@ -42029,30 +44774,39 @@ test $ac_cv_func_strnlen_working = no && gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" - if test $ac_cv_func_strnlen_working = no; then - # This is necessary because automake-1.6.1 doesn't understand - # that the above use of AC_FUNC_STRNLEN means we may have to use - # lib/strnlen.c. - #AC_LIBOBJ([strnlen]) + if test $ac_cv_func_strnlen_working = no; then + REPLACE_STRNLEN=1 + fi + fi + if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then -cat >>confdefs.h <<\_ACEOF -#define strnlen rpl_strnlen -_ACEOF + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" : fi + GNULIB_STRNLEN=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_STRNLEN 1 +#define GNULIB_TEST_STRNLEN 1 _ACEOF + # Code from module strnlen1: + # Code from module strtoimax: @@ -42278,9 +45032,12 @@ fi + GNULIB_STRTOIMAX=1 + # Code from module strtol: + @@ -42396,6 +45153,7 @@ done + # Code from module strtoll: @@ -42524,15 +45282,18 @@ done + GNULIB_STRTOLL=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_STRTOLL 1 +#define GNULIB_TEST_STRTOLL 1 _ACEOF + # Code from module strtoul: @@ -42649,6 +45410,7 @@ done + # Code from module strtoull: @@ -42777,15 +45539,18 @@ done + GNULIB_STRTOULL=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_STRTOULL 1 +#define GNULIB_TEST_STRTOULL 1 _ACEOF + # Code from module strtoumax: @@ -43011,9 +45776,166 @@ fi + GNULIB_STRTOUMAX=1 + # Code from module symlink: + + + + + + + + + if test $ac_cv_func_symlink = no; then + HAVE_SYMLINK=0 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" + + else + { $as_echo "$as_me:$LINENO: checking whether symlink handles trailing slash correctly" >&5 +$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } +if test "${gl_cv_func_symlink_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + gl_cv_func_symlink_works="guessing no" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +if (!symlink ("a", "conftest.link/")) return 1; + if (symlink ("conftest.f", "conftest.lnk2")) return 2; + if (!symlink ("a", "conftest.lnk2/")) return 3; + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_symlink_works=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gl_cv_func_symlink_works=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + rm -f conftest.f conftest.link conftest.lnk2 +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_symlink_works" >&5 +$as_echo "$gl_cv_func_symlink_works" >&6; } + if test "$gl_cv_func_symlink_works" != yes; then + REPLACE_SYMLINK=1 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" + + fi + fi + + + + + GNULIB_SYMLINK=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_SYMLINK 1 +_ACEOF + + + + # Code from module symlinkat: + + + + + + + + + + + if test $ac_cv_func_symlinkat = no; then + HAVE_SYMLINKAT=0 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS symlinkat.$ac_objext" + + fi + + + + + GNULIB_SYMLINKAT=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_SYMLINKAT 1 +_ACEOF + + + + # Code from module sys_stat: + @@ -43317,6 +46239,7 @@ fi $as_echo "$MKDIR_P" >&6; } + # Code from module sys_time: @@ -43363,6 +46286,7 @@ fi $as_echo "$MKDIR_P" >&6; } + # Code from module sysexits: @@ -43503,6 +46427,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Code from module tempname: @@ -43520,6 +46445,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext : + # Code from module time: + + + + # Code from module time_r: @@ -43529,7 +46459,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: checking whether localtime_r is compatible with its POSIX signature" >&5 + + + + if test $ac_cv_func_localtime_r = yes; then + { $as_echo "$as_me:$LINENO: checking whether localtime_r is compatible with its POSIX signature" >&5 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } if test "${gl_cv_time_r_posix+set}" = set; then $as_echo_n "(cached) " >&6 @@ -43545,12 +46479,239 @@ int main () { /* We don't need to append 'restrict's to the argument types, - even though the POSIX signature has the 'restrict's, - since C99 says they can't affect type compatibility. */ - struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; - if (ptr) return 0; - /* Check the return type is a pointer. On HP-UX 10 it is 'int'. */ - *localtime_r (0, 0); + even though the POSIX signature has the 'restrict's, + since C99 says they can't affect type compatibility. */ + struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; + if (ptr) return 0; + /* Check the return type is a pointer. + On HP-UX 10 it is 'int'. */ + *localtime_r (0, 0); + ; + return 0; +} + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_time_r_posix=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_time_r_posix=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_time_r_posix" >&5 +$as_echo "$gl_cv_time_r_posix" >&6; } + if test $gl_cv_time_r_posix = yes; then + REPLACE_LOCALTIME_R=0 + else + REPLACE_LOCALTIME_R=1 + fi + else + HAVE_LOCALTIME_R=0 + fi + if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" + + + : + + fi + + + + + GNULIB_TIME_R=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_TIME_R 1 +_ACEOF + + + + # Code from module timespec: + + + + # Code from module unistd: + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_unistd_h='<'unistd.h'>' + else + { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_unistd_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_unistd_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/unistd.h#{ + s#.*"\(.*/unistd.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_unistd_h='<'unistd.h'>' + fi + +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_unistd_h" >&5 +$as_echo "$gl_cv_next_unistd_h" >&6; } + fi + NEXT_UNISTD_H=$gl_cv_next_unistd_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'unistd.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_unistd_h + fi + NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive + + + + + + + + + + + if test $ac_cv_header_unistd_h = yes; then + HAVE_UNISTD_H=1 + else + HAVE_UNISTD_H=0 + fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + for gl_func in 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 pwrite readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +/* Some systems declare various items in the wrong headers. */ +#ifndef __GLIBC__ +# include +# include +# include +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# include +# endif +#endif + +int +main () +{ +#undef $gl_func + (void) $gl_func; ; return 0; } @@ -43573,36 +46734,37 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - gl_cv_time_r_posix=yes + eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_time_r_posix=no + eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_time_r_posix" >&5 -$as_echo "$gl_cv_time_r_posix" >&6; } - if test $gl_cv_time_r_posix = yes; then - REPLACE_LOCALTIME_R=0 - else - REPLACE_LOCALTIME_R=1 - - - - +ac_res=`eval 'as_val=${'$as_gl_Symbol'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + as_val=`eval 'as_val=${'$as_gl_Symbol'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + eval ac_cv_have_decl_$gl_func=yes +fi + done - gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" + # Code from module unistd-safer: - : - fi @@ -43615,6 +46777,7 @@ $as_echo "$gl_cv_time_r_posix" >&6; } + gl_LIBOBJS="$gl_LIBOBJS dup-safer.$ac_objext" @@ -43622,55 +46785,9 @@ $as_echo "$gl_cv_time_r_posix" >&6; } - if test $gl_cv_have_include_next = yes; then - gl_cv_next_unistd_h='<'unistd.h'>' - else - { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_unistd_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test $ac_cv_header_unistd_h = yes; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/unistd.h#{ - s#.*"\(.*/unistd.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_unistd_h='<'unistd.h'>' - fi - -fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_unistd_h" >&5 -$as_echo "$gl_cv_next_unistd_h" >&6; } - fi - NEXT_UNISTD_H=$gl_cv_next_unistd_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'unistd.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_unistd_h - fi - NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive + gl_LIBOBJS="$gl_LIBOBJS fd-safer.$ac_objext" @@ -43680,56 +46797,112 @@ $as_echo "$gl_cv_next_unistd_h" >&6; } - if test $ac_cv_header_unistd_h = yes; then - HAVE_UNISTD_H=1 - else - HAVE_UNISTD_H=0 - fi + gl_LIBOBJS="$gl_LIBOBJS pipe-safer.$ac_objext" + # Code from module unitypes: + if { test "$HAVE_LIBUNISTRING" != yes \ + || { + test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ + || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ + && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ + || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ + && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 + } + } + } + } + }; then + LIBUNISTRING_UNITYPES_H='unitypes.h' + else + LIBUNISTRING_UNITYPES_H= + fi + # Code from module uniwidth/base: + if { test "$HAVE_LIBUNISTRING" != yes \ + || { + test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ + || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ + && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ + || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ + && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 + } + } + } + } + }; then + LIBUNISTRING_UNIWIDTH_H='uniwidth.h' + else + LIBUNISTRING_UNIWIDTH_H= + fi + # Code from module uniwidth/width: + if { test "$HAVE_LIBUNISTRING" != yes \ + || { + test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ + || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ + && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ + || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ + && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 + } + } + } + } + }; then + LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE= + LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#' +else + LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#' + LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE= +fi + # Code from module unlink: - for gl_func in 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 unlink unlinkat usleep; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking whether unlink honors trailing slashes" >&5 +$as_echo_n "checking whether unlink honors trailing slashes... " >&6; } +if test "${gl_cv_func_unlink_honors_slashes+set}" = set; then $as_echo_n "(cached) " >&6 +else + touch conftest.file + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + ln -s conftest.file conftest.lnk + fi + if test "$cross_compiling" = yes; then + gl_cv_func_unlink_honors_slashes="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -43738,123 +46911,87 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -/* Some systems declare various items in the wrong headers. */ -#ifndef __GLIBC__ -# include -# include -# include -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include -# endif -#endif + #include int main () { -#undef $gl_func - (void) $gl_func; +if (!unlink ("conftest.file/") || errno != ENOTDIR) return 1; +#if HAVE_LSTAT + if (!unlink ("conftest.lnk/") || errno != ENOTDIR) return 2; +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_gl_Symbol=yes" + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + gl_cv_func_unlink_honors_slashes=yes else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_gl_Symbol=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +( exit $ac_status ) +gl_cv_func_unlink_honors_slashes=no fi -ac_res=`eval 'as_val=${'$as_gl_Symbol'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - as_val=`eval 'as_val=${'$as_gl_Symbol'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - done - - - - - - - - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS dup-safer.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fd-safer.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS pipe-safer.$ac_objext" - - - - - - { $as_echo "$as_me:$LINENO: checking whether unlink honors trailing slashes" >&5 -$as_echo_n "checking whether unlink honors trailing slashes... " >&6; } -if test "${gl_cv_func_unlink_works+set}" = set; then + rm -f conftest.file conftest.lnk +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_unlink_honors_slashes" >&5 +$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; } + { $as_echo "$as_me:$LINENO: checking whether unlink of a parent directory fails is it should" >&5 +$as_echo_n "checking whether unlink of a parent directory fails is it should... " >&6; } +if test "${gl_cv_func_unlink_parent_fails+set}" = set; then $as_echo_n "(cached) " >&6 else - touch conftest.file - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - ln -s conftest.file conftest.lnk - fi - if test "$cross_compiling" = yes; then - gl_cv_func_unlink_works="guessing no" + case "$host_os" in + darwin*) + if { + # Use the mktemp program if available. If not available, hide the error + # message. + tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" + } || + { + # Use a simple mkdir command. It is guaranteed to fail if the directory + # already exists. $RANDOM is bash specific and expands to empty in shells + # other than bash, ksh and zsh. Its use does not increase security; + # rather, it minimizes the probability of failure in a very cluttered /tmp + # directory. + tmp=/tmp/gt$$-$RANDOM + (umask 077 && mkdir "$tmp") + }; then + mkdir "$tmp/subdir" + GL_SUBDIR_FOR_UNLINK="$tmp/subdir" + export GL_SUBDIR_FOR_UNLINK + if test "$cross_compiling" = yes; then + gl_cv_func_unlink_parent_fails="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -43862,20 +46999,16 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - #include -int -main () -{ -if (!unlink ("conftest.file/") || errno != ENOTDIR) return 1; -#if HAVE_LSTAT - if (!unlink ("conftest.lnk/") || errno != ENOTDIR) return 2; -#endif + #include + #include + int main () + { + if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0) + return 1; + return unlink ("..") == 0; + } - ; - return 0; -} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -43899,25 +47032,49 @@ $as_echo "$ac_try_echo") >&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gl_cv_func_unlink_works=yes + gl_cv_func_unlink_parent_fails=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -gl_cv_func_unlink_works=no +gl_cv_func_unlink_parent_fails=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - rm -f conftest.file conftest.lnk + unset GL_SUBDIR_FOR_UNLINK + rm -rf "$tmp" + else + gl_cv_func_unlink_parent_fails="guessing no" + fi + ;; + *) + gl_cv_func_unlink_parent_fails="guessing yes" + ;; + esac + fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_unlink_works" >&5 -$as_echo "$gl_cv_func_unlink_works" >&6; } - if test x"$gl_cv_func_unlink_works" != xyes; then +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_unlink_parent_fails" >&5 +$as_echo "$gl_cv_func_unlink_parent_fails" >&6; } + case "$gl_cv_func_unlink_parent_fails" in + *no) + +cat >>confdefs.h <<\_ACEOF +#define UNLINK_PARENT_BUG 1 +_ACEOF + + ;; + esac + if test "$gl_cv_func_unlink_honors_slashes" != yes \ + || { case "$gl_cv_func_unlink_parent_fails" in + *yes) false;; + *no) true;; + esac + }; then REPLACE_UNLINK=1 @@ -43933,15 +47090,18 @@ $as_echo "$gl_cv_func_unlink_works" >&6; } + GNULIB_UNLINK=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_UNLINK 1 +#define GNULIB_TEST_UNLINK 1 _ACEOF + # Code from module unlinkdir: @@ -43982,6 +47142,7 @@ _ACEOF ;; esac + # Code from module unlocked-io: cat >>confdefs.h <<\_ACEOF @@ -44044,6 +47205,7 @@ _ACEOF + # Code from module unsetenv: @@ -44180,6 +47342,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include extern #ifdef __cplusplus @@ -44248,8 +47411,8 @@ _ACEOF fi - { $as_echo "$as_me:$LINENO: checking whether unsetenv works on duplicates" >&5 -$as_echo_n "checking whether unsetenv works on duplicates... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether unsetenv obeys POSIX" >&5 +$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; } if test "${gl_cv_func_unsetenv_works+set}" = set; then $as_echo_n "(cached) " >&6 else @@ -44264,6 +47427,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include + #include int main () @@ -44275,6 +47439,7 @@ main () entry[0] = 'a'; unsetenv ("a"); if (getenv ("a")) return 3; + if (!unsetenv ("") || errno != EINVAL) return 4; ; return 0; @@ -44336,15 +47501,18 @@ $as_echo "$gl_cv_func_unsetenv_works" >&6; } + GNULIB_UNSETENV=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_UNSETENV 1 +#define GNULIB_TEST_UNSETENV 1 _ACEOF + # Code from module utimens: @@ -44428,29 +47596,192 @@ $as_echo "$ac_try_echo") >&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gl_cv_func_futimesat_works=yes + gl_cv_func_futimesat_works=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gl_cv_func_futimesat_works=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + rm -f conftest.file +fi +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_futimesat_works" >&5 +$as_echo "$gl_cv_func_futimesat_works" >&6; } + if test "$gl_cv_func_futimesat_works" != yes; then + +cat >>confdefs.h <<\_ACEOF +#define FUTIMESAT_NULL_BUG 1 +_ACEOF + + fi + fi + + # Code from module utimensat: + + + + + + + + + + if test $ac_cv_func_utimensat = no; then + HAVE_UTIMENSAT=0 + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS utimensat.$ac_objext" + + else + { $as_echo "$as_me:$LINENO: checking whether utimensat works" >&5 +$as_echo_n "checking whether utimensat works... " >&6; } +if test "${gl_cv_func_utimensat_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + gl_cv_func_utimensat_works="guessing no" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include + +int +main () +{ +struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } }; + struct stat st; + const char *f = "conftest.file"; + if (close (creat (f, 0600))) return 1; + if (utimensat (AT_FDCWD, f, NULL, AT_SYMLINK_NOFOLLOW)) return 2; + if (utimensat (AT_FDCWD, f, ts, 0)) return 3; + sleep (1); + ts[0].tv_nsec = UTIME_NOW; + ts[1].tv_nsec = UTIME_OMIT; + if (utimensat (AT_FDCWD, f, ts, 0)) return 4; + if (stat (f, &st)) return 5; + if (st.st_ctime < st.st_atime) return 6; + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef __linux__ +/* The Linux kernel added utimensat in 2.6.22, but has bugs with UTIME_OMIT + in several file systems as recently as 2.6.32. Always replace utimensat + to support older kernels. */ +choke me +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_func_utimensat_works=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_utimensat_works="needs runtime check" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -gl_cv_func_futimesat_works=no +gl_cv_func_utimensat_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - rm -f conftest.file fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_futimesat_works" >&5 -$as_echo "$gl_cv_func_futimesat_works" >&6; } - if test "$gl_cv_func_futimesat_works" != yes; then +{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_utimensat_works" >&5 +$as_echo "$gl_cv_func_utimensat_works" >&6; } + if test "$gl_cv_func_utimensat_works" != yes; then + REPLACE_UTIMENSAT=1 + -cat >>confdefs.h <<\_ACEOF -#define FUTIMESAT_NULL_BUG 1 -_ACEOF + + + + + + + gl_LIBOBJS="$gl_LIBOBJS utimensat.$ac_objext" fi fi @@ -44458,6 +47789,20 @@ _ACEOF + GNULIB_UTIMENSAT=1 + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_TEST_UTIMENSAT 1 +_ACEOF + + + + # Code from module vasnprintf: + + + @@ -44640,6 +47985,7 @@ fi fi + # Code from module vasprintf: for ac_func in vasprintf @@ -44782,11 +48128,13 @@ done + GNULIB_VASPRINTF=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_VASPRINTF 1 +#define GNULIB_TEST_VASPRINTF 1 _ACEOF @@ -44799,6 +48147,8 @@ _ACEOF XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format" + # Code from module verify: + # Code from module version-etc: # Check whether --with-packager was given. if test "${with_packager+set}" = set; then @@ -44852,6 +48202,8 @@ $as_echo "$as_me: error: The --with-packager-{bug-reports,version} options requi { (exit 1); exit 1; }; } fi + # Code from module version-etc-fsf: + # Code from module vsnprintf: gl_cv_func_vsnprintf_usable=no @@ -45059,15 +48411,19 @@ $as_echo "$gl_cv_func_snprintf_size1" >&6; } + GNULIB_VSNPRINTF=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_VSNPRINTF 1 +#define GNULIB_TEST_VSNPRINTF 1 _ACEOF + # Code from module warn-on-use: + # Code from module wchar: @@ -45242,6 +48598,7 @@ fi done + # Code from module wcrtomb: @@ -45273,10 +48630,10 @@ if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then else case "$host_os" in - # Guess no on AIX and OSF/1. - osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; + # Guess no on AIX and OSF/1. + aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then @@ -45459,9 +48816,7 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } fi - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_WCRTOMB=1 - fi + @@ -45470,27 +48825,29 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } if test $ac_cv_func_wcrtomb = no; then HAVE_WCRTOMB=0 - fi - if test $HAVE_WCRTOMB != 0 && test $REPLACE_WCRTOMB != 1; then + else + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_WCRTOMB=1 + else - { $as_echo "$as_me:$LINENO: checking whether wcrtomb return value is correct" >&5 + { $as_echo "$as_me:$LINENO: checking whether wcrtomb return value is correct" >&5 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; } if test "${gl_cv_func_wcrtomb_retval+set}" = set; then $as_echo_n "(cached) " >&6 else - case "$host_os" in - # Guess no on AIX 4, OSF/1 and Solaris. - aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_wcrtomb_retval="guessing yes" ;; - esac - if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then + case "$host_os" in + # Guess no on AIX 4, OSF/1 and Solaris. + aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_wcrtomb_retval="guessing yes" ;; + esac + if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then + if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF @@ -45565,15 +48922,16 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$a fi - fi + fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_wcrtomb_retval" >&5 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; } - case "$gl_cv_func_wcrtomb_retval" in - *yes) ;; - *) REPLACE_WCRTOMB=1 ;; - esac + case "$gl_cv_func_wcrtomb_retval" in + *yes) ;; + *) REPLACE_WCRTOMB=1 ;; + esac + fi fi if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then @@ -45596,15 +48954,18 @@ $as_echo "$gl_cv_func_wcrtomb_retval" >&6; } + GNULIB_WCRTOMB=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_WCRTOMB 1 +#define GNULIB_TEST_WCRTOMB 1 _ACEOF + # Code from module wctype: @@ -45629,6 +48990,30 @@ _ACEOF + + if test $ac_cv_func_iswblank = yes; then + HAVE_ISWBLANK=1 + REPLACE_ISWBLANK=0 + else + HAVE_ISWBLANK=0 + if test $ac_cv_have_decl_iswblank = yes; then + REPLACE_ISWBLANK=1 + else + REPLACE_ISWBLANK=0 + fi + fi + + + + + + + + + + + + if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else @@ -45822,6 +49207,7 @@ $as_echo "$gl_cv_next_wctype_h" >&6; } fi + # Code from module wcwidth: @@ -45928,9 +49314,7 @@ fi 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 { $as_echo "$as_me:$LINENO: checking whether wcwidth works reasonably in UTF-8 locales" >&5 $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; } if test "${gl_cv_func_wcwidth_works+set}" = set; then @@ -45940,9 +49324,9 @@ else if test "$cross_compiling" = yes; then case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_wcwidth_works="guessing yes";; - *) gl_cv_func_wcwidth_works="guessing no";; + # Guess yes on glibc and AIX 7 systems. + *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; + *) gl_cv_func_wcwidth_works="guessing no";; esac else @@ -46024,7 +49408,7 @@ $as_echo "$gl_cv_func_wcwidth_works" >&6; } *no) REPLACE_WCWIDTH=1 ;; esac fi - if test $REPLACE_WCWIDTH = 1; then + if test $ac_cv_func_wcwidth != yes || test $REPLACE_WCWIDTH = 1; then @@ -46036,8 +49420,8 @@ $as_echo "$gl_cv_func_wcwidth_works" >&6; } gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext" 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 : @@ -46045,15 +49429,19 @@ $as_echo "$gl_cv_func_wcwidth_works" >&6; } + GNULIB_WCWIDTH=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_WCWIDTH 1 +#define GNULIB_TEST_WCWIDTH 1 _ACEOF + # Code from module write: + @@ -46063,12 +49451,14 @@ _ACEOF GNULIB_WRITE=1 + cat >>confdefs.h <<\_ACEOF -#define GNULIB_WRITE 1 +#define GNULIB_TEST_WRITE 1 _ACEOF + # Code from module xalloc: @@ -46089,6 +49479,8 @@ _ACEOF : + # Code from module xalloc-die: + # Code from module xgetcwd: @@ -46103,6 +49495,7 @@ _ACEOF + # Code from module xsize: @@ -46258,11 +49651,13 @@ fi done + # Code from module xstrndup: : + # Code from module xstrtol: @@ -46295,6 +49690,8 @@ done gl_LIBOBJS="$gl_LIBOBJS xstrtol-error.$ac_objext" + # Code from module xstrtoumax: + # Code from module xvasprintf: @@ -46302,6 +49699,7 @@ done XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format" + # End of code from modules @@ -46323,6 +49721,11 @@ done gl_source_base='tests' + 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 + + gl_module_indicator_condition=$gltests_WITNESS + + @@ -46519,8 +49922,6 @@ fi - - # Set LIB_SETSOCKOPT to -lnsl -lsocket if necessary. pu_save_LIBS=$LIBS LIB_SETSOCKOPT= @@ -47406,105 +50807,19 @@ fi -for ac_func in fsync getdtablesize lstat mkfifo readlink symlink setlocale utimes -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -#undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -fi -done + + + + + { $as_echo "$as_me:$LINENO: checking whether getgrgid is declared" >&5 $as_echo_n "checking whether getgrgid is declared... " >&6; } @@ -48260,15 +51575,14 @@ fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi ac_prog=ld if test "$GCC" = yes; then @@ -48543,7 +51857,7 @@ fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then @@ -48975,14 +52289,16 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include #include + int main () { iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } @@ -49028,14 +52344,16 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include #include + int main () { iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } @@ -49086,15 +52404,17 @@ if test "${am_cv_func_iconv_works+set}" = set; then $as_echo_n "(cached) " >&6 else - am_save_LIBS="$LIBS" + am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then - case "$host_os" in + + case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac + else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -49145,6 +52465,24 @@ int main () return 1; } } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + const char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + 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. */ { @@ -49324,6 +52662,7 @@ _ACEOF fi + for ac_header in iconv.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -49606,7 +52945,7 @@ $as_echo "$USE_NLS" >&6; } - GETTEXT_MACRO_VERSION=0.17 + GETTEXT_MACRO_VERSION=0.18 @@ -49614,15 +52953,14 @@ $as_echo "$USE_NLS" >&6; } # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi # Find out how to test for executable files. Don't use a zero-byte file, @@ -49737,15 +53075,14 @@ fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi # Find out how to test for executable files. Don't use a zero-byte file, @@ -49815,15 +53152,14 @@ fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi # Find out how to test for executable files. Don't use a zero-byte file, @@ -49911,6 +53247,7 @@ fi + { $as_echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5 @@ -50096,15 +53433,19 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; + int main () { + bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings + ; return 0; } @@ -50192,14 +53533,16 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include #include + int main () { iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } @@ -50245,14 +53588,16 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include #include + int main () { iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } @@ -50303,15 +53648,17 @@ if test "${am_cv_func_iconv_works+set}" = set; then $as_echo_n "(cached) " >&6 else - am_save_LIBS="$LIBS" + am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then - case "$host_os" in + + case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac + else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -50362,6 +53709,24 @@ int main () return 1; } } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + const char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + 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. */ { @@ -50539,7 +53904,7 @@ fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then @@ -50941,6 +54306,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include $gt_revision_test_code extern int _nl_msg_cat_cntr; @@ -50949,11 +54315,14 @@ extern "C" #endif const char *_nl_expand_alias (const char *); + int main () { + bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; return 0; } @@ -50998,6 +54367,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include $gt_revision_test_code extern int _nl_msg_cat_cntr; @@ -51006,11 +54376,14 @@ extern "C" #endif const char *_nl_expand_alias (const char *); + int main () { + bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; return 0; } @@ -51037,8 +54410,8 @@ $as_echo "$ac_try_echo") >&5 $as_test_x conftest$ac_exeext }; then LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" - eval "$gt_func_gnugettext_libintl=yes" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" else $as_echo "$as_me: failed program was:" >&5 @@ -51326,6 +54699,13 @@ if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi @@ -51683,7 +55063,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU tar $as_me 1.23, which was +This file was extended by GNU tar $as_me 1.24, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -51746,7 +55126,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -GNU tar config.status 1.23 +GNU tar config.status 1.24 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"