diff options
author | Fabian Groffen <grobian@gentoo.org> | 2022-02-27 13:29:15 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2022-02-27 13:29:15 +0100 |
commit | b65e7f06a73504c50281f00e1e47fd424dd75a58 (patch) | |
tree | 351531973e226e2cfd3cc43a60276cbedbd47abc /configure | |
parent | gitignore: do NOT ignore gnulib files (diff) | |
download | portage-utils-b65e7f06a73504c50281f00e1e47fd424dd75a58.tar.gz portage-utils-b65e7f06a73504c50281f00e1e47fd424dd75a58.tar.bz2 portage-utils-b65e7f06a73504c50281f00e1e47fd424dd75a58.zip |
buildsys: regen, add ALL gnulib files this time
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 12187 |
1 files changed, 8366 insertions, 3821 deletions
@@ -657,8 +657,10 @@ ac_includes_default="\ ac_header_c_list= ac_func_c_list= gl_getopt_required=POSIX -ac_subst_vars='gltests_LTLIBOBJS +ac_subst_vars='gltests_LIBOBJDEPS +gltests_LTLIBOBJS gltests_LIBOBJS +gl_LIBOBJDEPS gl_LTLIBOBJS gl_LIBOBJS am__EXEEXT_FALSE @@ -697,11 +699,56 @@ SED LIBTOOL LIBGNU_LTLIBDEPS LIBGNU_LIBDEPS +GL_CFLAG_GNULIB_WARNINGS +GL_CFLAG_ALLOW_WARNINGS gltests_WITNESS +GL_GNULIB_MDA_WCSDUP +GL_GNULIB_WCSFTIME +GL_GNULIB_WCSWIDTH +GL_GNULIB_WCSTOK +GL_GNULIB_WCSSTR +GL_GNULIB_WCSPBRK +GL_GNULIB_WCSSPN +GL_GNULIB_WCSCSPN +GL_GNULIB_WCSRCHR +GL_GNULIB_WCSCHR +GL_GNULIB_WCSDUP +GL_GNULIB_WCSXFRM +GL_GNULIB_WCSCOLL +GL_GNULIB_WCSNCASECMP +GL_GNULIB_WCSCASECMP +GL_GNULIB_WCSNCMP +GL_GNULIB_WCSCMP +GL_GNULIB_WCSNCAT +GL_GNULIB_WCSCAT +GL_GNULIB_WCPNCPY +GL_GNULIB_WCSNCPY +GL_GNULIB_WCPCPY +GL_GNULIB_WCSCPY +GL_GNULIB_WCSNLEN +GL_GNULIB_WCSLEN +GL_GNULIB_WMEMSET +GL_GNULIB_WMEMPCPY +GL_GNULIB_WMEMMOVE +GL_GNULIB_WMEMCPY +GL_GNULIB_WMEMCMP +GL_GNULIB_WMEMCHR +GL_GNULIB_WCWIDTH +GL_GNULIB_WCSNRTOMBS +GL_GNULIB_WCSRTOMBS +GL_GNULIB_WCRTOMB +GL_GNULIB_MBSNRTOWCS +GL_GNULIB_MBSRTOWCS +GL_GNULIB_MBRLEN +GL_GNULIB_MBRTOWC +GL_GNULIB_MBSINIT +GL_GNULIB_WCTOB +GL_GNULIB_BTOWC HAVE_CRTDEFS_H HAVE_WINT_T NEXT_AS_FIRST_DIRECTIVE_WCHAR_H NEXT_WCHAR_H +REPLACE_WCSTOK REPLACE_WCSFTIME REPLACE_WCSWIDTH REPLACE_WCWIDTH @@ -717,6 +764,7 @@ REPLACE_WCTOB REPLACE_BTOWC REPLACE_MBSTATE_T HAVE_DECL_WCWIDTH +HAVE_DECL_WCSDUP HAVE_DECL_WCTOB HAVE_WCSFTIME HAVE_WCSWIDTH @@ -743,6 +791,7 @@ HAVE_WCSCPY HAVE_WCSNLEN HAVE_WCSLEN HAVE_WMEMSET +HAVE_WMEMPCPY HAVE_WMEMMOVE HAVE_WMEMCPY HAVE_WMEMCMP @@ -756,96 +805,203 @@ HAVE_MBRLEN HAVE_MBRTOWC HAVE_MBSINIT HAVE_BTOWC -GNULIB_WCSFTIME -GNULIB_WCSWIDTH -GNULIB_WCSTOK -GNULIB_WCSSTR -GNULIB_WCSPBRK -GNULIB_WCSSPN -GNULIB_WCSCSPN -GNULIB_WCSRCHR -GNULIB_WCSCHR -GNULIB_WCSDUP -GNULIB_WCSXFRM -GNULIB_WCSCOLL -GNULIB_WCSNCASECMP -GNULIB_WCSCASECMP -GNULIB_WCSNCMP -GNULIB_WCSCMP -GNULIB_WCSNCAT -GNULIB_WCSCAT -GNULIB_WCPNCPY -GNULIB_WCSNCPY -GNULIB_WCPCPY -GNULIB_WCSCPY -GNULIB_WCSNLEN -GNULIB_WCSLEN -GNULIB_WMEMSET -GNULIB_WMEMMOVE -GNULIB_WMEMCPY -GNULIB_WMEMCMP -GNULIB_WMEMCHR -GNULIB_WCWIDTH -GNULIB_WCSNRTOMBS -GNULIB_WCSRTOMBS -GNULIB_WCRTOMB -GNULIB_MBSNRTOWCS -GNULIB_MBSRTOWCS -GNULIB_MBRLEN -GNULIB_MBRTOWC -GNULIB_MBSINIT -GNULIB_WCTOB -GNULIB_BTOWC HAVE_FEATURES_H -GL_GENERATE_UTIME_H_FALSE -GL_GENERATE_UTIME_H_TRUE -UTIME_H +GL_COND_OBJ_UTIMENSAT_FALSE +GL_COND_OBJ_UTIMENSAT_TRUE HAVE_UTIME_H NEXT_AS_FIRST_DIRECTIVE_UTIME_H NEXT_UTIME_H +GL_GNULIB_MDA_UTIME +GL_GNULIB_UTIME +GL_COND_OBJ_UTIME_FALSE +GL_COND_OBJ_UTIME_TRUE REPLACE_UTIME HAVE_UTIME -GNULIB_UTIME +GL_COND_OBJ_UNLINKAT_FALSE +GL_COND_OBJ_UNLINKAT_TRUE +GL_COND_OBJ_UNLINK_FALSE +GL_COND_OBJ_UNLINK_TRUE HAVE_UNISTD_H NEXT_AS_FIRST_DIRECTIVE_UNISTD_H NEXT_UNISTD_H +GL_GNULIB_MDA_TZSET +GL_GNULIB_TZSET +GL_GNULIB_TIME_RZ +GL_GNULIB_TIME_R +GL_GNULIB_TIMESPEC_GETRES +GL_GNULIB_TIMESPEC_GET +GL_GNULIB_TIMEGM +GL_GNULIB_STRPTIME +GL_GNULIB_STRFTIME +GL_GNULIB_NANOSLEEP +GL_GNULIB_LOCALTIME +GL_GNULIB_MKTIME +GL_GNULIB_CTIME +TIME_H_DEFINES_TIME_UTC UNISTD_H_DEFINES_STRUCT_TIMESPEC PTHREAD_H_DEFINES_STRUCT_TIMESPEC SYS_TIME_H_DEFINES_STRUCT_TIMESPEC TIME_H_DEFINES_STRUCT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_TIME_H NEXT_TIME_H +REPLACE_LOCALTIME +REPLACE_GMTIME +GNULIB_GETTIMEOFDAY +REPLACE_TZSET +REPLACE_TIMEGM +REPLACE_STRFTIME +REPLACE_NANOSLEEP +REPLACE_MKTIME +REPLACE_LOCALTIME_R +REPLACE_CTIME +HAVE_TIMEZONE_T +HAVE_TIMESPEC_GETRES +HAVE_TIMESPEC_GET +HAVE_TIMEGM +HAVE_STRPTIME +HAVE_NANOSLEEP +HAVE_DECL_LOCALTIME_R WINDOWS_STAT_INODES WINDOWS_64_BIT_OFF_T NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H NEXT_SYS_TYPES_H +GL_COND_OBJ_SYMLINKAT_FALSE +GL_COND_OBJ_SYMLINKAT_TRUE +GL_COND_OBJ_SYMLINK_FALSE +GL_COND_OBJ_SYMLINK_TRUE +GL_COND_OBJ_STRNCAT_FALSE +GL_COND_OBJ_STRNCAT_TRUE +GL_GNULIB_FFS HAVE_STRINGS_H NEXT_AS_FIRST_DIRECTIVE_STRINGS_H NEXT_STRINGS_H NEXT_AS_FIRST_DIRECTIVE_STRING_H NEXT_STRING_H +GL_COND_OBJ_STRERROR_OVERRIDE_FALSE +GL_COND_OBJ_STRERROR_OVERRIDE_TRUE +GL_COND_OBJ_STRERROR_FALSE +GL_COND_OBJ_STRERROR_TRUE +GL_COND_OBJ_STRDUP_FALSE +GL_COND_OBJ_STRDUP_TRUE +GL_COND_OBJ_STRNCASECMP_FALSE +GL_COND_OBJ_STRNCASECMP_TRUE +GL_COND_OBJ_STRCASECMP_FALSE +GL_COND_OBJ_STRCASECMP_TRUE HAVE_DECL_STRNCASECMP HAVE_STRCASECMP HAVE_FFS -GNULIB_FFS NEXT_AS_FIRST_DIRECTIVE_STDLIB_H NEXT_STDLIB_H +GL_COND_OBJ_STDIO_WRITE_FALSE +GL_COND_OBJ_STDIO_WRITE_TRUE +GL_COND_OBJ_STDIO_READ_FALSE +GL_COND_OBJ_STDIO_READ_TRUE NEXT_AS_FIRST_DIRECTIVE_STDIO_H NEXT_STDIO_H -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H -NEXT_STDDEF_H +GL_GENERATE_STDINT_H_FALSE +GL_GENERATE_STDINT_H_TRUE +STDINT_H GL_GENERATE_STDDEF_H_FALSE GL_GENERATE_STDDEF_H_TRUE STDDEF_H +NEXT_AS_FIRST_DIRECTIVE_STDDEF_H +NEXT_STDDEF_H HAVE_WCHAR_T HAVE_MAX_ALIGN_T REPLACE_NULL -HAVE__BOOL GL_GENERATE_STDBOOL_H_FALSE GL_GENERATE_STDBOOL_H_TRUE STDBOOL_H +HAVE__BOOL +GL_GENERATE_STDALIGN_H_FALSE +GL_GENERATE_STDALIGN_H_TRUE +STDALIGN_H +GL_COND_OBJ_STAT_FALSE +GL_COND_OBJ_STAT_TRUE +GL_COND_OBJ_SIGNBIT3_FALSE +GL_COND_OBJ_SIGNBIT3_TRUE +GL_COND_OBJ_RMDIR_FALSE +GL_COND_OBJ_RMDIR_TRUE +GL_COND_OBJ_RENAMEAT_FALSE +GL_COND_OBJ_RENAMEAT_TRUE +GL_COND_OBJ_RENAME_FALSE +GL_COND_OBJ_RENAME_TRUE +GL_COND_OBJ_REALLOCARRAY_FALSE +GL_COND_OBJ_REALLOCARRAY_TRUE +GL_COND_OBJ_READLINKAT_FALSE +GL_COND_OBJ_READLINKAT_TRUE +GL_COND_OBJ_READLINK_FALSE +GL_COND_OBJ_READLINK_TRUE +GL_COND_OBJ_RAWMEMCHR_FALSE +GL_COND_OBJ_RAWMEMCHR_TRUE +GL_COND_OBJ_PIPE_FALSE +GL_COND_OBJ_PIPE_TRUE +GL_COND_OBJ_OPENDIR_FALSE +GL_COND_OBJ_OPENDIR_TRUE +GL_COND_OBJ_OPENAT_FALSE +GL_COND_OBJ_OPENAT_TRUE +GL_COND_OBJ_OPEN_FALSE +GL_COND_OBJ_OPEN_TRUE +GL_COND_OBJ_MSVC_NOTHROW_FALSE +GL_COND_OBJ_MSVC_NOTHROW_TRUE +GL_COND_OBJ_MSVC_INVAL_FALSE +GL_COND_OBJ_MSVC_INVAL_TRUE +GL_COND_OBJ_MKDIRAT_FALSE +GL_COND_OBJ_MKDIRAT_TRUE +GL_COND_OBJ_MKDIR_FALSE +GL_COND_OBJ_MKDIR_TRUE +GL_COND_OBJ_MEMRCHR_FALSE +GL_COND_OBJ_MEMRCHR_TRUE +GL_COND_OBJ_MEMPCPY_FALSE +GL_COND_OBJ_MEMPCPY_TRUE +GL_GNULIB_MDA_STRDUP +GL_GNULIB_MDA_MEMCCPY +GL_GNULIB_STRVERSCMP +GL_GNULIB_STRSIGNAL +GL_GNULIB_SIGDESCR_NP +GL_GNULIB_SIGABBREV_NP +GL_GNULIB_STRERRORNAME_NP +GL_GNULIB_STRERROR_R +GL_GNULIB_STRERROR +GL_GNULIB_MBSTOK_R +GL_GNULIB_MBSSEP +GL_GNULIB_MBSSPN +GL_GNULIB_MBSPBRK +GL_GNULIB_MBSCSPN +GL_GNULIB_MBSCASESTR +GL_GNULIB_MBSPCASECMP +GL_GNULIB_MBSNCASECMP +GL_GNULIB_MBSCASECMP +GL_GNULIB_MBSSTR +GL_GNULIB_MBSRCHR +GL_GNULIB_MBSCHR +GL_GNULIB_MBSNLEN +GL_GNULIB_MBSLEN +GL_GNULIB_STRTOK_R +GL_GNULIB_STRCASESTR +GL_GNULIB_STRSTR +GL_GNULIB_STRSEP +GL_GNULIB_STRPBRK +GL_GNULIB_STRNLEN +GL_GNULIB_STRNDUP +GL_GNULIB_STRNCAT +GL_GNULIB_STRDUP +GL_GNULIB_STRCHRNUL +GL_GNULIB_STPNCPY +GL_GNULIB_STPCPY +GL_GNULIB_RAWMEMCHR +GL_GNULIB_MEMRCHR +GL_GNULIB_MEMPCPY +GL_GNULIB_MEMMEM +GL_GNULIB_MEMCHR +GL_GNULIB_FFSLL +GL_GNULIB_FFSL +GL_GNULIB_EXPLICIT_BZERO +GL_COND_OBJ_MEMCHR_FALSE +GL_COND_OBJ_MEMCHR_TRUE UNDEFINE_STRTOK_R REPLACE_STRSIGNAL +REPLACE_STRERRORNAME_NP REPLACE_STRERROR_R REPLACE_STRERROR REPLACE_STRTOK_R @@ -859,8 +1015,12 @@ REPLACE_STRCHRNUL REPLACE_STPNCPY REPLACE_MEMMEM REPLACE_MEMCHR +REPLACE_FFSLL HAVE_STRVERSCMP HAVE_DECL_STRSIGNAL +HAVE_SIGDESCR_NP +HAVE_SIGABBREV_NP +HAVE_STRERRORNAME_NP HAVE_DECL_STRERROR_R HAVE_DECL_STRTOK_R HAVE_STRCASESTR @@ -876,57 +1036,26 @@ HAVE_RAWMEMCHR HAVE_DECL_MEMRCHR HAVE_MEMPCPY HAVE_DECL_MEMMEM -HAVE_MEMCHR HAVE_FFSLL HAVE_FFSL HAVE_EXPLICIT_BZERO HAVE_MBSLEN -GNULIB_STRVERSCMP -GNULIB_STRSIGNAL -GNULIB_STRERROR_R -GNULIB_STRERROR -GNULIB_MBSTOK_R -GNULIB_MBSSEP -GNULIB_MBSSPN -GNULIB_MBSPBRK -GNULIB_MBSCSPN -GNULIB_MBSCASESTR -GNULIB_MBSPCASECMP -GNULIB_MBSNCASECMP -GNULIB_MBSCASECMP -GNULIB_MBSSTR -GNULIB_MBSRCHR -GNULIB_MBSCHR -GNULIB_MBSNLEN -GNULIB_MBSLEN -GNULIB_STRTOK_R -GNULIB_STRCASESTR -GNULIB_STRSTR -GNULIB_STRSEP -GNULIB_STRPBRK -GNULIB_STRNLEN -GNULIB_STRNDUP -GNULIB_STRNCAT -GNULIB_STRDUP -GNULIB_STRCHRNUL -GNULIB_STPNCPY -GNULIB_STPCPY -GNULIB_RAWMEMCHR -GNULIB_MEMRCHR -GNULIB_MEMPCPY -GNULIB_MEMMEM -GNULIB_MEMCHR -GNULIB_FFSLL -GNULIB_FFSL -GNULIB_EXPLICIT_BZERO NEXT_AS_FIRST_DIRECTIVE_MATH_H NEXT_MATH_H +GL_COND_OBJ_LSTAT_FALSE +GL_COND_OBJ_LSTAT_TRUE +GL_GENERATE_LIMITS_H_FALSE +GL_GENERATE_LIMITS_H_TRUE +LIMITS_H +GL_GNULIB_STRTOUMAX +GL_GNULIB_STRTOIMAX +GL_GNULIB_IMAXDIV +GL_GNULIB_IMAXABS NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H NEXT_INTTYPES_H UINT64_MAX_EQ_ULONG_MAX UINT32_MAX_LT_UINTMAX_MAX PRIPTR_PREFIX -PRI_MACROS_BROKEN INT64_MAX_EQ_LONG_MAX INT32_MAX_LT_INTMAX_MAX REPLACE_STRTOUMAX @@ -936,13 +1065,6 @@ HAVE_DECL_STRTOUMAX HAVE_DECL_STRTOIMAX HAVE_DECL_IMAXDIV HAVE_DECL_IMAXABS -GNULIB_STRTOUMAX -GNULIB_STRTOIMAX -GNULIB_IMAXDIV -GNULIB_IMAXABS -GL_GENERATE_STDINT_H_FALSE -GL_GENERATE_STDINT_H_TRUE -STDINT_H HAVE_SYS_INTTYPES_H HAVE_SYS_BITYPES_H HAVE_C99_STDINT_H @@ -966,39 +1088,14 @@ NEXT_STDINT_H HAVE_SYS_TYPES_H HAVE_INTTYPES_H HAVE_WCHAR_H -HAVE_UNSIGNED_LONG_LONG_INT -HAVE_LONG_LONG_INT -GNULIB_OVERRIDES_WINT_T -GL_GENERATE_LIMITS_H_FALSE -GL_GENERATE_LIMITS_H_TRUE -LIMITS_H +GNULIBHEADERS_OVERRIDE_WINT_T NEXT_AS_FIRST_DIRECTIVE_LIMITS_H NEXT_LIMITS_H -REPLACE_LOCALTIME -REPLACE_GMTIME -REPLACE_TZSET -REPLACE_TIMEGM -REPLACE_STRFTIME -REPLACE_NANOSLEEP -REPLACE_MKTIME -REPLACE_LOCALTIME_R -REPLACE_CTIME -HAVE_TIMEZONE_T -HAVE_TZSET -HAVE_TIMEGM -HAVE_STRPTIME -HAVE_NANOSLEEP -HAVE_DECL_LOCALTIME_R -GNULIB_TZSET -GNULIB_TIME_RZ -GNULIB_TIME_R -GNULIB_TIMEGM -GNULIB_STRPTIME -GNULIB_STRFTIME -GNULIB_NANOSLEEP -GNULIB_LOCALTIME -GNULIB_MKTIME -GNULIB_CTIME +GL_COND_OBJ_GROUP_MEMBER_FALSE +GL_COND_OBJ_GROUP_MEMBER_TRUE +GL_GNULIB_GETTIMEOFDAY +GL_COND_OBJ_GETTIMEOFDAY_FALSE +GL_COND_OBJ_GETTIMEOFDAY_TRUE NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H NEXT_SYS_TIME_H REPLACE_STRUCT_TIMEVAL @@ -1006,16 +1103,88 @@ REPLACE_GETTIMEOFDAY HAVE_SYS_TIME_H HAVE_STRUCT_TIMEVAL HAVE_GETTIMEOFDAY -GNULIB_GETTIMEOFDAY LTLIBINTL LIBINTL -GNULIB_GL_UNISTD_H_GETOPT +GL_COND_OBJ_GETOPT_FALSE +GL_COND_OBJ_GETOPT_TRUE +GL_GENERATE_GETOPT_CDEFS_H_FALSE +GL_GENERATE_GETOPT_CDEFS_H_TRUE GETOPT_CDEFS_H +GL_GENERATE_GETOPT_H_FALSE +GL_GENERATE_GETOPT_H_TRUE GETOPT_H HAVE_SYS_CDEFS_H HAVE_GETOPT_H NEXT_AS_FIRST_DIRECTIVE_GETOPT_H NEXT_GETOPT_H +GL_COND_OBJ_GETLINE_FALSE +GL_COND_OBJ_GETLINE_TRUE +GL_COND_OBJ_GETGROUPS_FALSE +GL_COND_OBJ_GETGROUPS_TRUE +GL_COND_OBJ_GETDTABLESIZE_FALSE +GL_COND_OBJ_GETDTABLESIZE_TRUE +GL_GNULIB_MDA_TEMPNAM +GL_GNULIB_MDA_PUTW +GL_GNULIB_MDA_GETW +GL_GNULIB_MDA_FILENO +GL_GNULIB_MDA_FDOPEN +GL_GNULIB_MDA_FCLOSEALL +GL_GNULIB_VSPRINTF_POSIX +GL_GNULIB_VSNPRINTF +GL_GNULIB_VPRINTF_POSIX +GL_GNULIB_VPRINTF +GL_GNULIB_VFPRINTF_POSIX +GL_GNULIB_VFPRINTF +GL_GNULIB_VDPRINTF +GL_GNULIB_VSCANF +GL_GNULIB_VFSCANF +GL_GNULIB_VASPRINTF +GL_GNULIB_TMPFILE +GL_GNULIB_STDIO_H_SIGPIPE +GL_GNULIB_STDIO_H_NONBLOCKING +GL_GNULIB_SPRINTF_POSIX +GL_GNULIB_SNPRINTF +GL_GNULIB_SCANF +GL_GNULIB_RENAMEAT +GL_GNULIB_RENAME +GL_GNULIB_REMOVE +GL_GNULIB_PUTS +GL_GNULIB_PUTCHAR +GL_GNULIB_PUTC +GL_GNULIB_PRINTF_POSIX +GL_GNULIB_PRINTF +GL_GNULIB_POPEN +GL_GNULIB_PERROR +GL_GNULIB_PCLOSE +GL_GNULIB_OBSTACK_PRINTF_POSIX +GL_GNULIB_OBSTACK_PRINTF +GL_GNULIB_GETLINE +GL_GNULIB_GETDELIM +GL_GNULIB_GETCHAR +GL_GNULIB_GETC +GL_GNULIB_FWRITE +GL_GNULIB_FTELLO +GL_GNULIB_FTELL +GL_GNULIB_FSEEKO +GL_GNULIB_FSEEK +GL_GNULIB_FSCANF +GL_GNULIB_FREOPEN +GL_GNULIB_FREAD +GL_GNULIB_FPUTS +GL_GNULIB_FPUTC +GL_GNULIB_FPURGE +GL_GNULIB_FPRINTF_POSIX +GL_GNULIB_FPRINTF +GL_GNULIB_FOPEN_GNU +GL_GNULIB_FOPEN +GL_GNULIB_FGETS +GL_GNULIB_FGETC +GL_GNULIB_FFLUSH +GL_GNULIB_FDOPEN +GL_GNULIB_FCLOSE +GL_GNULIB_DPRINTF +GL_COND_OBJ_GETDELIM_FALSE +GL_COND_OBJ_GETDELIM_TRUE REPLACE_VSPRINTF REPLACE_VSNPRINTF REPLACE_VPRINTF @@ -1043,6 +1212,7 @@ REPLACE_FSEEK REPLACE_FREOPEN REPLACE_FPURGE REPLACE_FPRINTF +REPLACE_FOPEN_FOR_FOPEN_GNU REPLACE_FOPEN REPLACE_FFLUSH REPLACE_FDOPEN @@ -1064,72 +1234,50 @@ HAVE_DECL_GETDELIM HAVE_DECL_FTELLO HAVE_DECL_FSEEKO HAVE_DECL_FPURGE -GNULIB_VSPRINTF_POSIX -GNULIB_VSNPRINTF -GNULIB_VPRINTF_POSIX -GNULIB_VPRINTF -GNULIB_VFPRINTF_POSIX -GNULIB_VFPRINTF -GNULIB_VDPRINTF -GNULIB_VSCANF -GNULIB_VFSCANF -GNULIB_VASPRINTF -GNULIB_TMPFILE -GNULIB_STDIO_H_SIGPIPE -GNULIB_STDIO_H_NONBLOCKING -GNULIB_SPRINTF_POSIX -GNULIB_SNPRINTF -GNULIB_SCANF -GNULIB_RENAMEAT -GNULIB_RENAME -GNULIB_REMOVE -GNULIB_PUTS -GNULIB_PUTCHAR -GNULIB_PUTC -GNULIB_PRINTF_POSIX -GNULIB_PRINTF -GNULIB_POPEN -GNULIB_PERROR -GNULIB_PCLOSE -GNULIB_OBSTACK_PRINTF_POSIX -GNULIB_OBSTACK_PRINTF -GNULIB_GETLINE -GNULIB_GETDELIM -GNULIB_GETCHAR -GNULIB_GETC -GNULIB_FWRITE -GNULIB_FTELLO -GNULIB_FTELL -GNULIB_FSEEKO -GNULIB_FSEEK -GNULIB_FSCANF -GNULIB_FREOPEN -GNULIB_FREAD -GNULIB_FPUTS -GNULIB_FPUTC -GNULIB_FPURGE -GNULIB_FPRINTF_POSIX -GNULIB_FPRINTF -GNULIB_FOPEN -GNULIB_FGETS -GNULIB_FGETC -GNULIB_FFLUSH -GNULIB_FDOPEN -GNULIB_FCLOSE -GNULIB_DPRINTF +HAVE_DECL_FCLOSEALL +GL_COND_OBJ_GETCWD_LGPL_FALSE +GL_COND_OBJ_GETCWD_LGPL_TRUE +GL_COND_OBJ_FUTIMENS_FALSE +GL_COND_OBJ_FUTIMENS_TRUE +GL_COND_OBJ_FSTATAT_FALSE +GL_COND_OBJ_FSTATAT_TRUE +GL_GNULIB_MDA_UMASK +GL_GNULIB_MDA_MKDIR +GL_GNULIB_MDA_CHMOD +GL_GNULIB_OVERRIDES_STRUCT_STAT +GL_GNULIB_UTIMENSAT +GL_GNULIB_STAT +GL_GNULIB_MKNODAT +GL_GNULIB_MKNOD +GL_GNULIB_MKFIFOAT +GL_GNULIB_MKFIFO +GL_GNULIB_MKDIRAT +GL_GNULIB_MKDIR +GL_GNULIB_LSTAT +GL_GNULIB_LCHMOD +GL_GNULIB_GETUMASK +GL_GNULIB_FUTIMENS +GL_GNULIB_FSTATAT +GL_GNULIB_FSTAT +GL_GNULIB_FCHMODAT WINDOWS_64_BIT_ST_SIZE WINDOWS_STAT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H NEXT_SYS_STAT_H +GL_COND_OBJ_FSTAT_FALSE +GL_COND_OBJ_FSTAT_TRUE REPLACE_UTIMENSAT REPLACE_STAT +REPLACE_MKNODAT REPLACE_MKNOD +REPLACE_MKFIFOAT REPLACE_MKFIFO REPLACE_MKDIR REPLACE_LSTAT REPLACE_FUTIMENS REPLACE_FSTATAT REPLACE_FSTAT +REPLACE_FCHMODAT HAVE_UTIMENSAT HAVE_MKNODAT HAVE_MKNOD @@ -1138,24 +1286,112 @@ HAVE_MKFIFO HAVE_MKDIRAT HAVE_LSTAT HAVE_LCHMOD +HAVE_GETUMASK HAVE_FUTIMENS HAVE_FSTATAT HAVE_FCHMODAT -GNULIB_OVERRIDES_STRUCT_STAT -GNULIB_UTIMENSAT -GNULIB_STAT -GNULIB_MKNODAT -GNULIB_MKNOD -GNULIB_MKFIFOAT -GNULIB_MKFIFO -GNULIB_MKDIRAT -GNULIB_LSTAT -GNULIB_LCHMOD -GNULIB_FUTIMENS -GNULIB_FSTATAT -GNULIB_FSTAT -GNULIB_FCHMODAT HAVE_SAME_LONG_DOUBLE_AS_DOUBLE +GL_GNULIB_MDA_YN +GL_GNULIB_MDA_Y1 +GL_GNULIB_MDA_Y0 +GL_GNULIB_MDA_JN +GL_GNULIB_MDA_J1 +GL_GNULIB_MDA_J0 +GL_GNULIB_TRUNCL +GL_GNULIB_TRUNCF +GL_GNULIB_TRUNC +GL_GNULIB_TANHF +GL_GNULIB_TANL +GL_GNULIB_TANF +GL_GNULIB_SQRTL +GL_GNULIB_SQRTF +GL_GNULIB_SINHF +GL_GNULIB_SINL +GL_GNULIB_SINF +GL_GNULIB_SIGNBIT +GL_GNULIB_ROUNDL +GL_GNULIB_ROUNDF +GL_GNULIB_ROUND +GL_GNULIB_RINTL +GL_GNULIB_RINTF +GL_GNULIB_RINT +GL_GNULIB_REMAINDERL +GL_GNULIB_REMAINDERF +GL_GNULIB_REMAINDER +GL_GNULIB_POWF +GL_GNULIB_MODFL +GL_GNULIB_MODFF +GL_GNULIB_MODF +GL_GNULIB_LOGBL +GL_GNULIB_LOGBF +GL_GNULIB_LOGB +GL_GNULIB_LOG2L +GL_GNULIB_LOG2F +GL_GNULIB_LOG2 +GL_GNULIB_LOG1PL +GL_GNULIB_LOG1PF +GL_GNULIB_LOG1P +GL_GNULIB_LOG10L +GL_GNULIB_LOG10F +GL_GNULIB_LOG10 +GL_GNULIB_LOGL +GL_GNULIB_LOGF +GL_GNULIB_LOG +GL_GNULIB_LDEXPL +GL_GNULIB_LDEXPF +GL_GNULIB_ISNANL +GL_GNULIB_ISNAND +GL_GNULIB_ISNANF +GL_GNULIB_ISNAN +GL_GNULIB_ISINF +GL_GNULIB_ISFINITE +GL_GNULIB_ILOGBL +GL_GNULIB_ILOGBF +GL_GNULIB_ILOGB +GL_GNULIB_HYPOTL +GL_GNULIB_HYPOTF +GL_GNULIB_HYPOT +GL_GNULIB_FREXPL +GL_GNULIB_FREXP +GL_GNULIB_FREXPF +GL_GNULIB_FMODL +GL_GNULIB_FMODF +GL_GNULIB_FMOD +GL_GNULIB_FMAL +GL_GNULIB_FMAF +GL_GNULIB_FMA +GL_GNULIB_FLOORL +GL_GNULIB_FLOORF +GL_GNULIB_FLOOR +GL_GNULIB_FABSL +GL_GNULIB_FABSF +GL_GNULIB_EXPM1L +GL_GNULIB_EXPM1F +GL_GNULIB_EXPM1 +GL_GNULIB_EXP2L +GL_GNULIB_EXP2F +GL_GNULIB_EXP2 +GL_GNULIB_EXPL +GL_GNULIB_EXPF +GL_GNULIB_COSHF +GL_GNULIB_COSL +GL_GNULIB_COSF +GL_GNULIB_COPYSIGNL +GL_GNULIB_COPYSIGNF +GL_GNULIB_COPYSIGN +GL_GNULIB_CEILL +GL_GNULIB_CEILF +GL_GNULIB_CEIL +GL_GNULIB_CBRTL +GL_GNULIB_CBRTF +GL_GNULIB_CBRT +GL_GNULIB_ATAN2F +GL_GNULIB_ATANL +GL_GNULIB_ATANF +GL_GNULIB_ASINL +GL_GNULIB_ASINF +GL_GNULIB_ACOSL +GL_GNULIB_ACOSF REPLACE_TRUNCL REPLACE_TRUNCF REPLACE_TRUNC @@ -1165,7 +1401,7 @@ REPLACE_SQRTL REPLACE_SQRTF REPLACE_SINHF REPLACE_SINF -REPLACE_SIGNBIT_USING_GCC +REPLACE_SIGNBIT_USING_BUILTINS REPLACE_SIGNBIT REPLACE_ROUNDL REPLACE_ROUNDF @@ -1331,130 +1567,63 @@ HAVE_ASINL HAVE_ASINF HAVE_ACOSL HAVE_ACOSF -GNULIB_TRUNCL -GNULIB_TRUNCF -GNULIB_TRUNC -GNULIB_TANHF -GNULIB_TANL -GNULIB_TANF -GNULIB_SQRTL -GNULIB_SQRTF -GNULIB_SINHF -GNULIB_SINL -GNULIB_SINF -GNULIB_SIGNBIT -GNULIB_ROUNDL -GNULIB_ROUNDF -GNULIB_ROUND -GNULIB_RINTL -GNULIB_RINTF -GNULIB_RINT -GNULIB_REMAINDERL -GNULIB_REMAINDERF -GNULIB_REMAINDER -GNULIB_POWF -GNULIB_MODFL -GNULIB_MODFF -GNULIB_MODF -GNULIB_LOGBL -GNULIB_LOGBF -GNULIB_LOGB -GNULIB_LOG2L -GNULIB_LOG2F -GNULIB_LOG2 -GNULIB_LOG1PL -GNULIB_LOG1PF -GNULIB_LOG1P -GNULIB_LOG10L -GNULIB_LOG10F -GNULIB_LOG10 -GNULIB_LOGL -GNULIB_LOGF -GNULIB_LOG -GNULIB_LDEXPL -GNULIB_LDEXPF -GNULIB_ISNANL -GNULIB_ISNAND -GNULIB_ISNANF -GNULIB_ISNAN -GNULIB_ISINF -GNULIB_ISFINITE -GNULIB_ILOGBL -GNULIB_ILOGBF -GNULIB_ILOGB -GNULIB_HYPOTL -GNULIB_HYPOTF -GNULIB_HYPOT -GNULIB_FREXPL -GNULIB_FREXP -GNULIB_FREXPF -GNULIB_FMODL -GNULIB_FMODF -GNULIB_FMOD -GNULIB_FMAL -GNULIB_FMAF -GNULIB_FMA -GNULIB_FLOORL -GNULIB_FLOORF -GNULIB_FLOOR -GNULIB_FABSL -GNULIB_FABSF -GNULIB_EXPM1L -GNULIB_EXPM1F -GNULIB_EXPM1 -GNULIB_EXP2L -GNULIB_EXP2F -GNULIB_EXP2 -GNULIB_EXPL -GNULIB_EXPF -GNULIB_COSHF -GNULIB_COSL -GNULIB_COSF -GNULIB_COPYSIGNL -GNULIB_COPYSIGNF -GNULIB_COPYSIGN -GNULIB_CEILL -GNULIB_CEILF -GNULIB_CEIL -GNULIB_CBRTL -GNULIB_CBRTF -GNULIB_CBRT -GNULIB_ATAN2F -GNULIB_ATANL -GNULIB_ATANF -GNULIB_ASINL -GNULIB_ASINF -GNULIB_ACOSL -GNULIB_ACOSF -REPLACE_ITOLD +GL_COND_OBJ_FREE_FALSE +GL_COND_OBJ_FREE_TRUE +GL_COND_OBJ_ITOLD_FALSE +GL_COND_OBJ_ITOLD_TRUE +GL_COND_OBJ_FLOAT_FALSE +GL_COND_OBJ_FLOAT_TRUE GL_GENERATE_FLOAT_H_FALSE GL_GENERATE_FLOAT_H_TRUE FLOAT_H +REPLACE_ITOLD NEXT_AS_FIRST_DIRECTIVE_FLOAT_H NEXT_FLOAT_H +GL_COND_OBJ_FDOPENDIR_FALSE +GL_COND_OBJ_FDOPENDIR_TRUE NEXT_AS_FIRST_DIRECTIVE_FCNTL_H NEXT_FCNTL_H +GL_GNULIB_MDA_OPEN +GL_GNULIB_MDA_CREAT +GL_GNULIB_OPENAT +GL_GNULIB_OPEN +GL_GNULIB_NONBLOCKING +GL_GNULIB_FCNTL +GL_GNULIB_CREAT +GL_COND_OBJ_FCNTL_FALSE +GL_COND_OBJ_FCNTL_TRUE REPLACE_OPENAT REPLACE_OPEN REPLACE_FCNTL +REPLACE_CREAT HAVE_OPENAT HAVE_FCNTL -GNULIB_OPENAT -GNULIB_OPEN -GNULIB_NONBLOCKING -GNULIB_FCNTL +GL_COND_OBJ_FCHDIR_FALSE +GL_COND_OBJ_FCHDIR_TRUE +GL_COND_OBJ_FACCESSAT_FALSE +GL_COND_OBJ_FACCESSAT_TRUE LIB_EACCESS +GL_COND_OBJ_EUIDACCESS_FALSE +GL_COND_OBJ_EUIDACCESS_TRUE +GL_COND_OBJ_ERROR_FALSE +GL_COND_OBJ_ERROR_TRUE +GL_GENERATE_ERRNO_H_FALSE +GL_GENERATE_ERRNO_H_TRUE +ERRNO_H EOVERFLOW_VALUE EOVERFLOW_HIDDEN ENOLINK_VALUE ENOLINK_HIDDEN EMULTIHOP_VALUE EMULTIHOP_HIDDEN -GL_GENERATE_ERRNO_H_FALSE -GL_GENERATE_ERRNO_H_TRUE -ERRNO_H NEXT_AS_FIRST_DIRECTIVE_ERRNO_H NEXT_ERRNO_H +GL_COND_OBJ_DUP2_FALSE +GL_COND_OBJ_DUP2_TRUE +GL_COND_OBJ_DUP_FALSE +GL_COND_OBJ_DUP_TRUE +GL_COND_OBJ_DIRFD_FALSE +GL_COND_OBJ_DIRFD_TRUE HAVE_DIRENT_H NEXT_AS_FIRST_DIRECTIVE_DIRENT_H NEXT_DIRENT_H @@ -1462,6 +1631,16 @@ PRAGMA_COLUMNS PRAGMA_SYSTEM_HEADER INCLUDE_NEXT_AS_FIRST_DIRECTIVE INCLUDE_NEXT +GL_GNULIB_ALPHASORT +GL_GNULIB_SCANDIR +GL_GNULIB_FDOPENDIR +GL_GNULIB_DIRFD +GL_GNULIB_CLOSEDIR +GL_GNULIB_REWINDDIR +GL_GNULIB_READDIR +GL_GNULIB_OPENDIR +GL_COND_OBJ_CLOSEDIR_FALSE +GL_COND_OBJ_CLOSEDIR_TRUE REPLACE_FDOPENDIR REPLACE_DIRFD REPLACE_CLOSEDIR @@ -1475,19 +1654,16 @@ HAVE_CLOSEDIR HAVE_REWINDDIR HAVE_READDIR HAVE_OPENDIR -GNULIB_ALPHASORT -GNULIB_SCANDIR -GNULIB_FDOPENDIR -GNULIB_DIRFD -GNULIB_CLOSEDIR -GNULIB_REWINDDIR -GNULIB_READDIR -GNULIB_OPENDIR +GL_COND_OBJ_CLOSE_FALSE +GL_COND_OBJ_CLOSE_TRUE HAVE_WINSOCK2_H HAVE_MSVC_INVALID_PARAMETER_HANDLER LIB_CLOCK_GETTIME +GL_COND_OBJ_CHDIR_LONG_FALSE +GL_COND_OBJ_CHDIR_LONG_TRUE UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS UNISTD_H_HAVE_WINSOCK2_H +UNISTD_H_HAVE_SYS_RANDOM_H REPLACE_WRITE REPLACE_USLEEP REPLACE_UNLINKAT @@ -1508,6 +1684,7 @@ REPLACE_LINKAT REPLACE_LINK REPLACE_LCHOWN REPLACE_ISATTY +REPLACE_GETPASS_FOR_GETPASS_GNU REPLACE_GETPASS REPLACE_GETPAGESIZE REPLACE_GETGROUPS @@ -1518,10 +1695,19 @@ REPLACE_GETCWD REPLACE_FTRUNCATE REPLACE_FCHOWNAT REPLACE_FACCESSAT +REPLACE_EXECVPE +REPLACE_EXECVP +REPLACE_EXECVE +REPLACE_EXECV +REPLACE_EXECLP +REPLACE_EXECLE +REPLACE_EXECL REPLACE_DUP2 REPLACE_DUP +REPLACE_COPY_FILE_RANGE REPLACE_CLOSE REPLACE_CHOWN +REPLACE_ACCESS HAVE_SYS_PARAM_H HAVE_OS_H HAVE_DECL_TTYNAME_R @@ -1534,6 +1720,7 @@ HAVE_DECL_GETLOGIN HAVE_DECL_GETDOMAINNAME HAVE_DECL_FDATASYNC HAVE_DECL_FCHDIR +HAVE_DECL_EXECVPE HAVE_DECL_ENVIRON HAVE_USLEEP HAVE_UNLINKAT @@ -1556,6 +1743,7 @@ HAVE_GETPAGESIZE HAVE_GETLOGIN HAVE_GETHOSTNAME HAVE_GETGROUPS +HAVE_GETENTROPY HAVE_GETDTABLESIZE HAVE_FTRUNCATE HAVE_FSYNC @@ -1563,87 +1751,185 @@ HAVE_FDATASYNC HAVE_FCHOWNAT HAVE_FCHDIR HAVE_FACCESSAT +HAVE_EXECVPE HAVE_EUIDACCESS HAVE_DUP3 -HAVE_DUP2 +HAVE_COPY_FILE_RANGE HAVE_CHOWN -GNULIB_WRITE -GNULIB_USLEEP -GNULIB_UNLINKAT -GNULIB_UNLINK -GNULIB_UNISTD_H_SIGPIPE -GNULIB_UNISTD_H_NONBLOCKING -GNULIB_TTYNAME_R -GNULIB_TRUNCATE -GNULIB_SYMLINKAT -GNULIB_SYMLINK -GNULIB_SLEEP -GNULIB_SETHOSTNAME -GNULIB_RMDIR -GNULIB_READLINKAT -GNULIB_READLINK -GNULIB_READ -GNULIB_PWRITE -GNULIB_PREAD -GNULIB_PIPE2 -GNULIB_PIPE -GNULIB_LSEEK -GNULIB_LINKAT -GNULIB_LINK -GNULIB_LCHOWN -GNULIB_ISATTY -GNULIB_GROUP_MEMBER -GNULIB_GETUSERSHELL -GNULIB_GETPASS -GNULIB_GETPAGESIZE -GNULIB_GETLOGIN_R -GNULIB_GETLOGIN -GNULIB_GETHOSTNAME -GNULIB_GETGROUPS -GNULIB_GETDTABLESIZE -GNULIB_GETDOMAINNAME -GNULIB_GETCWD -GNULIB_FTRUNCATE -GNULIB_FSYNC -GNULIB_FDATASYNC -GNULIB_FCHOWNAT -GNULIB_FCHDIR -GNULIB_FACCESSAT -GNULIB_EUIDACCESS -GNULIB_ENVIRON -GNULIB_DUP3 -GNULIB_DUP2 -GNULIB_DUP -GNULIB_CLOSE -GNULIB_CHOWN -GNULIB_CHDIR +GL_GNULIB_MDA_WRITE +GL_GNULIB_MDA_UNLINK +GL_GNULIB_MDA_SWAB +GL_GNULIB_MDA_RMDIR +GL_GNULIB_MDA_READ +GL_GNULIB_MDA_LSEEK +GL_GNULIB_MDA_ISATTY +GL_GNULIB_MDA_GETPID +GL_GNULIB_MDA_GETCWD +GL_GNULIB_MDA_EXECVPE +GL_GNULIB_MDA_EXECVP +GL_GNULIB_MDA_EXECVE +GL_GNULIB_MDA_EXECV +GL_GNULIB_MDA_EXECLP +GL_GNULIB_MDA_EXECLE +GL_GNULIB_MDA_EXECL +GL_GNULIB_MDA_DUP2 +GL_GNULIB_MDA_DUP +GL_GNULIB_MDA_CLOSE +GL_GNULIB_MDA_CHDIR +GL_GNULIB_MDA_ACCESS +GL_GNULIB_WRITE +GL_GNULIB_USLEEP +GL_GNULIB_UNLINKAT +GL_GNULIB_UNLINK +GL_GNULIB_UNISTD_H_SIGPIPE +GL_GNULIB_UNISTD_H_NONBLOCKING +GL_GNULIB_UNISTD_H_GETOPT +GL_GNULIB_TTYNAME_R +GL_GNULIB_TRUNCATE +GL_GNULIB_SYMLINKAT +GL_GNULIB_SYMLINK +GL_GNULIB_SLEEP +GL_GNULIB_SETHOSTNAME +GL_GNULIB_RMDIR +GL_GNULIB_READLINKAT +GL_GNULIB_READLINK +GL_GNULIB_READ +GL_GNULIB_PWRITE +GL_GNULIB_PREAD +GL_GNULIB_PIPE2 +GL_GNULIB_PIPE +GL_GNULIB_LSEEK +GL_GNULIB_LINKAT +GL_GNULIB_LINK +GL_GNULIB_LCHOWN +GL_GNULIB_ISATTY +GL_GNULIB_GROUP_MEMBER +GL_GNULIB_GETUSERSHELL +GL_GNULIB_GETPASS_GNU +GL_GNULIB_GETPASS +GL_GNULIB_GETPAGESIZE +GL_GNULIB_GETOPT_POSIX +GL_GNULIB_GETLOGIN_R +GL_GNULIB_GETLOGIN +GL_GNULIB_GETHOSTNAME +GL_GNULIB_GETGROUPS +GL_GNULIB_GETENTROPY +GL_GNULIB_GETDTABLESIZE +GL_GNULIB_GETDOMAINNAME +GL_GNULIB_GETCWD +GL_GNULIB_FTRUNCATE +GL_GNULIB_FSYNC +GL_GNULIB_FDATASYNC +GL_GNULIB_FCHOWNAT +GL_GNULIB_FCHDIR +GL_GNULIB_FACCESSAT +GL_GNULIB_EXECVPE +GL_GNULIB_EXECVP +GL_GNULIB_EXECVE +GL_GNULIB_EXECV +GL_GNULIB_EXECLP +GL_GNULIB_EXECLE +GL_GNULIB_EXECL +GL_GNULIB_EUIDACCESS +GL_GNULIB_ENVIRON +GL_GNULIB_DUP3 +GL_GNULIB_DUP2 +GL_GNULIB_DUP +GL_GNULIB_COPY_FILE_RANGE +GL_GNULIB_CLOSE +GL_GNULIB_CHOWN +GL_GNULIB_CHDIR +GL_GNULIB_ACCESS +GL_COND_OBJ_CANONICALIZE_LGPL_FALSE +GL_COND_OBJ_CANONICALIZE_LGPL_TRUE +GL_GNULIB_MDA_PUTENV +GL_GNULIB_MDA_MKTEMP +GL_GNULIB_MDA_GCVT +GL_GNULIB_MDA_FCVT +GL_GNULIB_MDA_ECVT +GL_GNULIB_WCTOMB +GL_GNULIB_UNSETENV +GL_GNULIB_UNLOCKPT +GL_GNULIB_SYSTEM_POSIX +GL_GNULIB_STRTOULL +GL_GNULIB_STRTOUL +GL_GNULIB_STRTOLL +GL_GNULIB_STRTOLD +GL_GNULIB_STRTOL +GL_GNULIB_STRTOD +GL_GNULIB_SETENV +GL_GNULIB_SECURE_GETENV +GL_GNULIB_RPMATCH +GL_GNULIB_REALPATH +GL_GNULIB_REALLOC_POSIX +GL_GNULIB_REALLOC_GNU +GL_GNULIB_REALLOCARRAY +GL_GNULIB_RANDOM_R +GL_GNULIB_RANDOM +GL_GNULIB_QSORT_R +GL_GNULIB_PUTENV +GL_GNULIB_PTSNAME_R +GL_GNULIB_PTSNAME +GL_GNULIB_POSIX_OPENPT +GL_GNULIB_POSIX_MEMALIGN +GL_GNULIB_MKSTEMPS +GL_GNULIB_MKSTEMP +GL_GNULIB_MKOSTEMPS +GL_GNULIB_MKOSTEMP +GL_GNULIB_MKDTEMP +GL_GNULIB_MBTOWC +GL_GNULIB_MALLOC_POSIX +GL_GNULIB_MALLOC_GNU +GL_GNULIB_GRANTPT +GL_GNULIB_GETSUBOPT +GL_GNULIB_GETLOADAVG +GL_GNULIB_FREE_POSIX +GL_GNULIB_CANONICALIZE_FILE_NAME +GL_GNULIB_CALLOC_POSIX +GL_GNULIB_CALLOC_GNU +GL_GNULIB_ATOLL +GL_GNULIB_ALIGNED_ALLOC +GL_GNULIB__EXIT REPLACE_WCTOMB REPLACE_UNSETENV +REPLACE_STRTOULL +REPLACE_STRTOUL +REPLACE_STRTOLL REPLACE_STRTOLD +REPLACE_STRTOL REPLACE_STRTOD REPLACE_SETSTATE REPLACE_SETENV REPLACE_REALPATH -REPLACE_REALLOC +REPLACE_REALLOCARRAY +REPLACE_REALLOC_FOR_REALLOC_POSIX +REPLACE_REALLOC_FOR_REALLOC_GNU REPLACE_RANDOM_R REPLACE_RANDOM REPLACE_QSORT_R REPLACE_PUTENV REPLACE_PTSNAME_R REPLACE_PTSNAME +REPLACE_POSIX_MEMALIGN REPLACE_MKSTEMP REPLACE_MBTOWC -REPLACE_MALLOC +REPLACE_MALLOC_FOR_MALLOC_POSIX +REPLACE_MALLOC_FOR_MALLOC_GNU REPLACE_INITSTATE +REPLACE_FREE REPLACE_CANONICALIZE_FILE_NAME -REPLACE_CALLOC +REPLACE_CALLOC_FOR_CALLOC_POSIX +REPLACE_CALLOC_FOR_CALLOC_GNU +REPLACE_ALIGNED_ALLOC HAVE_DECL_UNSETENV HAVE_UNLOCKPT HAVE_SYS_LOADAVG_H HAVE_STRUCT_RANDOM_DATA HAVE_STRTOULL +HAVE_STRTOUL HAVE_STRTOLL HAVE_STRTOLD +HAVE_STRTOL HAVE_STRTOD HAVE_DECL_SETSTATE HAVE_SETSTATE @@ -1660,6 +1946,7 @@ HAVE_QSORT_R HAVE_PTSNAME_R HAVE_PTSNAME HAVE_POSIX_OPENPT +HAVE_POSIX_MEMALIGN HAVE_MKSTEMPS HAVE_MKSTEMP HAVE_MKOSTEMPS @@ -1671,51 +1958,27 @@ HAVE_INITSTATE HAVE_GRANTPT HAVE_GETSUBOPT HAVE_DECL_GETLOADAVG +HAVE_DECL_GCVT +HAVE_DECL_FCVT +HAVE_DECL_ECVT HAVE_CANONICALIZE_FILE_NAME HAVE_ATOLL +HAVE_ALIGNED_ALLOC HAVE__EXIT -GNULIB_WCTOMB -GNULIB_UNSETENV -GNULIB_UNLOCKPT -GNULIB_SYSTEM_POSIX -GNULIB_STRTOULL -GNULIB_STRTOLL -GNULIB_STRTOLD -GNULIB_STRTOD -GNULIB_SETENV -GNULIB_SECURE_GETENV -GNULIB_RPMATCH -GNULIB_REALPATH -GNULIB_REALLOC_POSIX -GNULIB_REALLOCARRAY -GNULIB_RANDOM_R -GNULIB_RANDOM -GNULIB_QSORT_R -GNULIB_PUTENV -GNULIB_PTSNAME_R -GNULIB_PTSNAME -GNULIB_POSIX_OPENPT -GNULIB_MKSTEMPS -GNULIB_MKSTEMP -GNULIB_MKOSTEMPS -GNULIB_MKOSTEMP -GNULIB_MKDTEMP -GNULIB_MBTOWC -GNULIB_MALLOC_POSIX -GNULIB_GRANTPT -GNULIB_GETSUBOPT -GNULIB_GETLOADAVG -GNULIB_CANONICALIZE_FILE_NAME -GNULIB_CALLOC_POSIX -GNULIB_ATOLL -GNULIB__EXIT -HAVE_ALLOCA_H GL_GENERATE_ALLOCA_H_FALSE GL_GENERATE_ALLOCA_H_TRUE ALLOCA_H +HAVE_ALLOCA_H ALLOCA GL_COND_LIBTOOL_FALSE GL_COND_LIBTOOL_TRUE +RANLIB +ARFLAGS +ac_ct_AR +AR +EGREP +GREP +CPP host_os host_vendor host_cpu @@ -1724,13 +1987,6 @@ build_os build_vendor build_cpu build -RANLIB -ARFLAGS -ac_ct_AR -AR -EGREP -GREP -CPP OPENMP_CFLAGS am__fastdepCC_FALSE am__fastdepCC_TRUE @@ -1829,6 +2085,8 @@ enable_maintainer_mode enable_dependency_tracking enable_openmp enable_largefile +enable_year2038 +enable_cross_guesses enable_shared enable_static with_pic @@ -2490,6 +2748,9 @@ Optional Features: speeds up one-time build --disable-openmp do not use OpenMP --disable-largefile omit support for large files + --disable-year2038 omit support for timestamps past the year 2038 + --enable-cross-guesses={conservative|risky} + specify policy for cross-compilation guesses --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -2930,6 +3191,10 @@ printf "%s\n" "$ac_res" >&6; } # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. ac_fn_check_decl () { + ac_save_ac_compile="$ac_compile" + if test -n "$ac_compile_for_check_decl"; then + ac_compile="$ac_compile_for_check_decl" + fi as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 @@ -2973,6 +3238,7 @@ eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + ac_compile="$ac_save_ac_compile" } # ac_fn_check_decl @@ -3836,16 +4102,17 @@ as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" +as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" +as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" as_fn_append ac_func_c_list " canonicalize_file_name HAVE_CANONICALIZE_FILE_NAME" -as_fn_append ac_func_c_list " getcwd HAVE_GETCWD" -as_fn_append ac_func_c_list " readlink HAVE_READLINK" +as_fn_append ac_func_c_list " faccessat HAVE_FACCESSAT" as_fn_append ac_func_c_list " realpath HAVE_REALPATH" +as_fn_append ac_func_c_list " lstat HAVE_LSTAT" as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H" as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER" as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H" as_fn_append ac_func_c_list " fchdir HAVE_FCHDIR" as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H" -as_fn_append ac_func_c_list " faccessat HAVE_FACCESSAT" as_fn_append ac_func_c_list " fcntl HAVE_FCNTL" as_fn_append ac_func_c_list " symlink HAVE_SYMLINK" as_fn_append ac_func_c_list " fdopendir HAVE_FDOPENDIR" @@ -3858,26 +4125,24 @@ as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H" as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H" as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME" as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME" -as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY" +as_fn_append ac_func_c_list " timespec_get HAVE_TIMESPEC_GET" as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" +as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY" as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H" -as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" -as_fn_append ac_func_c_list " lstat HAVE_LSTAT" as_fn_append ac_header_c_list " math.h math_h HAVE_MATH_H" as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H" as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT" as_fn_append ac_func_c_list " mkdirat HAVE_MKDIRAT" as_fn_append ac_func_c_list " openat HAVE_OPENAT" +as_fn_append ac_func_c_list " pipe HAVE_PIPE" gl_printf_safe=yes +as_fn_append ac_func_c_list " readlink HAVE_READLINK" as_fn_append ac_func_c_list " readlinkat HAVE_READLINKAT" as_fn_append ac_func_c_list " link HAVE_LINK" as_fn_append ac_func_c_list " renameat HAVE_RENAMEAT" as_fn_append ac_func_c_list " renameat2 HAVE_RENAMEAT2" -as_fn_append ac_func_c_list " strdup HAVE_STRDUP" as_fn_append ac_func_c_list " symlinkat HAVE_SYMLINKAT" -as_fn_append ac_func_c_list " pipe HAVE_PIPE" as_fn_append ac_func_c_list " unlinkat HAVE_UNLINKAT" -as_fn_append ac_func_c_list " utime HAVE_UTIME" as_fn_append ac_header_c_list " utime.h utime_h HAVE_UTIME_H" as_fn_append ac_func_c_list " futimes HAVE_FUTIMES" as_fn_append ac_func_c_list " futimesat HAVE_FUTIMESAT" @@ -3891,7 +4156,7 @@ as_fn_append ac_func_c_list " fmemopen HAVE_FMEMOPEN" as_fn_append ac_func_c_list " scandirat HAVE_SCANDIRAT" # Auxiliary files required by this configure script. -ac_aux_files="ltmain.sh config.guess config.sub ar-lib compile missing install-sh" +ac_aux_files="ltmain.sh ar-lib config.guess config.sub compile missing install-sh" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." @@ -5797,6 +6062,84 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5 +printf %s "checking whether the compiler is clang... " >&6; } +if test ${gl_cv_compiler_clang+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #ifdef __clang__ + barfbarf + #endif + +int +main (void) +{ + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_compiler_clang=no +else $as_nop + gl_cv_compiler_clang=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5 +printf "%s\n" "$gl_cv_compiler_clang" >&6; } + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5 +printf %s "checking for compiler option needed when checking for declarations... " >&6; } +if test ${gl_cv_compiler_check_decl_option+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test $gl_cv_compiler_clang = yes; then + save_ac_compile="$ac_compile" + ac_compile="$ac_compile -Werror=implicit-function-declaration" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration' +else $as_nop + gl_cv_compiler_check_decl_option=none +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_compile="$save_ac_compile" + else + gl_cv_compiler_check_decl_option=none + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5 +printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; } + if test "x$gl_cv_compiler_check_decl_option" != xnone; then + ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option" + else + ac_compile_for_check_decl="$ac_compile" + fi + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -6022,28 +6365,9 @@ printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi - ac_fn_c_check_header_compile "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = xyes -then : - MINIX=yes -else $as_nop - MINIX= -fi - - if test "$MINIX" = yes; then - -printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h - - -printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h - -printf "%s\n" "#define _MINIX 1" >>confdefs.h -printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h - - fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 @@ -6075,36 +6399,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } - test $ac_cv_safe_to_define___extensions__ = yes && - printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h - - printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h - - printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h - - printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h - - printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h - - printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h - - printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h - - printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } @@ -6113,7 +6407,9 @@ then : printf %s "(cached) " >&6 else $as_nop ac_cv_should_define__xopen_source=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $ac_cv_header_wchar_h = yes +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <wchar.h> @@ -6133,9 +6429,9 @@ else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define _XOPEN_SOURCE 500 - #include <wchar.h> - mbstate_t x; + #define _XOPEN_SOURCE 500 + #include <wchar.h> + mbstate_t x; int main (void) { @@ -6152,13 +6448,62 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } - test $ac_cv_should_define__xopen_source = yes && - printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h + + printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h + printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h + + printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h + + if test $ac_cv_header_minix_config_h = yes +then : + MINIX=yes + printf "%s\n" "#define _MINIX 1" >>confdefs.h + + printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h + +else $as_nop + MINIX= +fi + if test $ac_cv_safe_to_define___extensions__ = yes +then : + printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h + +fi + if test $ac_cv_should_define__xopen_source = yes +then : + printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h + +fi if test -e penmp || test -e mp; then as_fn_error $? "AC_OPENMP clobbers files named 'mp' and 'penmp'. Aborting configure because one of these files already exists." "$LINENO" 5 @@ -6241,9 +6586,90 @@ printf "%s\n" "$ac_cv_prog_c_openmp" >&6; } + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + + case "$host_os" in + openbsd*) + +printf "%s\n" "#define _ISOC11_SOURCE 1" >>confdefs.h + + ;; + esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6966,81 +7392,6 @@ fi - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - - # IEEE behaviour is the default on all CPUs except Alpha and SH # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 @@ -7074,8 +7425,8 @@ then : enableval=$enable_largefile; fi -if test "$enable_largefile" != no; then - +if test "$enable_largefile" != no +then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 printf %s "checking for special C compiler options needed for large files... " >&6; } if test ${ac_cv_sys_largefile_CC+y} @@ -7086,9 +7437,9 @@ else $as_nop if test "$GCC" != yes; then ac_save_CC=$CC while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> /* Check that off_t can represent 2**63 - 1 correctly. @@ -7107,18 +7458,18 @@ main (void) return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO" + if ac_fn_c_try_compile "$LINENO" then : break fi rm -f core conftest.err conftest.$ac_objext conftest.beam - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO" + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam - break + break done CC=$ac_save_CC rm -f conftest.$ac_ext @@ -7163,6 +7514,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#undef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #include <sys/types.h> /* Check that off_t can represent 2**63 - 1 correctly. @@ -7199,7 +7551,8 @@ printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs ;; esac rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then + case $ac_cv_sys_file_offset_bits in #( + unknown) : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; } if test ${ac_cv_sys_large_files+y} @@ -7233,6 +7586,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#undef _LARGE_FILES #define _LARGE_FILES 1 #include <sys/types.h> /* Check that off_t can represent 2**63 - 1 correctly. @@ -7268,9 +7622,143 @@ case $ac_cv_sys_large_files in #( printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h ;; esac -rm -rf conftest* +rm -rf conftest* ;; #( + 64) : + + # Check whether --enable-year2038 was given. +if test ${enable_year2038+y} +then : + enableval=$enable_year2038; +fi + + if test "$enable_year2038" != no +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for time_t past the year 2038" >&5 +printf %s "checking for time_t past the year 2038... " >&6; } +if test ${gl_cv_type_time_t_y2038+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include <time.h> + /* Check that time_t can represent 2**32 - 1 correctly. */ + #define LARGE_TIME_T \\ + ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30))) + int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535 + && LARGE_TIME_T % 65537 == 0) + ? 1 : -1]; + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_type_time_t_y2038=yes +else $as_nop + gl_cv_type_time_t_y2038=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_y2038" >&5 +printf "%s\n" "$gl_cv_type_time_t_y2038" >&6; } + if test "$gl_cv_type_time_t_y2038" = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t with _TIME_BITS=64" >&5 +printf %s "checking for 64-bit time_t with _TIME_BITS=64... " >&6; } +if test ${gl_cv_type_time_t_bits_macro+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _TIME_BITS 64 + #define _FILE_OFFSET_BITS 64 + + #include <time.h> + /* Check that time_t can represent 2**32 - 1 correctly. */ + #define LARGE_TIME_T \\ + ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30))) + int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535 + && LARGE_TIME_T % 65537 == 0) + ? 1 : -1]; + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_type_time_t_bits_macro=yes +else $as_nop + gl_cv_type_time_t_bits_macro=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_bits_macro" >&5 +printf "%s\n" "$gl_cv_type_time_t_bits_macro" >&6; } + if test "$gl_cv_type_time_t_bits_macro" = yes; then + +printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h + + +printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h + + gl_cv_type_time_t_y2038=yes + fi + fi + if test $gl_cv_type_time_t_y2038 = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef _USE_32BIT_TIME_T + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The 'time_t' type stops working after January 2038. + Remove _USE_32BIT_TIME_T from the compiler flags. +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + # If not cross-compiling and says we should check, + # and 'touch' works with a large timestamp, then evidently wider time_t + # is desired and supported, so fail and ask the builder to fix the + # problem. Otherwise, just warn the builder. + + if test "$gl_warned_about_y2038" != yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The 'time_t' type stops working after January 2038, + and this package needs a wider 'time_t' type + if there is any way to access timestamps after that. + Configure with 'CC=\"${CC} -m64\"' perhaps?" >&5 +printf "%s\n" "$as_me: WARNING: The 'time_t' type stops working after January 2038, + and this package needs a wider 'time_t' type + if there is any way to access timestamps after that. + Configure with 'CC=\"${CC} -m64\"' perhaps?" >&2;} + gl_warned_about_y2038=yes + fi + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi + ;; #( + *) : + ;; +esac +fi + + + + case "$host_os" in + mingw*) + +printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h + + ;; + esac @@ -7278,10 +7766,17 @@ fi + # Code from module absolute-header: # Code from module alloca-opt: # Code from module assure: # Code from module at-internal: + # Code from module attribute: + # Code from module basename-lgpl: + # Code from module builtin-expect: + # Code from module c99: + # Code from module calloc-gnu: + # Code from module calloc-posix: # Code from module canonicalize-lgpl: # Code from module chdir: # Code from module chdir-long: @@ -7292,10 +7787,10 @@ fi # Code from module dirent: # Code from module dirfd: # Code from module dirname-lgpl: - # Code from module dosname: # Code from module double-slash-root: # Code from module dup: # Code from module dup2: + # Code from module eloop-threshold: # Code from module errno: # Code from module error: # Code from module euidaccess: @@ -7315,11 +7810,13 @@ fi # Code from module fpieee: # Code from module fpucw: + # Code from module free-posix: # Code from module frexp-nolibm: # Code from module frexpl-nolibm: # Code from module fstat: # Code from module fstatat: # Code from module futimens: + # Code from module gen-header: # Code from module getcwd-lgpl: # Code from module getdelim: # Code from module getdtablesize: @@ -7331,6 +7828,8 @@ fi # Code from module gettime: # Code from module gettimeofday: # Code from module group-member: + # Code from module ialloc: + # Code from module idx: # Code from module include_next: # Code from module intprops: # Code from module inttypes: @@ -7340,15 +7839,18 @@ fi # Code from module isnanl-nolibm: # Code from module largefile: + + # Code from module libc-config: # Code from module limits-h: - # Code from module localtime-buffer: # Code from module lstat: + # Code from module malloc-gnu: # Code from module malloc-posix: # Code from module malloca: # Code from module math: # Code from module memchr: # Code from module mempcpy: # Code from module memrchr: + # Code from module minmax: # Code from module mkdir: # Code from module mkdirat: # Code from module msvc-inval: @@ -7361,12 +7863,16 @@ fi # Code from module openat-h: # Code from module opendir: # Code from module pathmax: + # Code from module pipe-posix: # Code from module printf-frexp: # Code from module printf-frexpl: # Code from module printf-safe: + # Code from module rawmemchr: # Code from module readlink: # Code from module readlinkat: + # Code from module realloc-gnu: # Code from module realloc-posix: + # Code from module reallocarray: # Code from module rename: # Code from module renameat: # Code from module renameatu: @@ -7374,6 +7880,7 @@ fi # Code from module root-uid: # Code from module same-inode: # Code from module save-cwd: + # Code from module scratch_buffer: # Code from module signbit: # Code from module size_max: # Code from module snippet/_Noreturn: @@ -7384,6 +7891,8 @@ fi # Code from module stat: # Code from module stat-time: # Code from module statat: + # Code from module std-gnu11: + # Code from module stdalign: # Code from module stdbool: # Code from module stddef: # Code from module stdint: @@ -7412,6 +7921,7 @@ fi # Code from module utime-h: # Code from module utimens: # Code from module utimensat: + # Code from module vararrays: # Code from module vasnprintf: # Code from module vasprintf: # Code from module vasprintf-posix: @@ -7427,9 +7937,33 @@ fi + + + + # Check whether --enable-cross-guesses was given. +if test ${enable_cross_guesses+y} +then : + enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5 +printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;} + enableval=conservative + fi + gl_cross_guesses="$enableval" +else $as_nop + gl_cross_guesses=conservative +fi + + if test $gl_cross_guesses = risky; then + gl_cross_guess_normal="guessing yes" + gl_cross_guess_inverted="guessing no" + else + gl_cross_guess_normal="guessing no" + gl_cross_guess_inverted="guessing yes" + fi LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ + ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes then : @@ -7594,44 +8128,13 @@ printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h 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_MBTOWC=0; - GNULIB_MKDTEMP=0; - GNULIB_MKOSTEMP=0; - GNULIB_MKOSTEMPS=0; - GNULIB_MKSTEMP=0; - GNULIB_MKSTEMPS=0; - GNULIB_POSIX_OPENPT=0; - GNULIB_PTSNAME=0; - GNULIB_PTSNAME_R=0; - GNULIB_PUTENV=0; - GNULIB_QSORT_R=0; - GNULIB_RANDOM=0; - GNULIB_RANDOM_R=0; - GNULIB_REALLOCARRAY=0; - GNULIB_REALLOC_POSIX=0; - GNULIB_REALPATH=0; - GNULIB_RPMATCH=0; - GNULIB_SECURE_GETENV=0; - GNULIB_SETENV=0; - GNULIB_STRTOD=0; - GNULIB_STRTOLD=0; - GNULIB_STRTOLL=0; - GNULIB_STRTOULL=0; - GNULIB_SYSTEM_POSIX=0; - GNULIB_UNLOCKPT=0; - GNULIB_UNSETENV=0; - GNULIB_WCTOMB=0; HAVE__EXIT=1; + HAVE_ALIGNED_ALLOC=1; HAVE_ATOLL=1; HAVE_CANONICALIZE_FILE_NAME=1; + HAVE_DECL_ECVT=1; + HAVE_DECL_FCVT=1; + HAVE_DECL_GCVT=1; HAVE_DECL_GETLOADAVG=1; HAVE_GETSUBOPT=1; HAVE_GRANTPT=1; @@ -7643,6 +8146,7 @@ fi HAVE_MKOSTEMPS=1; HAVE_MKSTEMP=1; HAVE_MKSTEMPS=1; + HAVE_POSIX_MEMALIGN=1; HAVE_POSIX_OPENPT=1; HAVE_PTSNAME=1; HAVE_PTSNAME_R=1; @@ -7659,34 +8163,406 @@ fi HAVE_SETSTATE=1; HAVE_DECL_SETSTATE=1; HAVE_STRTOD=1; + HAVE_STRTOL=1; HAVE_STRTOLD=1; HAVE_STRTOLL=1; + HAVE_STRTOUL=1; HAVE_STRTOULL=1; HAVE_STRUCT_RANDOM_DATA=1; HAVE_SYS_LOADAVG_H=0; HAVE_UNLOCKPT=1; HAVE_DECL_UNSETENV=1; - REPLACE_CALLOC=0; + REPLACE_ALIGNED_ALLOC=0; + REPLACE_CALLOC_FOR_CALLOC_GNU=0; + REPLACE_CALLOC_FOR_CALLOC_POSIX=0; REPLACE_CANONICALIZE_FILE_NAME=0; + REPLACE_FREE=0; REPLACE_INITSTATE=0; - REPLACE_MALLOC=0; + REPLACE_MALLOC_FOR_MALLOC_GNU=0; + REPLACE_MALLOC_FOR_MALLOC_POSIX=0; REPLACE_MBTOWC=0; REPLACE_MKSTEMP=0; + REPLACE_POSIX_MEMALIGN=0; REPLACE_PTSNAME=0; REPLACE_PTSNAME_R=0; REPLACE_PUTENV=0; REPLACE_QSORT_R=0; REPLACE_RANDOM=0; REPLACE_RANDOM_R=0; - REPLACE_REALLOC=0; + REPLACE_REALLOC_FOR_REALLOC_GNU=0; + REPLACE_REALLOC_FOR_REALLOC_POSIX=0; + REPLACE_REALLOCARRAY=0; REPLACE_REALPATH=0; REPLACE_SETENV=0; REPLACE_SETSTATE=0; REPLACE_STRTOD=0; + REPLACE_STRTOL=0; REPLACE_STRTOLD=0; + REPLACE_STRTOLL=0; + REPLACE_STRTOUL=0; + REPLACE_STRTOULL=0; REPLACE_UNSETENV=0; REPLACE_WCTOMB=0; + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5 +printf %s "checking whether malloc is ptrdiff_t safe... " >&6; } +if test ${gl_cv_malloc_ptrdiff+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdint.h> + +int +main (void) +{ +/* 64-bit ptrdiff_t is so wide that no practical platform + can exceed it. */ + #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0) + + /* On rare machines where size_t fits in ptrdiff_t there + is no problem. */ + #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX) + + /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t + bounds even on 32-bit platforms. We don't know which + non-glibc systems are safe. */ + #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__)) + + #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE + return 0; + #else + #error "malloc might not be ptrdiff_t safe" + syntax error + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_malloc_ptrdiff=yes +else $as_nop + gl_cv_malloc_ptrdiff=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5 +printf "%s\n" "$gl_cv_malloc_ptrdiff" >&6; } + + + + + test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1 + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5 +printf %s "checking whether malloc, realloc, calloc set errno on failure... " >&6; } +if test ${gl_cv_func_malloc_posix+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + case "$host_os" in + mingw*) + gl_cv_func_malloc_posix=no ;; + irix* | solaris*) + + gl_cv_func_malloc_posix=no ;; + *) + gl_cv_func_malloc_posix=yes ;; + esac + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 +printf "%s\n" "$gl_cv_func_malloc_posix" >&6; } + + + + + + if test "$gl_cv_func_malloc_posix" = yes; then + +printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h + + else + REPLACE_MALLOC_FOR_MALLOC_POSIX=1 + fi + + + + + if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then + REPLACE_CALLOC_FOR_CALLOC_POSIX=1 + fi + + + + GL_GNULIB__EXIT=0 + + + + GL_GNULIB_ALIGNED_ALLOC=0 + + + + GL_GNULIB_ATOLL=0 + + + + GL_GNULIB_CALLOC_GNU=0 + + + + GL_GNULIB_CALLOC_POSIX=0 + + + + GL_GNULIB_CANONICALIZE_FILE_NAME=0 + + + + GL_GNULIB_FREE_POSIX=0 + + + + GL_GNULIB_GETLOADAVG=0 + + + + GL_GNULIB_GETSUBOPT=0 + + + + GL_GNULIB_GRANTPT=0 + + + + GL_GNULIB_MALLOC_GNU=0 + + + + GL_GNULIB_MALLOC_POSIX=0 + + + + GL_GNULIB_MBTOWC=0 + + + + GL_GNULIB_MKDTEMP=0 + + + + GL_GNULIB_MKOSTEMP=0 + + + + GL_GNULIB_MKOSTEMPS=0 + + + + GL_GNULIB_MKSTEMP=0 + + + + GL_GNULIB_MKSTEMPS=0 + + + + GL_GNULIB_POSIX_MEMALIGN=0 + + + + GL_GNULIB_POSIX_OPENPT=0 + + + + GL_GNULIB_PTSNAME=0 + + + + GL_GNULIB_PTSNAME_R=0 + + + + GL_GNULIB_PUTENV=0 + + + + GL_GNULIB_QSORT_R=0 + + + + GL_GNULIB_RANDOM=0 + + + + GL_GNULIB_RANDOM_R=0 + + + + GL_GNULIB_REALLOCARRAY=0 + + + + GL_GNULIB_REALLOC_GNU=0 + + + + GL_GNULIB_REALLOC_POSIX=0 + + + + GL_GNULIB_REALPATH=0 + + + + GL_GNULIB_RPMATCH=0 + + + + GL_GNULIB_SECURE_GETENV=0 + + + + GL_GNULIB_SETENV=0 + + + + GL_GNULIB_STRTOD=0 + + + + GL_GNULIB_STRTOL=0 + + + + GL_GNULIB_STRTOLD=0 + + + + GL_GNULIB_STRTOLL=0 + + + + GL_GNULIB_STRTOUL=0 + + + + GL_GNULIB_STRTOULL=0 + + + + GL_GNULIB_SYSTEM_POSIX=0 + + + + GL_GNULIB_UNLOCKPT=0 + + + + GL_GNULIB_UNSETENV=0 + + + + GL_GNULIB_WCTOMB=0 + + + + GL_GNULIB_MDA_ECVT=1 + + + + GL_GNULIB_MDA_FCVT=1 + + + + GL_GNULIB_MDA_GCVT=1 + + + + GL_GNULIB_MDA_MKTEMP=1 + + + + GL_GNULIB_MDA_PUTENV=1 + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 +printf %s "checking whether lstat correctly handles trailing slash... " >&6; } +if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y} +then : + printf %s "(cached) " >&6 +else $as_nop + rm -f conftest.sym conftest.file + echo >conftest.file + if test "$cross_compiling" = yes +then : + case "$host_os" in + linux-* | linux) + # Guess yes on Linux systems. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; + *-gnu* | gnu*) + # Guess yes on glibc systems. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; + mingw*) + # Guess no on native Windows. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; + *) + # If we don't know, obey --enable-cross-guesses. + gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;; + esac + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main (void) +{ +struct stat sbuf; + if (symlink ("conftest.file", "conftest.sym") != 0) + return 1; + /* 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; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_lstat_dereferences_slashed_symlink=yes +else $as_nop + gl_cv_func_lstat_dereferences_slashed_symlink=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + rm -f conftest.sym conftest.file + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 +printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } + case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + *yes) + +printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h + + ;; + esac + ac_func= for ac_item in $ac_func_c_list do @@ -7703,7 +8579,6 @@ done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 printf %s "checking whether // is distinct from /... " >&6; } if test ${gl_cv_double_slash_root+y} @@ -7745,6 +8620,7 @@ printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5 printf %s "checking whether realpath works... " >&6; } if test ${gl_cv_func_realpath_works+y} @@ -7752,17 +8628,26 @@ then : printf %s "(cached) " >&6 else $as_nop + rm -rf conftest.a conftest.d 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.l + fi mkdir conftest.d if test "$cross_compiling" = yes then : case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; + # Guess 'nearly' on musl systems. + *-musl*) gl_cv_func_realpath_works="guessing nearly" ;; + # Guess no on Cygwin. + cygwin*) gl_cv_func_realpath_works="guessing no" ;; # Guess no on native Windows. mingw*) gl_cv_func_realpath_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_realpath_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;; esac else $as_nop @@ -7808,7 +8693,7 @@ nocrash_init (void) /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { - /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ + /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { @@ -7827,7 +8712,7 @@ nocrash_init (void) for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. - See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ + See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } @@ -7884,6 +8769,7 @@ nocrash_init (void) } #endif + #include <errno.h> #include <stdlib.h> #include <string.h> @@ -7892,32 +8778,56 @@ main (void) { int result = 0; + /* This test fails on Solaris 10. */ { char *name = realpath ("conftest.a", NULL); if (!(name && *name == '/')) result |= 1; free (name); } + /* This test fails on older versions of Cygwin. */ { char *name = realpath ("conftest.b/../conftest.a", NULL); if (name != NULL) result |= 2; free (name); } + /* This test fails on Cygwin 2.9. */ + #if HAVE_LSTAT + { + char *name = realpath ("conftest.l/../conftest.a", NULL); + if (name != NULL || errno != ENOTDIR) + result |= 4; + free (name); + } + #endif + /* This test fails on Mac OS X 10.13, OpenBSD 6.0. */ { char *name = realpath ("conftest.a/", NULL); if (name != NULL) - result |= 4; + result |= 8; free (name); } + /* This test fails on AIX 7, Solaris 10. */ { char *name1 = realpath (".", NULL); char *name2 = realpath ("conftest.d//./..", NULL); if (! name1 || ! name2 || strcmp (name1, name2)) - result |= 8; + result |= 16; free (name1); free (name2); } + #ifdef __linux__ + /* On Linux, // is the same as /. See also double-slash-root.m4. + realpath() should respect this. + This test fails on musl libc 1.2.2. */ + { + char *name = realpath ("//", NULL); + if (! name || strcmp (name, "/")) + result |= 32; + free (name); + } + #endif return result; ; @@ -7929,13 +8839,17 @@ if ac_fn_c_try_run "$LINENO" then : gl_cv_func_realpath_works=yes else $as_nop - gl_cv_func_realpath_works=no + case $? in + 32) gl_cv_func_realpath_works=nearly ;; + *) gl_cv_func_realpath_works=no ;; + esac + fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - rm -rf conftest.a conftest.d + rm -rf conftest.a conftest.l conftest.d fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5 @@ -7946,6 +8860,29 @@ printf "%s\n" "$gl_cv_func_realpath_works" >&6; } printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h ;; + *nearly) + +printf "%s\n" "#define FUNC_REALPATH_NEARLY_WORKS 1" >>confdefs.h + + ;; + esac + + + + + + + + + case "$host_os" in + mingw*) ;; + *) ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" +if test "x$ac_cv_func_getcwd" = xyes +then : + printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h + +fi + ;; esac @@ -7954,63 +8891,348 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h + GL_GNULIB_ACCESS=0 + + + + GL_GNULIB_CHDIR=0 + + + + GL_GNULIB_CHOWN=0 + + + + GL_GNULIB_CLOSE=0 + + + + GL_GNULIB_COPY_FILE_RANGE=0 + + + + GL_GNULIB_DUP=0 + + + + GL_GNULIB_DUP2=0 + + + + GL_GNULIB_DUP3=0 + + + + GL_GNULIB_ENVIRON=0 + + + + GL_GNULIB_EUIDACCESS=0 + + + + GL_GNULIB_EXECL=0 + + + + GL_GNULIB_EXECLE=0 + + + + GL_GNULIB_EXECLP=0 + + + + GL_GNULIB_EXECV=0 + + + + GL_GNULIB_EXECVE=0 + + + + GL_GNULIB_EXECVP=0 + + + + GL_GNULIB_EXECVPE=0 + + + + GL_GNULIB_FACCESSAT=0 + + + + GL_GNULIB_FCHDIR=0 + + + + GL_GNULIB_FCHOWNAT=0 + + + + GL_GNULIB_FDATASYNC=0 + + + + GL_GNULIB_FSYNC=0 + + + + GL_GNULIB_FTRUNCATE=0 + + + + GL_GNULIB_GETCWD=0 + + + + GL_GNULIB_GETDOMAINNAME=0 + + + + GL_GNULIB_GETDTABLESIZE=0 + + + + GL_GNULIB_GETENTROPY=0 + + + + GL_GNULIB_GETGROUPS=0 + + + + GL_GNULIB_GETHOSTNAME=0 + + + + GL_GNULIB_GETLOGIN=0 + + + + GL_GNULIB_GETLOGIN_R=0 + + + + GL_GNULIB_GETOPT_POSIX=0 + + + + GL_GNULIB_GETPAGESIZE=0 + + + + GL_GNULIB_GETPASS=0 + + + + GL_GNULIB_GETPASS_GNU=0 + + + + GL_GNULIB_GETUSERSHELL=0 + + + + GL_GNULIB_GROUP_MEMBER=0 + + + + GL_GNULIB_ISATTY=0 + + + + GL_GNULIB_LCHOWN=0 + + + + GL_GNULIB_LINK=0 + + + + GL_GNULIB_LINKAT=0 + + + + GL_GNULIB_LSEEK=0 + + + + GL_GNULIB_PIPE=0 + + + + GL_GNULIB_PIPE2=0 + + + + GL_GNULIB_PREAD=0 + + + + GL_GNULIB_PWRITE=0 + + + + GL_GNULIB_READ=0 + + + + GL_GNULIB_READLINK=0 + + + + GL_GNULIB_READLINKAT=0 + + + + GL_GNULIB_RMDIR=0 + + + + GL_GNULIB_SETHOSTNAME=0 + + + + GL_GNULIB_SLEEP=0 + + + + GL_GNULIB_SYMLINK=0 + + + + GL_GNULIB_SYMLINKAT=0 + + + + GL_GNULIB_TRUNCATE=0 + + + + GL_GNULIB_TTYNAME_R=0 + + + + GL_GNULIB_UNISTD_H_GETOPT=0 + + + + GL_GNULIB_UNISTD_H_NONBLOCKING=0 + + + + GL_GNULIB_UNISTD_H_SIGPIPE=0 + + + + GL_GNULIB_UNLINK=0 + + + + GL_GNULIB_UNLINKAT=0 + + + + GL_GNULIB_USLEEP=0 + + + + GL_GNULIB_WRITE=0 + + + + GL_GNULIB_MDA_ACCESS=1 + + + + GL_GNULIB_MDA_CHDIR=1 + + + + GL_GNULIB_MDA_CLOSE=1 + + + + GL_GNULIB_MDA_DUP=1 + + + + GL_GNULIB_MDA_DUP2=1 + + + + GL_GNULIB_MDA_EXECL=1 + + + + GL_GNULIB_MDA_EXECLE=1 + + + + GL_GNULIB_MDA_EXECLP=1 + + + + GL_GNULIB_MDA_EXECV=1 + + + + GL_GNULIB_MDA_EXECVE=1 + + + + GL_GNULIB_MDA_EXECVP=1 + + + + GL_GNULIB_MDA_EXECVPE=1 + + + + GL_GNULIB_MDA_GETCWD=1 + + + + GL_GNULIB_MDA_GETPID=1 + + + + GL_GNULIB_MDA_ISATTY=1 + + + + GL_GNULIB_MDA_LSEEK=1 + + + + GL_GNULIB_MDA_READ=1 + + + + GL_GNULIB_MDA_RMDIR=1 + + + + GL_GNULIB_MDA_SWAB=1 + + + + GL_GNULIB_MDA_UNLINK=1 + + + + GL_GNULIB_MDA_WRITE=1 + - GNULIB_CHDIR=0; - GNULIB_CHOWN=0; - GNULIB_CLOSE=0; - GNULIB_DUP=0; - GNULIB_DUP2=0; - GNULIB_DUP3=0; - GNULIB_ENVIRON=0; - GNULIB_EUIDACCESS=0; - GNULIB_FACCESSAT=0; - GNULIB_FCHDIR=0; - GNULIB_FCHOWNAT=0; - GNULIB_FDATASYNC=0; - GNULIB_FSYNC=0; - GNULIB_FTRUNCATE=0; - GNULIB_GETCWD=0; - GNULIB_GETDOMAINNAME=0; - GNULIB_GETDTABLESIZE=0; - GNULIB_GETGROUPS=0; - GNULIB_GETHOSTNAME=0; - GNULIB_GETLOGIN=0; - GNULIB_GETLOGIN_R=0; - GNULIB_GETPAGESIZE=0; - GNULIB_GETPASS=0; - GNULIB_GETUSERSHELL=0; - GNULIB_GROUP_MEMBER=0; - GNULIB_ISATTY=0; - GNULIB_LCHOWN=0; - GNULIB_LINK=0; - GNULIB_LINKAT=0; - GNULIB_LSEEK=0; - GNULIB_PIPE=0; - GNULIB_PIPE2=0; - GNULIB_PREAD=0; - GNULIB_PWRITE=0; - GNULIB_READ=0; - GNULIB_READLINK=0; - GNULIB_READLINKAT=0; - GNULIB_RMDIR=0; - GNULIB_SETHOSTNAME=0; - GNULIB_SLEEP=0; - GNULIB_SYMLINK=0; - GNULIB_SYMLINKAT=0; - GNULIB_TRUNCATE=0; - GNULIB_TTYNAME_R=0; - GNULIB_UNISTD_H_NONBLOCKING=0; - GNULIB_UNISTD_H_SIGPIPE=0; - GNULIB_UNLINK=0; - GNULIB_UNLINKAT=0; - GNULIB_USLEEP=0; - GNULIB_WRITE=0; HAVE_CHOWN=1; - HAVE_DUP2=1; + HAVE_COPY_FILE_RANGE=1; HAVE_DUP3=1; HAVE_EUIDACCESS=1; + HAVE_EXECVPE=1; HAVE_FACCESSAT=1; HAVE_FCHDIR=1; HAVE_FCHOWNAT=1; @@ -8018,6 +9240,7 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h HAVE_FSYNC=1; HAVE_FTRUNCATE=1; HAVE_GETDTABLESIZE=1; + HAVE_GETENTROPY=1; HAVE_GETGROUPS=1; HAVE_GETHOSTNAME=1; HAVE_GETLOGIN=1; @@ -8040,6 +9263,7 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h HAVE_UNLINKAT=1; HAVE_USLEEP=1; HAVE_DECL_ENVIRON=1; + HAVE_DECL_EXECVPE=1; HAVE_DECL_FCHDIR=1; HAVE_DECL_FDATASYNC=1; HAVE_DECL_GETDOMAINNAME=1; @@ -8052,10 +9276,19 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h HAVE_DECL_TTYNAME_R=1; HAVE_OS_H=0; HAVE_SYS_PARAM_H=0; + REPLACE_ACCESS=0; REPLACE_CHOWN=0; REPLACE_CLOSE=0; + REPLACE_COPY_FILE_RANGE=0; REPLACE_DUP=0; REPLACE_DUP2=0; + REPLACE_EXECL=0; + REPLACE_EXECLE=0; + REPLACE_EXECLP=0; + REPLACE_EXECV=0; + REPLACE_EXECVE=0; + REPLACE_EXECVP=0; + REPLACE_EXECVPE=0; REPLACE_FACCESSAT=0; REPLACE_FCHOWNAT=0; REPLACE_FTRUNCATE=0; @@ -8066,6 +9299,7 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h REPLACE_GETGROUPS=0; REPLACE_GETPAGESIZE=0; REPLACE_GETPASS=0; + REPLACE_GETPASS_FOR_GETPASS_GNU=0; REPLACE_ISATTY=0; REPLACE_LCHOWN=0; REPLACE_LINK=0; @@ -8086,6 +9320,7 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h REPLACE_UNLINKAT=0; REPLACE_USLEEP=0; REPLACE_WRITE=0; + UNISTD_H_HAVE_SYS_RANDOM_H=0; UNISTD_H_HAVE_WINSOCK2_H=0; UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; @@ -8109,14 +9344,6 @@ printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h - GNULIB_OPENDIR=0; - GNULIB_READDIR=0; - GNULIB_REWINDDIR=0; - GNULIB_CLOSEDIR=0; - GNULIB_DIRFD=0; - GNULIB_FDOPENDIR=0; - GNULIB_SCANDIR=0; - GNULIB_ALPHASORT=0; HAVE_OPENDIR=1; HAVE_READDIR=1; HAVE_REWINDDIR=1; @@ -8133,6 +9360,44 @@ printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h + + + + + GL_GNULIB_OPENDIR=0 + + + + GL_GNULIB_READDIR=0 + + + + GL_GNULIB_REWINDDIR=0 + + + + GL_GNULIB_CLOSEDIR=0 + + + + GL_GNULIB_DIRFD=0 + + + + GL_GNULIB_FDOPENDIR=0 + + + + GL_GNULIB_SCANDIR=0 + + + + GL_GNULIB_ALPHASORT=0 + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 printf %s "checking whether the preprocessor supports include_next... " >&6; } if test ${gl_cv_have_include_next+y} @@ -8216,13 +9481,14 @@ printf "%s\n" "$gl_cv_have_include_next" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 -printf %s "checking whether system header files limit the line length... " >&6; } -if test ${gl_cv_pragma_columns+y} + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5 +printf %s "checking whether source code line length is unlimited... " >&6; } +if test ${gl_cv_source_line_length_unlimited+y} then : printf %s "(cached) " >&6 else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __TANDEM @@ -8233,17 +9499,17 @@ _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "choke me" >/dev/null 2>&1 then : - gl_cv_pragma_columns=yes + gl_cv_source_line_length_unlimited=no else $as_nop - gl_cv_pragma_columns=no + gl_cv_source_line_length_unlimited=yes fi rm -rf conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 -printf "%s\n" "$gl_cv_pragma_columns" >&6; } - if test $gl_cv_pragma_columns = yes; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5 +printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; } + if test $gl_cv_source_line_length_unlimited = no; then PRAGMA_COLUMNS="#pragma COLUMNS 10000" else PRAGMA_COLUMNS= @@ -8251,6 +9517,99 @@ printf "%s\n" "$gl_cv_pragma_columns" >&6; } + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_dirent_h='<'dirent.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5 +printf %s "checking absolute name of <dirent.h>... " >&6; } +if test ${gl_cv_next_dirent_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + if test $ac_cv_header_dirent_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <dirent.h> +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'dirent.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_dirent_h + gl_cv_next_dirent_h='"'$gl_header'"' + else + gl_cv_next_dirent_h='<'dirent.h'>' + fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5 +printf "%s\n" "$gl_cv_next_dirent_h" >&6; } + fi + NEXT_DIRENT_H=$gl_cv_next_dirent_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='<'dirent.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_dirent_h + fi + NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_dirent_h = yes; then + HAVE_DIRENT_H=1 + else + HAVE_DIRENT_H=0 + fi + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } if test ${ac_cv_c_undeclared_builtin_options+y} @@ -8331,6 +9690,61 @@ See \`config.log' for more details" "$LINENO" 5; } ;; #( ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; esac +gl_mda_defines=' +#if defined _WIN32 && !defined __CYGWIN__ +#define access _access +#define chdir _chdir +#define chmod _chmod +#define close _close +#define creat _creat +#define dup _dup +#define dup2 _dup2 +#define ecvt _ecvt +#define execl _execl +#define execle _execle +#define execlp _execlp +#define execv _execv +#define execve _execve +#define execvp _execvp +#define execvpe _execvpe +#define fcloseall _fcloseall +#define fcvt _fcvt +#define fdopen _fdopen +#define fileno _fileno +#define gcvt _gcvt +#define getcwd _getcwd +#define getpid _getpid +#define getw _getw +#define isatty _isatty +#define j0 _j0 +#define j1 _j1 +#define jn _jn +#define lfind _lfind +#define lsearch _lsearch +#define lseek _lseek +#define memccpy _memccpy +#define mkdir _mkdir +#define mktemp _mktemp +#define open _open +#define putenv _putenv +#define putw _putw +#define read _read +#define rmdir _rmdir +#define strdup _strdup +#define swab _swab +#define tempnam _tempnam +#define tzset _tzset +#define umask _umask +#define unlink _unlink +#define utime _utime +#define wcsdup _wcsdup +#define write _write +#define y0 _y0 +#define y1 _y1 +#define yn _yn +#endif +' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 @@ -8411,7 +9825,7 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; } if test $gl_cv_header_errno_h_complete = yes; then - ERRNO_H='' + GL_GENERATE_ERRNO_H=false else @@ -8463,8 +9877,8 @@ _ACEOF gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_errno_h - gl_cv_next_errno_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_errno_h + gl_cv_next_errno_h='"'$gl_header'"' fi @@ -8485,19 +9899,10 @@ printf "%s\n" "$gl_cv_next_errno_h" >&6; } - ERRNO_H='errno.h' + GL_GENERATE_ERRNO_H=true fi - if test -n "$ERRNO_H"; then - GL_GENERATE_ERRNO_H_TRUE= - GL_GENERATE_ERRNO_H_FALSE='#' -else - GL_GENERATE_ERRNO_H_TRUE='#' - GL_GENERATE_ERRNO_H_FALSE= -fi - - - if test -n "$ERRNO_H"; then + if $GL_GENERATE_ERRNO_H; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 printf %s "checking for EMULTIHOP value... " >&6; } if test ${gl_cv_header_errno_h_EMULTIHOP+y} @@ -8572,7 +9977,7 @@ printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; } fi - if test -n "$ERRNO_H"; then + if $GL_GENERATE_ERRNO_H; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 printf %s "checking for ENOLINK value... " >&6; } if test ${gl_cv_header_errno_h_ENOLINK+y} @@ -8647,7 +10052,7 @@ printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; } fi - if test -n "$ERRNO_H"; then + if $GL_GENERATE_ERRNO_H; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 printf %s "checking for EOVERFLOW value... " >&6; } if test ${gl_cv_header_errno_h_EOVERFLOW+y} @@ -8786,7 +10191,6 @@ fi XGETTEXT_EXTRA_OPTIONS= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 printf %s "checking for uid_t in sys/types.h... " >&6; } if test ${ac_cv_type_uid_t+y} @@ -8889,75 +10293,37 @@ printf "%s\n" "#define GETGROUPS_T $ac_cv_type_getgroups" >>confdefs.h - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -printf %s "checking whether lstat correctly handles trailing slash... " >&6; } -if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ctype.h defines __header_inline" >&5 +printf %s "checking whether ctype.h defines __header_inline... " >&6; } +if test ${gl_cv_have___header_inline+y} then : printf %s "(cached) " >&6 else $as_nop - rm -f conftest.sym conftest.file - echo >conftest.file - if test "$cross_compiling" = yes -then : - case "$host_os" in - linux-* | linux) - # Guess yes on Linux systems. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; - *-gnu* | gnu*) - # Guess yes on glibc systems. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; - mingw*) - # Guess no on native Windows. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; - *) - # If we don't know, assume the worst. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; - esac - -else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main (void) -{ -struct stat sbuf; - if (symlink ("conftest.file", "conftest.sym") != 0) - return 1; - /* 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 <ctype.h> + #ifndef __header_inline + #error "<ctype.h> does not define __header_inline" + #endif - ; - return 0; -} _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_cpp "$LINENO" then : - gl_cv_func_lstat_dereferences_slashed_symlink=yes + gl_cv_have___header_inline=yes else $as_nop - gl_cv_func_lstat_dereferences_slashed_symlink=no + gl_cv_have___header_inline=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___header_inline" >&5 +printf "%s\n" "$gl_cv_have___header_inline" >&6; } + if test "$gl_cv_have___header_inline" = yes; then - rm -f conftest.sym conftest.file +printf "%s\n" "#define HAVE___HEADER_INLINE 1" >>confdefs.h -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 -printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } - case "$gl_cv_func_lstat_dereferences_slashed_symlink" in - *yes) + fi -printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h - ;; - esac ac_fn_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_fchdir" = xyes @@ -8969,12 +10335,9 @@ fi printf "%s\n" "#define HAVE_DECL_FCHDIR $ac_have_decl" >>confdefs.h - GNULIB_FCNTL=0; - GNULIB_NONBLOCKING=0; - GNULIB_OPEN=0; - GNULIB_OPENAT=0; HAVE_FCNTL=1; HAVE_OPENAT=1; + REPLACE_CREAT=0; REPLACE_FCNTL=0; REPLACE_OPEN=0; REPLACE_OPENAT=0; @@ -8982,6 +10345,36 @@ printf "%s\n" "#define HAVE_DECL_FCHDIR $ac_have_decl" >>confdefs.h + GL_GNULIB_CREAT=0 + + + + GL_GNULIB_FCNTL=0 + + + + GL_GNULIB_NONBLOCKING=0 + + + + GL_GNULIB_OPEN=0 + + + + GL_GNULIB_OPENAT=0 + + + + GL_GNULIB_MDA_CREAT=1 + + + + GL_GNULIB_MDA_OPEN=1 + + + + + @@ -9013,6 +10406,10 @@ else $as_nop # defined sleep(n) _sleep ((n) * 1000) #endif #include <fcntl.h> + + +$gl_mda_defines + #ifndef O_NOATIME #define O_NOATIME 0 #endif @@ -9182,101 +10579,90 @@ fi - GNULIB_ACOSF=0; - GNULIB_ACOSL=0; - GNULIB_ASINF=0; - GNULIB_ASINL=0; - GNULIB_ATANF=0; - GNULIB_ATANL=0; - GNULIB_ATAN2F=0; - GNULIB_CBRT=0; - GNULIB_CBRTF=0; - GNULIB_CBRTL=0; - GNULIB_CEIL=0; - GNULIB_CEILF=0; - GNULIB_CEILL=0; - GNULIB_COPYSIGN=0; - GNULIB_COPYSIGNF=0; - GNULIB_COPYSIGNL=0; - GNULIB_COSF=0; - GNULIB_COSL=0; - GNULIB_COSHF=0; - GNULIB_EXPF=0; - GNULIB_EXPL=0; - GNULIB_EXP2=0; - GNULIB_EXP2F=0; - GNULIB_EXP2L=0; - GNULIB_EXPM1=0; - GNULIB_EXPM1F=0; - GNULIB_EXPM1L=0; - GNULIB_FABSF=0; - GNULIB_FABSL=0; - GNULIB_FLOOR=0; - GNULIB_FLOORF=0; - GNULIB_FLOORL=0; - GNULIB_FMA=0; - GNULIB_FMAF=0; - GNULIB_FMAL=0; - GNULIB_FMOD=0; - GNULIB_FMODF=0; - GNULIB_FMODL=0; - GNULIB_FREXPF=0; - GNULIB_FREXP=0; - GNULIB_FREXPL=0; - GNULIB_HYPOT=0; - GNULIB_HYPOTF=0; - GNULIB_HYPOTL=0; - GNULIB_ILOGB=0; - GNULIB_ILOGBF=0; - GNULIB_ILOGBL=0; - GNULIB_ISFINITE=0; - GNULIB_ISINF=0; - GNULIB_ISNAN=0; - GNULIB_ISNANF=0; - GNULIB_ISNAND=0; - GNULIB_ISNANL=0; - GNULIB_LDEXPF=0; - GNULIB_LDEXPL=0; - GNULIB_LOG=0; - GNULIB_LOGF=0; - GNULIB_LOGL=0; - GNULIB_LOG10=0; - GNULIB_LOG10F=0; - GNULIB_LOG10L=0; - GNULIB_LOG1P=0; - GNULIB_LOG1PF=0; - GNULIB_LOG1PL=0; - GNULIB_LOG2=0; - GNULIB_LOG2F=0; - GNULIB_LOG2L=0; - GNULIB_LOGB=0; - GNULIB_LOGBF=0; - GNULIB_LOGBL=0; - GNULIB_MODF=0; - GNULIB_MODFF=0; - GNULIB_MODFL=0; - GNULIB_POWF=0; - GNULIB_REMAINDER=0; - GNULIB_REMAINDERF=0; - GNULIB_REMAINDERL=0; - GNULIB_RINT=0; - GNULIB_RINTF=0; - GNULIB_RINTL=0; - GNULIB_ROUND=0; - GNULIB_ROUNDF=0; - GNULIB_ROUNDL=0; - GNULIB_SIGNBIT=0; - GNULIB_SINF=0; - GNULIB_SINL=0; - GNULIB_SINHF=0; - GNULIB_SQRTF=0; - GNULIB_SQRTL=0; - GNULIB_TANF=0; - GNULIB_TANL=0; - GNULIB_TANHF=0; - GNULIB_TRUNC=0; - GNULIB_TRUNCF=0; - GNULIB_TRUNCL=0; + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_fcntl_h='<'fcntl.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5 +printf %s "checking absolute name of <fcntl.h>... " >&6; } +if test ${gl_cv_next_fcntl_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <fcntl.h> +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'fcntl.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_fcntl_h + gl_cv_next_fcntl_h='"'$gl_header'"' + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5 +printf "%s\n" "$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 + + + + + + + + + + + + + + + + HAVE_ACOSF=1; HAVE_ACOSL=1; HAVE_ASINF=1; @@ -9442,7 +10828,7 @@ fi REPLACE_ROUNDF=0; REPLACE_ROUNDL=0; REPLACE_SIGNBIT=0; - REPLACE_SIGNBIT_USING_GCC=0; + REPLACE_SIGNBIT_USING_BUILTINS=0; REPLACE_SINF=0; REPLACE_SINHF=0; REPLACE_SQRTF=0; @@ -9496,6 +10882,412 @@ fi printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h + + GL_GNULIB_ACOSF=0 + + + + GL_GNULIB_ACOSL=0 + + + + GL_GNULIB_ASINF=0 + + + + GL_GNULIB_ASINL=0 + + + + GL_GNULIB_ATANF=0 + + + + GL_GNULIB_ATANL=0 + + + + GL_GNULIB_ATAN2F=0 + + + + GL_GNULIB_CBRT=0 + + + + GL_GNULIB_CBRTF=0 + + + + GL_GNULIB_CBRTL=0 + + + + GL_GNULIB_CEIL=0 + + + + GL_GNULIB_CEILF=0 + + + + GL_GNULIB_CEILL=0 + + + + GL_GNULIB_COPYSIGN=0 + + + + GL_GNULIB_COPYSIGNF=0 + + + + GL_GNULIB_COPYSIGNL=0 + + + + GL_GNULIB_COSF=0 + + + + GL_GNULIB_COSL=0 + + + + GL_GNULIB_COSHF=0 + + + + GL_GNULIB_EXPF=0 + + + + GL_GNULIB_EXPL=0 + + + + GL_GNULIB_EXP2=0 + + + + GL_GNULIB_EXP2F=0 + + + + GL_GNULIB_EXP2L=0 + + + + GL_GNULIB_EXPM1=0 + + + + GL_GNULIB_EXPM1F=0 + + + + GL_GNULIB_EXPM1L=0 + + + + GL_GNULIB_FABSF=0 + + + + GL_GNULIB_FABSL=0 + + + + GL_GNULIB_FLOOR=0 + + + + GL_GNULIB_FLOORF=0 + + + + GL_GNULIB_FLOORL=0 + + + + GL_GNULIB_FMA=0 + + + + GL_GNULIB_FMAF=0 + + + + GL_GNULIB_FMAL=0 + + + + GL_GNULIB_FMOD=0 + + + + GL_GNULIB_FMODF=0 + + + + GL_GNULIB_FMODL=0 + + + + GL_GNULIB_FREXPF=0 + + + + GL_GNULIB_FREXP=0 + + + + GL_GNULIB_FREXPL=0 + + + + GL_GNULIB_HYPOT=0 + + + + GL_GNULIB_HYPOTF=0 + + + + GL_GNULIB_HYPOTL=0 + + + + GL_GNULIB_ILOGB=0 + + + + GL_GNULIB_ILOGBF=0 + + + + GL_GNULIB_ILOGBL=0 + + + + GL_GNULIB_ISFINITE=0 + + + + GL_GNULIB_ISINF=0 + + + + GL_GNULIB_ISNAN=0 + + + + GL_GNULIB_ISNANF=0 + + + + GL_GNULIB_ISNAND=0 + + + + GL_GNULIB_ISNANL=0 + + + + GL_GNULIB_LDEXPF=0 + + + + GL_GNULIB_LDEXPL=0 + + + + GL_GNULIB_LOG=0 + + + + GL_GNULIB_LOGF=0 + + + + GL_GNULIB_LOGL=0 + + + + GL_GNULIB_LOG10=0 + + + + GL_GNULIB_LOG10F=0 + + + + GL_GNULIB_LOG10L=0 + + + + GL_GNULIB_LOG1P=0 + + + + GL_GNULIB_LOG1PF=0 + + + + GL_GNULIB_LOG1PL=0 + + + + GL_GNULIB_LOG2=0 + + + + GL_GNULIB_LOG2F=0 + + + + GL_GNULIB_LOG2L=0 + + + + GL_GNULIB_LOGB=0 + + + + GL_GNULIB_LOGBF=0 + + + + GL_GNULIB_LOGBL=0 + + + + GL_GNULIB_MODF=0 + + + + GL_GNULIB_MODFF=0 + + + + GL_GNULIB_MODFL=0 + + + + GL_GNULIB_POWF=0 + + + + GL_GNULIB_REMAINDER=0 + + + + GL_GNULIB_REMAINDERF=0 + + + + GL_GNULIB_REMAINDERL=0 + + + + GL_GNULIB_RINT=0 + + + + GL_GNULIB_RINTF=0 + + + + GL_GNULIB_RINTL=0 + + + + GL_GNULIB_ROUND=0 + + + + GL_GNULIB_ROUNDF=0 + + + + GL_GNULIB_ROUNDL=0 + + + + GL_GNULIB_SIGNBIT=0 + + + + GL_GNULIB_SINF=0 + + + + GL_GNULIB_SINL=0 + + + + GL_GNULIB_SINHF=0 + + + + GL_GNULIB_SQRTF=0 + + + + GL_GNULIB_SQRTL=0 + + + + GL_GNULIB_TANF=0 + + + + GL_GNULIB_TANL=0 + + + + GL_GNULIB_TANHF=0 + + + + GL_GNULIB_TRUNC=0 + + + + GL_GNULIB_TRUNCF=0 + + + + GL_GNULIB_TRUNCL=0 + + + + GL_GNULIB_MDA_J0=1 + + + + GL_GNULIB_MDA_J1=1 + + + + GL_GNULIB_MDA_JN=1 + + + + GL_GNULIB_MDA_Y0=1 + + + + GL_GNULIB_MDA_Y1=1 + + + + GL_GNULIB_MDA_YN=1 + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5 printf %s "checking whether long double and double are the same... " >&6; } if test ${gl_cv_long_double_equals_double+y} @@ -9540,23 +11332,10 @@ printf "%s\n" "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h - GNULIB_FCHMODAT=0; - GNULIB_FSTAT=0; - GNULIB_FSTATAT=0; - GNULIB_FUTIMENS=0; - GNULIB_LCHMOD=0; - GNULIB_LSTAT=0; - GNULIB_MKDIRAT=0; - GNULIB_MKFIFO=0; - GNULIB_MKFIFOAT=0; - GNULIB_MKNOD=0; - GNULIB_MKNODAT=0; - GNULIB_STAT=0; - GNULIB_UTIMENSAT=0; - GNULIB_OVERRIDES_STRUCT_STAT=0; HAVE_FCHMODAT=1; HAVE_FSTATAT=1; HAVE_FUTIMENS=1; + HAVE_GETUMASK=1; HAVE_LCHMOD=1; HAVE_LSTAT=1; HAVE_MKDIRAT=1; @@ -9565,13 +11344,16 @@ printf "%s\n" "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h HAVE_MKNOD=1; HAVE_MKNODAT=1; HAVE_UTIMENSAT=1; + REPLACE_FCHMODAT=0; REPLACE_FSTAT=0; REPLACE_FSTATAT=0; REPLACE_FUTIMENS=0; REPLACE_LSTAT=0; REPLACE_MKDIR=0; REPLACE_MKFIFO=0; + REPLACE_MKFIFOAT=0; REPLACE_MKNOD=0; + REPLACE_MKNODAT=0; REPLACE_STAT=0; REPLACE_UTIMENSAT=0; @@ -9701,6 +11483,56 @@ printf "%s\n" "$gl_cv_member_st_size_64" >&6; } ;; esac +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +printf %s "checking for C/C++ restrict keyword... " >&6; } +if test ${ac_cv_c_restrict+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_c_restrict=no + # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see: + # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html + # Put 'restrict' last, because C++ lacks it. + for ac_kw in __restrict__ __restrict _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int *int_ptr; + int foo (int_ptr $ac_kw ip) { return ip[0]; } + int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ + int bar (int ip[$ac_kw]) { return ip[0]; } + +int +main (void) +{ +int s[1]; + int *$ac_kw t = s; + t[0] = 0; + return foo (t) + bar (t); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_restrict=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +printf "%s\n" "$ac_cv_c_restrict" >&6; } + + case $ac_cv_c_restrict in + restrict) ;; + no) printf "%s\n" "#define restrict /**/" >>confdefs.h + ;; + *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h + ;; + esac + @@ -9760,8 +11592,8 @@ _ACEOF gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_sys_stat_h - gl_cv_next_sys_stat_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_sys_stat_h + gl_cv_next_sys_stat_h='"'$gl_header'"' else gl_cv_next_sys_stat_h='<'sys/stat.h'>' fi @@ -9819,6 +11651,104 @@ fi + case "$host_os" in + mingw*) + ac_fn_c_check_header_compile "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default" +if test "x$ac_cv_header_sdkddkver_h" = xyes +then : + printf "%s\n" "#define HAVE_SDKDDKVER_H 1" >>confdefs.h + +fi + + ;; + esac + + + + + + + + GL_GNULIB_FCHMODAT=0 + + + + GL_GNULIB_FSTAT=0 + + + + GL_GNULIB_FSTATAT=0 + + + + GL_GNULIB_FUTIMENS=0 + + + + GL_GNULIB_GETUMASK=0 + + + + GL_GNULIB_LCHMOD=0 + + + + GL_GNULIB_LSTAT=0 + + + + GL_GNULIB_MKDIR=0 + + + + GL_GNULIB_MKDIRAT=0 + + + + GL_GNULIB_MKFIFO=0 + + + + GL_GNULIB_MKFIFOAT=0 + + + + GL_GNULIB_MKNOD=0 + + + + GL_GNULIB_MKNODAT=0 + + + + GL_GNULIB_STAT=0 + + + + GL_GNULIB_UTIMENSAT=0 + + + + GL_GNULIB_OVERRIDES_STRUCT_STAT=0 + + + + GL_GNULIB_MDA_CHMOD=1 + + + + GL_GNULIB_MDA_MKDIR=1 + + + + GL_GNULIB_MDA_UMASK=1 + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; } if test ${gl_cv_func_getcwd_null+y} @@ -9830,10 +11760,12 @@ then : case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";; + # Guess yes on musl systems. + *-musl*) gl_cv_func_getcwd_null="guessing yes";; # Guess yes on Cygwin. cygwin*) gl_cv_func_getcwd_null="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_getcwd_null="guessing no";; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";; esac else $as_nop @@ -9846,6 +11778,10 @@ else $as_nop # else /* on Windows with MSVC */ # include <direct.h> # endif + + +$gl_mda_defines + # ifndef getcwd char *getcwd (); # endif @@ -9855,7 +11791,7 @@ main (void) { #if defined _WIN32 && ! defined __CYGWIN__ -/* mingw cwd does not start with '/', but getcwd does allocate. +/* mingw cwd does not start with '/', but _getcwd does allocate. However, mingw fails to honor non-zero size. */ #else if (chdir ("/") != 0) @@ -9902,6 +11838,10 @@ else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <unistd.h> + + +$gl_mda_defines + int main (void) { @@ -9929,60 +11869,8 @@ fi printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; } - GNULIB_DPRINTF=0; - GNULIB_FCLOSE=0; - GNULIB_FDOPEN=0; - GNULIB_FFLUSH=0; - GNULIB_FGETC=0; - GNULIB_FGETS=0; - GNULIB_FOPEN=0; - GNULIB_FPRINTF=0; - GNULIB_FPRINTF_POSIX=0; - GNULIB_FPURGE=0; - GNULIB_FPUTC=0; - GNULIB_FPUTS=0; - GNULIB_FREAD=0; - GNULIB_FREOPEN=0; - GNULIB_FSCANF=0; - GNULIB_FSEEK=0; - GNULIB_FSEEKO=0; - GNULIB_FTELL=0; - GNULIB_FTELLO=0; - GNULIB_FWRITE=0; - GNULIB_GETC=0; - GNULIB_GETCHAR=0; - GNULIB_GETDELIM=0; - GNULIB_GETLINE=0; - GNULIB_OBSTACK_PRINTF=0; - GNULIB_OBSTACK_PRINTF_POSIX=0; - GNULIB_PCLOSE=0; - GNULIB_PERROR=0; - GNULIB_POPEN=0; - GNULIB_PRINTF=0; - GNULIB_PRINTF_POSIX=0; - GNULIB_PUTC=0; - GNULIB_PUTCHAR=0; - GNULIB_PUTS=0; - GNULIB_REMOVE=0; - GNULIB_RENAME=0; - GNULIB_RENAMEAT=0; - GNULIB_SCANF=0; - GNULIB_SNPRINTF=0; - GNULIB_SPRINTF_POSIX=0; - GNULIB_STDIO_H_NONBLOCKING=0; - GNULIB_STDIO_H_SIGPIPE=0; - GNULIB_TMPFILE=0; - GNULIB_VASPRINTF=0; - GNULIB_VFSCANF=0; - GNULIB_VSCANF=0; - GNULIB_VDPRINTF=0; - GNULIB_VFPRINTF=0; - GNULIB_VFPRINTF_POSIX=0; - GNULIB_VPRINTF=0; - GNULIB_VPRINTF_POSIX=0; - GNULIB_VSNPRINTF=0; - GNULIB_VSPRINTF_POSIX=0; - HAVE_DECL_FPURGE=1; + HAVE_DECL_FCLOSEALL=1; + HAVE_DECL_FPURGE=1; HAVE_DECL_FSEEKO=1; HAVE_DECL_FTELLO=1; HAVE_DECL_GETDELIM=1; @@ -10003,6 +11891,7 @@ printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; } REPLACE_FDOPEN=0; REPLACE_FFLUSH=0; REPLACE_FOPEN=0; + REPLACE_FOPEN_FOR_FOPEN_GNU=0; REPLACE_FPRINTF=0; REPLACE_FPURGE=0; REPLACE_FREOPEN=0; @@ -10042,6 +11931,248 @@ printf "%s\n" "#define HAVE_DECL_GETDELIM $ac_have_decl" >>confdefs.h + + GL_GNULIB_DPRINTF=0 + + + + GL_GNULIB_FCLOSE=0 + + + + GL_GNULIB_FDOPEN=0 + + + + GL_GNULIB_FFLUSH=0 + + + + GL_GNULIB_FGETC=0 + + + + GL_GNULIB_FGETS=0 + + + + GL_GNULIB_FOPEN=0 + + + + GL_GNULIB_FOPEN_GNU=0 + + + + GL_GNULIB_FPRINTF=0 + + + + GL_GNULIB_FPRINTF_POSIX=0 + + + + GL_GNULIB_FPURGE=0 + + + + GL_GNULIB_FPUTC=0 + + + + GL_GNULIB_FPUTS=0 + + + + GL_GNULIB_FREAD=0 + + + + GL_GNULIB_FREOPEN=0 + + + + GL_GNULIB_FSCANF=0 + + + + GL_GNULIB_FSEEK=0 + + + + GL_GNULIB_FSEEKO=0 + + + + GL_GNULIB_FTELL=0 + + + + GL_GNULIB_FTELLO=0 + + + + GL_GNULIB_FWRITE=0 + + + + GL_GNULIB_GETC=0 + + + + GL_GNULIB_GETCHAR=0 + + + + GL_GNULIB_GETDELIM=0 + + + + GL_GNULIB_GETLINE=0 + + + + GL_GNULIB_OBSTACK_PRINTF=0 + + + + GL_GNULIB_OBSTACK_PRINTF_POSIX=0 + + + + GL_GNULIB_PCLOSE=0 + + + + GL_GNULIB_PERROR=0 + + + + GL_GNULIB_POPEN=0 + + + + GL_GNULIB_PRINTF=0 + + + + GL_GNULIB_PRINTF_POSIX=0 + + + + GL_GNULIB_PUTC=0 + + + + GL_GNULIB_PUTCHAR=0 + + + + GL_GNULIB_PUTS=0 + + + + GL_GNULIB_REMOVE=0 + + + + GL_GNULIB_RENAME=0 + + + + GL_GNULIB_RENAMEAT=0 + + + + GL_GNULIB_SCANF=0 + + + + GL_GNULIB_SNPRINTF=0 + + + + GL_GNULIB_SPRINTF_POSIX=0 + + + + GL_GNULIB_STDIO_H_NONBLOCKING=0 + + + + GL_GNULIB_STDIO_H_SIGPIPE=0 + + + + GL_GNULIB_TMPFILE=0 + + + + GL_GNULIB_VASPRINTF=0 + + + + GL_GNULIB_VFSCANF=0 + + + + GL_GNULIB_VSCANF=0 + + + + GL_GNULIB_VDPRINTF=0 + + + + GL_GNULIB_VFPRINTF=0 + + + + GL_GNULIB_VFPRINTF_POSIX=0 + + + + GL_GNULIB_VPRINTF=0 + + + + GL_GNULIB_VPRINTF_POSIX=0 + + + + GL_GNULIB_VSNPRINTF=0 + + + + GL_GNULIB_VSPRINTF_POSIX=0 + + + + GL_GNULIB_MDA_FCLOSEALL=1 + + + + GL_GNULIB_MDA_FDOPEN=1 + + + + GL_GNULIB_MDA_FILENO=1 + + + + GL_GNULIB_MDA_GETW=1 + + + + GL_GNULIB_MDA_PUTW=1 + + + + GL_GNULIB_MDA_TEMPNAM=1 + + + + ac_fn_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_getdtablesize" = xyes then : @@ -10119,8 +12250,8 @@ _ACEOF gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_getopt_h - gl_cv_next_getopt_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_getopt_h + gl_cv_next_getopt_h='"'$gl_header'"' else gl_cv_next_getopt_h='<'getopt.h'>' fi @@ -10383,7 +12514,7 @@ else $as_nop export POSIXLY_CORRECT if test "$cross_compiling" = yes then : - gl_cv_func_getopt_gnu="guessing no" + gl_cv_func_getopt_gnu="$gl_cross_guess_normal" else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10429,7 +12560,7 @@ nocrash_init (void) /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { - /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ + /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { @@ -10448,7 +12579,7 @@ nocrash_init (void) for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. - See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ + See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } @@ -10681,61 +12812,12 @@ printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; } : - GNULIB_GETTIMEOFDAY=0; HAVE_GETTIMEOFDAY=1; HAVE_STRUCT_TIMEVAL=1; HAVE_SYS_TIME_H=1; REPLACE_GETTIMEOFDAY=0; REPLACE_STRUCT_TIMEVAL=0; -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -printf %s "checking for C/C++ restrict keyword... " >&6; } -if test ${ac_cv_c_restrict+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int *int_ptr; - int foo (int_ptr $ac_kw ip) { return ip[0]; } - int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ - int bar (int ip[$ac_kw]) { return ip[0]; } - -int -main (void) -{ -int s[1]; - int *$ac_kw t = s; - t[0] = 0; - return foo (t) + bar (t); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_c_restrict=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -printf "%s\n" "$ac_cv_c_restrict" >&6; } - - case $ac_cv_c_restrict in - restrict) ;; - no) printf "%s\n" "#define restrict /**/" >>confdefs.h - ;; - *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h - ;; - esac - @@ -10795,8 +12877,8 @@ _ACEOF gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_sys_time_h - gl_cv_next_sys_time_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_sys_time_h + gl_cv_next_sys_time_h='"'$gl_header'"' else gl_cv_next_sys_time_h='<'sys/time.h'>' fi @@ -10936,37 +13018,9 @@ printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; } + GL_GNULIB_GETTIMEOFDAY=0 - NEED_LOCALTIME_BUFFER=0 - - - GNULIB_CTIME=0; - GNULIB_MKTIME=0; - GNULIB_LOCALTIME=0; - GNULIB_NANOSLEEP=0; - GNULIB_STRFTIME=0; - GNULIB_STRPTIME=0; - GNULIB_TIMEGM=0; - GNULIB_TIME_R=0; - GNULIB_TIME_RZ=0; - GNULIB_TZSET=0; - HAVE_DECL_LOCALTIME_R=1; - HAVE_NANOSLEEP=1; - HAVE_STRPTIME=1; - HAVE_TIMEGM=1; - HAVE_TZSET=1; - HAVE_TIMEZONE_T=0; - REPLACE_CTIME=GNULIB_PORTCHECK; - REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; - REPLACE_MKTIME=GNULIB_PORTCHECK; - REPLACE_NANOSLEEP=GNULIB_PORTCHECK; - REPLACE_STRFTIME=GNULIB_PORTCHECK; - REPLACE_TIMEGM=GNULIB_PORTCHECK; - REPLACE_TZSET=GNULIB_PORTCHECK; - : ${GNULIB_GETTIMEOFDAY=0}; - REPLACE_GMTIME=0; - REPLACE_LOCALTIME=0; @@ -11024,8 +13078,8 @@ _ACEOF gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_limits_h - gl_cv_next_limits_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_limits_h + gl_cv_next_limits_h='"'$gl_header'"' else gl_cv_next_limits_h='<'limits.h'>' fi @@ -11050,8 +13104,8 @@ printf "%s\n" "$gl_cv_next_limits_h" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5 -printf %s "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has WORD_BIT, BOOL_WIDTH etc." >&5 +printf %s "checking whether limits.h has WORD_BIT, BOOL_WIDTH etc.... " >&6; } if test ${gl_cv_header_limits_width+y} then : printf %s "(cached) " >&6 @@ -11065,6 +13119,7 @@ else $as_nop long long llm = LLONG_MAX; int wb = WORD_BIT; int ullw = ULLONG_WIDTH; + int bw = BOOL_WIDTH; int main (void) @@ -11085,20 +13140,11 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5 printf "%s\n" "$gl_cv_header_limits_width" >&6; } if test "$gl_cv_header_limits_width" = yes; then - LIMITS_H= + GL_GENERATE_LIMITS_H=false else - LIMITS_H=limits.h + GL_GENERATE_LIMITS_H=true fi - if test -n "$LIMITS_H"; then - GL_GENERATE_LIMITS_H_TRUE= - GL_GENERATE_LIMITS_H_FALSE='#' -else - GL_GENERATE_LIMITS_H_TRUE='#' - GL_GENERATE_LIMITS_H_FALSE= -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 printf %s "checking for wint_t... " >&6; } @@ -11108,14 +13154,6 @@ then : else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before - <wchar.h>. - BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included - before <wchar.h>. */ -#include <stddef.h> -#include <stdio.h> -#include <time.h> #include <wchar.h> wint_t foo = (wchar_t)'\0'; int @@ -11141,24 +13179,14 @@ printf "%s\n" "$gt_cv_c_wint_t" >&6; } printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5 -printf %s "checking whether wint_t is too small... " >&6; } -if test ${gl_cv_type_wint_t_too_small+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5 +printf %s "checking whether wint_t is large enough... " >&6; } +if test ${gl_cv_type_wint_t_large_enough+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before - <wchar.h>. - BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include <stddef.h> -# include <stdio.h> -# include <time.h> -#endif #include <wchar.h> int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; @@ -11172,183 +13200,70 @@ main (void) _ACEOF if ac_fn_c_try_compile "$LINENO" then : - gl_cv_type_wint_t_too_small=no + gl_cv_type_wint_t_large_enough=yes else $as_nop - gl_cv_type_wint_t_too_small=yes + gl_cv_type_wint_t_large_enough=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5 -printf "%s\n" "$gl_cv_type_wint_t_too_small" >&6; } - if test $gl_cv_type_wint_t_too_small = yes; then - GNULIB_OVERRIDES_WINT_T=1 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5 +printf "%s\n" "$gl_cv_type_wint_t_large_enough" >&6; } + if test $gl_cv_type_wint_t_large_enough = no; then + GNULIBHEADERS_OVERRIDE_WINT_T=1 else - GNULIB_OVERRIDES_WINT_T=0 + GNULIBHEADERS_OVERRIDE_WINT_T=0 fi else - GNULIB_OVERRIDES_WINT_T=0 - fi - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 -printf %s "checking for unsigned long long int... " >&6; } -if test ${ac_cv_type_unsigned_long_long_int+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main (void) -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - -else $as_nop - ac_cv_type_unsigned_long_long_int=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 -printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; } - if test $ac_cv_type_unsigned_long_long_int = yes; then - -printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h - + GNULIBHEADERS_OVERRIDE_WINT_T=0 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 -printf %s "checking for long long int... " >&6; } -if test ${ac_cv_type_long_long_int+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5 +printf %s "checking whether the compiler produces multi-arch binaries... " >&6; } +if test ${gl_cv_c_multiarch+y} then : printf %s "(cached) " >&6 else $as_nop - ac_cv_type_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_long_long_int = yes; then - if test "$cross_compiling" = yes -then : - : -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <limits.h> - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif -int -main (void) -{ -long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - -else $as_nop - ac_cv_type_long_long_int=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 -printf "%s\n" "$ac_cv_type_long_long_int" >&6; } - if test $ac_cv_type_long_long_int = yes; then - -printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h - - fi - - - - gl_cv_c_multiarch=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + gl_cv_c_multiarch=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; + not a universal capable compiler + #endif + typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO" then : - arch= - prev= - for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do - if test -n "$prev"; then - case $word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$arch" || test "$arch" = "$word"; then - arch="$word" - else - gl_cv_c_multiarch=yes - fi - ;; - esac - prev= - else - if test "x$word" = "x-arch"; then - prev=arch - fi - fi - done + arch= + prev= + for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do + if test -n "$prev"; then + case $word in + i?86 | x86_64 | ppc | ppc64 | arm | arm64) + if test -z "$arch" || test "$arch" = "$word"; then + arch="$word" + else + gl_cv_c_multiarch=yes + fi + ;; + esac + prev= + else + if test "x$word" = "x-arch"; then + prev=arch + fi + fi + done fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5 +printf "%s\n" "$gl_cv_c_multiarch" >&6; } if test $gl_cv_c_multiarch = yes; then APPLE_UNIVERSAL_BUILD=1 else @@ -11362,18 +13277,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi +printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi +printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h @@ -11384,14 +13291,16 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi - if test $ac_cv_header_inttypes_h = yes; then + + if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi - if test $ac_cv_header_sys_types_h = yes; then + + if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 @@ -11452,8 +13361,8 @@ _ACEOF gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_stdint_h - gl_cv_next_stdint_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_stdint_h + gl_cv_next_stdint_h='"'$gl_header'"' else gl_cv_next_stdint_h='<'stdint.h'>' fi @@ -11506,13 +13415,9 @@ else $as_nop #endif - /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ #include <stddef.h> #include <signal.h> #if HAVE_WCHAR_H - # include <stdio.h> - # include <time.h> # include <wchar.h> #endif @@ -11592,7 +13497,7 @@ uintmax_t j = UINTMAX_MAX; /* Check that SIZE_MAX has the correct type, if possible. */ #if 201112 <= __STDC_VERSION__ int k = _Generic (SIZE_MAX, size_t: 0); -#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ +#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \ || (0x5110 <= __SUNPRO_C && !__STDC__)) extern size_t k; extern __typeof__ (SIZE_MAX) k; @@ -11610,7 +13515,7 @@ struct s { PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; - /* Detect bug in FreeBSD 6.0 / ia64. */ + /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) @@ -11688,13 +13593,9 @@ else $as_nop #include <stdint.h> - /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ #include <stddef.h> #include <signal.h> #if HAVE_WCHAR_H - # include <stdio.h> - # include <time.h> # include <wchar.h> #endif @@ -11775,17 +13676,17 @@ printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; } HAVE_C99_STDINT_H=0 HAVE_SYS_BITYPES_H=0 HAVE_SYS_INTTYPES_H=0 - STDINT_H=stdint.h + GL_GENERATE_STDINT_H=true case "$gl_cv_header_working_stdint_h" in *yes) HAVE_C99_STDINT_H=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5 -printf %s "checking whether stdint.h predates C++11... " >&6; } -if test ${gl_cv_header_stdint_predates_cxx11_h+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5 +printf %s "checking whether stdint.h works without ISO C predefines... " >&6; } +if test ${gl_cv_header_stdint_without_STDC_macros+y} then : printf %s "(cached) " >&6 else $as_nop - gl_cv_header_stdint_predates_cxx11_h=yes + gl_cv_header_stdint_without_STDC_macros=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11794,13 +13695,9 @@ else $as_nop #include <stdint.h> - /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ #include <stddef.h> #include <signal.h> #if HAVE_WCHAR_H - # include <stdio.h> - # include <time.h> # include <wchar.h> #endif @@ -11818,14 +13715,15 @@ main (void) _ACEOF if ac_fn_c_try_compile "$LINENO" then : - gl_cv_header_stdint_predates_cxx11_h=no + gl_cv_header_stdint_without_STDC_macros=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5 -printf "%s\n" "$gl_cv_header_stdint_predates_cxx11_h" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5 +printf "%s\n" "$gl_cv_header_stdint_without_STDC_macros" >&6; } - if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then + if test $gl_cv_header_stdint_without_STDC_macros = no; then printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h @@ -11850,13 +13748,9 @@ else $as_nop #endif #include <stdint.h> - /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ #include <stddef.h> #include <signal.h> #if HAVE_WCHAR_H - # include <stdio.h> - # include <time.h> # include <wchar.h> #endif @@ -11879,7 +13773,7 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5 printf "%s\n" "$gl_cv_header_stdint_width" >&6; } if test "$gl_cv_header_stdint_width" = yes; then - STDINT_H= + GL_GENERATE_STDINT_H=false fi ;; *) @@ -11915,13 +13809,9 @@ then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " - /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ #include <stddef.h> #include <signal.h> #if HAVE_WCHAR_H - # include <stdio.h> - # include <time.h> # include <wchar.h> #endif @@ -11960,13 +13850,9 @@ then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " - /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ #include <stddef.h> #include <signal.h> #if HAVE_WCHAR_H - # include <stdio.h> - # include <time.h> # include <wchar.h> #endif @@ -12006,13 +13892,9 @@ else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ #include <stddef.h> #include <signal.h> #if HAVE_WCHAR_H - # include <stdio.h> - # include <time.h> # include <wchar.h> #endif @@ -12083,13 +13965,9 @@ else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ #include <stddef.h> #include <signal.h> #if HAVE_WCHAR_H - # include <stdio.h> - # include <time.h> # include <wchar.h> #endif @@ -12155,13 +14033,9 @@ else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ #include <stddef.h> #include <signal.h> #if HAVE_WCHAR_H - # include <stdio.h> - # include <time.h> # include <wchar.h> #endif @@ -12197,7 +14071,7 @@ printf "%s\n" "$ac_res" >&6; } - if test $GNULIB_OVERRIDES_WINT_T = 1; then + if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then BITSIZEOF_WINT_T=32 fi @@ -12206,35 +14080,14 @@ printf "%s\n" "$ac_res" >&6; } - LIMITS_H='limits.h' - if test -n "$LIMITS_H"; then - GL_GENERATE_LIMITS_H_TRUE= - GL_GENERATE_LIMITS_H_FALSE='#' -else - GL_GENERATE_LIMITS_H_TRUE='#' - GL_GENERATE_LIMITS_H_FALSE= -fi - - - + GL_GENERATE_LIMITS_H=true - if test -n "$STDINT_H"; then - GL_GENERATE_STDINT_H_TRUE= - GL_GENERATE_STDINT_H_FALSE='#' -else - GL_GENERATE_STDINT_H_TRUE='#' - GL_GENERATE_STDINT_H_FALSE= -fi - GNULIB_IMAXABS=0; - GNULIB_IMAXDIV=0; - GNULIB_STRTOIMAX=0; - GNULIB_STRTOUMAX=0; HAVE_DECL_IMAXABS=1; HAVE_DECL_IMAXDIV=1; HAVE_DECL_STRTOIMAX=1; @@ -12244,7 +14097,6 @@ fi REPLACE_STRTOUMAX=0; INT32_MAX_LT_INTMAX_MAX=1; INT64_MAX_EQ_LONG_MAX='defined _LP64'; - PRI_MACROS_BROKEN=0; PRIPTR_PREFIX=__PRIPTR_PREFIX; UINT32_MAX_LT_UINTMAX_MAX=1; UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; @@ -12308,8 +14160,8 @@ _ACEOF gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_inttypes_h - gl_cv_next_inttypes_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_inttypes_h + gl_cv_next_inttypes_h='"'$gl_header'"' else gl_cv_next_inttypes_h='<'inttypes.h'>' fi @@ -12341,29 +14193,198 @@ printf "%s\n" "$gl_cv_next_inttypes_h" >&6; } - ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" -if test "x$ac_cv_header_inttypes_h" = xyes + + + + + PRIPTR_PREFIX= + if $GL_GENERATE_STDINT_H; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #ifdef _WIN64 + LLP64 + #endif + +int +main (void) +{ + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h + PRIPTR_PREFIX='"l"' +else $as_nop + PRIPTR_PREFIX='"ll"' +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + else + for glpfx in '' l ll I64; do + case $glpfx in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + I64) gltype1='__int64';; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdint.h> + extern intptr_t foo; + extern $gltype1 foo; +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + PRIPTR_PREFIX='"'$glpfx'"' fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + test -n "$PRIPTR_PREFIX" && break + done + fi - if test $ac_cv_header_inttypes_h = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 -printf %s "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } -if test ${gt_cv_inttypes_pri_broken+y} + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5 +printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; } +if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y} then : printf %s "(cached) " >&6 else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Work also in C++ mode. */ + #define __STDC_LIMIT_MACROS 1 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + + #include <limits.h> + #if HAVE_STDINT_H + #include <stdint.h> + #endif + + #if defined INT32_MAX && defined INTMAX_MAX + #define CONDITION (INT32_MAX < INTMAX_MAX) + #else + #define CONDITION (sizeof (int) < sizeof (long long int)) + #endif + int test[CONDITION ? 1 : -1]; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes +else $as_nop + gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 +printf "%s\n" "$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 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5 +printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; } +if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Work also in C++ mode. */ + #define __STDC_LIMIT_MACROS 1 -#include <inttypes.h> -#ifdef PRId32 -char *p = PRId32; -#endif + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + + #include <limits.h> + #if HAVE_STDINT_H + #include <stdint.h> + #endif + #if defined INT64_MAX + #define CONDITION (INT64_MAX == LONG_MAX) + #else + #define CONDITION (sizeof (long long int) == sizeof (long int)) + #endif + int test[CONDITION ? 1 : -1]; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes +else $as_nop + gl_cv_test_INT64_MAX_EQ_LONG_MAX=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 +printf "%s\n" "$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 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5 +printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } +if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 <limits.h> + #if HAVE_STDINT_H + #include <stdint.h> + #endif + + #if defined UINT32_MAX && defined UINTMAX_MAX + #define CONDITION (UINT32_MAX < UINTMAX_MAX) + #else + #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) + #endif + int test[CONDITION ? 1 : -1]; int main (void) { @@ -12374,27 +14395,97 @@ main (void) _ACEOF if ac_fn_c_try_compile "$LINENO" then : - gt_cv_inttypes_pri_broken=no + gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes else $as_nop - gt_cv_inttypes_pri_broken=yes + gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 +printf "%s\n" "$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 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5 +printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; } +if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 <limits.h> + #if HAVE_STDINT_H + #include <stdint.h> + #endif + + #if defined UINT64_MAX + #define CONDITION (UINT64_MAX == ULONG_MAX) + #else + #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) + #endif + int test[CONDITION ? 1 : -1]; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes +else $as_nop + gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 -printf "%s\n" "$gt_cv_inttypes_pri_broken" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 +printf "%s\n" "$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 - if test "$gt_cv_inttypes_pri_broken" = yes; then -printf "%s\n" "#define PRI_MACROS_BROKEN 1" >>confdefs.h - PRI_MACROS_BROKEN=1 else - PRI_MACROS_BROKEN=0 + UINT64_MAX_EQ_ULONG_MAX=-1 fi + + GL_GNULIB_IMAXABS=0 + + + + GL_GNULIB_IMAXDIV=0 + + + + GL_GNULIB_STRTOIMAX=0 + + + + GL_GNULIB_STRTOUMAX=0 + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5 printf %s "checking where to find the exponent in a 'double'... " >&6; } if test ${gl_cv_cc_double_expbit0+y} @@ -13094,56 +15185,24 @@ printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 -printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } -if test ${gl_cv_func_malloc_posix+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -#if defined _WIN32 && ! defined __CYGWIN__ - choke me - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_func_malloc_posix=yes -else $as_nop - gl_cv_func_malloc_posix=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 -printf "%s\n" "$gl_cv_func_malloc_posix" >&6; } - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -printf %s "checking for GNU libc compatible malloc... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5 +printf %s "checking whether malloc (0) returns nonnull... " >&6; } if test ${ac_cv_func_malloc_0_nonnull+y} then : printf %s "(cached) " >&6 else $as_nop if test "$cross_compiling" = yes then : - case "$host_os" in # (( - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) - ac_cv_func_malloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_malloc_0_nonnull=no ;; - esac + case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ + | gnu* | *-musl* | midnightbsd* \ + | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_malloc_0_nonnull="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;; + esac + else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13153,12 +15212,13 @@ int main (void) { void *p = malloc (0); - int result = !p; - free (p); - return result; + int result = !p; + free (p); + return result; ; return 0; } + _ACEOF if ac_fn_c_try_run "$LINENO" then : @@ -13170,99 +15230,175 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes + case $ac_cv_func_malloc_0_nonnull in #( + *yes) : + gl_cv_func_malloc_0_nonnull=1 ;; #( + *) : + gl_cv_func_malloc_0_nonnull=0 ;; +esac + + +printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_math_h='<'math.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5 +printf %s "checking absolute name of <math.h>... " >&6; } +if test ${gl_cv_next_math_h+y} then : - gl_cv_func_malloc_0_nonnull=1 + printf %s "(cached) " >&6 else $as_nop - gl_cv_func_malloc_0_nonnull=0 + + if test $ac_cv_header_math_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'math.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_math_h + gl_cv_next_math_h='"'$gl_header'"' + else + gl_cv_next_math_h='<'math.h'>' + fi + + fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5 +printf "%s\n" "$gl_cv_next_math_h" >&6; } + fi + NEXT_MATH_H=$gl_cv_next_math_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='<'math.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_math_h + fi + NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive -printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5 +printf %s "checking whether NAN macro works... " >&6; } +if test ${gl_cv_header_math_nan_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main (void) +{ +/* Solaris 10 has a broken definition of NAN. Other platforms + fail to provide NAN, or provide it only in C99 mode; this + test only needs to fail when NAN is provided but wrong. */ + float f = 1.0f; +#ifdef NAN + f = NAN; +#endif + return f == 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_header_math_nan_works=yes +else $as_nop + gl_cv_header_math_nan_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5 +printf "%s\n" "$gl_cv_header_math_nan_works" >&6; } + if test $gl_cv_header_math_nan_works = no; then + REPLACE_NAN=1 + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5 +printf %s "checking whether HUGE_VAL works... " >&6; } +if test ${gl_cv_header_math_huge_val_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main (void) +{ +/* Solaris 10 has a broken definition of HUGE_VAL. */ + double d = HUGE_VAL; + return d == 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_header_math_huge_val_works=yes +else $as_nop + gl_cv_header_math_huge_val_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5 +printf "%s\n" "$gl_cv_header_math_huge_val_works" >&6; } + if test $gl_cv_header_math_huge_val_works = no; then + REPLACE_HUGE_VAL=1 + fi - GNULIB_EXPLICIT_BZERO=0; - GNULIB_FFSL=0; - GNULIB_FFSLL=0; - GNULIB_MEMCHR=0; - GNULIB_MEMMEM=0; - GNULIB_MEMPCPY=0; - GNULIB_MEMRCHR=0; - GNULIB_RAWMEMCHR=0; - GNULIB_STPCPY=0; - GNULIB_STPNCPY=0; - GNULIB_STRCHRNUL=0; - GNULIB_STRDUP=0; - GNULIB_STRNCAT=0; - GNULIB_STRNDUP=0; - GNULIB_STRNLEN=0; - GNULIB_STRPBRK=0; - GNULIB_STRSEP=0; - GNULIB_STRSTR=0; - GNULIB_STRCASESTR=0; - GNULIB_STRTOK_R=0; - GNULIB_MBSLEN=0; - GNULIB_MBSNLEN=0; - GNULIB_MBSCHR=0; - GNULIB_MBSRCHR=0; - GNULIB_MBSSTR=0; - GNULIB_MBSCASECMP=0; - GNULIB_MBSNCASECMP=0; - GNULIB_MBSPCASECMP=0; - GNULIB_MBSCASESTR=0; - GNULIB_MBSCSPN=0; - GNULIB_MBSPBRK=0; - GNULIB_MBSSPN=0; - GNULIB_MBSSEP=0; - GNULIB_MBSTOK_R=0; - GNULIB_STRERROR=0; - GNULIB_STRERROR_R=0; - GNULIB_STRSIGNAL=0; - GNULIB_STRVERSCMP=0; - HAVE_MBSLEN=0; - HAVE_EXPLICIT_BZERO=1; - HAVE_FFSL=1; - HAVE_FFSLL=1; - HAVE_MEMCHR=1; - HAVE_DECL_MEMMEM=1; - HAVE_MEMPCPY=1; - HAVE_DECL_MEMRCHR=1; - HAVE_RAWMEMCHR=1; - HAVE_STPCPY=1; - HAVE_STPNCPY=1; - HAVE_STRCHRNUL=1; - HAVE_DECL_STRDUP=1; - HAVE_DECL_STRNDUP=1; - HAVE_DECL_STRNLEN=1; - HAVE_STRPBRK=1; - HAVE_STRSEP=1; - HAVE_STRCASESTR=1; - HAVE_DECL_STRTOK_R=1; - HAVE_DECL_STRERROR_R=1; - HAVE_DECL_STRSIGNAL=1; - HAVE_STRVERSCMP=1; - REPLACE_MEMCHR=0; - REPLACE_MEMMEM=0; - REPLACE_STPNCPY=0; - REPLACE_STRCHRNUL=0; - REPLACE_STRDUP=0; - REPLACE_STRNCAT=0; - REPLACE_STRNDUP=0; - REPLACE_STRNLEN=0; - REPLACE_STRSTR=0; - REPLACE_STRCASESTR=0; - REPLACE_STRTOK_R=0; - REPLACE_STRERROR=0; - REPLACE_STRERROR_R=0; - REPLACE_STRSIGNAL=0; - UNDEFINE_STRTOK_R=0; @@ -13335,19 +15471,65 @@ printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h + HAVE_MBSLEN=0; + HAVE_EXPLICIT_BZERO=1; + HAVE_FFSL=1; + HAVE_FFSLL=1; + HAVE_DECL_MEMMEM=1; + HAVE_MEMPCPY=1; + HAVE_DECL_MEMRCHR=1; + HAVE_RAWMEMCHR=1; + HAVE_STPCPY=1; + HAVE_STPNCPY=1; + HAVE_STRCHRNUL=1; + HAVE_DECL_STRDUP=1; + HAVE_DECL_STRNDUP=1; + HAVE_DECL_STRNLEN=1; + HAVE_STRPBRK=1; + HAVE_STRSEP=1; + HAVE_STRCASESTR=1; + HAVE_DECL_STRTOK_R=1; + HAVE_DECL_STRERROR_R=1; + HAVE_STRERRORNAME_NP=1; + HAVE_SIGABBREV_NP=1; + HAVE_SIGDESCR_NP=1; + HAVE_DECL_STRSIGNAL=1; + HAVE_STRVERSCMP=1; + REPLACE_FFSLL=0; + REPLACE_MEMCHR=0; + REPLACE_MEMMEM=0; + REPLACE_STPNCPY=0; + REPLACE_STRCHRNUL=0; + REPLACE_STRDUP=0; + REPLACE_STRNCAT=0; + REPLACE_STRNDUP=0; + REPLACE_STRNLEN=0; + REPLACE_STRSTR=0; + REPLACE_STRCASESTR=0; + REPLACE_STRTOK_R=0; + REPLACE_STRERROR=0; + REPLACE_STRERROR_R=0; + REPLACE_STRERRORNAME_NP=0; + REPLACE_STRSIGNAL=0; + UNDEFINE_STRTOK_R=0; + + + + + - if test $HAVE_MEMCHR = 1; then - # Detect platform-specific bugs in some versions of glibc: - # memchr should not dereference anything with length 0 - # https://bugzilla.redhat.com/show_bug.cgi?id=499689 - # memchr should not dereference overestimated length after a match - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 - # https://sourceware.org/bugzilla/show_bug.cgi?id=10162 - # memchr should cast the second argument to 'unsigned char'. - # This bug exists in Android 4.3. - # Assume that memchr works on platforms that lack mprotect. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 + + # Detect platform-specific bugs in some versions of glibc: + # memchr should not dereference anything with length 0 + # https://bugzilla.redhat.com/show_bug.cgi?id=499689 + # memchr should not dereference overestimated length after a match + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 + # https://sourceware.org/bugzilla/show_bug.cgi?id=10162 + # memchr should cast the second argument to 'unsigned char'. + # This bug exists in Android 4.3. + # Assume that memchr works on platforms that lack mprotect. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 printf %s "checking whether memchr works... " >&6; } if test ${gl_cv_func_memchr_works+y} then : @@ -13356,13 +15538,13 @@ else $as_nop if test "$cross_compiling" = yes then : case "$host_os" in - # Guess no on Android. - linux*-android*) gl_cv_func_memchr_works="guessing no" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_memchr_works="guessing yes" ;; - # Be pessimistic for now. - *) gl_cv_func_memchr_works="guessing no" ;; - esac + # Guess no on Android. + linux*-android*) gl_cv_func_memchr_works="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_memchr_works="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;; + esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13406,6 +15588,7 @@ main (void) #endif if (fence) { + /* Test against bugs on glibc systems. */ if (memchr (fence, 0, 0)) result |= 1; strcpy (fence - 9, "12345678"); @@ -13413,6 +15596,9 @@ main (void) result |= 2; if (memchr (fence - 1, 0, 3) != fence - 1) result |= 4; + /* Test against bug on AIX 7.2. */ + if (memchr (fence - 4, '6', 16) != fence - 4) + result |= 8; } /* Test against bug on Android 4.3. */ { @@ -13421,7 +15607,7 @@ main (void) input[1] = 'b'; input[2] = 'c'; if (memchr (input, 0x789abc00 | 'b', 3) != input + 1) - result |= 8; + result |= 16; } return result; @@ -13443,11 +15629,184 @@ fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 printf "%s\n" "$gl_cv_func_memchr_works" >&6; } - case "$gl_cv_func_memchr_works" in - *yes) ;; - *) REPLACE_MEMCHR=1 ;; - esac - fi + case "$gl_cv_func_memchr_works" in + *yes) ;; + *) REPLACE_MEMCHR=1 ;; + esac + + + + GL_GNULIB_EXPLICIT_BZERO=0 + + + + GL_GNULIB_FFSL=0 + + + + GL_GNULIB_FFSLL=0 + + + + GL_GNULIB_MEMCHR=0 + + + + GL_GNULIB_MEMMEM=0 + + + + GL_GNULIB_MEMPCPY=0 + + + + GL_GNULIB_MEMRCHR=0 + + + + GL_GNULIB_RAWMEMCHR=0 + + + + GL_GNULIB_STPCPY=0 + + + + GL_GNULIB_STPNCPY=0 + + + + GL_GNULIB_STRCHRNUL=0 + + + + GL_GNULIB_STRDUP=0 + + + + GL_GNULIB_STRNCAT=0 + + + + GL_GNULIB_STRNDUP=0 + + + + GL_GNULIB_STRNLEN=0 + + + + GL_GNULIB_STRPBRK=0 + + + + GL_GNULIB_STRSEP=0 + + + + GL_GNULIB_STRSTR=0 + + + + GL_GNULIB_STRCASESTR=0 + + + + GL_GNULIB_STRTOK_R=0 + + + + GL_GNULIB_MBSLEN=0 + + + + GL_GNULIB_MBSNLEN=0 + + + + GL_GNULIB_MBSCHR=0 + + + + GL_GNULIB_MBSRCHR=0 + + + + GL_GNULIB_MBSSTR=0 + + + + GL_GNULIB_MBSCASECMP=0 + + + + GL_GNULIB_MBSNCASECMP=0 + + + + GL_GNULIB_MBSPCASECMP=0 + + + + GL_GNULIB_MBSCASESTR=0 + + + + GL_GNULIB_MBSCSPN=0 + + + + GL_GNULIB_MBSPBRK=0 + + + + GL_GNULIB_MBSSPN=0 + + + + GL_GNULIB_MBSSEP=0 + + + + GL_GNULIB_MBSTOK_R=0 + + + + GL_GNULIB_STRERROR=0 + + + + GL_GNULIB_STRERROR_R=0 + + + + GL_GNULIB_STRERRORNAME_NP=0 + + + + GL_GNULIB_SIGABBREV_NP=0 + + + + GL_GNULIB_SIGDESCR_NP=0 + + + + GL_GNULIB_STRSIGNAL=0 + + + + GL_GNULIB_STRVERSCMP=0 + + + + GL_GNULIB_MDA_MEMCCPY=1 + + + + GL_GNULIB_MDA_STRDUP=1 + + ac_fn_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_memrchr" = xyes @@ -13462,6 +15821,86 @@ printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5 +printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; } +if test ${gl_cv_minmax_in_limits_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <limits.h> + int x = MIN (42, 17); +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_minmax_in_limits_h=yes +else $as_nop + gl_cv_minmax_in_limits_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5 +printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; } + if test $gl_cv_minmax_in_limits_h = yes; then + +printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h + + fi + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5 +printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; } +if test ${gl_cv_minmax_in_sys_param_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/param.h> + int x = MIN (42, 17); +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_minmax_in_sys_param_h=yes +else $as_nop + gl_cv_minmax_in_sys_param_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5 +printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; } + if test $gl_cv_minmax_in_sys_param_h = yes; then + +printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h + + fi + + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5 printf %s "checking for O_CLOEXEC... " >&6; } @@ -13535,6 +15974,15 @@ printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h + + + if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then + REPLACE_REALLOC_FOR_REALLOC_POSIX=1 + fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 printf %s "checking for stdbool.h that conforms to C99... " >&6; } if test ${ac_cv_header_stdbool_h+y} @@ -13672,12 +16120,448 @@ printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h fi - GNULIB_FFS=0; + + + + + + GL_GENERATE_STDDEF_H=false + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5 +printf %s "checking for good max_align_t... " >&6; } +if test ${gl_cv_type_max_align_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stddef.h> + unsigned int s = sizeof (max_align_t); + #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__ + int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1]; + int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1]; + #endif + typedef struct { char a; max_align_t b; } max_helper; + typedef struct { char a; long b; } long_helper; + typedef struct { char a; double b; } double_helper; + typedef struct { char a; long double b; } long_double_helper; + int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1]; + int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1]; + int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1]; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_type_max_align_t=yes +else $as_nop + gl_cv_type_max_align_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5 +printf "%s\n" "$gl_cv_type_max_align_t" >&6; } + if test $gl_cv_type_max_align_t = no; then + HAVE_MAX_ALIGN_T=0 + GL_GENERATE_STDDEF_H=true + fi + + if test $gt_cv_c_wchar_t = no; then + HAVE_WCHAR_T=0 + GL_GENERATE_STDDEF_H=true + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 +printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; } +if test ${gl_cv_decl_null_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stddef.h> + int test[2 * (sizeof NULL == sizeof (void *)) -1]; + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_decl_null_works=yes +else $as_nop + gl_cv_decl_null_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 +printf "%s\n" "$gl_cv_decl_null_works" >&6; } + if test $gl_cv_decl_null_works = no; then + REPLACE_NULL=1 + GL_GENERATE_STDDEF_H=true + fi + + if $GL_GENERATE_STDDEF_H; then + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stddef_h='<'stddef.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 +printf %s "checking absolute name of <stddef.h>... " >&6; } +if test ${gl_cv_next_stddef_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stddef.h> +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'stddef.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_stddef_h + gl_cv_next_stddef_h='"'$gl_header'"' + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 +printf "%s\n" "$gl_cv_next_stddef_h" >&6; } + fi + NEXT_STDDEF_H=$gl_cv_next_stddef_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='<'stddef.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stddef_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive + + + + + fi + + + +ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_fcloseall" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h + + + + + printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdio_h='<'stdio.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5 +printf %s "checking absolute name of <stdio.h>... " >&6; } +if test ${gl_cv_next_stdio_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdio.h> +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'stdio.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_stdio_h + gl_cv_next_stdio_h='"'$gl_header'"' + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 +printf "%s\n" "$gl_cv_next_stdio_h" >&6; } + fi + NEXT_STDIO_H=$gl_cv_next_stdio_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='<'stdio.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdio_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5 +printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; } +if test ${gl_cv_func_printf_attribute_flavor+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define __STDC_FORMAT_MACROS 1 + #include <stdio.h> + #include <inttypes.h> + /* For non-mingw systems, compilation will trivially succeed. + For mingw, compilation will succeed for older mingw (system + printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ + #if (defined _WIN32 && ! defined __CYGWIN__) && \ + (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) + extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; + #endif + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_func_printf_attribute_flavor=system +else $as_nop + gl_cv_func_printf_attribute_flavor=gnu +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5 +printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; } + if test "$gl_cv_func_printf_attribute_flavor" = gnu; then + +printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h + + fi + + + + + + + + + + + + + + if test $ac_cv_have_decl_fcloseall = no; then + HAVE_DECL_FCLOSEALL=0 + fi + +ac_fn_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_ecvt" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_ECVT $ac_have_decl" >>confdefs.h + +ac_fn_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_fcvt" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_FCVT $ac_have_decl" >>confdefs.h + +ac_fn_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_gcvt" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_GCVT $ac_have_decl" >>confdefs.h + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdlib_h='<'stdlib.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5 +printf %s "checking absolute name of <stdlib.h>... " >&6; } +if test ${gl_cv_next_stdlib_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'stdlib.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_stdlib_h + gl_cv_next_stdlib_h='"'$gl_header'"' + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 +printf "%s\n" "$gl_cv_next_stdlib_h" >&6; } + fi + NEXT_STDLIB_H=$gl_cv_next_stdlib_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='<'stdlib.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdlib_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive + + + + + + + + + + + + + if test $ac_cv_have_decl_ecvt = no; then + HAVE_DECL_ECVT=0 + fi + + if test $ac_cv_have_decl_fcvt = no; then + HAVE_DECL_FCVT=0 + fi + + if test $ac_cv_have_decl_gcvt = no; then + HAVE_DECL_GCVT=0 + fi + + HAVE_FFS=1; HAVE_STRCASECMP=1; HAVE_DECL_STRNCASECMP=1; - ac_fn_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_strdup" = xyes then : @@ -13700,10 +16584,12 @@ then : case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;; # Guess yes on native Windows. mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_strerror_0_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;; esac else $as_nop @@ -13762,7 +16648,6 @@ printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h - if test $gl_cv_have_include_next = yes; then gl_cv_next_string_h='<'string.h'>' else @@ -13805,8 +16690,8 @@ _ACEOF gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_string_h - gl_cv_next_string_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_string_h + gl_cv_next_string_h='"'$gl_header'"' fi @@ -13844,6 +16729,8 @@ printf "%s\n" "$gl_cv_next_string_h" >&6; } + + if test $gl_cv_have_include_next = yes; then gl_cv_next_strings_h='<'strings.h'>' else @@ -13889,8 +16776,8 @@ _ACEOF gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_strings_h - gl_cv_next_strings_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_strings_h + gl_cv_next_strings_h='"'$gl_header'"' else gl_cv_next_strings_h='<'strings.h'>' fi @@ -13927,73 +16814,14 @@ printf "%s\n" "$gl_cv_next_strings_h" >&6; } + GL_GNULIB_FFS=0 - # 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. - ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = xyes -then : - gl_have_mmap=yes -else $as_nop - gl_have_mmap=no -fi - - - # Try to allow MAP_ANONYMOUS. - gl_have_mmap_anonymous=no - if test $gl_have_mmap = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 -printf %s "checking for MAP_ANONYMOUS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/mman.h> -#ifdef MAP_ANONYMOUS - I cannot identify this map -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cannot identify this map" >/dev/null 2>&1 -then : - gl_have_mmap_anonymous=yes -fi -rm -rf conftest* - - if test $gl_have_mmap_anonymous != yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <sys/mman.h> -#ifdef MAP_ANON - I cannot identify this map -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cannot identify this map" >/dev/null 2>&1 -then : - -printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h - - gl_have_mmap_anonymous=yes -fi -rm -rf conftest* - - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 -printf "%s\n" "$gl_have_mmap_anonymous" >&6; } - if test $gl_have_mmap_anonymous = yes; then -printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h - fi - fi @@ -14031,6 +16859,9 @@ else $as_nop # endif #endif + +$gl_mda_defines + int main (void) { @@ -14118,9 +16949,10 @@ printf "%s\n" "$gl_cv_func_strncat_works" >&6; } -printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h +printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h + @@ -14172,8 +17004,8 @@ _ACEOF gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_sys_types_h - gl_cv_next_sys_types_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_sys_types_h + gl_cv_next_sys_types_h='"'$gl_header'"' fi @@ -14208,6 +17040,28 @@ printf "%s\n" "$gl_cv_next_sys_types_h" >&6; } + + HAVE_DECL_LOCALTIME_R=1; + HAVE_NANOSLEEP=1; + HAVE_STRPTIME=1; + HAVE_TIMEGM=1; + HAVE_TIMESPEC_GET=1; + HAVE_TIMESPEC_GETRES=1; + HAVE_TIMEZONE_T=0; + REPLACE_CTIME=GNULIB_PORTCHECK; + REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; + REPLACE_MKTIME=GNULIB_PORTCHECK; + REPLACE_NANOSLEEP=GNULIB_PORTCHECK; + REPLACE_STRFTIME=GNULIB_PORTCHECK; + REPLACE_TIMEGM=GNULIB_PORTCHECK; + REPLACE_TZSET=GNULIB_PORTCHECK; + + : ${GNULIB_GETTIMEOFDAY=0}; + REPLACE_GMTIME=0; + REPLACE_LOCALTIME=0; + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 printf %s "checking for struct timespec in <time.h>... " >&6; } if test ${gl_cv_sys_struct_timespec_in_time_h+y} @@ -14398,8 +17252,8 @@ _ACEOF gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_time_h - gl_cv_next_time_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_time_h + gl_cv_next_time_h='"'$gl_header'"' fi @@ -14424,13 +17278,320 @@ printf "%s\n" "$gl_cv_next_time_h" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5 +printf %s "checking for TIME_UTC in <time.h>... " >&6; } +if test ${gl_cv_time_h_has_TIME_UTC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <time.h> + +int +main (void) +{ +static int x = TIME_UTC; x++; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_time_h_has_TIME_UTC=yes +else $as_nop + gl_cv_time_h_has_TIME_UTC=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5 +printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; } + if test $gl_cv_time_h_has_TIME_UTC = yes; then + TIME_H_DEFINES_TIME_UTC=1 + else + TIME_H_DEFINES_TIME_UTC=0 + fi + + + + + GL_GNULIB_CTIME=0 + + + + GL_GNULIB_MKTIME=0 + + + + GL_GNULIB_LOCALTIME=0 + + + + GL_GNULIB_NANOSLEEP=0 + + + + GL_GNULIB_STRFTIME=0 + + + + GL_GNULIB_STRPTIME=0 + + + + GL_GNULIB_TIMEGM=0 + + + + GL_GNULIB_TIMESPEC_GET=0 + + + + GL_GNULIB_TIMESPEC_GETRES=0 + + + + GL_GNULIB_TIME_R=0 + + + + GL_GNULIB_TIME_RZ=0 + + + + GL_GNULIB_TZSET=0 + + + + GL_GNULIB_MDA_TZSET=1 + + + +ac_fn_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_execvpe" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_EXECVPE $ac_have_decl" >>confdefs.h + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_unistd_h='<'unistd.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 +printf %s "checking absolute name of <unistd.h>... " >&6; } +if test ${gl_cv_next_unistd_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + if test $ac_cv_header_unistd_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <unistd.h> +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'unistd.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_unistd_h + gl_cv_next_unistd_h='"'$gl_header'"' + else + gl_cv_next_unistd_h='<'unistd.h'>' + fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 +printf "%s\n" "$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 + + + + + + + + + + + + + + if test $ac_cv_have_decl_execvpe = no; then + HAVE_DECL_EXECVPE=0 + fi + + - GNULIB_UTIME=0; HAVE_UTIME=1; REPLACE_UTIME=0; + GL_GNULIB_UTIME=0 + + + + GL_GNULIB_MDA_UTIME=1 + + + + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_utime_h='<'utime.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <utime.h>" >&5 +printf %s "checking absolute name of <utime.h>... " >&6; } +if test ${gl_cv_next_utime_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + if test $ac_cv_header_utime_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <utime.h> +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'utime.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_utime_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_utime_h + gl_cv_next_utime_h='"'$gl_header'"' + else + gl_cv_next_utime_h='<'utime.h'>' + fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_utime_h" >&5 +printf "%s\n" "$gl_cv_next_utime_h" >&6; } + fi + NEXT_UTIME_H=$gl_cv_next_utime_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='<'utime.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_utime_h + fi + NEXT_AS_FIRST_DIRECTIVE_UTIME_H=$gl_next_as_first_directive + + + + + + if test $ac_cv_header_utime_h = yes; then + HAVE_UTIME_H=1 + else + HAVE_UTIME_H=0 + fi + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5 printf %s "checking whether the utimes function works... " >&6; } @@ -14441,9 +17602,11 @@ else $as_nop if test "$cross_compiling" = yes then : case "$host_os" in - # Guess no on native Windows. - mingw*) gl_cv_func_working_utimes="guessing no" ;; - *) gl_cv_func_working_utimes="guessing no" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_working_utimes="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_working_utimes="guessing no" ;; + *) gl_cv_func_working_utimes="$gl_cross_guess_normal" ;; esac else $as_nop @@ -14461,6 +17624,10 @@ else $as_nop #include <utime.h> #include <errno.h> + +$gl_mda_defines + + static int inorder (time_t a, time_t b, time_t c) { @@ -14722,11 +17889,7 @@ printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h else - test $ac_cv_type_long_long_int = yes \ - && ac_type='long long' \ - || ac_type='long' - -printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h +printf "%s\n" "#define intmax_t long long" >>confdefs.h fi @@ -14749,9 +17912,12 @@ then : case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on musl systems. + *-musl*) 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";; + midnightbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; @@ -14792,8 +17958,8 @@ fi rm -rf conftest* ;; - # If we don't know, assume the worst. - *) gl_cv_func_snprintf_retval_c99="guessing no";; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";; esac else $as_nop @@ -14847,6 +18013,108 @@ printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5 +printf %s "checking whether snprintf truncates the result as in C99... " >&6; } +if test ${gl_cv_func_snprintf_truncation_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + if test "$cross_compiling" = yes +then : + + case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on musl systems. + *-musl*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on FreeBSD >= 5. + freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + midnightbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on Mac OS X >= 10.3. + darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; + darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on OpenBSD >= 3.9. + openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) + gl_cv_func_snprintf_truncation_c99="guessing no";; + openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on Solaris >= 2.6. + solaris2.[0-5] | solaris2.[0-5].*) + gl_cv_func_snprintf_truncation_c99="guessing no";; + solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on AIX >= 4. + aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";; + aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on HP-UX >= 11. + hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; + hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on IRIX >= 6.5. + irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on OSF/1 >= 5. + osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; + osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on NetBSD >= 3. + netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) + gl_cv_func_snprintf_truncation_c99="guessing no";; + netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on Android. + linux*-android*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess no on native Windows. + mingw*) gl_cv_func_snprintf_truncation_c99="guessing no";; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";; + esac + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <stdio.h> +#include <string.h> +#if HAVE_SNPRINTF +# define my_snprintf snprintf +#else +# include <stdarg.h> +static int my_snprintf (char *buf, int size, const char *format, ...) +{ + va_list args; + int ret; + va_start (args, format); + ret = vsnprintf (buf, size, format, args); + va_end (args); + return ret; +} +#endif +static char buf[100]; +int main () +{ + strcpy (buf, "ABCDEF"); + my_snprintf (buf, 3, "%d %d", 4567, 89); + if (memcmp (buf, "45\0DEF", 6) != 0) + return 1; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_snprintf_truncation_c99=yes +else $as_nop + gl_cv_func_snprintf_truncation_c99=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5 +printf "%s\n" "$gl_cv_func_snprintf_truncation_c99" >&6; } + + + ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" @@ -14906,6 +18174,14 @@ printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h ;; esac + case "$gl_cv_func_snprintf_truncation_c99" in + *yes) + +printf "%s\n" "#define HAVE_SNPRINTF_TRUNCATION_C99 1" >>confdefs.h + + ;; + esac + @@ -14923,9 +18199,12 @@ then : case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; + # Guess yes on musl systems. + *-musl*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; + midnightbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";; darwin*) gl_cv_func_printf_sizes_c99="guessing yes";; @@ -14961,8 +18240,8 @@ fi rm -rf conftest* ;; - # If we don't know, assume the worst. - *) gl_cv_func_printf_sizes_c99="guessing no";; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_printf_sizes_c99="$gl_cross_guess_normal";; esac else $as_nop @@ -15114,9 +18393,12 @@ then : case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_printf_infinite="guessing yes";; + # Guess yes on musl systems. + *-musl*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; + midnightbsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; darwin*) gl_cv_func_printf_infinite="guessing yes";; @@ -15127,6 +18409,9 @@ then : netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_infinite="guessing no";; netbsd*) gl_cv_func_printf_infinite="guessing yes";; + # Guess yes on OpenBSD >= 6.0. + openbsd[1-5].*) gl_cv_func_printf_infinite="guessing no";; + openbsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_infinite="guessing yes";; # Guess no on Android. @@ -15150,8 +18435,8 @@ fi rm -rf conftest* ;; - # If we don't know, assume the worst. - *) gl_cv_func_printf_infinite="guessing no";; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_printf_infinite="$gl_cross_guess_normal";; esac else $as_nop @@ -15268,12 +18553,18 @@ then : case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; + # Guess yes on musl systems. + *-musl*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; + midnightbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; + # Guess yes on OpenBSD >= 6.0. + openbsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";; + openbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess no on Android. linux*-android*) gl_cv_func_printf_infinite_long_double="guessing no";; # Guess yes on MSVC, no on mingw. @@ -15295,8 +18586,8 @@ fi rm -rf conftest* ;; - # If we don't know, assume the worst. - *) gl_cv_func_printf_infinite_long_double="guessing no";; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_printf_infinite_long_double="$gl_cross_guess_normal";; esac ;; esac @@ -15343,7 +18634,7 @@ nocrash_init (void) /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { - /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ + /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { @@ -15362,7 +18653,7 @@ nocrash_init (void) for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. - See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ + See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } @@ -15623,12 +18914,14 @@ fi rm -rf conftest* ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_printf_directive_a="guessing yes";; # Guess no on Android. linux*-android*) gl_cv_func_printf_directive_a="guessing no";; # Guess no on native Windows. mingw*) gl_cv_func_printf_directive_a="guessing no";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_directive_a="guessing no";; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_printf_directive_a="$gl_cross_guess_normal";; esac else $as_nop @@ -15654,7 +18947,7 @@ int main () && strcmp (buf, "-0X6.488P-1 33") != 0 && strcmp (buf, "-0XC.91P-2 33") != 0)) result |= 2; - /* This catches a FreeBSD 6.1 bug: it doesn't round. */ + /* This catches a FreeBSD 13.0 bug: it doesn't round. */ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 || (strcmp (buf, "0x1.83p+0 33") != 0 && strcmp (buf, "0x3.05p-1 33") != 0 @@ -15721,12 +19014,18 @@ then : case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_printf_directive_f="guessing yes";; + # Guess yes on musl systems. + *-musl*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; + midnightbsd*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; darwin*) gl_cv_func_printf_directive_f="guessing yes";; + # Guess yes on OpenBSD >= 6.0. + openbsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";; + openbsd*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[1-9][0-9]*) gl_cv_func_printf_directive_f="guessing yes";; solaris*) gl_cv_func_printf_directive_f="guessing no";; @@ -15751,8 +19050,8 @@ fi rm -rf conftest* ;; - # If we don't know, assume the worst. - *) gl_cv_func_printf_directive_f="guessing no";; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_printf_directive_f="$gl_cross_guess_normal";; esac else $as_nop @@ -15806,6 +19105,22 @@ else $as_nop if test "$cross_compiling" = yes then : case "$host_os" in + # Guess no on glibc when _FORTIFY_SOURCE >= 2. + *-gnu* | gnu*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if _FORTIFY_SOURCE >= 2 + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_func_printf_directive_n="guessing yes" +else $as_nop + gl_cv_func_printf_directive_n="guessing no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; # Guess no on Android. linux*-android*) gl_cv_func_printf_directive_n="guessing no";; # Guess no on native Windows. @@ -15821,7 +19136,10 @@ else $as_nop #include <stdlib.h> #include <string.h> #ifdef _MSC_VER -/* See page about "Parameter Validation" on msdn.microsoft.com. */ +#include <inttypes.h> +/* See page about "Parameter Validation" on msdn.microsoft.com. + <https://docs.microsoft.com/en-us/cpp/c-runtime-library/parameter-validation> + <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler> */ static void cdecl invalid_parameter_handler (const wchar_t *expression, const wchar_t *function, @@ -15878,7 +19196,9 @@ else $as_nop then : case "$host_os" in - openbsd*) gl_cv_func_printf_directive_ls="guessing no";; + # Guess yes on OpenBSD >= 6.0. + openbsd[1-5].*) gl_cv_func_printf_directive_ls="guessing no";; + openbsd*) gl_cv_func_printf_directive_ls="guessing yes";; irix*) gl_cv_func_printf_directive_ls="guessing no";; solaris*) gl_cv_func_printf_directive_ls="guessing no";; cygwin*) gl_cv_func_printf_directive_ls="guessing no";; @@ -15894,13 +19214,7 @@ else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before - <wchar.h>. - BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ -#include <stddef.h> #include <stdio.h> -#include <time.h> #include <wchar.h> #include <string.h> int main () @@ -16136,14 +19450,16 @@ then : case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";; + # Guess yes on musl systems. + *-musl*) gl_cv_func_printf_flag_zero="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_flag_zero="guessing yes";; # Guess no on Android. linux*-android*) gl_cv_func_printf_flag_zero="guessing no";; # Guess no on native Windows. mingw*) gl_cv_func_printf_flag_zero="guessing no";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_flag_zero="guessing no";; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_printf_flag_zero="$gl_cross_guess_normal";; esac else $as_nop @@ -16279,7 +19595,7 @@ mach_exception_thread (void *arg) struct { mach_msg_header_t head; mach_msg_body_t msgh_body; - char data1024; + char data[1024]; } msg; mach_msg_return_t retval; /* Wait for a message on the exception port. */ @@ -16296,7 +19612,7 @@ nocrash_init (void) /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { - /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ + /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { @@ -16315,7 +19631,7 @@ nocrash_init (void) for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. - See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ + See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } @@ -16466,8 +19782,8 @@ _ACEOF haiku*) gl_cv_func_printf_enomem="guessing yes";; # Guess no on Android. linux*-android*) gl_cv_func_printf_enomem="guessing no";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_enomem="guessing no";; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_printf_enomem="$gl_cross_guess_normal";; esac fi @@ -16488,46 +19804,6 @@ printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h esac - GNULIB_BTOWC=0; - GNULIB_WCTOB=0; - GNULIB_MBSINIT=0; - GNULIB_MBRTOWC=0; - GNULIB_MBRLEN=0; - GNULIB_MBSRTOWCS=0; - GNULIB_MBSNRTOWCS=0; - GNULIB_WCRTOMB=0; - GNULIB_WCSRTOMBS=0; - GNULIB_WCSNRTOMBS=0; - GNULIB_WCWIDTH=0; - GNULIB_WMEMCHR=0; - GNULIB_WMEMCMP=0; - GNULIB_WMEMCPY=0; - GNULIB_WMEMMOVE=0; - GNULIB_WMEMSET=0; - GNULIB_WCSLEN=0; - GNULIB_WCSNLEN=0; - GNULIB_WCSCPY=0; - GNULIB_WCPCPY=0; - GNULIB_WCSNCPY=0; - GNULIB_WCPNCPY=0; - GNULIB_WCSCAT=0; - GNULIB_WCSNCAT=0; - GNULIB_WCSCMP=0; - GNULIB_WCSNCMP=0; - GNULIB_WCSCASECMP=0; - GNULIB_WCSNCASECMP=0; - GNULIB_WCSCOLL=0; - GNULIB_WCSXFRM=0; - GNULIB_WCSDUP=0; - GNULIB_WCSCHR=0; - GNULIB_WCSRCHR=0; - GNULIB_WCSCSPN=0; - GNULIB_WCSSPN=0; - GNULIB_WCSPBRK=0; - GNULIB_WCSSTR=0; - GNULIB_WCSTOK=0; - GNULIB_WCSWIDTH=0; - GNULIB_WCSFTIME=0; HAVE_BTOWC=1; HAVE_MBSINIT=1; HAVE_MBRTOWC=1; @@ -16541,6 +19817,7 @@ printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h HAVE_WMEMCMP=1; HAVE_WMEMCPY=1; HAVE_WMEMMOVE=1; + HAVE_WMEMPCPY=1; HAVE_WMEMSET=1; HAVE_WCSLEN=1; HAVE_WCSNLEN=1; @@ -16567,6 +19844,7 @@ printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h HAVE_WCSWIDTH=1; HAVE_WCSFTIME=1; HAVE_DECL_WCTOB=1; + HAVE_DECL_WCSDUP=1; HAVE_DECL_WCWIDTH=1; REPLACE_MBSTATE_T=0; REPLACE_BTOWC=0; @@ -16582,70 +19860,64 @@ printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h REPLACE_WCWIDTH=0; REPLACE_WCSWIDTH=0; REPLACE_WCSFTIME=0; + REPLACE_WCSTOK=0; + - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; } if test ${gl_cv_header_wchar_h_correct_inline+y} then : printf %s "(cached) " >&6 else $as_nop gl_cv_header_wchar_h_correct_inline=yes - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + case "$host_os" in + *-gnu* | gnu*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define wcstod renamed_wcstod -/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before - <wchar.h>. - BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ -#include <stddef.h> -#include <stdio.h> -#include <time.h> -#include <wchar.h> -extern int zero (void); -int main () { return zero(); } + + #define wcstod renamed_wcstod + #include <wchar.h> + extern int zero (void); + int main () { return zero(); } _ACEOF - save_ac_compile="$ac_compile" - ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/` - if echo '#include "conftest.c"' >conftest1.c && - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + save_ac_compile="$ac_compile" + ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/` + if echo '#include "conftest.c"' >conftest1.c \ + && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #define wcstod renamed_wcstod -/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before - <wchar.h>. - BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be - included before <wchar.h>. */ -#include <stddef.h> -#include <stdio.h> -#include <time.h> -#include <wchar.h> -int zero (void) { return 0; } + + #define wcstod renamed_wcstod + #include <wchar.h> + int zero (void) { return 0; } _ACEOF - ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/` - if echo '#include "conftest.c"' >conftest2.c && - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/` + if echo '#include "conftest.c"' >conftest2.c \ + && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then - : - else - gl_cv_header_wchar_h_correct_inline=no + if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then + : + else + gl_cv_header_wchar_h_correct_inline=no + fi + fi fi - fi - fi - ac_compile="$save_ac_compile" - rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext + ac_compile="$save_ac_compile" + rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext + ;; + esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 @@ -16673,6 +19945,383 @@ Configuration aborted." "$LINENO" 5 + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_wchar_h='<'wchar.h'>' + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5 +printf %s "checking absolute name of <wchar.h>... " >&6; } +if test ${gl_cv_next_wchar_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + if test $ac_cv_header_wchar_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <wchar.h> +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'wchar.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_wchar_h + gl_cv_next_wchar_h='"'$gl_header'"' + else + gl_cv_next_wchar_h='<'wchar.h'>' + fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 +printf "%s\n" "$gl_cv_next_wchar_h" >&6; } + fi + NEXT_WCHAR_H=$gl_cv_next_wchar_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='<'wchar.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_wchar_h + fi + NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_wchar_h = yes; then + HAVE_WCHAR_H=1 + else + HAVE_WCHAR_H=0 + fi + + + + + + if test $gt_cv_c_wint_t = yes; then + HAVE_WINT_T=1 + else + HAVE_WINT_T=0 + fi + + + + + + + + + + + ac_fn_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" " + #include <wchar.h> + +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_wcsdup" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_WCSDUP $ac_have_decl" >>confdefs.h + + if test $ac_cv_have_decl_wcsdup = no; then + HAVE_DECL_WCSDUP=0 + fi + + + + GL_GNULIB_BTOWC=0 + + + + GL_GNULIB_WCTOB=0 + + + + GL_GNULIB_MBSINIT=0 + + + + GL_GNULIB_MBRTOWC=0 + + + + GL_GNULIB_MBRLEN=0 + + + + GL_GNULIB_MBSRTOWCS=0 + + + + GL_GNULIB_MBSNRTOWCS=0 + + + + GL_GNULIB_WCRTOMB=0 + + + + GL_GNULIB_WCSRTOMBS=0 + + + + GL_GNULIB_WCSNRTOMBS=0 + + + + GL_GNULIB_WCWIDTH=0 + + + + GL_GNULIB_WMEMCHR=0 + + + + GL_GNULIB_WMEMCMP=0 + + + + GL_GNULIB_WMEMCPY=0 + + + + GL_GNULIB_WMEMMOVE=0 + + + + GL_GNULIB_WMEMPCPY=0 + + + + GL_GNULIB_WMEMSET=0 + + + + GL_GNULIB_WCSLEN=0 + + + + GL_GNULIB_WCSNLEN=0 + + + + GL_GNULIB_WCSCPY=0 + + + + GL_GNULIB_WCPCPY=0 + + + + GL_GNULIB_WCSNCPY=0 + + + + GL_GNULIB_WCPNCPY=0 + + + + GL_GNULIB_WCSCAT=0 + + + + GL_GNULIB_WCSNCAT=0 + + + + GL_GNULIB_WCSCMP=0 + + + + GL_GNULIB_WCSNCMP=0 + + + + GL_GNULIB_WCSCASECMP=0 + + + + GL_GNULIB_WCSNCASECMP=0 + + + + GL_GNULIB_WCSCOLL=0 + + + + GL_GNULIB_WCSXFRM=0 + + + + GL_GNULIB_WCSDUP=0 + + + + GL_GNULIB_WCSCHR=0 + + + + GL_GNULIB_WCSRCHR=0 + + + + GL_GNULIB_WCSCSPN=0 + + + + GL_GNULIB_WCSSPN=0 + + + + GL_GNULIB_WCSPBRK=0 + + + + GL_GNULIB_WCSSTR=0 + + + + GL_GNULIB_WCSTOK=0 + + + + GL_GNULIB_WCSWIDTH=0 + + + + GL_GNULIB_WCSFTIME=0 + + + + GL_GNULIB_MDA_WCSDUP=1 + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler option to allow warnings" >&5 +printf %s "checking for C compiler option to allow warnings... " >&6; } +if test ${gl_cv_cc_wallow+y} +then : + printf %s "(cached) " >&6 +else $as_nop + rm -f conftest* + echo 'int dummy;' > conftest.c + { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } >/dev/null + { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } >/dev/null + if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then + gl_cv_cc_wallow='-Wno-error' + else + gl_cv_cc_wallow=none + fi + rm -f conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_wallow" >&5 +printf "%s\n" "$gl_cv_cc_wallow" >&6; } + case "$gl_cv_cc_wallow" in + none) GL_CFLAG_ALLOW_WARNINGS='' ;; + *) GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;; + esac + + + + + GL_CFLAG_GNULIB_WARNINGS='' + if test -n "$GL_CFLAG_ALLOW_WARNINGS"; then + cat > conftest.c <<\EOF + #if __GNUC__ >= 3 || (__clang_major__ + (__clang_minor__ >= 9) > 3) + -Wno-cast-qual + -Wno-conversion + -Wno-float-equal + -Wno-sign-compare + -Wno-undef + -Wno-unused-function + -Wno-unused-parameter + #endif + #if __GNUC__ + (__GNUC_MINOR__ >= 9) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3) + -Wno-float-conversion + #endif + #if __GNUC__ >= 7 || (__clang_major__ + (__clang_minor__ >= 9) > 3) + -Wimplicit-fallthrough + #endif + #if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3) + -Wno-pedantic + #endif + #if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3) + -Wno-sign-conversion + -Wno-type-limits + #endif + #if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4 + -Wno-unsuffixed-float-constants + #endif +EOF + gl_command="$CC $CFLAGS $CPPFLAGS -E conftest.c > conftest.out" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gl_command\""; } >&5 + (eval $gl_command) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + gl_options=`grep -v '#' conftest.out` + for word in $gl_options; do + GL_CFLAG_GNULIB_WARNINGS="$GL_CFLAG_GNULIB_WARNINGS $word" + done + fi + rm -f conftest.c conftest.out + fi + + + if false; then GL_COND_LIBTOOL_TRUE= GL_COND_LIBTOOL_FALSE='#' @@ -16694,7 +20343,11 @@ fi + + + gl_source_base='autotools/gnulib' + gl_source_base_prefix= if test $ac_cv_func_alloca_works = no; then @@ -16735,27 +20388,232 @@ printf "%s\n" "$gl_cv_rpl_alloca" >&6; } printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h - ALLOCA_H=alloca.h + GL_GENERATE_ALLOCA_H=true else - ALLOCA_H= + GL_GENERATE_ALLOCA_H=false fi else - ALLOCA_H=alloca.h + GL_GENERATE_ALLOCA_H=true + fi + + if test $ac_cv_working_alloca_h = yes; then + HAVE_ALLOCA_H=1 + else + HAVE_ALLOCA_H=0 fi - if test -n "$ALLOCA_H"; then + + + + + + case "$GL_GENERATE_ALLOCA_H" in + false) ALLOCA_H='' ;; + true) + if test -z "$ALLOCA_H"; then + ALLOCA_H="${gl_source_base_prefix}alloca.h" + fi + ;; + *) echo "*** GL_GENERATE_ALLOCA_H is not set correctly" 1>&2; exit 1 ;; + esac + + + if $GL_GENERATE_ALLOCA_H; then GL_GENERATE_ALLOCA_H_TRUE= GL_GENERATE_ALLOCA_H_FALSE='#' else GL_GENERATE_ALLOCA_H_TRUE='#' GL_GENERATE_ALLOCA_H_FALSE= fi +: + if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then + GL_GENERATE_ALLOCA_H_TRUE='#' + GL_GENERATE_ALLOCA_H_FALSE='#' + fi - if test $ac_cv_working_alloca_h = yes; then - HAVE_ALLOCA_H=1 - else - HAVE_ALLOCA_H=0 + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5 +printf %s "checking for __builtin_expect... " >&6; } +if test ${gl_cv___builtin_expect+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int + main (int argc, char **argv) + { + argc = __builtin_expect (argc, 100); + return argv[argc != 100][0]; + } +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_cv___builtin_expect=yes +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include <builtins.h> + int + main (int argc, char **argv) + { + argc = __builtin_expect (argc, 100); + return argv[argc != 100][0]; + } +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + gl_cv___builtin_expect="in <builtins.h>" +else $as_nop + gl_cv___builtin_expect=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5 +printf "%s\n" "$gl_cv___builtin_expect" >&6; } + if test "$gl_cv___builtin_expect" = yes; then + printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h + + elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then + printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h + + fi + + + + + + REPLACE_CALLOC_FOR_CALLOC_GNU="$REPLACE_CALLOC_FOR_CALLOC_POSIX" + if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 0; then + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether calloc (0, n) and calloc (n, 0) return nonnull" >&5 +printf %s "checking whether calloc (0, n) and calloc (n, 0) return nonnull... " >&6; } +if test ${ac_cv_func_calloc_0_nonnull+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test $cross_compiling != yes; then + ac_cv_func_calloc_0_nonnull=yes + if test "$cross_compiling" = yes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main (void) +{ +int result = 0; + char * volatile p = calloc (0, 0); + if (!p) + result |= 1; + free (p); + return result; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + +else $as_nop + ac_cv_func_calloc_0_nonnull=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + else + case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) ac_cv_func_calloc_0_nonnull="guessing yes" ;; + # Guess yes on native Windows. + mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;; + esac + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5 +printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; } + case $ac_cv_func_calloc_0_nonnull in #( + *yes) : + ;; #( + *) : + REPLACE_CALLOC_FOR_CALLOC_GNU=1 ;; +esac + + fi + + if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext" + + fi + + + + + + + + + + GL_GNULIB_CALLOC_GNU=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_CALLOC_GNU 1" >>confdefs.h + + + + + + + if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then + REPLACE_CALLOC_FOR_CALLOC_POSIX=1 + fi + + if test $REPLACE_CALLOC_FOR_CALLOC_POSIX = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext" + fi @@ -16766,8 +20624,15 @@ fi + GL_GNULIB_CALLOC_POSIX=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h + - gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" @@ -16793,35 +20658,45 @@ fi esac fi - if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then + + if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then + GL_COND_OBJ_CANONICALIZE_LGPL_TRUE= + GL_COND_OBJ_CANONICALIZE_LGPL_FALSE='#' +else + GL_COND_OBJ_CANONICALIZE_LGPL_TRUE='#' + GL_COND_OBJ_CANONICALIZE_LGPL_FALSE= +fi +: + if test -z "${GL_COND_OBJ_CANONICALIZE_LGPL_TRUE}" && test -z "${GL_COND_OBJ_CANONICALIZE_LGPL_FALSE}"; then + GL_COND_OBJ_CANONICALIZE_LGPL_TRUE='#' + GL_COND_OBJ_CANONICALIZE_LGPL_FALSE='#' + fi +printf "%s\n" "#define GNULIB_CANONICALIZE_LGPL 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" - fi -printf "%s\n" "#define GNULIB_CANONICALIZE_LGPL 1" >>confdefs.h + GL_GNULIB_CANONICALIZE_FILE_NAME=1 - GNULIB_CANONICALIZE_FILE_NAME=1 +printf "%s\n" "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h -printf "%s\n" "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h @@ -16830,7 +20705,7 @@ printf "%s\n" "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h - GNULIB_REALPATH=1 + GL_GNULIB_REALPATH=1 @@ -16845,7 +20720,11 @@ printf "%s\n" "#define GNULIB_TEST_REALPATH 1" >>confdefs.h - GNULIB_CHDIR=1 + + + + + GL_GNULIB_CHDIR=1 @@ -16857,9 +20736,9 @@ printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5 -printf %s "checking whether this system has an arbitrary file name length limit... " >&6; } -if test ${gl_cv_have_arbitrary_file_name_length_limit+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5 +printf %s "checking whether this system supports file names of any length... " >&6; } +if test ${gl_cv_have_unlimited_file_name_length+y} then : printf %s "(cached) " >&6 else $as_nop @@ -16893,29 +20772,35 @@ _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1 then : - gl_cv_have_arbitrary_file_name_length_limit=yes + gl_cv_have_unlimited_file_name_length=no else $as_nop - gl_cv_have_arbitrary_file_name_length_limit=no + gl_cv_have_unlimited_file_name_length=yes fi rm -rf conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5 -printf "%s\n" "$gl_cv_have_arbitrary_file_name_length_limit" >&6; } - - if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then - - - - - +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5 +printf "%s\n" "$gl_cv_have_unlimited_file_name_length" >&6; } + if test $gl_cv_have_unlimited_file_name_length = no; then + GL_COND_OBJ_CHDIR_LONG_TRUE= + GL_COND_OBJ_CHDIR_LONG_FALSE='#' +else + GL_COND_OBJ_CHDIR_LONG_TRUE='#' + GL_COND_OBJ_CHDIR_LONG_FALSE= +fi +: + if test -z "${GL_COND_OBJ_CHDIR_LONG_TRUE}" && test -z "${GL_COND_OBJ_CHDIR_LONG_FALSE}"; then + GL_COND_OBJ_CHDIR_LONG_TRUE='#' + GL_COND_OBJ_CHDIR_LONG_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext" + if test -z "$GL_COND_OBJ_CHDIR_LONG_TRUE"; then : : - fi + +fi @@ -16988,7 +20873,13 @@ then : LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime fi - ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" + ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" +if test "x$ac_cv_func_clock_getres" = xyes +then : + printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" if test "x$ac_cv_func_clock_gettime" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h @@ -17058,24 +20949,30 @@ fi fi - if test $REPLACE_CLOSE = 1; then - - - + if test $REPLACE_CLOSE = 1; then + GL_COND_OBJ_CLOSE_TRUE= + GL_COND_OBJ_CLOSE_FALSE='#' +else + GL_COND_OBJ_CLOSE_TRUE='#' + GL_COND_OBJ_CLOSE_FALSE= +fi +: + if test -z "${GL_COND_OBJ_CLOSE_TRUE}" && test -z "${GL_COND_OBJ_CLOSE_FALSE}"; then + GL_COND_OBJ_CLOSE_TRUE='#' + GL_COND_OBJ_CLOSE_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext" - fi - GNULIB_CLOSE=1 + GL_GNULIB_CLOSE=1 @@ -17117,120 +21014,40 @@ fi REPLACE_CLOSEDIR=1;; esac - if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext" + if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then + GL_COND_OBJ_CLOSEDIR_TRUE= + GL_COND_OBJ_CLOSEDIR_FALSE='#' +else + GL_COND_OBJ_CLOSEDIR_TRUE='#' + GL_COND_OBJ_CLOSEDIR_FALSE= +fi +: + if test -z "${GL_COND_OBJ_CLOSEDIR_TRUE}" && test -z "${GL_COND_OBJ_CLOSEDIR_FALSE}"; then + GL_COND_OBJ_CLOSEDIR_TRUE='#' + GL_COND_OBJ_CLOSEDIR_FALSE='#' fi - GNULIB_CLOSEDIR=1 - - - - - -printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h - - - - - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_dirent_h='<'dirent.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5 -printf %s "checking absolute name of <dirent.h>... " >&6; } -if test ${gl_cv_next_dirent_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test $ac_cv_header_dirent_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <dirent.h> -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac + GL_GNULIB_CLOSEDIR=1 - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'dirent.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_dirent_h - gl_cv_next_dirent_h='"'$gl_header'"' - else - gl_cv_next_dirent_h='<'dirent.h'>' - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5 -printf "%s\n" "$gl_cv_next_dirent_h" >&6; } - fi - NEXT_DIRENT_H=$gl_cv_next_dirent_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='<'dirent.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_dirent_h - fi - NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive +printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h - if test $ac_cv_header_dirent_h = yes; then - HAVE_DIRENT_H=1 - else - HAVE_DIRENT_H=0 - fi @@ -17303,17 +21120,21 @@ printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h ;; esac - if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \ - || test $REPLACE_DIRFD = 1; then - - - - - - + if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no || test $REPLACE_DIRFD = 1; then + GL_COND_OBJ_DIRFD_TRUE= + GL_COND_OBJ_DIRFD_FALSE='#' +else + GL_COND_OBJ_DIRFD_TRUE='#' + GL_COND_OBJ_DIRFD_FALSE= +fi +: + if test -z "${GL_COND_OBJ_DIRFD_TRUE}" && test -z "${GL_COND_OBJ_DIRFD_FALSE}"; then + GL_COND_OBJ_DIRFD_TRUE='#' + GL_COND_OBJ_DIRFD_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext" + if test -z "$GL_COND_OBJ_DIRFD_TRUE"; then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5 @@ -17364,23 +21185,24 @@ printf "%s\n" "#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name" >>confd fi - fi + +fi - GNULIB_DIRFD=1 + GL_GNULIB_DIRFD=1 -printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h +printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h @@ -17464,6 +21286,10 @@ else $as_nop #include <unistd.h> #include <fcntl.h> #include <errno.h> + + +$gl_mda_defines + int main (void) { @@ -17497,25 +21323,35 @@ printf "%s\n" "$gl_cv_func_dup_works" >&6; } ;; esac - if test $REPLACE_DUP = 1; then - + if test $REPLACE_DUP = 1; then + GL_COND_OBJ_DUP_TRUE= + GL_COND_OBJ_DUP_FALSE='#' +else + GL_COND_OBJ_DUP_TRUE='#' + GL_COND_OBJ_DUP_FALSE= +fi +: + if test -z "${GL_COND_OBJ_DUP_TRUE}" && test -z "${GL_COND_OBJ_DUP_FALSE}"; then + GL_COND_OBJ_DUP_TRUE='#' + GL_COND_OBJ_DUP_FALSE='#' + fi + if test -z "$GL_COND_OBJ_DUP_TRUE"; then : + : +fi - gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext" - : - fi - GNULIB_DUP=1 + GL_GNULIB_DUP=1 @@ -17528,13 +21364,7 @@ printf "%s\n" "#define GNULIB_TEST_DUP 1" >>confdefs.h - - -printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h - - - if test $HAVE_DUP2 = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 printf %s "checking whether dup2 works... " >&6; } if test ${gl_cv_func_dup2_works+y} then : @@ -17543,82 +21373,85 @@ else $as_nop if test "$cross_compiling" = yes then : case "$host_os" in - mingw*) # on this platform, dup2 always returns 0 for success - gl_cv_func_dup2_works="guessing no" ;; - cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 - gl_cv_func_dup2_works="guessing no" ;; - aix* | freebsd*) - # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE, - # not EBADF. - gl_cv_func_dup2_works="guessing no" ;; - haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. - gl_cv_func_dup2_works="guessing no" ;; - *-android*) # implemented using dup3(), which fails if oldfd == newfd - gl_cv_func_dup2_works="guessing no" ;; - os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd. - gl_cv_func_dup2_works="guessing no" ;; - *) gl_cv_func_dup2_works="guessing yes" ;; - esac + mingw*) # on this platform, dup2 always returns 0 for success + gl_cv_func_dup2_works="guessing no" ;; + cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 + gl_cv_func_dup2_works="guessing no" ;; + aix* | freebsd*) + # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE, + # not EBADF. + gl_cv_func_dup2_works="guessing no" ;; + haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. + gl_cv_func_dup2_works="guessing no" ;; + *-android*) # implemented using dup3(), which fails if oldfd == newfd + gl_cv_func_dup2_works="guessing no" ;; + os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd. + gl_cv_func_dup2_works="guessing no" ;; + *) gl_cv_func_dup2_works="guessing yes" ;; + esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include <errno.h> - #include <fcntl.h> - #include <limits.h> - #include <sys/resource.h> - #include <unistd.h> - #ifndef RLIM_SAVED_CUR - # define RLIM_SAVED_CUR RLIM_INFINITY - #endif - #ifndef RLIM_SAVED_MAX - # define RLIM_SAVED_MAX RLIM_INFINITY - #endif + #include <errno.h> + #include <fcntl.h> + #include <limits.h> + #include <sys/resource.h> + #include <unistd.h> + + +$gl_mda_defines + + #ifndef RLIM_SAVED_CUR + # define RLIM_SAVED_CUR RLIM_INFINITY + #endif + #ifndef RLIM_SAVED_MAX + # define RLIM_SAVED_MAX RLIM_INFINITY + #endif int main (void) { int result = 0; - int bad_fd = INT_MAX; - struct rlimit rlim; - if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 - && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX - && rlim.rlim_cur != RLIM_INFINITY - && rlim.rlim_cur != RLIM_SAVED_MAX - && rlim.rlim_cur != RLIM_SAVED_CUR) - bad_fd = rlim.rlim_cur; - #ifdef FD_CLOEXEC - if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) - result |= 1; - #endif - if (dup2 (1, 1) != 1) - result |= 2; - #ifdef FD_CLOEXEC - if (fcntl (1, F_GETFD) != FD_CLOEXEC) - result |= 4; - #endif - close (0); - if (dup2 (0, 0) != -1) - result |= 8; - /* Many gnulib modules require POSIX conformance of EBADF. */ - if (dup2 (2, bad_fd) == -1 && errno != EBADF) - result |= 16; - /* Flush out some cygwin core dumps. */ - if (dup2 (2, -1) != -1 || errno != EBADF) - result |= 32; - dup2 (2, 255); - dup2 (2, 256); - /* On OS/2 kLIBC, dup2() does not work on a directory fd. */ - { - int fd = open (".", O_RDONLY); - if (fd == -1) - result |= 64; - else if (dup2 (fd, fd + 1) == -1) - result |= 128; - - close (fd); - } - return result; + int bad_fd = INT_MAX; + struct rlimit rlim; + if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 + && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX + && rlim.rlim_cur != RLIM_INFINITY + && rlim.rlim_cur != RLIM_SAVED_MAX + && rlim.rlim_cur != RLIM_SAVED_CUR) + bad_fd = rlim.rlim_cur; + #ifdef FD_CLOEXEC + if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) + result |= 1; + #endif + if (dup2 (1, 1) != 1) + result |= 2; + #ifdef FD_CLOEXEC + if (fcntl (1, F_GETFD) != FD_CLOEXEC) + result |= 4; + #endif + close (0); + if (dup2 (0, 0) != -1) + result |= 8; + /* Many gnulib modules require POSIX conformance of EBADF. */ + if (dup2 (2, bad_fd) == -1 && errno != EBADF) + result |= 16; + /* Flush out some cygwin core dumps. */ + if (dup2 (2, -1) != -1 || errno != EBADF) + result |= 32; + dup2 (2, 255); + dup2 (2, 256); + /* On OS/2 kLIBC, dup2() does not work on a directory fd. */ + { + int fd = open (".", O_RDONLY); + if (fd == -1) + result |= 64; + else if (dup2 (fd, fd + 1) == -1) + result |= 128; + close (fd); + } + return result; ; return 0; } @@ -17638,20 +21471,19 @@ fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 printf "%s\n" "$gl_cv_func_dup2_works" >&6; } - case "$gl_cv_func_dup2_works" in - *yes) ;; - *) - REPLACE_DUP2=1 - ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize" + case "$gl_cv_func_dup2_works" in + *yes) ;; + *) + REPLACE_DUP2=1 + ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize" if test "x$ac_cv_func_setdtablesize" = xyes then : printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h fi - ;; - esac - fi + ;; + esac @@ -17661,31 +21493,39 @@ fi fi if test $HAVE_FCHDIR = 0; then - if test $HAVE_DUP2 = 1; then - REPLACE_DUP2=1 - fi + REPLACE_DUP2=1 fi - if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then - + if test $REPLACE_DUP2 = 1; then + GL_COND_OBJ_DUP2_TRUE= + GL_COND_OBJ_DUP2_FALSE='#' +else + GL_COND_OBJ_DUP2_TRUE='#' + GL_COND_OBJ_DUP2_FALSE= +fi +: + if test -z "${GL_COND_OBJ_DUP2_TRUE}" && test -z "${GL_COND_OBJ_DUP2_FALSE}"; then + GL_COND_OBJ_DUP2_TRUE='#' + GL_COND_OBJ_DUP2_FALSE='#' + fi + if test -z "$GL_COND_OBJ_DUP2_TRUE"; then : +fi - gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" - fi - GNULIB_DUP2=1 + GL_GNULIB_DUP2=1 @@ -17697,6 +21537,39 @@ printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h + + + + case "$GL_GENERATE_ERRNO_H" in + false) ERRNO_H='' ;; + true) + if test -z "$ERRNO_H"; then + ERRNO_H="${gl_source_base_prefix}errno.h" + fi + ;; + *) echo "*** GL_GENERATE_ERRNO_H is not set correctly" 1>&2; exit 1 ;; + esac + + + if $GL_GENERATE_ERRNO_H; then + GL_GENERATE_ERRNO_H_TRUE= + GL_GENERATE_ERRNO_H_FALSE='#' +else + GL_GENERATE_ERRNO_H_TRUE='#' + GL_GENERATE_ERRNO_H_FALSE= +fi +: + if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then + GL_GENERATE_ERRNO_H_TRUE='#' + GL_GENERATE_ERRNO_H_FALSE='#' + fi + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 printf %s "checking for error_at_line... " >&6; } if test ${ac_cv_lib_error_at_line+y} @@ -17726,22 +21599,30 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 printf "%s\n" "$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 + GL_COND_OBJ_ERROR_TRUE= + GL_COND_OBJ_ERROR_FALSE='#' +else + GL_COND_OBJ_ERROR_TRUE='#' + GL_COND_OBJ_ERROR_FALSE= +fi +: + if test -z "${GL_COND_OBJ_ERROR_TRUE}" && test -z "${GL_COND_OBJ_ERROR_FALSE}"; then + GL_COND_OBJ_ERROR_TRUE='#' + GL_COND_OBJ_ERROR_FALSE='#' + fi + if test -z "$GL_COND_OBJ_ERROR_TRUE"; then : - gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" : - fi + +fi XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format" @@ -17766,16 +21647,21 @@ fi HAVE_EUIDACCESS=0 fi - if test $HAVE_EUIDACCESS = 0; then - - - - - - + if test $HAVE_EUIDACCESS = 0; then + GL_COND_OBJ_EUIDACCESS_TRUE= + GL_COND_OBJ_EUIDACCESS_FALSE='#' +else + GL_COND_OBJ_EUIDACCESS_TRUE='#' + GL_COND_OBJ_EUIDACCESS_FALSE= +fi +: + if test -z "${GL_COND_OBJ_EUIDACCESS_TRUE}" && test -z "${GL_COND_OBJ_EUIDACCESS_FALSE}"; then + GL_COND_OBJ_EUIDACCESS_TRUE='#' + GL_COND_OBJ_EUIDACCESS_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext" + if test -z "$GL_COND_OBJ_EUIDACCESS_TRUE"; then : @@ -17786,18 +21672,19 @@ then : fi - ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" + + ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" if test "x$ac_cv_func_getgroups" = xyes then : fi -# If we don't yet have getgroups, see if it's in -lbsd. -# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. -ac_save_LIBS=$LIBS -if test $ac_cv_func_getgroups = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5 + # If we don't yet have getgroups, see if it's in -lbsd. + # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. + ac_save_LIBS=$LIBS + if test $ac_cv_func_getgroups = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5 printf %s "checking for getgroups in -lbsd... " >&6; } if test ${ac_cv_lib_bsd_getgroups+y} then : @@ -17837,12 +21724,12 @@ then : GETGROUPS_LIB=-lbsd fi -fi + fi -# Run the program to test the functionality of the system-supplied -# getgroups function only if there is such a function. -if test $ac_cv_func_getgroups = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5 + # Run the program to test the functionality of the system-supplied + # getgroups function only if there is such a function. + if test $ac_cv_func_getgroups = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5 printf %s "checking for working getgroups... " >&6; } if test ${ac_cv_func_getgroups_works+y} then : @@ -17851,11 +21738,14 @@ else $as_nop if test "$cross_compiling" = yes then : case "$host_os" in # (( - # Guess yes on glibc systems. - *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;; - # If we don't know, assume the worst. - *) ac_cv_func_getgroups_works="guessing no" ;; - esac + # Guess yes on glibc systems. + *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) ac_cv_func_getgroups_works="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) ac_cv_func_getgroups_works="$gl_cross_guess_normal" ;; + esac + else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17863,11 +21753,12 @@ $ac_includes_default int main (void) { -/* On Ultrix 4.3, getgroups (0, 0) always fails. */ - return getgroups (0, 0) == -1; +/* On NeXTstep 3.2, getgroups (0, 0) always fails. */ + return getgroups (0, 0) == -1; ; return 0; } + _ACEOF if ac_fn_c_try_run "$LINENO" then : @@ -17883,17 +21774,17 @@ fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5 printf "%s\n" "$ac_cv_func_getgroups_works" >&6; } -else - ac_cv_func_getgroups_works=no -fi -case "$ac_cv_func_getgroups_works" in - *yes) + else + ac_cv_func_getgroups_works=no + fi + case "$ac_cv_func_getgroups_works" in + *yes) printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h - ;; -esac -LIBS=$ac_save_LIBS + ;; + esac + LIBS=$ac_save_LIBS # Solaris 9 and 10 need -lgen to get the eaccess function. @@ -17972,13 +21863,18 @@ fi LIBS=$gl_saved_libs - fi + +fi + + - GNULIB_EUIDACCESS=1 + + + GL_GNULIB_EUIDACCESS=1 @@ -17999,22 +21895,27 @@ printf "%s\n" "#define GNULIB_TEST_EUIDACCESS 1" >>confdefs.h if test $ac_cv_func_faccessat = no; then HAVE_FACCESSAT=0 else - case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + case $gl_cv_func_lstat_dereferences_slashed_symlink in *yes) ;; *) REPLACE_FACCESSAT=1 ;; esac fi - if test $HAVE_FACCESSAT = 0 || test $REPLACE_FACCESSAT = 1; then - - - - - - + if test $HAVE_FACCESSAT = 0 || test $REPLACE_FACCESSAT = 1; then + GL_COND_OBJ_FACCESSAT_TRUE= + GL_COND_OBJ_FACCESSAT_FALSE='#' +else + GL_COND_OBJ_FACCESSAT_TRUE='#' + GL_COND_OBJ_FACCESSAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_FACCESSAT_TRUE}" && test -z "${GL_COND_OBJ_FACCESSAT_FALSE}"; then + GL_COND_OBJ_FACCESSAT_TRUE='#' + GL_COND_OBJ_FACCESSAT_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext" + if test -z "$GL_COND_OBJ_FACCESSAT_TRUE"; then : ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access" @@ -18025,7 +21926,8 @@ then : fi - fi + +fi printf "%s\n" "#define GNULIB_FACCESSAT 1" >>confdefs.h @@ -18036,7 +21938,11 @@ printf "%s\n" "#define GNULIB_FACCESSAT 1" >>confdefs.h - GNULIB_FACCESSAT=1 + + + + + GL_GNULIB_FACCESSAT=1 @@ -18058,17 +21964,6 @@ printf "%s\n" "#define GNULIB_TEST_FACCESSAT 1" >>confdefs.h if test $HAVE_FCHDIR = 0; then - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext" - - : - printf "%s\n" "#define REPLACE_FCHDIR 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5 @@ -18080,21 +21975,24 @@ else $as_nop if test "$cross_compiling" = yes then : case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_open_directory_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_open_directory_works="guessing no" ;; - esac + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_open_directory_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;; + esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <fcntl.h> + +$gl_mda_defines + int main (void) { @@ -18127,11 +22025,34 @@ printf "%s\n" "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h fi + if test $HAVE_FCHDIR = 0; then + GL_COND_OBJ_FCHDIR_TRUE= + GL_COND_OBJ_FCHDIR_FALSE='#' +else + GL_COND_OBJ_FCHDIR_TRUE='#' + GL_COND_OBJ_FCHDIR_FALSE= +fi +: + if test -z "${GL_COND_OBJ_FCHDIR_TRUE}" && test -z "${GL_COND_OBJ_FCHDIR_FALSE}"; then + GL_COND_OBJ_FCHDIR_TRUE='#' + GL_COND_OBJ_FCHDIR_FALSE='#' + fi + + if test -z "$GL_COND_OBJ_FCHDIR_TRUE"; then : + + : + +fi + + + + - GNULIB_FCHDIR=1 + + GL_GNULIB_FCHDIR=1 @@ -18178,6 +22099,10 @@ else $as_nop #include <limits.h> #include <sys/resource.h> #include <unistd.h> + + +$gl_mda_defines + #ifndef RLIM_SAVED_CUR # define RLIM_SAVED_CUR RLIM_INFINITY #endif @@ -18246,29 +22171,42 @@ printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; } if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y} then : printf %s "(cached) " >&6 else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in + # Guess no on NetBSD. + netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;; + *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;; + esac + +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include <fcntl.h> -#ifndef F_DUPFD_CLOEXEC -choke me -#endif + #include <unistd.h> + int main (int argc, char *argv[]) + { + if (argc == 1) + /* parent process */ + { + if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0) + return 1; + return execl ("./conftest", "./conftest", "child", NULL); + } + else + /* child process */ + return (fcntl (10, F_GETFL) < 0 ? 0 : 42); + } -int -main (void) -{ - ; - return 0; -} _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_run "$LINENO" then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18294,15 +22232,21 @@ else $as_nop gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + else $as_nop gl_cv_func_fcntl_f_dupfd_cloexec=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } - if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then - + case "$gl_cv_func_fcntl_f_dupfd_cloexec" in + *yes) ;; + *) if test $ac_cv_func_fcntl = no; then @@ -18311,7 +22255,8 @@ printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } REPLACE_FCNTL=1 fi - fi + ;; + esac fi @@ -18334,107 +22279,36 @@ printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } fi - if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" + if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then + GL_COND_OBJ_FCNTL_TRUE= + GL_COND_OBJ_FCNTL_FALSE='#' +else + GL_COND_OBJ_FCNTL_TRUE='#' + GL_COND_OBJ_FCNTL_FALSE= +fi +: + if test -z "${GL_COND_OBJ_FCNTL_TRUE}" && test -z "${GL_COND_OBJ_FCNTL_FALSE}"; then + GL_COND_OBJ_FCNTL_TRUE='#' + GL_COND_OBJ_FCNTL_FALSE='#' fi - GNULIB_FCNTL=1 - - - - - -printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h - - - - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_fcntl_h='<'fcntl.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5 -printf %s "checking absolute name of <fcntl.h>... " >&6; } -if test ${gl_cv_next_fcntl_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <fcntl.h> -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'fcntl.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_fcntl_h - gl_cv_next_fcntl_h='"'$gl_header'"' + GL_GNULIB_FCNTL=1 -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5 -printf "%s\n" "$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 +printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h @@ -18486,10 +22360,12 @@ else $as_nop if test "$cross_compiling" = yes then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_fdopendir_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;; esac else $as_nop @@ -18499,6 +22375,10 @@ else $as_nop #include <dirent.h> #include <fcntl.h> #include <unistd.h> + + +$gl_mda_defines + #if !HAVE_DECL_FDOPENDIR extern # ifdef __cplusplus @@ -18511,11 +22391,12 @@ int main (void) { int result = 0; - int fd = open ("conftest.c", O_RDONLY); - if (fd < 0) result |= 1; - if (fdopendir (fd)) result |= 2; - if (close (fd)) result |= 4; - return result; + int fd = open ("conftest.c", O_RDONLY); + if (fd < 0) result |= 1; + if (fdopendir (fd)) result |= 2; + if (close (fd)) result |= 4; + return result; + ; return 0; } @@ -18541,24 +22422,30 @@ printf "%s\n" "$gl_cv_func_fdopendir_works" >&6; } esac fi - if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then - - - + if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then + GL_COND_OBJ_FDOPENDIR_TRUE= + GL_COND_OBJ_FDOPENDIR_FALSE='#' +else + GL_COND_OBJ_FDOPENDIR_TRUE='#' + GL_COND_OBJ_FDOPENDIR_FALSE= +fi +: + if test -z "${GL_COND_OBJ_FDOPENDIR_TRUE}" && test -z "${GL_COND_OBJ_FDOPENDIR_FALSE}"; then + GL_COND_OBJ_FDOPENDIR_TRUE='#' + GL_COND_OBJ_FDOPENDIR_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" - fi - GNULIB_FDOPENDIR=1 + GL_GNULIB_FDOPENDIR=1 @@ -18579,16 +22466,16 @@ printf "%s\n" "#define GNULIB_FDOPENDIR 1" >>confdefs.h - FLOAT_H= + GL_GENERATE_FLOAT_H=false REPLACE_FLOAT_LDBL=0 case "$host_os" in aix* | beos* | openbsd* | mirbsd* | irix*) - FLOAT_H=float.h + GL_GENERATE_FLOAT_H=true ;; freebsd* | dragonfly*) case "$host_cpu" in i[34567]86 ) - FLOAT_H=float.h + GL_GENERATE_FLOAT_H=true ;; x86_64 ) # On x86_64 systems, the C compiler may still be generating @@ -18606,7 +22493,7 @@ if ac_fn_c_try_compile "$LINENO" then : else $as_nop - FLOAT_H=float.h + GL_GENERATE_FLOAT_H=true fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; @@ -18615,14 +22502,14 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext linux*) case "$host_cpu" in powerpc*) - FLOAT_H=float.h + GL_GENERATE_FLOAT_H=true ;; esac ;; esac case "$host_os" in aix* | freebsd* | dragonfly* | linux*) - if test -n "$FLOAT_H"; then + if $GL_GENERATE_FLOAT_H; then REPLACE_FLOAT_LDBL=1 fi ;; @@ -18693,11 +22580,11 @@ printf "%s\n" "$gl_cv_func_itold_works" >&6; } case "$gl_cv_func_itold_works" in *no) REPLACE_ITOLD=1 - FLOAT_H=float.h + GL_GENERATE_FLOAT_H=true ;; esac - if test -n "$FLOAT_H"; then + if $GL_GENERATE_FLOAT_H; then @@ -18748,8 +22635,8 @@ _ACEOF gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_float_h - gl_cv_next_float_h='"'$gl_header'"' + gl_header=$gl_cv_absolute_float_h + gl_cv_next_float_h='"'$gl_header'"' fi @@ -18772,41 +22659,155 @@ printf "%s\n" "$gl_cv_next_float_h" >&6; } fi - if test -n "$FLOAT_H"; then + + + + + + case "$GL_GENERATE_FLOAT_H" in + false) FLOAT_H='' ;; + true) + if test -z "$FLOAT_H"; then + FLOAT_H="${gl_source_base_prefix}float.h" + fi + ;; + *) echo "*** GL_GENERATE_FLOAT_H is not set correctly" 1>&2; exit 1 ;; + esac + + + if $GL_GENERATE_FLOAT_H; then GL_GENERATE_FLOAT_H_TRUE= GL_GENERATE_FLOAT_H_FALSE='#' else GL_GENERATE_FLOAT_H_TRUE='#' GL_GENERATE_FLOAT_H_FALSE= fi +: + if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then + GL_GENERATE_FLOAT_H_TRUE='#' + GL_GENERATE_FLOAT_H_FALSE='#' + fi - if test $REPLACE_FLOAT_LDBL = 1; then + if test $REPLACE_FLOAT_LDBL = 1; then + GL_COND_OBJ_FLOAT_TRUE= + GL_COND_OBJ_FLOAT_FALSE='#' +else + GL_COND_OBJ_FLOAT_TRUE='#' + GL_COND_OBJ_FLOAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_FLOAT_TRUE}" && test -z "${GL_COND_OBJ_FLOAT_FALSE}"; then + GL_COND_OBJ_FLOAT_TRUE='#' + GL_COND_OBJ_FLOAT_FALSE='#' + fi + if test $REPLACE_ITOLD = 1; then + GL_COND_OBJ_ITOLD_TRUE= + GL_COND_OBJ_ITOLD_FALSE='#' +else + GL_COND_OBJ_ITOLD_TRUE='#' + GL_COND_OBJ_ITOLD_FALSE= +fi +: + if test -z "${GL_COND_OBJ_ITOLD_TRUE}" && test -z "${GL_COND_OBJ_ITOLD_FALSE}"; then + GL_COND_OBJ_ITOLD_TRUE='#' + GL_COND_OBJ_ITOLD_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext" - fi - if test $REPLACE_ITOLD = 1; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5 +printf %s "checking whether free is known to preserve errno... " >&6; } +if test ${gl_cv_func_free_preserves_errno+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +int +main (void) +{ +#if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__) + #elif defined __OpenBSD__ + #elif defined __sun + #else + #error "'free' is not known to preserve errno" + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_func_free_preserves_errno=yes +else $as_nop + gl_cv_func_free_preserves_errno=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5 +printf "%s\n" "$gl_cv_func_free_preserves_errno" >&6; } + case $gl_cv_func_free_preserves_errno in + *yes) +printf "%s\n" "#define HAVE_FREE_POSIX 1" >>confdefs.h + ;; + *) REPLACE_FREE=1 ;; + esac - gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext" + if test $REPLACE_FREE = 1; then + GL_COND_OBJ_FREE_TRUE= + GL_COND_OBJ_FREE_FALSE='#' +else + GL_COND_OBJ_FREE_TRUE='#' + GL_COND_OBJ_FREE_FALSE= +fi +: + if test -z "${GL_COND_OBJ_FREE_TRUE}" && test -z "${GL_COND_OBJ_FREE_FALSE}"; then + GL_COND_OBJ_FREE_TRUE='#' + GL_COND_OBJ_FREE_FALSE='#' fi + if test -z "$GL_COND_OBJ_FREE_TRUE"; then : + + : + +fi + + + + + + + + + + GL_GNULIB_FREE_POSIX=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h + + + + if test $gl_cv_func_frexp_no_libm = yes; then @@ -18960,7 +22961,11 @@ printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h - GNULIB_FREXP=1 + + + + + GL_GNULIB_FREXP=1 @@ -19064,6 +23069,7 @@ extern "C" #endif long double frexpl (long double, int *); +long double zero = 0.0L; int main() { int result = 0; @@ -19121,7 +23127,8 @@ int main() } } /* Test on infinite numbers. */ - x = 1.0L / 0.0L; + /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */ + x = 1.0L / zero; { int exp; long double y = frexpl (x, &exp); @@ -19178,7 +23185,11 @@ printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h - GNULIB_FREXPL=1 + + + + + GL_GNULIB_FREXPL=1 @@ -19216,16 +23227,21 @@ printf "%s\n" "#define GNULIB_TEST_FREXPL 1" >>confdefs.h fi - if test $REPLACE_FSTAT = 1; then - - - - - - + if test $REPLACE_FSTAT = 1; then + GL_COND_OBJ_FSTAT_TRUE= + GL_COND_OBJ_FSTAT_FALSE='#' +else + GL_COND_OBJ_FSTAT_TRUE='#' + GL_COND_OBJ_FSTAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_FSTAT_TRUE}" && test -z "${GL_COND_OBJ_FSTAT_FALSE}"; then + GL_COND_OBJ_FSTAT_TRUE='#' + GL_COND_OBJ_FSTAT_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext" + if test -z "$GL_COND_OBJ_FSTAT_TRUE"; then : case "$host_os" in mingw*) @@ -19243,15 +23259,21 @@ printf "%s\n" "#define GNULIB_TEST_FREXPL 1" >>confdefs.h esac + : - fi + +fi + + - GNULIB_FSTAT=1 + + + GL_GNULIB_FSTAT=1 @@ -19332,24 +23354,30 @@ printf "%s\n" "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h esac fi - if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then - - - + if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then + GL_COND_OBJ_FSTATAT_TRUE= + GL_COND_OBJ_FSTATAT_FALSE='#' +else + GL_COND_OBJ_FSTATAT_TRUE='#' + GL_COND_OBJ_FSTATAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_FSTATAT_TRUE}" && test -z "${GL_COND_OBJ_FSTATAT_FALSE}"; then + GL_COND_OBJ_FSTATAT_TRUE='#' + GL_COND_OBJ_FSTATAT_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" - fi - GNULIB_FSTATAT=1 + GL_GNULIB_FSTATAT=1 @@ -19374,7 +23402,15 @@ then : else $as_nop if test "$cross_compiling" = yes then : - gl_cv_func_futimens_works="guessing yes" + case "$host_os" in + # Guess no on glibc systems. + *-gnu* | gnu*) gl_cv_func_futimens_works="guessing no" ;; + # Guess no on musl systems. + *-musl*) gl_cv_func_futimens_works="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_futimens_works="guessing yes" ;; + esac + else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19384,6 +23420,9 @@ else $as_nop #include <unistd.h> #include <errno.h> + +$gl_mda_defines + int main (void) { @@ -19424,29 +23463,38 @@ fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimens_works" >&5 printf "%s\n" "$gl_cv_func_futimens_works" >&6; } - if test "$gl_cv_func_futimens_works" = no; then - REPLACE_FUTIMENS=1 - fi + case "$gl_cv_func_futimens_works" in + *yes) ;; + *) + REPLACE_FUTIMENS=1 + ;; + esac fi - if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then - - - + if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then + GL_COND_OBJ_FUTIMENS_TRUE= + GL_COND_OBJ_FUTIMENS_FALSE='#' +else + GL_COND_OBJ_FUTIMENS_TRUE='#' + GL_COND_OBJ_FUTIMENS_FALSE= +fi +: + if test -z "${GL_COND_OBJ_FUTIMENS_TRUE}" && test -z "${GL_COND_OBJ_FUTIMENS_FALSE}"; then + GL_COND_OBJ_FUTIMENS_TRUE='#' + GL_COND_OBJ_FUTIMENS_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext" - fi - GNULIB_FUTIMENS=1 + GL_GNULIB_FUTIMENS=1 @@ -19468,24 +23516,30 @@ printf "%s\n" "#define GNULIB_TEST_FUTIMENS 1" >>confdefs.h ;; esac - if test $REPLACE_GETCWD = 1; then - - - + if test $REPLACE_GETCWD = 1; then + GL_COND_OBJ_GETCWD_LGPL_TRUE= + GL_COND_OBJ_GETCWD_LGPL_FALSE='#' +else + GL_COND_OBJ_GETCWD_LGPL_TRUE='#' + GL_COND_OBJ_GETCWD_LGPL_FALSE= +fi +: + if test -z "${GL_COND_OBJ_GETCWD_LGPL_TRUE}" && test -z "${GL_COND_OBJ_GETCWD_LGPL_FALSE}"; then + GL_COND_OBJ_GETCWD_LGPL_TRUE='#' + GL_COND_OBJ_GETCWD_LGPL_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext" - fi - GNULIB_GETCWD=1 + GL_GNULIB_GETCWD=1 @@ -19512,9 +23566,9 @@ then : printf %s "(cached) " >&6 else $as_nop echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data - if test "$cross_compiling" = yes + if test "$cross_compiling" = yes then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <features.h> @@ -19530,7 +23584,11 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | then : gl_cv_func_working_getdelim="guessing yes" else $as_nop - gl_cv_func_working_getdelim="guessing no" + case "$host_os" in + *-musl*) gl_cv_func_working_getdelim="guessing yes" ;; + *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;; + esac + fi rm -rf conftest* @@ -19555,6 +23613,7 @@ else $as_nop int len = getdelim (&line, &siz, '\n', in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) { free (line); fclose (in); return 2; } + free (line); } { /* Test result for a NULL buffer and a non-zero size. @@ -19580,13 +23639,13 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5 printf "%s\n" "$gl_cv_func_working_getdelim" >&6; } case "$gl_cv_func_working_getdelim" in - *no) - REPLACE_GETDELIM=1 - ;; + *yes) ;; + *) REPLACE_GETDELIM=1 ;; esac else HAVE_GETDELIM=0 @@ -19596,16 +23655,21 @@ printf "%s\n" "$gl_cv_func_working_getdelim" >&6; } HAVE_DECL_GETDELIM=0 fi - if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then - - - - - - + if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then + GL_COND_OBJ_GETDELIM_TRUE= + GL_COND_OBJ_GETDELIM_FALSE='#' +else + GL_COND_OBJ_GETDELIM_TRUE='#' + GL_COND_OBJ_GETDELIM_FALSE= +fi +: + if test -z "${GL_COND_OBJ_GETDELIM_TRUE}" && test -z "${GL_COND_OBJ_GETDELIM_FALSE}"; then + GL_COND_OBJ_GETDELIM_TRUE='#' + GL_COND_OBJ_GETDELIM_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" + if test -z "$GL_COND_OBJ_GETDELIM_TRUE"; then : ac_fn_c_check_func "$LINENO" "flockfile" "ac_cv_func_flockfile" @@ -19631,13 +23695,18 @@ fi printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h - fi + +fi + + + - GNULIB_GETDELIM=1 + + GL_GNULIB_GETDELIM=1 @@ -19676,14 +23745,19 @@ else $as_nop /* end confdefs.h. */ #include <unistd.h> + + +$gl_mda_defines + + int main (void) { int size = getdtablesize(); - if (dup2 (0, getdtablesize()) != -1) - return 1; - if (size != getdtablesize()) - return 2; + if (dup2 (0, getdtablesize()) != -1) + return 1; + if (size != getdtablesize()) + return 2; ; return 0; @@ -19713,25 +23787,35 @@ printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; } HAVE_GETDTABLESIZE=0 fi - if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then - + if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then + GL_COND_OBJ_GETDTABLESIZE_TRUE= + GL_COND_OBJ_GETDTABLESIZE_FALSE='#' +else + GL_COND_OBJ_GETDTABLESIZE_TRUE='#' + GL_COND_OBJ_GETDTABLESIZE_FALSE= +fi +: + if test -z "${GL_COND_OBJ_GETDTABLESIZE_TRUE}" && test -z "${GL_COND_OBJ_GETDTABLESIZE_FALSE}"; then + GL_COND_OBJ_GETDTABLESIZE_TRUE='#' + GL_COND_OBJ_GETDTABLESIZE_FALSE='#' + fi + if test -z "$GL_COND_OBJ_GETDTABLESIZE_TRUE"; then : + : +fi - gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext" - : - fi - GNULIB_GETDTABLESIZE=1 + GL_GNULIB_GETDTABLESIZE=1 @@ -19745,18 +23829,19 @@ printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h - ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" + + ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" if test "x$ac_cv_func_getgroups" = xyes then : fi -# If we don't yet have getgroups, see if it's in -lbsd. -# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. -ac_save_LIBS=$LIBS -if test $ac_cv_func_getgroups = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5 + # If we don't yet have getgroups, see if it's in -lbsd. + # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. + ac_save_LIBS=$LIBS + if test $ac_cv_func_getgroups = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5 printf %s "checking for getgroups in -lbsd... " >&6; } if test ${ac_cv_lib_bsd_getgroups+y} then : @@ -19796,12 +23881,12 @@ then : GETGROUPS_LIB=-lbsd fi -fi + fi -# Run the program to test the functionality of the system-supplied -# getgroups function only if there is such a function. -if test $ac_cv_func_getgroups = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5 + # Run the program to test the functionality of the system-supplied + # getgroups function only if there is such a function. + if test $ac_cv_func_getgroups = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5 printf %s "checking for working getgroups... " >&6; } if test ${ac_cv_func_getgroups_works+y} then : @@ -19810,11 +23895,14 @@ else $as_nop if test "$cross_compiling" = yes then : case "$host_os" in # (( - # Guess yes on glibc systems. - *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;; - # If we don't know, assume the worst. - *) ac_cv_func_getgroups_works="guessing no" ;; - esac + # Guess yes on glibc systems. + *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) ac_cv_func_getgroups_works="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) ac_cv_func_getgroups_works="$gl_cross_guess_normal" ;; + esac + else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19822,11 +23910,12 @@ $ac_includes_default int main (void) { -/* On Ultrix 4.3, getgroups (0, 0) always fails. */ - return getgroups (0, 0) == -1; +/* On NeXTstep 3.2, getgroups (0, 0) always fails. */ + return getgroups (0, 0) == -1; ; return 0; } + _ACEOF if ac_fn_c_try_run "$LINENO" then : @@ -19842,17 +23931,17 @@ fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5 printf "%s\n" "$ac_cv_func_getgroups_works" >&6; } -else - ac_cv_func_getgroups_works=no -fi -case "$ac_cv_func_getgroups_works" in - *yes) + else + ac_cv_func_getgroups_works=no + fi + case "$ac_cv_func_getgroups_works" in + *yes) printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h - ;; -esac -LIBS=$ac_save_LIBS + ;; + esac + LIBS=$ac_save_LIBS if test $ac_cv_func_getgroups != yes; then HAVE_GETGROUPS=0 @@ -19868,7 +23957,7 @@ LIBS=$ac_save_LIBS printf "%s\n" "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5 printf %s "checking whether getgroups handles negative values... " >&6; } if test ${gl_cv_func_getgroups_works+y} then : @@ -19879,8 +23968,10 @@ then : case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_getgroups_works="guessing no" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_getgroups_works="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_getgroups_works="$gl_cross_guess_normal" ;; esac else $as_nop @@ -19920,24 +24011,30 @@ printf "%s\n" "$gl_cv_func_getgroups_works" >&6; } fi test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS" - if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then - - - + if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then + GL_COND_OBJ_GETGROUPS_TRUE= + GL_COND_OBJ_GETGROUPS_FALSE='#' +else + GL_COND_OBJ_GETGROUPS_TRUE='#' + GL_COND_OBJ_GETGROUPS_FALSE= +fi +: + if test -z "${GL_COND_OBJ_GETGROUPS_TRUE}" && test -z "${GL_COND_OBJ_GETGROUPS_FALSE}"; then + GL_COND_OBJ_GETGROUPS_TRUE='#' + GL_COND_OBJ_GETGROUPS_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext" - fi - GNULIB_GETGROUPS=1 + GL_GNULIB_GETGROUPS=1 @@ -19971,9 +24068,9 @@ then : printf %s "(cached) " >&6 else $as_nop echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data - if test "$cross_compiling" = yes + if test "$cross_compiling" = yes then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <features.h> @@ -19989,7 +24086,11 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | then : am_cv_func_working_getline="guessing yes" else $as_nop - am_cv_func_working_getline="guessing no" + case "$host_os" in + *-musl*) am_cv_func_working_getline="guessing yes" ;; + *) am_cv_func_working_getline="$gl_cross_guess_normal" ;; + esac + fi rm -rf conftest* @@ -20040,6 +24141,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5 printf "%s\n" "$am_cv_func_working_getline" >&6; } @@ -20050,32 +24152,43 @@ printf "%s\n" "$am_cv_func_working_getline" >&6; } fi case "$am_cv_func_working_getline" in - *no) + *yes) ;; + *) REPLACE_GETLINE=1 ;; esac - if test $REPLACE_GETLINE = 1; then - + if test $REPLACE_GETLINE = 1; then + GL_COND_OBJ_GETLINE_TRUE= + GL_COND_OBJ_GETLINE_FALSE='#' +else + GL_COND_OBJ_GETLINE_TRUE='#' + GL_COND_OBJ_GETLINE_FALSE= +fi +: + if test -z "${GL_COND_OBJ_GETLINE_TRUE}" && test -z "${GL_COND_OBJ_GETLINE_FALSE}"; then + GL_COND_OBJ_GETLINE_TRUE='#' + GL_COND_OBJ_GETLINE_FALSE='#' + fi + if test -z "$GL_COND_OBJ_GETLINE_TRUE"; then : + : +fi - gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext" - : - fi - GNULIB_GETLINE=1 + GL_GNULIB_GETLINE=1 @@ -20095,6 +24208,8 @@ printf "%s\n" "#define GNULIB_TEST_GETLINE 1" >>confdefs.h REPLACE_GETOPT=1 fi + GL_GENERATE_GETOPT_H=false + GL_GENERATE_GETOPT_CDEFS_H=false if test $REPLACE_GETOPT = 1; then @@ -20108,37 +24223,122 @@ printf "%s\n" "#define GNULIB_TEST_GETLINE 1" >>confdefs.h printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h - GETOPT_H=getopt.h - GETOPT_CDEFS_H=getopt-cdefs.h + GL_GENERATE_GETOPT_H=true + GL_GENERATE_GETOPT_CDEFS_H=true + fi - fi - if test $REPLACE_GETOPT = 1; then + case "$GL_GENERATE_GETOPT_H" in + false) GETOPT_H='' ;; + true) + if test -z "$GETOPT_H"; then + GETOPT_H="${gl_source_base_prefix}getopt.h" + fi + ;; + *) echo "*** GL_GENERATE_GETOPT_H is not set correctly" 1>&2; exit 1 ;; + esac + + + if $GL_GENERATE_GETOPT_H; then + GL_GENERATE_GETOPT_H_TRUE= + GL_GENERATE_GETOPT_H_FALSE='#' +else + GL_GENERATE_GETOPT_H_TRUE='#' + GL_GENERATE_GETOPT_H_FALSE= +fi +: + if test -z "${GL_GENERATE_GETOPT_H_TRUE}" && test -z "${GL_GENERATE_GETOPT_H_FALSE}"; then + GL_GENERATE_GETOPT_H_TRUE='#' + GL_GENERATE_GETOPT_H_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" + case "$GL_GENERATE_GETOPT_CDEFS_H" in + false) GETOPT_CDEFS_H='' ;; + true) + if test -z "$GETOPT_CDEFS_H"; then + GETOPT_CDEFS_H="${gl_source_base_prefix}getopt-cdefs.h" + fi + ;; + *) echo "*** GL_GENERATE_GETOPT_CDEFS_H is not set correctly" 1>&2; exit 1 ;; + esac + + + if $GL_GENERATE_GETOPT_CDEFS_H; then + GL_GENERATE_GETOPT_CDEFS_H_TRUE= + GL_GENERATE_GETOPT_CDEFS_H_FALSE='#' +else + GL_GENERATE_GETOPT_CDEFS_H_TRUE='#' + GL_GENERATE_GETOPT_CDEFS_H_FALSE= +fi +: + if test -z "${GL_GENERATE_GETOPT_CDEFS_H_TRUE}" && test -z "${GL_GENERATE_GETOPT_CDEFS_H_FALSE}"; then + GL_GENERATE_GETOPT_CDEFS_H_TRUE='#' + GL_GENERATE_GETOPT_CDEFS_H_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" - GNULIB_GL_UNISTD_H_GETOPT=1 + if test $REPLACE_GETOPT = 1; then + GL_COND_OBJ_GETOPT_TRUE= + GL_COND_OBJ_GETOPT_FALSE='#' +else + GL_COND_OBJ_GETOPT_TRUE='#' + GL_COND_OBJ_GETOPT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_GETOPT_TRUE}" && test -z "${GL_COND_OBJ_GETOPT_FALSE}"; then + GL_COND_OBJ_GETOPT_TRUE='#' + GL_COND_OBJ_GETOPT_FALSE='#' fi + if test -z "$GL_COND_OBJ_GETOPT_TRUE"; then : + + + + + + + + GL_GNULIB_UNISTD_H_GETOPT=1 + + + +fi + + + + + + + + + + GL_GNULIB_GETOPT_POSIX=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_GETOPT_POSIX 1" >>confdefs.h + + + @@ -20247,83 +24447,6 @@ printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h if test $ac_cv_func_gettimeofday != yes; then HAVE_GETTIMEOFDAY=0 else - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 -printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; } -if test ${gl_cv_func_gettimeofday_clobber+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - # When cross-compiling: - case "$host_os" in - # Guess all is fine on glibc systems. - *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; - esac - -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> - #include <sys/time.h> - #include <time.h> - #include <stdlib.h> - -int -main (void) -{ - - time_t t = 0; - struct tm *lt; - struct tm saved_lt; - struct timeval tv; - lt = localtime (&t); - saved_lt = *lt; - gettimeofday (&tv, NULL); - return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - gl_cv_func_gettimeofday_clobber=no -else $as_nop - gl_cv_func_gettimeofday_clobber=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5 -printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; } - - case "$gl_cv_func_gettimeofday_clobber" in - *yes) - REPLACE_GETTIMEOFDAY=1 - -printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h - - - - - NEED_LOCALTIME_BUFFER=1 - REPLACE_GMTIME=1 - REPLACE_LOCALTIME=1 - - ;; - esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 printf %s "checking for gettimeofday with POSIX signature... " >&6; } if test ${gl_cv_func_gettimeofday_posix_signature+y} @@ -20398,25 +24521,35 @@ printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; } printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h - if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then - + if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then + GL_COND_OBJ_GETTIMEOFDAY_TRUE= + GL_COND_OBJ_GETTIMEOFDAY_FALSE='#' +else + GL_COND_OBJ_GETTIMEOFDAY_TRUE='#' + GL_COND_OBJ_GETTIMEOFDAY_FALSE= +fi +: + if test -z "${GL_COND_OBJ_GETTIMEOFDAY_TRUE}" && test -z "${GL_COND_OBJ_GETTIMEOFDAY_FALSE}"; then + GL_COND_OBJ_GETTIMEOFDAY_TRUE='#' + GL_COND_OBJ_GETTIMEOFDAY_FALSE='#' + fi + if test -z "$GL_COND_OBJ_GETTIMEOFDAY_TRUE"; then : + : +fi - gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" - : - fi - GNULIB_GETTIMEOFDAY=1 + GL_GNULIB_GETTIMEOFDAY=1 @@ -20442,296 +24575,52 @@ else $as_nop fi - if test $HAVE_GROUP_MEMBER = 0; then - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext" - - - - - fi - - - - - - GNULIB_GROUP_MEMBER=1 - - - - - -printf "%s\n" "#define GNULIB_TEST_GROUP_MEMBER 1" >>confdefs.h - - - - - - - - - PRIPTR_PREFIX= - if test -n "$STDINT_H"; then - PRIPTR_PREFIX='"l"' - else - for glpfx in '' l ll I64; do - case $glpfx in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - I64) gltype1='__int64';; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdint.h> - extern intptr_t foo; - extern $gltype1 foo; -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - PRIPTR_PREFIX='"'$glpfx'"' + if test $HAVE_GROUP_MEMBER = 0; then + GL_COND_OBJ_GROUP_MEMBER_TRUE= + GL_COND_OBJ_GROUP_MEMBER_FALSE='#' +else + GL_COND_OBJ_GROUP_MEMBER_TRUE='#' + GL_COND_OBJ_GROUP_MEMBER_FALSE= fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - test -n "$PRIPTR_PREFIX" && break - done +: + if test -z "${GL_COND_OBJ_GROUP_MEMBER_TRUE}" && test -z "${GL_COND_OBJ_GROUP_MEMBER_FALSE}"; then + GL_COND_OBJ_GROUP_MEMBER_TRUE='#' + GL_COND_OBJ_GROUP_MEMBER_FALSE='#' fi + if test -z "$GL_COND_OBJ_GROUP_MEMBER_TRUE"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5 -printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; } -if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* 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 <limits.h> - #if HAVE_STDINT_H - #include <stdint.h> - #endif - #if defined INT32_MAX && defined INTMAX_MAX - #define CONDITION (INT32_MAX < INTMAX_MAX) - #elif HAVE_LONG_LONG_INT - #define CONDITION (sizeof (int) < sizeof (long long int)) - #else - #define CONDITION 0 - #endif - int test[CONDITION ? 1 : -1]; -int -main (void) -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes -else $as_nop - gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 -printf "%s\n" "$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 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5 -printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; } -if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* 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 <limits.h> - #if HAVE_STDINT_H - #include <stdint.h> - #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 (void) -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes -else $as_nop - gl_cv_test_INT64_MAX_EQ_LONG_MAX=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 -printf "%s\n" "$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 + GL_GNULIB_GROUP_MEMBER=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5 -printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } -if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* 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 <limits.h> - #if HAVE_STDINT_H - #include <stdint.h> - #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 (void) -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes -else $as_nop - gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 -printf "%s\n" "$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 +printf "%s\n" "#define GNULIB_TEST_GROUP_MEMBER 1" >>confdefs.h - if test $APPLE_UNIVERSAL_BUILD = 0; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5 -printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; } -if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* 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 <limits.h> - #if HAVE_STDINT_H - #include <stdint.h> - #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 (void) -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes -else $as_nop - gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 -printf "%s\n" "$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 - @@ -20746,7 +24635,7 @@ else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <math.h> - #if __GNUC__ >= 4 + #if (__GNUC__ >= 4) || (__clang_major__ >= 4) # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) #else @@ -20809,9 +24698,9 @@ else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <math.h> - #if __GNUC__ >= 4 + #if (__GNUC__ >= 4) || (__clang_major__ >= 4) # undef isnanf - # define isnanf(x) __builtin_isnanf ((float)(x)) + # define isnanf(x) __builtin_isnan ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) @@ -20880,9 +24769,9 @@ else $as_nop /* end confdefs.h. */ #include <math.h> -#if __GNUC__ >= 4 +#if (__GNUC__ >= 4) || (__clang_major__ >= 4) # undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) +# define isnanf(x) __builtin_isnan ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) @@ -20922,7 +24811,7 @@ int main() m.value = NaN (); /* Set the bits below the exponent to 01111...111. */ m.word[0] &= -1U << FLT_EXPBIT0_BIT; - m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1; + m.word[0] |= (1U << (FLT_EXPBIT0_BIT - 1)) - 1; if (!isnanf (m.value)) result |= 4; } @@ -21095,9 +24984,9 @@ else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <math.h> - #if __GNUC__ >= 4 + #if (__GNUC__ >= 4) || (__clang_major__ >= 4) # undef isnanl - # define isnanl(x) __builtin_isnanl ((long double)(x)) + # define isnanl(x) __builtin_isnan ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) @@ -21169,9 +25058,9 @@ else $as_nop #include <float.h> #include <limits.h> #include <math.h> -#if __GNUC__ >= 4 +#if (__GNUC__ >= 4) || (__clang_major__ >= 4) # undef isnanl -# define isnanl(x) __builtin_isnanl ((long double)(x)) +# define isnanl(x) __builtin_isnan ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) @@ -21377,14 +25266,14 @@ typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; -static void add_to_ored_words (long double x) +static void add_to_ored_words (long double *x) { memory_long_double m; size_t i; /* Clear it first, in case sizeof (long double) < sizeof (memory_long_double). */ memset (&m, 0, sizeof (memory_long_double)); - m.value = x; + m.value = *x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; @@ -21393,17 +25282,15 @@ static void add_to_ored_words (long double x) } int main () { + static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L }; size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; - add_to_ored_words (0.25L); - add_to_ored_words (0.5L); - add_to_ored_words (1.0L); - add_to_ored_words (2.0L); - add_to_ored_words (4.0L); + for (j = 0; j < 5; j++) + add_to_ored_words (&samples[j]); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) @@ -21466,16 +25353,73 @@ printf "%s\n" "#define LDBL_EXPBIT0_BIT $bit" >>confdefs.h fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5 +printf %s "checking whether the compiler supports the __inline keyword... " >&6; } +if test ${gl_cv_c___inline+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int foo_t; + static __inline foo_t foo (void) { return 0; } +int +main (void) +{ +return foo (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + gl_cv_c___inline=yes +else $as_nop + gl_cv_c___inline=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5 +printf "%s\n" "$gl_cv_c___inline" >&6; } + if test $gl_cv_c___inline = yes; then + +printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h + + fi + + + case "$GL_GENERATE_LIMITS_H" in + false) LIMITS_H='' ;; + true) + if test -z "$LIMITS_H"; then + LIMITS_H="${gl_source_base_prefix}limits.h" + fi + ;; + *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;; + esac + + + if $GL_GENERATE_LIMITS_H; then + GL_GENERATE_LIMITS_H_TRUE= + GL_GENERATE_LIMITS_H_FALSE='#' +else + GL_GENERATE_LIMITS_H_TRUE='#' + GL_GENERATE_LIMITS_H_FALSE= +fi +: + if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then + GL_GENERATE_LIMITS_H_TRUE='#' + GL_GENERATE_LIMITS_H_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext" @@ -21492,25 +25436,35 @@ printf "%s\n" "#define LDBL_EXPBIT0_BIT $bit" >>confdefs.h HAVE_LSTAT=0 fi - if test $REPLACE_LSTAT = 1; then - + if test $REPLACE_LSTAT = 1; then + GL_COND_OBJ_LSTAT_TRUE= + GL_COND_OBJ_LSTAT_FALSE='#' +else + GL_COND_OBJ_LSTAT_TRUE='#' + GL_COND_OBJ_LSTAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_LSTAT_TRUE}" && test -z "${GL_COND_OBJ_LSTAT_FALSE}"; then + GL_COND_OBJ_LSTAT_TRUE='#' + GL_COND_OBJ_LSTAT_FALSE='#' + fi + if test -z "$GL_COND_OBJ_LSTAT_TRUE"; then : + : +fi - gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" - : - fi - GNULIB_LSTAT=1 + GL_GNULIB_LSTAT=1 @@ -21523,15 +25477,68 @@ printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h - if test $gl_cv_func_malloc_posix = yes; then + REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX" + if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then -printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5 +printf %s "checking whether malloc (0) returns nonnull... " >&6; } +if test ${ac_cv_func_malloc_0_nonnull+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ + | gnu* | *-musl* | midnightbsd* \ + | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_malloc_0_nonnull="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;; + esac + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> + +int +main (void) +{ +void *p = malloc (0); + int result = !p; + free (p); + return result; + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_func_malloc_0_nonnull=yes +else $as_nop + ac_cv_func_malloc_0_nonnull=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } + case $ac_cv_func_malloc_0_nonnull in #( + *yes) : + ;; #( + *) : + REPLACE_MALLOC_FOR_MALLOC_GNU=1 ;; +esac - else - REPLACE_MALLOC=1 fi - if test $REPLACE_MALLOC = 1; then + if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then @@ -21548,22 +25555,22 @@ printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h - GNULIB_MALLOC_POSIX=1 - -printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h + GL_GNULIB_MALLOC_GNU=1 +printf "%s\n" "#define GNULIB_TEST_MALLOC_GNU 1" >>confdefs.h + if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then @@ -21572,154 +25579,33 @@ printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" - if test $gl_cv_have_include_next = yes; then - gl_cv_next_math_h='<'math.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5 -printf %s "checking absolute name of <math.h>... " >&6; } -if test ${gl_cv_next_math_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop + fi - if test $ac_cv_header_math_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <math.h> -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'math.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_math_h - gl_cv_next_math_h='"'$gl_header'"' - else - gl_cv_next_math_h='<'math.h'>' - fi + GL_GNULIB_MALLOC_POSIX=1 -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5 -printf "%s\n" "$gl_cv_next_math_h" >&6; } - fi - NEXT_MATH_H=$gl_cv_next_math_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='<'math.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_math_h - fi - NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive +printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5 -printf %s "checking whether NAN macro works... " >&6; } -if test ${gl_cv_header_math_nan_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <math.h> -int -main (void) -{ -/* Solaris 10 has a broken definition of NAN. Other platforms - fail to provide NAN, or provide it only in C99 mode; this - test only needs to fail when NAN is provided but wrong. */ - float f = 1.0f; -#ifdef NAN - f = NAN; -#endif - return f == 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_header_math_nan_works=yes -else $as_nop - gl_cv_header_math_nan_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5 -printf "%s\n" "$gl_cv_header_math_nan_works" >&6; } - if test $gl_cv_header_math_nan_works = no; then - REPLACE_NAN=1 - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5 -printf %s "checking whether HUGE_VAL works... " >&6; } -if test ${gl_cv_header_math_huge_val_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <math.h> -int -main (void) -{ -/* Solaris 10 has a broken definition of HUGE_VAL. */ - double d = HUGE_VAL; - return d == 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_header_math_huge_val_works=yes -else $as_nop - gl_cv_header_math_huge_val_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5 -printf "%s\n" "$gl_cv_header_math_huge_val_works" >&6; } - if test $gl_cv_header_math_huge_val_works = no; then - REPLACE_HUGE_VAL=1 - fi - if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then @@ -21727,8 +25613,20 @@ printf "%s\n" "$gl_cv_header_math_huge_val_works" >&6; } + if test $REPLACE_MEMCHR = 1; then + GL_COND_OBJ_MEMCHR_TRUE= + GL_COND_OBJ_MEMCHR_FALSE='#' +else + GL_COND_OBJ_MEMCHR_TRUE='#' + GL_COND_OBJ_MEMCHR_FALSE= +fi +: + if test -z "${GL_COND_OBJ_MEMCHR_TRUE}" && test -z "${GL_COND_OBJ_MEMCHR_FALSE}"; then + GL_COND_OBJ_MEMCHR_TRUE='#' + GL_COND_OBJ_MEMCHR_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" + if test -z "$GL_COND_OBJ_MEMCHR_TRUE"; then : ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" @@ -21739,13 +25637,23 @@ then : fi - fi + +fi + + + - GNULIB_MEMCHR=1 + + + + + + + GL_GNULIB_MEMCHR=1 @@ -21772,27 +25680,42 @@ fi HAVE_MEMPCPY=0 fi - if test $HAVE_MEMPCPY = 0; then + + if test $HAVE_MEMPCPY = 0; then + GL_COND_OBJ_MEMPCPY_TRUE= + GL_COND_OBJ_MEMPCPY_FALSE='#' +else + GL_COND_OBJ_MEMPCPY_TRUE='#' + GL_COND_OBJ_MEMPCPY_FALSE= +fi +: + if test -z "${GL_COND_OBJ_MEMPCPY_TRUE}" && test -z "${GL_COND_OBJ_MEMPCPY_FALSE}"; then + GL_COND_OBJ_MEMPCPY_TRUE='#' + GL_COND_OBJ_MEMPCPY_FALSE='#' + fi + + if test -z "$GL_COND_OBJ_MEMPCPY_TRUE"; then : + + + : +fi - gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext" - : - fi - GNULIB_MEMPCPY=1 + GL_GNULIB_MEMPCPY=1 @@ -21819,7 +25742,25 @@ then : fi - if test $ac_cv_func_memrchr = no; then + + if test $ac_cv_func_memrchr = no; then + GL_COND_OBJ_MEMRCHR_TRUE= + GL_COND_OBJ_MEMRCHR_FALSE='#' +else + GL_COND_OBJ_MEMRCHR_TRUE='#' + GL_COND_OBJ_MEMRCHR_FALSE= +fi +: + if test -z "${GL_COND_OBJ_MEMRCHR_TRUE}" && test -z "${GL_COND_OBJ_MEMRCHR_FALSE}"; then + GL_COND_OBJ_MEMRCHR_TRUE='#' + GL_COND_OBJ_MEMRCHR_FALSE='#' + fi + + if test -z "$GL_COND_OBJ_MEMRCHR_TRUE"; then : + + : + +fi @@ -21828,16 +25769,13 @@ fi - gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext" - : - fi - GNULIB_MEMRCHR=1 + GL_GNULIB_MEMRCHR=1 @@ -21849,6 +25787,9 @@ printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5 printf %s "checking whether mkdir handles trailing slash... " >&6; } if test ${gl_cv_func_mkdir_trailing_slash_works+y} @@ -21856,15 +25797,15 @@ then : printf %s "(cached) " >&6 else $as_nop rm -rf conftest.dir - if test "$cross_compiling" = yes + if test "$cross_compiling" = yes then : case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; - # Guess yes on MSVC, no on mingw. - mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; + # Guess yes on MSVC, no on mingw. + mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _MSC_VER @@ -21881,17 +25822,20 @@ else $as_nop fi rm -rf conftest* - ;; - # If we don't know, assume the worst. - *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;; - esac + ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;; + esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# include <sys/types.h> -# include <sys/stat.h> + #include <sys/types.h> + #include <sys/stat.h> + + +$gl_mda_defines int main (void) @@ -21911,8 +25855,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - rm -rf conftest.dir - + rm -rf conftest.dir fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5 @@ -21931,23 +25874,28 @@ then : printf %s "(cached) " >&6 else $as_nop rm -rf conftest.dir - if test "$cross_compiling" = yes + if test "$cross_compiling" = yes then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; - esac + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;; + esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# include <sys/types.h> -# include <sys/stat.h> + #include <sys/types.h> + #include <sys/stat.h> + + +$gl_mda_defines int main (void) @@ -21967,7 +25915,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - rm -rf conftest.dir + rm -rf conftest.dir fi @@ -21983,84 +25931,119 @@ printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h ;; esac - if test $REPLACE_MKDIR = 1; then - - - + if test $REPLACE_MKDIR = 1; then + GL_COND_OBJ_MKDIR_TRUE= + GL_COND_OBJ_MKDIR_FALSE='#' +else + GL_COND_OBJ_MKDIR_TRUE='#' + GL_COND_OBJ_MKDIR_FALSE= +fi +: + if test -z "${GL_COND_OBJ_MKDIR_TRUE}" && test -z "${GL_COND_OBJ_MKDIR_FALSE}"; then + GL_COND_OBJ_MKDIR_TRUE='#' + GL_COND_OBJ_MKDIR_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext" - fi - if test $ac_cv_func_mkdirat != yes; then - HAVE_MKDIRAT=0 - fi - if test $HAVE_MKDIRAT = 0; then + GL_GNULIB_MKDIR=1 +printf "%s\n" "#define GNULIB_TEST_MKDIR 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS mkdirat.$ac_objext" + if test $ac_cv_func_mkdirat != yes; then + HAVE_MKDIRAT=0 fi + if test $HAVE_MKDIRAT = 0; then + GL_COND_OBJ_MKDIRAT_TRUE= + GL_COND_OBJ_MKDIRAT_FALSE='#' +else + GL_COND_OBJ_MKDIRAT_TRUE='#' + GL_COND_OBJ_MKDIRAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_MKDIRAT_TRUE}" && test -z "${GL_COND_OBJ_MKDIRAT_FALSE}"; then + GL_COND_OBJ_MKDIRAT_TRUE='#' + GL_COND_OBJ_MKDIRAT_FALSE='#' + fi - - - GNULIB_MKDIRAT=1 - + if test -z "$GL_COND_OBJ_MKDIRAT_TRUE"; then : -printf "%s\n" "#define GNULIB_TEST_MKDIRAT 1" >>confdefs.h +fi - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + GL_GNULIB_MKDIRAT=1 - gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext" - fi - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then +printf "%s\n" "#define GNULIB_TEST_MKDIRAT 1" >>confdefs.h + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + GL_COND_OBJ_MSVC_INVAL_TRUE= + GL_COND_OBJ_MSVC_INVAL_FALSE='#' +else + GL_COND_OBJ_MSVC_INVAL_TRUE='#' + GL_COND_OBJ_MSVC_INVAL_FALSE= +fi +: + if test -z "${GL_COND_OBJ_MSVC_INVAL_TRUE}" && test -z "${GL_COND_OBJ_MSVC_INVAL_FALSE}"; then + GL_COND_OBJ_MSVC_INVAL_TRUE='#' + GL_COND_OBJ_MSVC_INVAL_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext" + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + GL_COND_OBJ_MSVC_NOTHROW_TRUE= + GL_COND_OBJ_MSVC_NOTHROW_FALSE='#' +else + GL_COND_OBJ_MSVC_NOTHROW_TRUE='#' + GL_COND_OBJ_MSVC_NOTHROW_FALSE= +fi +: + if test -z "${GL_COND_OBJ_MSVC_NOTHROW_TRUE}" && test -z "${GL_COND_OBJ_MSVC_NOTHROW_FALSE}"; then + GL_COND_OBJ_MSVC_NOTHROW_TRUE='#' + GL_COND_OBJ_MSVC_NOTHROW_FALSE='#' fi + printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h @@ -22077,26 +26060,28 @@ printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h if test "$gl_cv_macro_O_CLOEXEC" != yes; then REPLACE_OPEN=1 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 printf %s "checking whether open recognizes a trailing slash... " >&6; } if test ${gl_cv_func_open_slash+y} then : printf %s "(cached) " >&6 else $as_nop # 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 + 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] | solaris2.[0-9].*) - gl_cv_func_open_slash="guessing no" ;; - *) - gl_cv_func_open_slash="guessing yes" ;; - esac + case "$host_os" in + freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) + gl_cv_func_open_slash="guessing no" ;; + *) + gl_cv_func_open_slash="guessing yes" ;; + esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22106,6 +26091,10 @@ else $as_nop #if HAVE_UNISTD_H # include <unistd.h> #endif + + +$gl_mda_defines + int main () { int result = 0; @@ -22128,16 +26117,21 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - rm -f conftest.sl conftest.tmp conftest.lnk + rm -f conftest.sl conftest.tmp conftest.lnk fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5 printf "%s\n" "$gl_cv_func_open_slash" >&6; } - case "$gl_cv_func_open_slash" in - *no) + case "$gl_cv_func_open_slash" in + *no) printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h + ;; + esac + + case "$gl_cv_func_open_slash" in + *no) REPLACE_OPEN=1 ;; esac @@ -22159,28 +26153,38 @@ printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h - if test $REPLACE_OPEN = 1; then - + if test $REPLACE_OPEN = 1; then + GL_COND_OBJ_OPEN_TRUE= + GL_COND_OBJ_OPEN_FALSE='#' +else + GL_COND_OBJ_OPEN_TRUE='#' + GL_COND_OBJ_OPEN_FALSE= +fi +: + if test -z "${GL_COND_OBJ_OPEN_TRUE}" && test -z "${GL_COND_OBJ_OPEN_FALSE}"; then + GL_COND_OBJ_OPEN_TRUE='#' + GL_COND_OBJ_OPEN_FALSE='#' + fi + if test -z "$GL_COND_OBJ_OPEN_TRUE"; then : + : - gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" +fi - : - fi - GNULIB_OPEN=1 + GL_GNULIB_OPEN=1 @@ -22210,32 +26214,42 @@ printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h ;; esac - if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then - + if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then + GL_COND_OBJ_OPENAT_TRUE= + GL_COND_OBJ_OPENAT_FALSE='#' +else + GL_COND_OBJ_OPENAT_TRUE='#' + GL_COND_OBJ_OPENAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_OPENAT_TRUE}" && test -z "${GL_COND_OBJ_OPENAT_FALSE}"; then + GL_COND_OBJ_OPENAT_TRUE='#' + GL_COND_OBJ_OPENAT_FALSE='#' + fi + if test -z "$GL_COND_OBJ_OPENAT_TRUE"; then : + : - gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" +fi +printf "%s\n" "#define GNULIB_OPENAT 1" >>confdefs.h - : - fi -printf "%s\n" "#define GNULIB_OPENAT 1" >>confdefs.h - GNULIB_OPENAT=1 + GL_GNULIB_OPENAT=1 @@ -22277,7 +26291,39 @@ fi REPLACE_OPENDIR=1;; esac - if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then + + if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then + GL_COND_OBJ_OPENDIR_TRUE= + GL_COND_OBJ_OPENDIR_FALSE='#' +else + GL_COND_OBJ_OPENDIR_TRUE='#' + GL_COND_OBJ_OPENDIR_FALSE= +fi +: + if test -z "${GL_COND_OBJ_OPENDIR_TRUE}" && test -z "${GL_COND_OBJ_OPENDIR_FALSE}"; then + GL_COND_OBJ_OPENDIR_TRUE='#' + GL_COND_OBJ_OPENDIR_FALSE='#' + fi + + + + + + + + + + + GL_GNULIB_OPENDIR=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h + + + @@ -22285,25 +26331,40 @@ fi + if test $ac_cv_func_pipe != yes; then + HAVE_PIPE=0 + fi - gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext" + if test $HAVE_PIPE = 0; then + GL_COND_OBJ_PIPE_TRUE= + GL_COND_OBJ_PIPE_FALSE='#' +else + GL_COND_OBJ_PIPE_TRUE='#' + GL_COND_OBJ_PIPE_FALSE= +fi +: + if test -z "${GL_COND_OBJ_PIPE_TRUE}" && test -z "${GL_COND_OBJ_PIPE_FALSE}"; then + GL_COND_OBJ_PIPE_TRUE='#' + GL_COND_OBJ_PIPE_FALSE='#' fi - GNULIB_OPENDIR=1 -printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h + GL_GNULIB_PIPE=1 + + +printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h @@ -22562,6 +26623,7 @@ extern "C" #endif long double frexpl (long double, int *); +long double zero = 0.0L; int main() { int result = 0; @@ -22619,7 +26681,8 @@ int main() } } /* Test on infinite numbers. */ - x = 1.0L / 0.0L; + /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */ + x = 1.0L / zero; { int exp; long double y = frexpl (x, &exp); @@ -22783,6 +26846,64 @@ fi + + ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr" +if test "x$ac_cv_func_rawmemchr" = xyes +then : + printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h + +fi + + if test $ac_cv_func_rawmemchr = no; then + HAVE_RAWMEMCHR=0 + fi + + + if test $HAVE_RAWMEMCHR = 0; then + GL_COND_OBJ_RAWMEMCHR_TRUE= + GL_COND_OBJ_RAWMEMCHR_FALSE='#' +else + GL_COND_OBJ_RAWMEMCHR_TRUE='#' + GL_COND_OBJ_RAWMEMCHR_FALSE= +fi +: + if test -z "${GL_COND_OBJ_RAWMEMCHR_TRUE}" && test -z "${GL_COND_OBJ_RAWMEMCHR_FALSE}"; then + GL_COND_OBJ_RAWMEMCHR_TRUE='#' + GL_COND_OBJ_RAWMEMCHR_FALSE='#' + fi + + if test -z "$GL_COND_OBJ_RAWMEMCHR_TRUE"; then : + + : + +fi + + + + + + + + + + + + + + + GL_GNULIB_RAWMEMCHR=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h + + + + + + if test $ac_cv_func_readlink = no; then HAVE_READLINK=0 else @@ -22817,7 +26938,7 @@ fi printf "%s\n" "$gl_cv_decl_readlink_works" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 printf %s "checking whether readlink handles trailing slash correctly... " >&6; } -if test ${gl_cv_func_readlink_works+y} +if test ${gl_cv_func_readlink_trailing_slash+y} then : printf %s "(cached) " >&6 else $as_nop @@ -22827,12 +26948,15 @@ else $as_nop if test "$cross_compiling" = yes then : case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_readlink_works="guessing no" ;; + # Guess yes on Linux or glibc systems. + linux-* | linux | *-gnu* | gnu*) + gl_cv_func_readlink_trailing_slash="guessing yes" ;; + # Guess no on AIX or HP-UX. + aix* | hpux*) + gl_cv_func_readlink_trailing_slash="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) + gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;; esac else $as_nop @@ -22851,9 +26975,9 @@ char buf[20]; _ACEOF if ac_fn_c_try_run "$LINENO" then : - gl_cv_func_readlink_works=yes + gl_cv_func_readlink_trailing_slash=yes else $as_nop - gl_cv_func_readlink_works=no + gl_cv_func_readlink_trailing_slash=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -22861,9 +26985,9 @@ fi rm -f conftest.link conftest.lnk2 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 -printf "%s\n" "$gl_cv_func_readlink_works" >&6; } - case "$gl_cv_func_readlink_works" in +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5 +printf "%s\n" "$gl_cv_func_readlink_trailing_slash" >&6; } + case "$gl_cv_func_readlink_trailing_slash" in *yes) if test "$gl_cv_decl_readlink_works" != yes; then REPLACE_READLINK=1 @@ -22876,29 +27000,103 @@ printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h REPLACE_READLINK=1 ;; esac - fi - if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5 +printf %s "checking whether readlink truncates results correctly... " >&6; } +if test ${gl_cv_func_readlink_truncate+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # We have readlink, so assume ln -s works. + ln -s ab conftest.link + if test "$cross_compiling" = yes +then : + case "$host_os" in + # Guess yes on Linux or glibc systems. + linux-* | linux | *-gnu* | gnu*) + gl_cv_func_readlink_truncate="guessing yes" ;; + # Guess no on AIX or HP-UX. + aix* | hpux*) + gl_cv_func_readlink_truncate="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) + gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;; + esac +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <unistd.h> +int +main (void) +{ +char c; + return readlink ("conftest.link", &c, 1) != 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_readlink_truncate=yes +else $as_nop + gl_cv_func_readlink_truncate=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm -f conftest.link conftest.lnk2 +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5 +printf "%s\n" "$gl_cv_func_readlink_truncate" >&6; } + case $gl_cv_func_readlink_truncate in + *yes) + if test "$gl_cv_decl_readlink_works" != yes; then + REPLACE_READLINK=1 + fi + ;; + *) +printf "%s\n" "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h + REPLACE_READLINK=1 + ;; + esac + fi + if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then + GL_COND_OBJ_READLINK_TRUE= + GL_COND_OBJ_READLINK_FALSE='#' +else + GL_COND_OBJ_READLINK_TRUE='#' + GL_COND_OBJ_READLINK_FALSE= +fi +: + if test -z "${GL_COND_OBJ_READLINK_TRUE}" && test -z "${GL_COND_OBJ_READLINK_FALSE}"; then + GL_COND_OBJ_READLINK_TRUE='#' + GL_COND_OBJ_READLINK_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" + if test -z "$GL_COND_OBJ_READLINK_TRUE"; then : : - fi + +fi + + + - GNULIB_READLINK=1 + + GL_GNULIB_READLINK=1 @@ -22945,13 +27143,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlinkat_works" >&5 printf "%s\n" "$gl_cv_decl_readlinkat_works" >&6; } - # Assume readinkat has the same trailing slash bug as readlink, - # as is the case on Mac Os X 10.10 - case "$gl_cv_func_readlink_works" in - *yes) - if test "$gl_cv_decl_readlinkat_works" != yes; then - REPLACE_READLINKAT=1 - fi + # Assume readlinkat has the same bugs as readlink, + # as is the case on OS X 10.10 with trailing slashes. + case $gl_cv_decl_readlinkat_works,$gl_cv_func_readlink_trailing_slash,$gl_cv_func_readlink_truncate in + *yes,*yes,*yes) ;; *) REPLACE_READLINKAT=1 @@ -22959,7 +27154,103 @@ printf "%s\n" "$gl_cv_decl_readlinkat_works" >&6; } esac fi - if test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1; then + + if test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1; then + GL_COND_OBJ_READLINKAT_TRUE= + GL_COND_OBJ_READLINKAT_FALSE='#' +else + GL_COND_OBJ_READLINKAT_TRUE='#' + GL_COND_OBJ_READLINKAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_READLINKAT_TRUE}" && test -z "${GL_COND_OBJ_READLINKAT_FALSE}"; then + GL_COND_OBJ_READLINKAT_TRUE='#' + GL_COND_OBJ_READLINKAT_FALSE='#' + fi + + + + + + + + + + + GL_GNULIB_READLINKAT=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h + + + + + + + if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 0; then + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realloc (0, 0) returns nonnull" >&5 +printf %s "checking whether realloc (0, 0) returns nonnull... " >&6; } +if test ${ac_cv_func_realloc_0_nonnull+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ + | gnu* | *-musl* | midnightbsd* \ + | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_realloc_0_nonnull="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;; + esac + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> + +int +main (void) +{ +void *p = realloc (0, 0); + int result = !p; + free (p); + return result; + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + ac_cv_func_realloc_0_nonnull=yes +else $as_nop + ac_cv_func_realloc_0_nonnull=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 +printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; } + case $ac_cv_func_realloc_0_nonnull in #( + *yes) : + ;; #( + *) : + REPLACE_REALLOC_FOR_REALLOC_GNU=1 ;; +esac + + fi + + if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then @@ -22968,7 +27259,7 @@ printf "%s\n" "$gl_cv_decl_readlinkat_works" >&6; } - gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" fi @@ -22976,28 +27267,28 @@ printf "%s\n" "$gl_cv_decl_readlinkat_works" >&6; } - GNULIB_READLINKAT=1 + GL_GNULIB_REALLOC_GNU=1 -printf "%s\n" "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h +printf "%s\n" "#define GNULIB_TEST_REALLOC_GNU 1" >>confdefs.h - if test $gl_cv_func_malloc_posix = yes; then -printf "%s\n" "#define HAVE_REALLOC_POSIX 1" >>confdefs.h - else - REPLACE_REALLOC=1 + + + if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then + REPLACE_REALLOC_FOR_REALLOC_POSIX=1 fi - if test $REPLACE_REALLOC = 1; then + if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then @@ -23014,7 +27305,11 @@ printf "%s\n" "#define HAVE_REALLOC_POSIX 1" >>confdefs.h - GNULIB_REALLOC_POSIX=1 + + + + + GL_GNULIB_REALLOC_POSIX=1 @@ -23029,6 +27324,67 @@ printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h + ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray" +if test "x$ac_cv_func_reallocarray" = xyes +then : + printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h + +fi + + if test "$ac_cv_func_reallocarray" = no; then + HAVE_REALLOCARRAY=0 + elif test "$gl_cv_malloc_ptrdiff" = no; then + REPLACE_REALLOCARRAY=1 + fi + + + if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then + GL_COND_OBJ_REALLOCARRAY_TRUE= + GL_COND_OBJ_REALLOCARRAY_FALSE='#' +else + GL_COND_OBJ_REALLOCARRAY_TRUE='#' + GL_COND_OBJ_REALLOCARRAY_FALSE= +fi +: + if test -z "${GL_COND_OBJ_REALLOCARRAY_TRUE}" && test -z "${GL_COND_OBJ_REALLOCARRAY_FALSE}"; then + GL_COND_OBJ_REALLOCARRAY_TRUE='#' + GL_COND_OBJ_REALLOCARRAY_FALSE='#' + fi + + if test -z "$GL_COND_OBJ_REALLOCARRAY_TRUE"; then : + + : + +fi + + +printf "%s\n" "#define GNULIB_REALLOCARRAY 1" >>confdefs.h + + + + + + + + + + + + GL_GNULIB_REALLOCARRAY=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_REALLOCARRAY 1" >>confdefs.h + + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5 printf %s "checking whether rename honors trailing slash on destination... " >&6; } if test ${gl_cv_func_rename_slash_dst_works+y} @@ -23051,8 +27407,8 @@ then : *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;; # Guess no on native Windows. mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rename_slash_dst_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;; esac else $as_nop @@ -23127,8 +27483,8 @@ then : *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;; # Guess yes on native Windows. mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rename_slash_src_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;; esac else $as_nop @@ -23189,52 +27545,47 @@ then : printf %s "(cached) " >&6 else $as_nop if test $ac_cv_func_link = yes; then - rm -rf conftest.f conftest.f1 conftest.f2 - if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 && - set x `ls -i conftest.f conftest.f1` && test "" = ""; then - if test "$cross_compiling" = yes + if test $cross_compiling != yes; then + rm -rf conftest.f conftest.f1 conftest.f2 + if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 && + set x `ls -i conftest.f conftest.f1` && test "" = ""; then + if test "$cross_compiling" = yes then : - case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_rename_link_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rename_link_works="guessing no" ;; - esac + : else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# include <errno.h> -# include <stdio.h> -# include <stdlib.h> -# include <unistd.h> +# include <errno.h> +# include <stdio.h> +# include <stdlib.h> +# include <unistd.h> + + +$gl_mda_defines int main (void) { int result = 0; - if (rename ("conftest.f", "conftest.f1")) - result |= 1; - if (unlink ("conftest.f1")) - result |= 2; + if (rename ("conftest.f", "conftest.f1")) + result |= 1; + if (unlink ("conftest.f1")) + result |= 2; - /* Allow either the POSIX-required behavior, where the - previous rename kept conftest.f, or the (better) NetBSD - behavior, where it removed conftest.f. */ - if (rename ("conftest.f", "conftest.f") != 0 - && errno != ENOENT) - result |= 4; + /* Allow either the POSIX-required behavior, where the + previous rename kept conftest.f, or the (better) NetBSD + behavior, where it removed conftest.f. */ + if (rename ("conftest.f", "conftest.f") != 0 + && errno != ENOENT) + result |= 4; - if (rename ("conftest.f1", "conftest.f1") == 0) - result |= 8; - if (rename ("conftest.f2", "conftest.f2") != 0) - result |= 16; - return result; + if (rename ("conftest.f1", "conftest.f1") == 0) + result |= 8; + if (rename ("conftest.f2", "conftest.f2") != 0) + result |= 16; + return result; ; return 0; @@ -23250,10 +27601,22 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + else + gl_cv_func_rename_link_works="guessing no" + fi + rm -rf conftest.f conftest.f1 conftest.f2 else - gl_cv_func_rename_link_works="guessing no" + case "$host_os" in + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_rename_link_works="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;; + esac fi - rm -rf conftest.f conftest.f1 conftest.f2 else gl_cv_func_rename_link_works=yes fi @@ -23289,8 +27652,8 @@ then : *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;; # Guess no on native Windows. mingw*) gl_cv_func_rename_dest_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rename_dest_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;; esac else $as_nop @@ -23339,24 +27702,30 @@ printf "%s\n" "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h ;; esac - if test $REPLACE_RENAME = 1; then - - - + if test $REPLACE_RENAME = 1; then + GL_COND_OBJ_RENAME_TRUE= + GL_COND_OBJ_RENAME_FALSE='#' +else + GL_COND_OBJ_RENAME_TRUE='#' + GL_COND_OBJ_RENAME_FALSE= +fi +: + if test -z "${GL_COND_OBJ_RENAME_TRUE}" && test -z "${GL_COND_OBJ_RENAME_FALSE}"; then + GL_COND_OBJ_RENAME_TRUE='#' + GL_COND_OBJ_RENAME_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" - fi - GNULIB_RENAME=1 + GL_GNULIB_RENAME=1 @@ -23385,36 +27754,42 @@ fi REPLACE_RENAMEAT=1 fi - if test $HAVE_RENAMEAT = 0 || test $REPLACE_RENAMEAT = 1; then - - - + if test $HAVE_RENAMEAT = 0 || test $REPLACE_RENAMEAT = 1; then + GL_COND_OBJ_RENAMEAT_TRUE= + GL_COND_OBJ_RENAMEAT_FALSE='#' +else + GL_COND_OBJ_RENAMEAT_TRUE='#' + GL_COND_OBJ_RENAMEAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_RENAMEAT_TRUE}" && test -z "${GL_COND_OBJ_RENAMEAT_FALSE}"; then + GL_COND_OBJ_RENAMEAT_TRUE='#' + GL_COND_OBJ_RENAMEAT_FALSE='#' + fi + if test $HAVE_RENAMEAT = 0; then - gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext" - fi - if test $HAVE_RENAMEAT = 0; then + gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext" + fi - gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext" - fi - GNULIB_RENAMEAT=1 + GL_GNULIB_RENAMEAT=1 @@ -23475,8 +27850,8 @@ then : *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;; # Guess no on native Windows. mingw*) gl_cv_func_rmdir_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rmdir_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;; esac else $as_nop @@ -23490,17 +27865,20 @@ else $as_nop # include <direct.h> #endif + +$gl_mda_defines + int main (void) { int result = 0; - if (!rmdir ("conftest.file/")) - result |= 1; - else if (errno != ENOTDIR) - result |= 2; - if (!rmdir ("conftest.dir/./")) - result |= 4; - return result; + if (!rmdir ("conftest.file/")) + result |= 1; + else if (errno != ENOTDIR) + result |= 2; + if (!rmdir ("conftest.dir/./")) + result |= 4; + return result; ; return 0; @@ -23527,30 +27905,38 @@ printf "%s\n" "$gl_cv_func_rmdir_works" >&6; } ;; esac - if test $REPLACE_RMDIR = 1; then - + if test $REPLACE_RMDIR = 1; then + GL_COND_OBJ_RMDIR_TRUE= + GL_COND_OBJ_RMDIR_FALSE='#' +else + GL_COND_OBJ_RMDIR_TRUE='#' + GL_COND_OBJ_RMDIR_FALSE= +fi +: + if test -z "${GL_COND_OBJ_RMDIR_TRUE}" && test -z "${GL_COND_OBJ_RMDIR_FALSE}"; then + GL_COND_OBJ_RMDIR_TRUE='#' + GL_COND_OBJ_RMDIR_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext" - fi + GL_GNULIB_RMDIR=1 - GNULIB_RMDIR=1 +printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h -printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h @@ -23559,7 +27945,7 @@ printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5 printf %s "checking for signbit macro... " >&6; } if test ${gl_cv_func_signbit+y} then : @@ -23571,10 +27957,12 @@ then : case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_signbit="guessing yes" ;; # Guess yes on native Windows. mingw*) gl_cv_func_signbit="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_signbit="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_signbit="$gl_cross_guess_normal" ;; esac else $as_nop @@ -23684,7 +28072,7 @@ fi printf "%s\n" "$gl_cv_func_signbit" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5 printf %s "checking for signbit compiler built-ins... " >&6; } -if test ${gl_cv_func_signbit_gcc+y} +if test ${gl_cv_func_signbit_builtins+y} then : printf %s "(cached) " >&6 else $as_nop @@ -23693,23 +28081,25 @@ else $as_nop then : case "$host_os" in # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_signbit_gcc="guessing yes" ;; + *-gnu* | gnu*) gl_cv_func_signbit_builtins="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_signbit_builtins="guessing yes" ;; # Guess yes on mingw, no on MSVC. mingw*) if test -n "$GCC"; then - gl_cv_func_signbit_gcc="guessing yes" + gl_cv_func_signbit_builtins="guessing yes" else - gl_cv_func_signbit_gcc="guessing no" + gl_cv_func_signbit_builtins="guessing no" fi ;; - # If we don't know, assume the worst. - *) gl_cv_func_signbit_gcc="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_signbit_builtins="$gl_cross_guess_normal" ;; esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if __GNUC__ >= 4 +#if (__GNUC__ >= 4) || (__clang_major__ >= 4) # define signbit(x) \ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ @@ -23795,9 +28185,9 @@ long double m0l = -p0l; _ACEOF if ac_fn_c_try_run "$LINENO" then : - gl_cv_func_signbit_gcc=yes + gl_cv_func_signbit_builtins=yes else $as_nop - gl_cv_func_signbit_gcc=no + gl_cv_func_signbit_builtins=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -23805,17 +28195,27 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5 -printf "%s\n" "$gl_cv_func_signbit_gcc" >&6; } - case "$gl_cv_func_signbit_gcc" in +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_builtins" >&5 +printf "%s\n" "$gl_cv_func_signbit_builtins" >&6; } + case "$gl_cv_func_signbit_builtins" in *yes) - REPLACE_SIGNBIT_USING_GCC=1 + REPLACE_SIGNBIT_USING_BUILTINS=1 ;; *) case "$gl_cv_func_signbit" in *yes) ;; *) REPLACE_SIGNBIT=1 + ;; + esac + ;; + esac + case "$host_os" in + solaris*) + REPLACE_SIGNBIT=1 + ;; + esac + if test $REPLACE_SIGNBIT = 1; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5 @@ -24134,8 +28534,8 @@ printf "%s\n" "#define LDBL_SIGNBIT_BIT $bit" >>confdefs.h esac - if test "$gl_cv_cc_float_signbit" = unknown; then - ac_fn_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h> + if test "$gl_cv_cc_float_signbit" = unknown; then + ac_fn_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h> " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_copysignf" = xyes then : @@ -24145,18 +28545,18 @@ else $as_nop fi printf "%s\n" "#define HAVE_DECL_COPYSIGNF $ac_have_decl" >>confdefs.h - if test "$ac_cv_have_decl_copysignf" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5 + if test "$ac_cv_have_decl_copysignf" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5 printf %s "checking whether copysignf can be used without linking with libm... " >&6; } if test ${gl_cv_func_copysignf_no_libm+y} then : printf %s "(cached) " >&6 else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <math.h> - float x, y; + float x, y; int main (void) { @@ -24177,15 +28577,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5 printf "%s\n" "$gl_cv_func_copysignf_no_libm" >&6; } - if test $gl_cv_func_copysignf_no_libm = yes; then + if test $gl_cv_func_copysignf_no_libm = yes; then printf "%s\n" "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h - fi - fi - fi - if test "$gl_cv_cc_double_signbit" = unknown; then - ac_fn_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h> + fi + fi + fi + if test "$gl_cv_cc_double_signbit" = unknown; then + ac_fn_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h> " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_copysign" = xyes then : @@ -24195,18 +28595,18 @@ else $as_nop fi printf "%s\n" "#define HAVE_DECL_COPYSIGN $ac_have_decl" >>confdefs.h - if test "$ac_cv_have_decl_copysign" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5 + if test "$ac_cv_have_decl_copysign" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5 printf %s "checking whether copysign can be used without linking with libm... " >&6; } if test ${gl_cv_func_copysign_no_libm+y} then : printf %s "(cached) " >&6 else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <math.h> - double x, y; + double x, y; int main (void) { @@ -24227,15 +28627,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5 printf "%s\n" "$gl_cv_func_copysign_no_libm" >&6; } - if test $gl_cv_func_copysign_no_libm = yes; then + if test $gl_cv_func_copysign_no_libm = yes; then printf "%s\n" "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h - fi - fi - fi - if test "$gl_cv_cc_long_double_signbit" = unknown; then - ac_fn_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h> + fi + fi + fi + if test "$gl_cv_cc_long_double_signbit" = unknown; then + ac_fn_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h> " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_copysignl" = xyes then : @@ -24245,18 +28645,18 @@ else $as_nop fi printf "%s\n" "#define HAVE_DECL_COPYSIGNL $ac_have_decl" >>confdefs.h - if test "$ac_cv_have_decl_copysignl" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5 + if test "$ac_cv_have_decl_copysignl" = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5 printf %s "checking whether copysignl can be used without linking with libm... " >&6; } if test ${gl_cv_func_copysignl_no_libm+y} then : printf %s "(cached) " >&6 else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <math.h> - long double x, y; + long double x, y; int main (void) { @@ -24277,56 +28677,39 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5 printf "%s\n" "$gl_cv_func_copysignl_no_libm" >&6; } - if test $gl_cv_func_copysignl_no_libm = yes; then + if test $gl_cv_func_copysignl_no_libm = yes; then printf "%s\n" "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h - fi - fi - fi - ;; - esac - ;; - esac - - if test $REPLACE_SIGNBIT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext" - - - + fi + fi + fi + fi + if test $REPLACE_SIGNBIT = 1; then + GL_COND_OBJ_SIGNBIT3_TRUE= + GL_COND_OBJ_SIGNBIT3_FALSE='#' +else + GL_COND_OBJ_SIGNBIT3_TRUE='#' + GL_COND_OBJ_SIGNBIT3_FALSE= +fi +: + if test -z "${GL_COND_OBJ_SIGNBIT3_TRUE}" && test -z "${GL_COND_OBJ_SIGNBIT3_FALSE}"; then + GL_COND_OBJ_SIGNBIT3_TRUE='#' + GL_COND_OBJ_SIGNBIT3_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext" - fi - GNULIB_SIGNBIT=1 + GL_GNULIB_SIGNBIT=1 @@ -24351,7 +28734,7 @@ then : printf %s "(cached) " >&6 else $as_nop - gl_cv_size_max= + gl_cv_size_max=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -24371,7 +28754,7 @@ then : fi rm -rf conftest* - if test -z "$gl_cv_size_max"; then + if test $gl_cv_size_max != yes; then if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h> #include <limits.h>" then : @@ -24491,8 +28874,8 @@ then : linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;; # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_stat_file_slash="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;; esac else $as_nop @@ -24545,16 +28928,21 @@ printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h ;; esac - if test $REPLACE_STAT = 1; then - - - - - - + if test $REPLACE_STAT = 1; then + GL_COND_OBJ_STAT_TRUE= + GL_COND_OBJ_STAT_FALSE='#' +else + GL_COND_OBJ_STAT_TRUE='#' + GL_COND_OBJ_STAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_STAT_TRUE}" && test -z "${GL_COND_OBJ_STAT_FALSE}"; then + GL_COND_OBJ_STAT_TRUE='#' + GL_COND_OBJ_STAT_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" + if test -z "$GL_COND_OBJ_STAT_TRUE"; then : case "$host_os" in mingw*) @@ -24572,15 +28960,21 @@ printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h esac + : - fi + +fi + + + + - GNULIB_STAT=1 + GL_GNULIB_STAT=1 @@ -24728,50 +29122,44 @@ fi printf "%s\n" "#define GNULIB_STATAT 1" >>confdefs.h - - - # 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 -n "$STDBOOL_H"; then - GL_GENERATE_STDBOOL_H_TRUE= - GL_GENERATE_STDBOOL_H_FALSE='#' -else - GL_GENERATE_STDBOOL_H_TRUE='#' - GL_GENERATE_STDBOOL_H_FALSE= -fi - - - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi - - - - - - STDDEF_H= - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5 -printf %s "checking for good max_align_t... " >&6; } -if test ${gl_cv_type_max_align_t+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5 +printf %s "checking for working stdalign.h... " >&6; } +if test ${gl_cv_header_working_stdalign_h+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <stddef.h> - unsigned int s = sizeof (max_align_t); - #if defined __GNUC__ || defined __IBM__ALIGNOF__ - int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1]; - int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1]; +#include <stdint.h> + #include <stdalign.h> + #include <stddef.h> + + /* Test that alignof yields a result consistent with offsetof. + This catches GCC bug 52023 + <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */ + #ifdef __cplusplus + template <class t> struct alignof_helper { char a; t b; }; + # define ao(type) offsetof (alignof_helper<type>, b) + #else + # define ao(type) offsetof (struct { char a; type b; }, b) + #endif + char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1]; + char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1]; + char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1]; + + /* Test _Alignas only on platforms where gnulib can help. */ + #if \ + ((defined __cplusplus && 201103 <= __cplusplus) \ + || (__TINYC__ && defined __attribute__) \ + || (defined __APPLE__ && defined __MACH__ \ + ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ + : __GNUC__) \ + || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ + || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \ + || 1300 <= _MSC_VER) + struct alignas_test { char c; char alignas (8) alignas_8; }; + char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 + ? 1 : -1]; #endif int @@ -24784,69 +29172,148 @@ main (void) _ACEOF if ac_fn_c_try_compile "$LINENO" then : - gl_cv_type_max_align_t=yes + gl_cv_header_working_stdalign_h=yes else $as_nop - gl_cv_type_max_align_t=no + gl_cv_header_working_stdalign_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5 +printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; } + + if test $gl_cv_header_working_stdalign_h = yes; then + GL_GENERATE_STDALIGN_H=false + else + GL_GENERATE_STDALIGN_H=true + fi + + + + + case "$GL_GENERATE_STDALIGN_H" in + false) STDALIGN_H='' ;; + true) + if test -z "$STDALIGN_H"; then + STDALIGN_H="${gl_source_base_prefix}stdalign.h" + fi + ;; + *) echo "*** GL_GENERATE_STDALIGN_H is not set correctly" 1>&2; exit 1 ;; + esac + + + if $GL_GENERATE_STDALIGN_H; then + GL_GENERATE_STDALIGN_H_TRUE= + GL_GENERATE_STDALIGN_H_FALSE='#' +else + GL_GENERATE_STDALIGN_H_TRUE='#' + GL_GENERATE_STDALIGN_H_FALSE= fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5 -printf "%s\n" "$gl_cv_type_max_align_t" >&6; } - if test $gl_cv_type_max_align_t = no; then - HAVE_MAX_ALIGN_T=0 - STDDEF_H=stddef.h +: + if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then + GL_GENERATE_STDALIGN_H_TRUE='#' + GL_GENERATE_STDALIGN_H_FALSE='#' fi - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h + + + + + + + + + + if test "$ac_cv_header_stdbool_h" = yes; then + case "$host_os" in + solaris*) + if test -z "$GCC"; then + GL_GENERATE_STDBOOL_H=true + else + GL_GENERATE_STDBOOL_H=false + fi + ;; + *) + GL_GENERATE_STDBOOL_H=false + ;; + esac + else + GL_GENERATE_STDBOOL_H=true fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 -printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; } -if test ${gl_cv_decl_null_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stddef.h> - int test[2 * (sizeof NULL == sizeof (void *)) -1]; + if test "$ac_cv_type__Bool" = yes; then + HAVE__BOOL=1 + else + HAVE__BOOL=0 + fi -int -main (void) -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_decl_null_works=yes -else $as_nop - gl_cv_decl_null_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + + + + case "$GL_GENERATE_STDBOOL_H" in + false) STDBOOL_H='' ;; + true) + if test -z "$STDBOOL_H"; then + STDBOOL_H="${gl_source_base_prefix}stdbool.h" + fi + ;; + *) echo "*** GL_GENERATE_STDBOOL_H is not set correctly" 1>&2; exit 1 ;; + esac + + + if $GL_GENERATE_STDBOOL_H; then + GL_GENERATE_STDBOOL_H_TRUE= + GL_GENERATE_STDBOOL_H_FALSE='#' +else + GL_GENERATE_STDBOOL_H_TRUE='#' + GL_GENERATE_STDBOOL_H_FALSE= fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 -printf "%s\n" "$gl_cv_decl_null_works" >&6; } - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h +: + if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then + GL_GENERATE_STDBOOL_H_TRUE='#' + GL_GENERATE_STDBOOL_H_FALSE='#' fi - if test -n "$STDDEF_H"; then + + + + + + + + + + + + + + + case "$GL_GENERATE_STDDEF_H" in + false) STDDEF_H='' ;; + true) + if test -z "$STDDEF_H"; then + STDDEF_H="${gl_source_base_prefix}stddef.h" + fi + ;; + *) echo "*** GL_GENERATE_STDDEF_H is not set correctly" 1>&2; exit 1 ;; + esac + + + if $GL_GENERATE_STDDEF_H; then GL_GENERATE_STDDEF_H_TRUE= GL_GENERATE_STDDEF_H_FALSE='#' else GL_GENERATE_STDDEF_H_TRUE='#' GL_GENERATE_STDDEF_H_FALSE= fi - - if test -n "$STDDEF_H"; then +: + if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then + GL_GENERATE_STDDEF_H_TRUE='#' + GL_GENERATE_STDDEF_H_FALSE='#' + fi @@ -24855,76 +29322,106 @@ fi - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stddef_h='<'stddef.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 -printf %s "checking absolute name of <stddef.h>... " >&6; } -if test ${gl_cv_next_stddef_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stddef.h> -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; + case "$GL_GENERATE_STDINT_H" in + false) STDINT_H='' ;; + true) + if test -z "$STDINT_H"; then + STDINT_H="${gl_source_base_prefix}stdint.h" + fi + ;; + *) echo "*** GL_GENERATE_STDINT_H is not set correctly" 1>&2; exit 1 ;; esac - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' + + if $GL_GENERATE_STDINT_H; then + GL_GENERATE_STDINT_H_TRUE= + GL_GENERATE_STDINT_H_FALSE='#' +else + GL_GENERATE_STDINT_H_TRUE='#' + GL_GENERATE_STDINT_H_FALSE= +fi +: + if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then + GL_GENERATE_STDINT_H_TRUE='#' + GL_GENERATE_STDINT_H_FALSE='#' + fi + + + + + + + + + + case "$GL_GENERATE_LIMITS_H" in + false) LIMITS_H='' ;; + true) + if test -z "$LIMITS_H"; then + LIMITS_H="${gl_source_base_prefix}limits.h" + fi ;; + *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;; esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'stddef.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_stddef_h - gl_cv_next_stddef_h='"'$gl_header'"' + if $GL_GENERATE_LIMITS_H; then + GL_GENERATE_LIMITS_H_TRUE= + GL_GENERATE_LIMITS_H_FALSE='#' +else + GL_GENERATE_LIMITS_H_TRUE='#' + GL_GENERATE_LIMITS_H_FALSE= +fi +: + if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then + GL_GENERATE_LIMITS_H_TRUE='#' + GL_GENERATE_LIMITS_H_FALSE='#' + fi + + + -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 -printf "%s\n" "$gl_cv_next_stddef_h" >&6; } - fi - NEXT_STDDEF_H=$gl_cv_next_stddef_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='<'stddef.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stddef_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive + + + + + if test $REPLACE_STDIO_READ_FUNCS = 1; then + GL_COND_OBJ_STDIO_READ_TRUE= + GL_COND_OBJ_STDIO_READ_FALSE='#' +else + GL_COND_OBJ_STDIO_READ_TRUE='#' + GL_COND_OBJ_STDIO_READ_FALSE= +fi +: + if test -z "${GL_COND_OBJ_STDIO_READ_TRUE}" && test -z "${GL_COND_OBJ_STDIO_READ_FALSE}"; then + GL_COND_OBJ_STDIO_READ_TRUE='#' + GL_COND_OBJ_STDIO_READ_FALSE='#' fi + if test $REPLACE_STDIO_WRITE_FUNCS = 1; then + GL_COND_OBJ_STDIO_WRITE_TRUE= + GL_COND_OBJ_STDIO_WRITE_FALSE='#' +else + GL_COND_OBJ_STDIO_WRITE_TRUE='#' + GL_COND_OBJ_STDIO_WRITE_FALSE= +fi +: + if test -z "${GL_COND_OBJ_STDIO_WRITE_TRUE}" && test -z "${GL_COND_OBJ_STDIO_WRITE_FALSE}"; then + GL_COND_OBJ_STDIO_WRITE_TRUE='#' + GL_COND_OBJ_STDIO_WRITE_FALSE='#' + fi - printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h @@ -24933,146 +29430,47 @@ printf "%s\n" "$gl_cv_next_stddef_h" >&6; } + GL_GNULIB_FSCANF=1 - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdio_h='<'stdio.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5 -printf %s "checking absolute name of <stdio.h>... " >&6; } -if test ${gl_cv_next_stdio_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdio.h> -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac +printf "%s\n" "#define GNULIB_TEST_FSCANF 1" >>confdefs.h - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'stdio.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_stdio_h - gl_cv_next_stdio_h='"'$gl_header'"' -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 -printf "%s\n" "$gl_cv_next_stdio_h" >&6; } - fi - NEXT_STDIO_H=$gl_cv_next_stdio_h +printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.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='<'stdio.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdio_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5 -printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; } -if test ${gl_cv_func_printf_attribute_flavor+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #define __STDC_FORMAT_MACROS 1 - #include <stdio.h> - #include <inttypes.h> - /* For non-mingw systems, compilation will trivially succeed. - For mingw, compilation will succeed for older mingw (system - printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ - #if (defined _WIN32 && ! defined __CYGWIN__) && \ - (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) - extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; - #endif -int -main (void) -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_func_printf_attribute_flavor=system -else $as_nop - gl_cv_func_printf_attribute_flavor=gnu -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5 -printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; } - if test "$gl_cv_func_printf_attribute_flavor" = gnu; then -printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h - fi + GL_GNULIB_SCANF=1 + - GNULIB_FSCANF=1 -printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h + +printf "%s\n" "#define GNULIB_TEST_SCANF 1" >>confdefs.h + - GNULIB_SCANF=1 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h - GNULIB_FGETC=1 - GNULIB_GETC=1 - GNULIB_GETCHAR=1 - GNULIB_FGETS=1 - GNULIB_FREAD=1 - GNULIB_FPRINTF=1 - GNULIB_PRINTF=1 - GNULIB_VFPRINTF=1 - GNULIB_VPRINTF=1 - GNULIB_FPUTC=1 - GNULIB_PUTC=1 - GNULIB_PUTCHAR=1 - GNULIB_FPUTS=1 - GNULIB_PUTS=1 - GNULIB_FWRITE=1 @@ -25080,76 +29478,280 @@ printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h + GL_GNULIB_FGETC=1 +printf "%s\n" "#define GNULIB_TEST_FGETC 1" >>confdefs.h - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdlib_h='<'stdlib.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5 -printf %s "checking absolute name of <stdlib.h>... " >&6; } -if test ${gl_cv_next_stdlib_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'stdlib.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_stdlib_h - gl_cv_next_stdlib_h='"'$gl_header'"' + + GL_GNULIB_GETC=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_GETC 1" >>confdefs.h + + + + + + + + + + + + + GL_GNULIB_GETCHAR=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h + + + + + + + + + + + + + GL_GNULIB_FGETS=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_FGETS 1" >>confdefs.h + + + + + + + + + + + + + GL_GNULIB_FREAD=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_FREAD 1" >>confdefs.h + + + + + + + + + + + + + GL_GNULIB_FPRINTF=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h + + + + + + + + + + + + + GL_GNULIB_PRINTF=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_PRINTF 1" >>confdefs.h + + + + + + + + + + + + + GL_GNULIB_VFPRINTF=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h + + + + + + + + + + + + + GL_GNULIB_VPRINTF=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h + + + + + + + + + + + + + GL_GNULIB_FPUTC=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_FPUTC 1" >>confdefs.h + + + + + + + + + + + + + GL_GNULIB_PUTC=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_PUTC 1" >>confdefs.h + + + + + + + + + + + + + GL_GNULIB_PUTCHAR=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h + + + + + + + + + + + + + GL_GNULIB_FPUTS=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_FPUTS 1" >>confdefs.h + + + + + + + + + + + + + GL_GNULIB_PUTS=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_PUTS 1" >>confdefs.h -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 -printf "%s\n" "$gl_cv_next_stdlib_h" >&6; } - fi - NEXT_STDLIB_H=$gl_cv_next_stdlib_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='<'stdlib.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdlib_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive + + + + + + + + + + GL_GNULIB_FWRITE=1 + + + + + +printf "%s\n" "#define GNULIB_TEST_FWRITE 1" >>confdefs.h + @@ -25201,36 +29803,48 @@ printf "%s\n" "#define HAVE_DECL_STRNCASECMP $ac_have_decl" >>confdefs.h fi - if test $HAVE_STRCASECMP = 0; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext" - - - : + if test $HAVE_STRCASECMP = 0; then + GL_COND_OBJ_STRCASECMP_TRUE= + GL_COND_OBJ_STRCASECMP_FALSE='#' +else + GL_COND_OBJ_STRCASECMP_TRUE='#' + GL_COND_OBJ_STRCASECMP_FALSE= +fi +: + if test -z "${GL_COND_OBJ_STRCASECMP_TRUE}" && test -z "${GL_COND_OBJ_STRCASECMP_FALSE}"; then + GL_COND_OBJ_STRCASECMP_TRUE='#' + GL_COND_OBJ_STRCASECMP_FALSE='#' fi - if test $HAVE_STRNCASECMP = 0; then - + if test -z "$GL_COND_OBJ_STRCASECMP_TRUE"; then : + : +fi + if test $HAVE_STRNCASECMP = 0; then + GL_COND_OBJ_STRNCASECMP_TRUE= + GL_COND_OBJ_STRNCASECMP_FALSE='#' +else + GL_COND_OBJ_STRNCASECMP_TRUE='#' + GL_COND_OBJ_STRNCASECMP_FALSE= +fi +: + if test -z "${GL_COND_OBJ_STRNCASECMP_TRUE}" && test -z "${GL_COND_OBJ_STRNCASECMP_FALSE}"; then + GL_COND_OBJ_STRNCASECMP_TRUE='#' + GL_COND_OBJ_STRNCASECMP_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext" + if test -z "$GL_COND_OBJ_STRNCASECMP_TRUE"; then : : - fi + +fi @@ -25247,7 +29861,7 @@ fi if test $ac_cv_func_strcasestr = no; then HAVE_STRCASESTR=0 else - if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then + if test $REPLACE_MEMCHR = 1; then REPLACE_STRCASESTR=1 else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5 @@ -25261,6 +29875,7 @@ then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include <string.h> /* for __GNU_LIBRARY__ */ #ifdef __GNU_LIBRARY__ #include <features.h> #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ @@ -25282,7 +29897,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | then : gl_cv_func_strcasestr_works_always="guessing yes" else $as_nop - gl_cv_func_strcasestr_works_always="guessing no" + gl_cv_func_strcasestr_works_always="$gl_cross_guess_normal" fi rm -rf conftest* @@ -25291,7 +29906,7 @@ else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <string.h> /* for strcasestr */ +#include <string.h> /* for __GNU_LIBRARY__, strcasestr */ #ifdef __GNU_LIBRARY__ #include <features.h> #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28 @@ -25354,49 +29969,70 @@ printf "%s\n" "$gl_cv_func_strcasestr_works_always" >&6; } - GNULIB_STRCASESTR=1 -printf "%s\n" "#define GNULIB_TEST_STRCASESTR 1" >>confdefs.h + GL_GNULIB_STRCASESTR=1 - if test $ac_cv_func_strdup = yes; then - if test $gl_cv_func_malloc_posix != yes; then - REPLACE_STRDUP=1 - fi + + +printf "%s\n" "#define GNULIB_TEST_STRCASESTR 1" >>confdefs.h + + + + + + + if test $gl_cv_func_malloc_posix != yes; then + REPLACE_STRDUP=1 fi if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi - if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then + if test $REPLACE_STRDUP = 1; then + GL_COND_OBJ_STRDUP_TRUE= + GL_COND_OBJ_STRDUP_FALSE='#' +else + GL_COND_OBJ_STRDUP_TRUE='#' + GL_COND_OBJ_STRDUP_FALSE= +fi +: + if test -z "${GL_COND_OBJ_STRDUP_TRUE}" && test -z "${GL_COND_OBJ_STRDUP_FALSE}"; then + GL_COND_OBJ_STRDUP_TRUE='#' + GL_COND_OBJ_STRDUP_FALSE='#' + fi + + if test -z "$GL_COND_OBJ_STRDUP_TRUE"; then : + + : +fi - gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" - : - fi - GNULIB_STRDUP=1 + + + GL_GNULIB_STRDUP=1 @@ -25411,7 +30047,7 @@ printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h - if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5 printf %s "checking for working strerror function... " >&6; } if test ${gl_cv_func_working_strerror+y} @@ -25423,8 +30059,10 @@ then : case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_working_strerror="guessing no" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_working_strerror="guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;; esac else $as_nop @@ -25465,21 +30103,26 @@ printf "%s\n" "$gl_cv_func_working_strerror" >&6; } REPLACE_STRERROR=1 fi - if test $REPLACE_STRERROR = 1; then - - - - + if test $REPLACE_STRERROR = 1; then + GL_COND_OBJ_STRERROR_TRUE= + GL_COND_OBJ_STRERROR_FALSE='#' +else + GL_COND_OBJ_STRERROR_TRUE='#' + GL_COND_OBJ_STRERROR_FALSE= +fi +: + if test -z "${GL_COND_OBJ_STRERROR_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_FALSE}"; then + GL_COND_OBJ_STRERROR_TRUE='#' + GL_COND_OBJ_STRERROR_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext" +printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h - fi -printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h @@ -25487,28 +30130,39 @@ printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h - GNULIB_STRERROR=1 -printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h + GL_GNULIB_STRERROR=1 - if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then +printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h + if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then + GL_COND_OBJ_STRERROR_OVERRIDE_TRUE= + GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#' +else + GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#' + GL_COND_OBJ_STRERROR_OVERRIDE_FALSE= +fi +: + if test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_FALSE}"; then + GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#' + GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext" + if test -z "$GL_COND_OBJ_STRERROR_OVERRIDE_TRUE"; then : @@ -25532,7 +30186,9 @@ fi fi - fi + +fi + @@ -25540,7 +30196,6 @@ fi - if test $REPLACE_STRNCAT = 1; then @@ -25549,18 +30204,46 @@ fi - gl_LIBOBJS="$gl_LIBOBJS strncat.$ac_objext" - : + + + if test $REPLACE_STRNCAT = 1; then + GL_COND_OBJ_STRNCAT_TRUE= + GL_COND_OBJ_STRNCAT_FALSE='#' +else + GL_COND_OBJ_STRNCAT_TRUE='#' + GL_COND_OBJ_STRNCAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_STRNCAT_TRUE}" && test -z "${GL_COND_OBJ_STRNCAT_FALSE}"; then + GL_COND_OBJ_STRNCAT_TRUE='#' + GL_COND_OBJ_STRNCAT_FALSE='#' fi + if test -z "$GL_COND_OBJ_STRNCAT_TRUE"; then : + + + : + + +fi + + + - GNULIB_STRNCAT=1 + + + + + + + + GL_GNULIB_STRNCAT=1 @@ -25589,8 +30272,8 @@ then : linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;; # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_symlink_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_symlink_works="$gl_cross_guess_normal" ;; esac else $as_nop @@ -25636,24 +30319,30 @@ printf "%s\n" "$gl_cv_func_symlink_works" >&6; } esac fi - if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then - - + if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then + GL_COND_OBJ_SYMLINK_TRUE= + GL_COND_OBJ_SYMLINK_FALSE='#' +else + GL_COND_OBJ_SYMLINK_TRUE='#' + GL_COND_OBJ_SYMLINK_FALSE= +fi +: + if test -z "${GL_COND_OBJ_SYMLINK_TRUE}" && test -z "${GL_COND_OBJ_SYMLINK_FALSE}"; then + GL_COND_OBJ_SYMLINK_TRUE='#' + GL_COND_OBJ_SYMLINK_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" - fi - - GNULIB_SYMLINK=1 + GL_GNULIB_SYMLINK=1 @@ -25684,8 +30373,8 @@ then : linux-* | linux) gl_cv_func_symlinkat_works="guessing yes" ;; # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_symlinkat_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_symlinkat_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_symlinkat_works="$gl_cross_guess_normal" ;; esac else $as_nop @@ -25732,113 +30421,36 @@ printf "%s\n" "$gl_cv_func_symlinkat_works" >&6; } esac fi - if test $HAVE_SYMLINKAT = 0 || test $REPLACE_SYMLINKAT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS symlinkat.$ac_objext" + if test $HAVE_SYMLINKAT = 0 || test $REPLACE_SYMLINKAT = 1; then + GL_COND_OBJ_SYMLINKAT_TRUE= + GL_COND_OBJ_SYMLINKAT_FALSE='#' +else + GL_COND_OBJ_SYMLINKAT_TRUE='#' + GL_COND_OBJ_SYMLINKAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_SYMLINKAT_TRUE}" && test -z "${GL_COND_OBJ_SYMLINKAT_FALSE}"; then + GL_COND_OBJ_SYMLINKAT_TRUE='#' + GL_COND_OBJ_SYMLINKAT_FALSE='#' fi - GNULIB_SYMLINKAT=1 - - - - - -printf "%s\n" "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h - - - - - - - - - - + GL_GNULIB_SYMLINKAT=1 - if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_stat_h='<'sys/stat.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 -printf %s "checking absolute name of <sys/stat.h>... " >&6; } -if test ${gl_cv_next_sys_stat_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - if test $ac_cv_header_sys_stat_h = yes; then - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/stat.h> -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'sys/stat.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - - gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - - gl_header=$gl_cv_absolute_sys_stat_h - gl_cv_next_sys_stat_h='"'$gl_header'"' - else - gl_cv_next_sys_stat_h='<'sys/stat.h'>' - fi - - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 -printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; } - fi - NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_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='<'sys/stat.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_stat_h - fi - NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive +printf "%s\n" "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h @@ -25847,7 +30459,6 @@ printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; } - WINDOWS_STAT_TIMESPEC=0 @@ -25856,18 +30467,6 @@ printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; } - ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> - #include <sys/stat.h> -" -if test "x$ac_cv_type_nlink_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define nlink_t int" >>confdefs.h - -fi - @@ -25896,96 +30495,6 @@ fi - if test $gl_cv_have_include_next = yes; then - gl_cv_next_unistd_h='<'unistd.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 -printf %s "checking absolute name of <unistd.h>... " >&6; } -if test ${gl_cv_next_unistd_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - if test $ac_cv_header_unistd_h = yes; then - - - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <unistd.h> -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'unistd.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - - gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - - gl_header=$gl_cv_absolute_unistd_h - gl_cv_next_unistd_h='"'$gl_header'"' - else - gl_cv_next_unistd_h='<'unistd.h'>' - fi - - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 -printf "%s\n" "$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 - - - - - - - - - - - - - - - @@ -26009,8 +30518,8 @@ then : *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;; # Guess no on native Windows. mingw*) gl_cv_func_unlink_honors_slashes="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_unlink_honors_slashes="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_unlink_honors_slashes="$gl_cross_guess_normal" ;; esac else $as_nop @@ -26023,6 +30532,9 @@ else $as_nop #endif #include <errno.h> + +$gl_mda_defines + int main (void) { @@ -26091,8 +30603,8 @@ else $as_nop export GL_SUBDIR_FOR_UNLINK if test "$cross_compiling" = yes then : - # If we don't know, assume the worst. - gl_cv_func_unlink_parent_fails="guessing no" + # If we don't know, obey --enable-cross-guesses. + gl_cv_func_unlink_parent_fails="$gl_cross_guess_normal" else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -26105,6 +30617,10 @@ else $as_nop # include <direct.h> # include <io.h> #endif + + +$gl_mda_defines + int main () { int result = 0; @@ -26149,24 +30665,30 @@ printf "%s\n" "#define UNLINK_PARENT_BUG 1" >>confdefs.h ;; esac - if test $REPLACE_UNLINK = 1; then - - - + if test $REPLACE_UNLINK = 1; then + GL_COND_OBJ_UNLINK_TRUE= + GL_COND_OBJ_UNLINK_FALSE='#' +else + GL_COND_OBJ_UNLINK_TRUE='#' + GL_COND_OBJ_UNLINK_FALSE= +fi +: + if test -z "${GL_COND_OBJ_UNLINK_TRUE}" && test -z "${GL_COND_OBJ_UNLINK_FALSE}"; then + GL_COND_OBJ_UNLINK_TRUE='#' + GL_COND_OBJ_UNLINK_FALSE='#' + fi - gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext" - fi - GNULIB_UNLINK=1 + GL_GNULIB_UNLINK=1 @@ -26201,189 +30723,170 @@ printf "%s\n" "#define GNULIB_TEST_UNLINK 1" >>confdefs.h esac fi - if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" + if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then + GL_COND_OBJ_UNLINKAT_TRUE= + GL_COND_OBJ_UNLINKAT_FALSE='#' +else + GL_COND_OBJ_UNLINKAT_TRUE='#' + GL_COND_OBJ_UNLINKAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_UNLINKAT_TRUE}" && test -z "${GL_COND_OBJ_UNLINKAT_FALSE}"; then + GL_COND_OBJ_UNLINKAT_TRUE='#' + GL_COND_OBJ_UNLINKAT_FALSE='#' fi - GNULIB_UNLINKAT=1 - - - - - -printf "%s\n" "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h - - - - - - - - if test $ac_cv_func_utime = no; then - HAVE_UTIME=0 - else - case "$host_os" in - mingw*) - REPLACE_UTIME=1 - ;; - esac - fi - - if test $HAVE_UTIME = 0 || test $REPLACE_UTIME = 1; then - - + GL_GNULIB_UNLINKAT=1 - gl_LIBOBJS="$gl_LIBOBJS utime.$ac_objext" - : - fi +printf "%s\n" "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h - GNULIB_UTIME=1 -printf "%s\n" "#define GNULIB_TEST_UTIME 1" >>confdefs.h + case "$host_os" in + mingw*) + REPLACE_UTIME=1 + ;; + *) + ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime" +if test "x$ac_cv_func_utime" = xyes +then : + printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h +fi + if test $ac_cv_func_utime = no; then + HAVE_UTIME=0 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether utime handles trailing slashes on files" >&5 +printf %s "checking whether utime handles trailing slashes on files... " >&6; } +if test ${gl_cv_func_utime_file_slash+y} +then : + printf %s "(cached) " >&6 +else $as_nop + touch conftest.tmp + # 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 : + case "$host_os" in + # Guess yes on Linux systems. + linux-* | linux) gl_cv_func_utime_file_slash="guessing yes" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_utime_file_slash="guessing yes" ;; + # Guess no on macOS. + darwin*) gl_cv_func_utime_file_slash="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_utime_file_slash="$gl_cross_guess_normal" ;; + esac +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stddef.h> + #include <utime.h> +int +main (void) +{ +int result = 0; + if (!utime ("conftest.tmp/", NULL)) + result |= 1; + #if HAVE_LSTAT + if (!utime ("conftest.lnk/", NULL)) + result |= 2; + #endif + return result; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO" +then : + gl_cv_func_utime_file_slash=yes +else $as_nop + gl_cv_func_utime_file_slash=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm -f conftest.tmp conftest.lnk +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utime_file_slash" >&5 +printf "%s\n" "$gl_cv_func_utime_file_slash" >&6; } + case $gl_cv_func_stat_file_slash in + *no) + REPLACE_UTIME=1 +printf "%s\n" "#define REPLACE_FUNC_UTIME_FILE 1" >>confdefs.h + ;; + esac + fi + ;; + esac + if test $HAVE_UTIME = 0 || test $REPLACE_UTIME = 1; then + GL_COND_OBJ_UTIME_TRUE= + GL_COND_OBJ_UTIME_FALSE='#' +else + GL_COND_OBJ_UTIME_TRUE='#' + GL_COND_OBJ_UTIME_FALSE= +fi +: + if test -z "${GL_COND_OBJ_UTIME_TRUE}" && test -z "${GL_COND_OBJ_UTIME_FALSE}"; then + GL_COND_OBJ_UTIME_TRUE='#' + GL_COND_OBJ_UTIME_FALSE='#' + fi + if test -z "$GL_COND_OBJ_UTIME_TRUE"; then : + : +fi - if test $gl_cv_have_include_next = yes; then - gl_cv_next_utime_h='<'utime.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <utime.h>" >&5 -printf %s "checking absolute name of <utime.h>... " >&6; } -if test ${gl_cv_next_utime_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test $ac_cv_header_utime_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <utime.h> -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'utime.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' + GL_GNULIB_UTIME=1 - gl_cv_absolute_utime_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - gl_header=$gl_cv_absolute_utime_h - gl_cv_next_utime_h='"'$gl_header'"' - else - gl_cv_next_utime_h='<'utime.h'>' - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_utime_h" >&5 -printf "%s\n" "$gl_cv_next_utime_h" >&6; } - fi - NEXT_UTIME_H=$gl_cv_next_utime_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='<'utime.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_utime_h - fi - NEXT_AS_FIRST_DIRECTIVE_UTIME_H=$gl_next_as_first_directive - - - - - - if test $ac_cv_header_utime_h = yes; then - HAVE_UTIME_H=1 - else - HAVE_UTIME_H=0 - fi +printf "%s\n" "#define GNULIB_TEST_UTIME 1" >>confdefs.h - UTIME_H='' - if false; then - UTIME_H=utime.h - else - if test $ac_cv_header_utime_h != yes; then - UTIME_H=utime.h - else - case "$host_os" in - mingw*) UTIME_H=utime.h - ;; - esac - fi - fi - if test -n "$UTIME_H"; then - GL_GENERATE_UTIME_H_TRUE= - GL_GENERATE_UTIME_H_FALSE='#' -else - GL_GENERATE_UTIME_H_TRUE='#' - GL_GENERATE_UTIME_H_FALSE= -fi @@ -26410,8 +30913,8 @@ then : linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;; # Guess yes on glibc systems. *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_futimesat_works="guessing no" ;; + # If we don't know, obey --enable-cross-guesses. + *) gl_cv_func_futimesat_works="$gl_cross_guess_normal" ;; esac else $as_nop @@ -26422,10 +30925,13 @@ else $as_nop #include <sys/times.h> #include <fcntl.h> + +$gl_mda_defines + int main (void) { - int fd = open ("conftest.file", O_RDWR); +int fd = open ("conftest.file", O_RDWR); if (fd < 0) return 1; if (futimesat (fd, NULL, NULL)) return 2; @@ -26472,7 +30978,18 @@ then : else $as_nop if test "$cross_compiling" = yes then : - gl_cv_func_utimensat_works="guessing yes" + case "$host_os" in + # Guess yes on Linux or glibc systems. + linux-* | linux | *-gnu* | gnu*) + gl_cv_func_utimensat_works="guessing yes" ;; + # Guess 'nearly' on AIX. + aix*) + gl_cv_func_utimensat_works="guessing nearly" ;; + # If we don't know, obey --enable-cross-guesses. + *) + gl_cv_func_utimensat_works="$gl_cross_guess_normal" ;; + esac + else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -26481,6 +30998,9 @@ else $as_nop #include <sys/stat.h> #include <unistd.h> + +$gl_mda_defines + int main (void) { @@ -26488,10 +31008,19 @@ int result = 0; const char *f = "conftest.file"; if (close (creat (f, 0600))) return 1; + /* Test whether a trailing slash is handled correctly. + This fails on AIX 7.2. */ + { + struct timespec ts[2]; + ts[0].tv_sec = 345183300; ts[0].tv_nsec = 0; + ts[1] = ts[0]; + if (utimensat (AT_FDCWD, "conftest.file/", ts, 0) == 0) + result |= 2; + } /* Test whether the AT_SYMLINK_NOFOLLOW flag is supported. */ { if (utimensat (AT_FDCWD, f, NULL, AT_SYMLINK_NOFOLLOW)) - result |= 2; + result |= 4; } /* Test whether UTIME_NOW and UTIME_OMIT work. */ { @@ -26501,7 +31030,7 @@ int result = 0; ts[1].tv_sec = 1; ts[1].tv_nsec = UTIME_NOW; if (utimensat (AT_FDCWD, f, ts, 0)) - result |= 4; + result |= 8; } sleep (1); { @@ -26512,11 +31041,11 @@ int result = 0; ts[1].tv_sec = 1; ts[1].tv_nsec = UTIME_OMIT; if (utimensat (AT_FDCWD, f, ts, 0)) - result |= 8; - if (stat (f, &st)) result |= 16; - else if (st.st_ctime < st.st_atime) + if (stat (f, &st)) result |= 32; + else if (st.st_ctime < st.st_atime) + result |= 64; } return result; @@ -26528,21 +31057,48 @@ if ac_fn_c_try_run "$LINENO" then : gl_cv_func_utimensat_works=yes else $as_nop - gl_cv_func_utimensat_works=no + case $? in + 2) gl_cv_func_utimensat_works='nearly' ;; + *) gl_cv_func_utimensat_works=no ;; + esac + fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utimensat_works" >&5 printf "%s\n" "$gl_cv_func_utimensat_works" >&6; } - if test "$gl_cv_func_utimensat_works" = no; then - REPLACE_UTIMENSAT=1 - fi + case "$gl_cv_func_utimensat_works" in + *yes) + ;; + *nearly) + +printf "%s\n" "#define HAVE_NEARLY_WORKING_UTIMENSAT 1" >>confdefs.h + + REPLACE_UTIMENSAT=1 + ;; + *) + REPLACE_UTIMENSAT=1 + ;; + esac fi - if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then + + if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then + GL_COND_OBJ_UTIMENSAT_TRUE= + GL_COND_OBJ_UTIMENSAT_FALSE='#' +else + GL_COND_OBJ_UTIMENSAT_TRUE='#' + GL_COND_OBJ_UTIMENSAT_FALSE= +fi +: + if test -z "${GL_COND_OBJ_UTIMENSAT_TRUE}" && test -z "${GL_COND_OBJ_UTIMENSAT_FALSE}"; then + GL_COND_OBJ_UTIMENSAT_TRUE='#' + GL_COND_OBJ_UTIMENSAT_FALSE='#' + fi @@ -26551,22 +31107,99 @@ printf "%s\n" "$gl_cv_func_utimensat_works" >&6; } - gl_LIBOBJS="$gl_LIBOBJS utimensat.$ac_objext" - fi + GL_GNULIB_UTIMENSAT=1 - GNULIB_UTIMENSAT=1 +printf "%s\n" "#define GNULIB_TEST_UTIMENSAT 1" >>confdefs.h -printf "%s\n" "#define GNULIB_TEST_UTIMENSAT 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5 +printf %s "checking for variable-length arrays... " >&6; } +if test ${ac_cv_c_vararrays+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC_NO_VLA__ + defined + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "defined" >/dev/null 2>&1 +then : + ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined' +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Test for VLA support. This test is partly inspired + from examples in the C standard. Use at least two VLA + functions to detect the GCC 3.4.3 bug described in: + https://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html + */ + #ifdef __STDC_NO_VLA__ + syntax error; + #else + extern int n; + int B[100]; + int fvla (int m, int C[m][m]); + + int + simple (int count, int all[static count]) + { + return all[count - 1]; + } + + int + fvla (int m, int C[m][m]) + { + typedef int VLA[m][m]; + VLA x; + int D[m]; + static int (*q)[m] = &B; + int (*s)[n] = q; + return C && &x[0][0] == &D[0] && &D[0] == s[0]; + } + #endif + +int +main (void) +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_c_vararrays=yes +else $as_nop + ac_cv_c_vararrays=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -rf conftest* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5 +printf "%s\n" "$ac_cv_c_vararrays" >&6; } + if test "$ac_cv_c_vararrays" = yes; then + +printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h + + elif test "$ac_cv_c_vararrays" = no; then + +printf "%s\n" "#define __STDC_NO_VLA__ 1" >>confdefs.h + + fi @@ -26628,8 +31261,6 @@ printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h - - ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" if test "x$ac_cv_type_ptrdiff_t" = xyes then : @@ -26700,7 +31331,11 @@ fi - GNULIB_VASPRINTF=1 + + + + + GL_GNULIB_VASPRINTF=1 @@ -27004,8 +31639,6 @@ printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h - - ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" if test "x$ac_cv_type_ptrdiff_t" = xyes then : @@ -27072,100 +31705,17 @@ fi - if test $gl_cv_have_include_next = yes; then - gl_cv_next_wchar_h='<'wchar.h'>' - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5 -printf %s "checking absolute name of <wchar.h>... " >&6; } -if test ${gl_cv_next_wchar_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - if test $ac_cv_header_wchar_h = yes; then - - - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <wchar.h> -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'wchar.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - - gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - - gl_header=$gl_cv_absolute_wchar_h - gl_cv_next_wchar_h='"'$gl_header'"' - else - gl_cv_next_wchar_h='<'wchar.h'>' - fi - - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 -printf "%s\n" "$gl_cv_next_wchar_h" >&6; } - fi - NEXT_WCHAR_H=$gl_cv_next_wchar_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='<'wchar.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_wchar_h - fi - NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive - - - - - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi - - - - - - if test $gt_cv_c_wint_t = yes; then - HAVE_WINT_T=1 - else - HAVE_WINT_T=0 - fi + : +printf "%s\n" "#define GNULIB_XALLOC 1" >>confdefs.h +printf "%s\n" "#define GNULIB_XALLOC_DIE 1" >>confdefs.h - : ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" @@ -27186,6 +31736,8 @@ fi + + gltests_libdeps= gltests_ltlibdeps= @@ -27197,7 +31749,11 @@ fi + + + gl_source_base='tests' + gl_source_base_prefix= 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 @@ -27210,6 +31766,9 @@ fi + + + LIBGNU_LIBDEPS="$gl_libdeps" LIBGNU_LTLIBDEPS="$gl_ltlibdeps" @@ -37001,75 +41560,61 @@ if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GL_GENERATE_UTIME_H_TRUE}" && test -z "${GL_GENERATE_UTIME_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_UTIME_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi gl_libobjs= gl_ltlibobjs= + gl_libobjdeps= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' + sed_dirname1='s,//*,/,g' + sed_dirname2='s,\(.\)/$,\1,' + sed_dirname3='s,^[^/]*$,.,' + sed_dirname4='s,\(.\)/[^/]*$,\1,' + sed_basename1='s,.*/,,' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" + i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"` + i_base=`echo "$i" | sed -e "$sed_basename1"` + gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po" done fi gl_LIBOBJS=$gl_libobjs gl_LTLIBOBJS=$gl_ltlibobjs + gl_LIBOBJDEPS=$gl_libobjdeps + gltests_libobjs= gltests_ltlibobjs= + gltests_libobjdeps= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' + sed_dirname1='s,//*,/,g' + sed_dirname2='s,\(.\)/$,\1,' + sed_dirname3='s,^[^/]*$,.,' + sed_dirname4='s,\(.\)/[^/]*$,\1,' + sed_basename1='s,.*/,,' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" + i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"` + i_base=`echo "$i" | sed -e "$sed_basename1"` + gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po" done fi gltests_LIBOBJS=$gltests_libobjs gltests_LTLIBOBJS=$gltests_ltlibobjs + gltests_LIBOBJDEPS=$gltests_libobjdeps + if test -z "${QMANIFEST_ENABLED_TRUE}" && test -z "${QMANIFEST_ENABLED_FALSE}"; then as_fn_error $? "conditional \"QMANIFEST_ENABLED\" was never defined. |