diff options
author | Simon Josefsson <simon@josefsson.org> | 2009-03-30 12:08:38 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2009-03-30 12:08:38 +0200 |
commit | 96b8ed443933193a0d18ca21f5fd65028f948077 (patch) | |
tree | cb1e5b247f4170da6426627d8ae1fc6bb25f8f68 /gl/m4 | |
parent | fe5597bd4c51cfce5328b0a869a35dd5cda64a6b (diff) | |
download | gnutls-96b8ed443933193a0d18ca21f5fd65028f948077.tar.gz |
Update gnulib files.
Diffstat (limited to 'gl/m4')
-rw-r--r-- | gl/m4/close.m4 | 6 | ||||
-rw-r--r-- | gl/m4/gnulib-common.m4 | 15 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 11 | ||||
-rw-r--r-- | gl/m4/printf.m4 | 24 | ||||
-rw-r--r-- | gl/m4/select.m4 | 52 | ||||
-rw-r--r-- | gl/m4/stdarg.m4 | 6 | ||||
-rw-r--r-- | gl/m4/sys_select_h.m4 | 6 |
7 files changed, 98 insertions, 22 deletions
diff --git a/gl/m4/close.m4 b/gl/m4/close.m4 index 29d3abdd13..b1189f5f50 100644 --- a/gl/m4/close.m4 +++ b/gl/m4/close.m4 @@ -1,5 +1,5 @@ -# close.m4 serial 2 -dnl Copyright (C) 2008 Free Software Foundation, Inc. +# close.m4 serial 3 +dnl Copyright (C) 2008-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -22,6 +22,4 @@ AC_DEFUN([gl_REPLACE_CLOSE], fi REPLACE_CLOSE=1 gl_REPLACE_FCLOSE - LIB_CLOSE="-lws2_32" - AC_SUBST([LIB_CLOSE]) ]) diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4 index 50e399aa1c..c8fda20330 100644 --- a/gl/m4/gnulib-common.m4 +++ b/gl/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 10 +# gnulib-common.m4 serial 11 dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -109,3 +109,16 @@ AC_DEFUN([gl_BIGENDIAN], [ AC_C_BIGENDIAN ]) + +# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) +# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not +# output a spurious "(cached)" mark in the midst of other configure output. +# This macro should be used instead of AC_CACHE_VAL when it is not surrounded +# by an AC_MSG_CHECKING/AC_MSG_RESULT pair. +AC_DEFUN([gl_CACHE_VAL_SILENT], +[ + saved_as_echo_n="$as_echo_n" + as_echo_n=':' + AC_CACHE_VAL([$1], [$2]) + as_echo_n="$saved_as_echo_n" +]) diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index f2cc584c8a..5106e8a8e8 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -130,10 +130,7 @@ AC_SUBST([LTALLOCA]) AC_LIBOBJ([recv]) fi gl_SYS_SOCKET_MODULE_INDICATOR([recv]) - AC_REQUIRE([gl_HEADER_SYS_SELECT]) - if test "$ac_cv_header_winsock2_h" = yes; then - AC_LIBOBJ([winsock-select]) - fi + gl_FUNC_SELECT gl_SYS_SELECT_MODULE_INDICATOR([select]) AC_REQUIRE([gl_HEADER_SYS_SOCKET]) if test "$ac_cv_header_winsock2_h" = yes; then @@ -171,7 +168,6 @@ AC_SUBST([LTALLOCA]) gl_HEADER_SYS_SELECT AC_PROG_MKDIR_P gl_HEADER_SYS_SOCKET - gl_MODULE_INDICATOR([sys_socket]) AC_PROG_MKDIR_P gl_HEADER_SYS_STAT_H AC_PROG_MKDIR_P @@ -346,6 +342,8 @@ AC_DEFUN([gl_FILE_LIST], [ lib/bind.c lib/c-ctype.c lib/c-ctype.h + lib/close-hook.c + lib/close-hook.h lib/close.c lib/connect.c lib/errno.in.h @@ -383,6 +381,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/readline.h lib/realloc.c lib/recv.c + lib/select.c lib/send.c lib/setsockopt.c lib/shutdown.c @@ -410,7 +409,6 @@ AC_DEFUN([gl_FILE_LIST], [ lib/version-etc.h lib/w32sock.h lib/wchar.in.h - lib/winsock-select.c lib/xsize.h m4/00gnulib.m4 m4/alloca.m4 @@ -452,6 +450,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/read-file.m4 m4/readline.m4 m4/realloc.m4 + m4/select.m4 m4/servent.m4 m4/size_max.m4 m4/snprintf.m4 diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4 index 4207ace49f..87aa45c5e7 100644 --- a/gl/m4/printf.m4 +++ b/gl/m4/printf.m4 @@ -1,4 +1,4 @@ -# printf.m4 serial 31 +# printf.m4 serial 33 dnl Copyright (C) 2003, 2007-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -558,7 +558,7 @@ int main () if (sprintf (buf, "%F", 1.0 / 0.0) < 0 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0)) return 1; - /* This catches a Cygwin 2007 bug. */ + /* This catches a Cygwin 1.5.x bug. */ if (sprintf (buf, "%.F", 1234.0) < 0 || strcmp (buf, "1234") != 0) return 1; @@ -653,7 +653,8 @@ int main () { char buf[100]; /* Test whether %ls works at all. - This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku. */ + This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on + Cygwin 1.5. */ { static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; buf[0] = '\0'; @@ -661,6 +662,15 @@ int main () || strcmp (buf, "abc") != 0) return 1; } + /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an + assertion failure inside libc), but not on OpenBSD 4.0. */ + { + static const wchar_t wstring[] = { 'a', 0 }; + buf[0] = '\0'; + if (sprintf (buf, "%ls", wstring) < 0 + || strcmp (buf, "a") != 0) + return 1; + } /* Test whether precisions in %ls are supported as specified in ISO C 99 section 7.19.6.1: "If a precision is specified, no more than that many bytes are written @@ -682,8 +692,9 @@ int main () changequote(,)dnl case "$host_os" in openbsd*) gl_cv_func_printf_directive_ls="guessing no";; - solaris*) gl_cv_func_printf_directive_ls="guessing no";; 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";; beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; *) gl_cv_func_printf_directive_ls="guessing yes";; esac @@ -1384,8 +1395,9 @@ dnl glibc 2.3.6 . . . . # . . . . . . . . . . dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . . dnl MacOS X 10.3.9 . . . . # . . . . . . # . # . . . . . . dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . . -dnl Cygwin 2007 (= Cygwin 1.5.24) . . . . # # . . . . ? # ? ? . . . . . . -dnl Cygwin 2006 (= Cygwin 1.5.19) # . . . # # . ? . # ? # ? ? . . . . . . +dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . . +dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . . +dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . . dnl Solaris 10 . . # # # . . # . . . # . . . . . . . . dnl Solaris 2.6 ... 9 # . # # # # . # . . . # . . . . . . . . dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # # diff --git a/gl/m4/select.m4 b/gl/m4/select.m4 new file mode 100644 index 0000000000..5397df02f3 --- /dev/null +++ b/gl/m4/select.m4 @@ -0,0 +1,52 @@ +# select.m4 serial 1 +dnl Copyright (C) 2009 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_SELECT], +[ + AC_REQUIRE([gl_HEADER_SYS_SELECT]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + if test "$ac_cv_header_winsock2_h" = yes; then + AC_LIBOBJ([select]) + else + dnl On Interix 3.5, select(0, NULL, NULL, NULL, timeout) fails with error + dnl EFAULT. + AC_CHECK_HEADERS_ONCE([sys/select.h]) + AC_CACHE_CHECK([whether select supports a 0 argument], + [gl_cv_func_select_supports0], + [ + AC_TRY_RUN([ +#include <sys/types.h> +#include <sys/time.h> +#if HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif +int main () +{ + struct timeval timeout; + timeout.tv_sec = 0; + timeout.tv_usec = 5; + return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0; +}], [gl_cv_func_select_supports0=yes], [gl_cv_func_select_supports0=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess no on Interix. + interix*) gl_cv_func_select_supports0="guessing no";; + # Guess yes otherwise. + *) gl_cv_func_select_supports0="guessing yes";; + esac +changequote([,])dnl + ]) + ]) + case "$gl_cv_func_select_supports0" in + *yes) ;; + *) + REPLACE_SELECT=1 + AC_LIBOBJ([select]) + ;; + esac + fi +]) diff --git a/gl/m4/stdarg.m4 b/gl/m4/stdarg.m4 index 21910e4bec..a9ada4f4e0 100644 --- a/gl/m4/stdarg.m4 +++ b/gl/m4/stdarg.m4 @@ -1,5 +1,5 @@ -# stdarg.m4 serial 2 -dnl Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# stdarg.m4 serial 3 +dnl Copyright (C) 2006, 2008-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -46,7 +46,7 @@ void (*func) (va_list, va_list) = va_copy; else dnl Provide a substitute in <config.h>, either __va_copy or as a simple dnl assignment. - AC_CACHE_VAL([gl_cv_func___va_copy], [ + gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [ AC_TRY_COMPILE([#include <stdarg.h>], [ #ifndef __va_copy error, bail out diff --git a/gl/m4/sys_select_h.m4 b/gl/m4/sys_select_h.m4 index c537e7918a..c48be2ce38 100644 --- a/gl/m4/sys_select_h.m4 +++ b/gl/m4/sys_select_h.m4 @@ -1,5 +1,5 @@ -# sys_select_h.m4 serial 6 -dnl Copyright (C) 2006-2008 Free Software Foundation, Inc. +# sys_select_h.m4 serial 7 +dnl Copyright (C) 2006-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -42,4 +42,6 @@ AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR], AC_DEFUN([gl_SYS_SELECT_H_DEFAULTS], [ GNULIB_SELECT=0; AC_SUBST([GNULIB_SELECT]) + dnl Assume proper GNU behavior unless another module says otherwise. + REPLACE_SELECT=0; AC_SUBST([REPLACE_SELECT]) ]) |