diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | configh.in | 3 | ||||
-rwxr-xr-x | configure | 141 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | doc/ChangeLog | 3 | ||||
-rw-r--r-- | doc/gawk.texi | 3 | ||||
-rw-r--r-- | doc/gawktexi.in | 3 | ||||
-rw-r--r-- | symbol.c | 2 |
8 files changed, 107 insertions, 61 deletions
@@ -1,3 +1,10 @@ +2015-02-27 Arnold D. Robbins <arnold@skeeve.com> + + * symbol.c (check_param_names): Fix argument order in memset() call. + * configure.ac: Use AC_SEARCH_LIBS instead of AC_CHECK_LIB. This fixes + a long-standing problem where `-lm' was used twice in the final + compilation line. + 2015-02-24 Arnold D. Robbins <arnold@skeeve.com> * POSIX.STD: Update copyright year. @@ -96,9 +96,6 @@ /* Define to 1 if you have the <libintl.h> header file. */ #undef HAVE_LIBINTL_H -/* Define to 1 if you have the `m' library (-lm). */ -#undef HAVE_LIBM - /* Define to 1 if you have a fully functional readline library. */ #undef HAVE_LIBREADLINE @@ -9592,13 +9592,12 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmod in -lm" >&5 -$as_echo_n "checking for fmod in -lm... " >&6; } -if ${ac_cv_lib_m_fmod+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fmod" >&5 +$as_echo_n "checking for library containing fmod... " >&6; } +if ${ac_cv_search_fmod+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9617,33 +9616,44 @@ return fmod (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_fmod=yes -else - ac_cv_lib_m_fmod=no +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_fmod=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + conftest$ac_exeext + if ${ac_cv_search_fmod+:} false; then : + break fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_fmod" >&5 -$as_echo "$ac_cv_lib_m_fmod" >&6; } -if test "x$ac_cv_lib_m_fmod" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF +done +if ${ac_cv_search_fmod+:} false; then : - LIBS="-lm $LIBS" +else + ac_cv_search_fmod=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fmod" >&5 +$as_echo "$ac_cv_search_fmod" >&6; } +ac_res=$ac_cv_search_fmod +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf in -lm" >&5 -$as_echo_n "checking for isinf in -lm... " >&6; } -if ${ac_cv_lib_m_isinf+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing isinf" >&5 +$as_echo_n "checking for library containing isinf... " >&6; } +if ${ac_cv_search_isinf+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9662,33 +9672,44 @@ return isinf (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_isinf=yes -else - ac_cv_lib_m_isinf=no +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_isinf=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + conftest$ac_exeext + if ${ac_cv_search_isinf+:} false; then : + break fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_isinf" >&5 -$as_echo "$ac_cv_lib_m_isinf" >&6; } -if test "x$ac_cv_lib_m_isinf" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF +done +if ${ac_cv_search_isinf+:} false; then : - LIBS="-lm $LIBS" +else + ac_cv_search_isinf=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_isinf" >&5 +$as_echo "$ac_cv_search_isinf" >&6; } +ac_res=$ac_cv_search_isinf +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ismod in -lm" >&5 -$as_echo_n "checking for ismod in -lm... " >&6; } -if ${ac_cv_lib_m_ismod+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ismod" >&5 +$as_echo_n "checking for library containing ismod... " >&6; } +if ${ac_cv_search_ismod+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9707,23 +9728,35 @@ return ismod (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_ismod=yes -else - ac_cv_lib_m_ismod=no +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ismod=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + conftest$ac_exeext + if ${ac_cv_search_ismod+:} false; then : + break fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_ismod" >&5 -$as_echo "$ac_cv_lib_m_ismod" >&6; } -if test "x$ac_cv_lib_m_ismod" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF +done +if ${ac_cv_search_ismod+:} false; then : - LIBS="-lm $LIBS" +else + ac_cv_search_ismod=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ismod" >&5 +$as_echo "$ac_cv_search_ismod" >&6; } +ac_res=$ac_cv_search_ismod +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi diff --git a/configure.ac b/configure.ac index 008c2780..7c922ccf 100644 --- a/configure.ac +++ b/configure.ac @@ -254,9 +254,9 @@ AC_CHECK_FUNC(getaddrinfo, [AC_DEFINE(HAVE_GETADDRINFO, 1, [have getaddrinfo])], [AC_DEFINE(HAVE_GETADDRINFO, 1, [have getaddrinfo])])]) -AC_CHECK_LIB(m, fmod) -AC_CHECK_LIB(m, isinf) -AC_CHECK_LIB(m, ismod) +AC_SEARCH_LIBS(fmod, m) +AC_SEARCH_LIBS(isinf, m) +AC_SEARCH_LIBS(ismod, m) dnl Don't look for libsigsegv on OSF/1, gives us severe headaches case $host_os in osf1) : ;; diff --git a/doc/ChangeLog b/doc/ChangeLog index 269c8aa7..5cae20c6 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,6 +1,9 @@ 2015-02-27 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Update UPDATE-MONTH and copyright year. + Note that "the guide is definitive" quote is really + from "The Restaurant at the End of the Universe". Thanks + to Antonio Colombo for pointing this out. 2015-02-24 Arnold D. Robbins <arnold@skeeve.com> diff --git a/doc/gawk.texi b/doc/gawk.texi index e4cb136b..9e208cce 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -12004,6 +12004,9 @@ the string constant @code{"0"} is actually true, because it is non-null. @i{The Guide is definitive. Reality is frequently inaccurate.} @author Douglas Adams, @cite{The Hitchhiker's Guide to the Galaxy} @end quotation +@c 2/2015: Antonio Colombo points out that this is really from +@c The Restaurant at the End of the Universe. But I'm going to +@c leave it alone. @cindex comparison expressions @cindex expressions, comparison diff --git a/doc/gawktexi.in b/doc/gawktexi.in index c1654af5..4f2eea73 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -11332,6 +11332,9 @@ the string constant @code{"0"} is actually true, because it is non-null. @i{The Guide is definitive. Reality is frequently inaccurate.} @author Douglas Adams, @cite{The Hitchhiker's Guide to the Galaxy} @end quotation +@c 2/2015: Antonio Colombo points out that this is really from +@c The Restaurant at the End of the Universe. But I'm going to +@c leave it alone. @cindex comparison expressions @cindex expressions, comparison @@ -642,7 +642,7 @@ check_param_names(void) max = func_table->table_size * 2; - memset(& n, sizeof n, 0); + memset(& n, 0, sizeof n); n.type = Node_val; n.flags = STRING|STRCUR; n.stfmt = -1; |