summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-03-01 06:18:48 +0200
committerArnold D. Robbins <arnold@skeeve.com>2015-03-01 06:18:48 +0200
commit9b995ad21b921a502c7c94b3c591735e4f713728 (patch)
treee703e0dce5b5d32ed6f347a5bbffd1c46254841a
parent9fa41fc2c183d5920d64e6f34f8a6bb325188443 (diff)
parent8954618d1958e26389519e7322e01ca8caafdf66 (diff)
downloadgawk-9b995ad21b921a502c7c94b3c591735e4f713728.tar.gz
Merge branch 'master' into non-fatal-io-2
-rw-r--r--ChangeLog7
-rw-r--r--configh.in3
-rwxr-xr-xconfigure141
-rw-r--r--configure.ac6
-rw-r--r--doc/ChangeLog12
-rw-r--r--doc/gawk.info2
-rw-r--r--doc/gawk.texi9
-rw-r--r--doc/gawktexi.in9
-rw-r--r--symbol.c2
9 files changed, 123 insertions, 68 deletions
diff --git a/ChangeLog b/ChangeLog
index 654c96b0..62777ab3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,13 @@
Save and restore errno around call to socketopen() and
use restored errno if open() fails at strictopen.
+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.
diff --git a/configh.in b/configh.in
index 301fa21a..a3c411bb 100644
--- a/configh.in
+++ b/configh.in
@@ -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
diff --git a/configure b/configure
index 045e8aab..e425f55a 100755
--- a/configure
+++ b/configure
@@ -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 47756846..d8c42cb4 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,15 @@
+2015-03-01 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Change quotes to @dfn for pseudorandom.
+ A last-minute O'Reilly fix.
+
+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>
* texinfo.tex: Update to most current version.
diff --git a/doc/gawk.info b/doc/gawk.info
index 83a5d818..cbcf529c 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -12088,7 +12088,7 @@ numbers.
(2) `mawk' uses a different seed each time.
(3) Computer-generated random numbers really are not truly random.
-They are technically known as "pseudorandom." This means that although
+They are technically known as "pseudorandom". This means that although
the numbers in a sequence appear to be random, you can in fact generate
the same sequence of random numbers over and over again.
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 9044c604..67077117 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -51,7 +51,7 @@
@c applies to and all the info about who's publishing this edition
@c These apply across the board.
-@set UPDATE-MONTH September, 2014
+@set UPDATE-MONTH February, 2015
@set VERSION 4.1
@set PATCHLEVEL 2
@@ -299,7 +299,7 @@ Fax: +1-617-542-2652
Email: <email>gnu@@gnu.org</email>
URL: <ulink url="http://www.gnu.org">http://www.gnu.org/</ulink></literallayout>
-<literallayout class="normal">Copyright &copy; 1989, 1991, 1992, 1993, 1996&ndash;2005, 2007, 2009&ndash;2014
+<literallayout class="normal">Copyright &copy; 1989, 1991, 1992, 1993, 1996&ndash;2005, 2007, 2009&ndash;2015
Free Software Foundation, Inc.
All Rights Reserved.</literallayout>
@end docbook
@@ -12069,6 +12069,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
@@ -17138,7 +17141,7 @@ for generating random numbers to the value @var{x}.
Each seed value leads to a particular sequence of random
numbers.@footnote{Computer-generated random numbers really are not truly
-random. They are technically known as ``pseudorandom.'' This means
+random. They are technically known as @dfn{pseudorandom}. This means
that although the numbers in a sequence appear to be random, you can in
fact generate the same sequence of random numbers over and over again.}
Thus, if the seed is set to the same value a second time,
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 61d5038e..1b99b5bc 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -46,7 +46,7 @@
@c applies to and all the info about who's publishing this edition
@c These apply across the board.
-@set UPDATE-MONTH September, 2014
+@set UPDATE-MONTH February, 2015
@set VERSION 4.1
@set PATCHLEVEL 2
@@ -294,7 +294,7 @@ Fax: +1-617-542-2652
Email: <email>gnu@@gnu.org</email>
URL: <ulink url="http://www.gnu.org">http://www.gnu.org/</ulink></literallayout>
-<literallayout class="normal">Copyright &copy; 1989, 1991, 1992, 1993, 1996&ndash;2005, 2007, 2009&ndash;2014
+<literallayout class="normal">Copyright &copy; 1989, 1991, 1992, 1993, 1996&ndash;2005, 2007, 2009&ndash;2015
Free Software Foundation, Inc.
All Rights Reserved.</literallayout>
@end docbook
@@ -11397,6 +11397,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
@@ -16420,7 +16423,7 @@ for generating random numbers to the value @var{x}.
Each seed value leads to a particular sequence of random
numbers.@footnote{Computer-generated random numbers really are not truly
-random. They are technically known as ``pseudorandom.'' This means
+random. They are technically known as @dfn{pseudorandom}. This means
that although the numbers in a sequence appear to be random, you can in
fact generate the same sequence of random numbers over and over again.}
Thus, if the seed is set to the same value a second time,
diff --git a/symbol.c b/symbol.c
index d698299b..845d3797 100644
--- a/symbol.c
+++ b/symbol.c
@@ -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;