diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-03-24 08:37:35 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-03-24 08:38:35 +0100 |
commit | 03b3dac9d247bcf607e52c5cbbf8609de21a453b (patch) | |
tree | c259dfd6dead8a3f51062fb68b3c03ff02774b6c /gl/m4 | |
parent | eac44b665c0924fa950195a2b6d890638b41fc7d (diff) | |
download | gnutls-03b3dac9d247bcf607e52c5cbbf8609de21a453b.tar.gz |
gnulib: removed u64 module
Diffstat (limited to 'gl/m4')
-rw-r--r-- | gl/m4/gnulib-cache.m4 | 3 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 5 | ||||
-rw-r--r-- | gl/m4/ld-version-script.m4 | 45 | ||||
-rw-r--r-- | gl/m4/printf.m4 | 47 | ||||
-rw-r--r-- | gl/m4/stdio_h.m4 | 20 | ||||
-rw-r--r-- | gl/m4/time_h.m4 | 19 | ||||
-rw-r--r-- | gl/m4/ungetc.m4 | 5 |
7 files changed, 76 insertions, 68 deletions
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 index fc55eab134..2d41057ac8 100644 --- a/gl/m4/gnulib-cache.m4 +++ b/gl/m4/gnulib-cache.m4 @@ -27,7 +27,7 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files alloca base64 byteswap c-ctype extensions func gendocs getline gettext gettimeofday hash-pjw-bare havelib iconv intprops lib-msvc-compat lib-symbol-versions maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html read-file snprintf stdint strcase strndup strtok_r strverscmp sys_socket sys_stat time_r u64 unistd valgrind-tests vasprintf vsnprintf warnings +# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files alloca base64 byteswap c-ctype extensions func gendocs getline gettext gettimeofday hash-pjw-bare havelib iconv intprops lib-msvc-compat lib-symbol-versions maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html read-file snprintf stdint strcase strndup strtok_r strverscmp sys_socket sys_stat time_r unistd valgrind-tests vasprintf vsnprintf warnings # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([gl/override]) @@ -65,7 +65,6 @@ gl_MODULES([ sys_socket sys_stat time_r - u64 unistd valgrind-tests vasprintf diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index 893041c095..263bce28b5 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -168,8 +168,6 @@ AC_DEFUN([gl_EARLY], # Code from module time: # Code from module time-tests: # Code from module time_r: - # Code from module u64: - # Code from module u64-tests: # Code from module unistd: # Code from module unistd-tests: # Code from module useless-if-before-free: @@ -644,8 +642,6 @@ AC_DEFUN([gl_FILE_LIST], [ lib/sys_uio.in.h lib/time.in.h lib/time_r.c - lib/u64.c - lib/u64.h lib/unistd.c lib/unistd.in.h lib/vasnprintf.c @@ -824,7 +820,6 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-sys_uio.c tests/test-sys_wait.h tests/test-time.c - tests/test-u64.c tests/test-unistd.c tests/test-vasnprintf.c tests/test-vasprintf.c diff --git a/gl/m4/ld-version-script.m4 b/gl/m4/ld-version-script.m4 index f6fe6b88e0..211d67b963 100644 --- a/gl/m4/ld-version-script.m4 +++ b/gl/m4/ld-version-script.m4 @@ -1,4 +1,4 @@ -# ld-version-script.m4 serial 3 +# ld-version-script.m4 serial 4 dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -18,20 +18,18 @@ dnl From Simon Josefsson AC_DEFUN([gl_LD_VERSION_SCRIPT], [ AC_ARG_ENABLE([ld-version-script], - AS_HELP_STRING([--enable-ld-version-script], - [enable linker version script (default is enabled when possible)]), - [have_ld_version_script=$enableval], []) - if test -z "$have_ld_version_script"; then - AC_MSG_CHECKING([if LD -Wl,--version-script works]) - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" - cat > conftest.map <<EOF -foo -EOF - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [accepts_syntax_errors=yes], [accepts_syntax_errors=no]) - if test "$accepts_syntax_errors" = no; then - cat > conftest.map <<EOF + [AS_HELP_STRING([--enable-ld-version-script], + [enable linker version script (default is enabled when possible)])], + [have_ld_version_script=$enableval], + [AC_CACHE_CHECK([if LD -Wl,--version-script works], + [gl_cv_sys_ld_version_script], + [gl_cv_sys_ld_version_script=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" + echo foo >conftest.map + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], + [], + [cat > conftest.map <<EOF VERS_1 { global: sym; }; @@ -40,14 +38,11 @@ VERS_2 { global: sym; } VERS_1; EOF - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [have_ld_version_script=yes], [have_ld_version_script=no]) - else - have_ld_version_script=no - fi - rm -f conftest.map - LDFLAGS="$save_LDFLAGS" - AC_MSG_RESULT($have_ld_version_script) - fi - AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], + [gl_cv_sys_ld_version_script=yes])]) + rm -f conftest.map + LDFLAGS=$save_LDFLAGS]) + have_ld_version_script=$gl_cv_sys_ld_version_script]) + AM_CONDITIONAL([HAVE_LD_VERSION_SCRIPT], + [test "$have_ld_version_script" = yes]) ]) diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4 index ffbb235c6a..d06746aae7 100644 --- a/gl/m4/printf.m4 +++ b/gl/m4/printf.m4 @@ -1,4 +1,4 @@ -# printf.m4 serial 51 +# printf.m4 serial 52 dnl Copyright (C) 2003, 2007-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -365,66 +365,51 @@ int main () { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Lf", x.value) <= 0) result |= 4; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Le", x.value) <= 0) result |= 4; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Lg", x.value) <= 0) result |= 4; } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Lf", x.value) <= 0) result |= 8; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Le", x.value) <= 0) result |= 8; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Lg", x.value) <= 0) result |= 8; } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Lf", x.value) <= 0) result |= 16; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Le", x.value) <= 0) result |= 16; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Lg", x.value) <= 0) result |= 16; } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Lf", x.value) <= 0) result |= 32; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Le", x.value) <= 0) result |= 32; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Lg", x.value) <= 0) result |= 32; } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Lf", x.value) <= 0) result |= 64; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Le", x.value) <= 0) result |= 64; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) + if (sprintf (buf, "%Lg", x.value) <= 0) result |= 64; } #endif diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4 index 42173387af..e0c4bde1f8 100644 --- a/gl/m4/stdio_h.m4 +++ b/gl/m4/stdio_h.m4 @@ -1,4 +1,4 @@ -# stdio_h.m4 serial 43 +# stdio_h.m4 serial 44 dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -12,6 +12,24 @@ AC_DEFUN([gl_STDIO_H], AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_NEXT_HEADERS([stdio.h]) + dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and + dnl inttypes.h behave like gnu instead of system; we must give our + dnl printf wrapper the right attribute to match. + AC_CACHE_CHECK([whether inttypes macros match system or gnu printf], + [gl_cv_func_printf_attribute_flavor], + [AC_EGREP_CPP([findme .(ll|j)d. findme], + [#define __STDC_FORMAT_MACROS 1 + #include <stdio.h> + #include <inttypes.h> + findme PRIdMAX findme + ], [gl_cv_func_printf_attribute_flavor=gnu], + [gl_cv_func_printf_attribute_flavor=system])]) + if test "$gl_cv_func_printf_attribute_flavor" = gnu; then + AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1], + [Define to 1 if printf and friends should be labeled with + attribute "__gnu_printf__" instead of "__printf__"]) + fi + dnl No need to create extra modules for these functions. Everyone who uses dnl <stdio.h> likely needs them. GNULIB_FSCANF=1 diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4 index 0f0b7d9a2a..d9c41a48f3 100644 --- a/gl/m4/time_h.m4 +++ b/gl/m4/time_h.m4 @@ -2,7 +2,7 @@ # Copyright (C) 2000-2001, 2003-2007, 2009-2015 Free Software Foundation, Inc. -# serial 8 +# serial 9 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -26,7 +26,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY], ]) dnl Check whether 'struct timespec' is declared -dnl in time.h, sys/time.h, or pthread.h. +dnl in time.h, sys/time.h, pthread.h, or unistd.h. AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], [ @@ -44,6 +44,7 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + UNISTD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else @@ -70,12 +71,26 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], [gl_cv_sys_struct_timespec_in_pthread_h=no])]) if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + else + AC_CACHE_CHECK([for struct timespec in <unistd.h>], + [gl_cv_sys_struct_timespec_in_unistd_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <unistd.h> + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [gl_cv_sys_struct_timespec_in_unistd_h=yes], + [gl_cv_sys_struct_timespec_in_unistd_h=no])]) + if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then + UNISTD_H_DEFINES_STRUCT_TIMESPEC=1 + fi fi fi fi AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) + AC_SUBST([UNISTD_H_DEFINES_STRUCT_TIMESPEC]) ]) AC_DEFUN([gl_TIME_MODULE_INDICATOR], diff --git a/gl/m4/ungetc.m4 b/gl/m4/ungetc.m4 index c5c90f6d9c..2a34b3019f 100644 --- a/gl/m4/ungetc.m4 +++ b/gl/m4/ungetc.m4 @@ -29,8 +29,9 @@ AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS], fclose (f); remove ("conftest.tmp");])], [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;; + # Guess yes on glibc and bionic systems. + *-gnu*|*-android*) + gl_cv_func_ungetc_works="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_ungetc_works="guessing no" ;; esac |