diff options
author | David Carlton <carlton@bactrian.org> | 2003-05-23 18:40:58 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2003-05-23 18:40:58 +0000 |
commit | 52ba01a6d0a345b48e6a65ee6669f385466415aa (patch) | |
tree | 9e4d1dabc8e142f81e8b471a310846b814483074 /libiberty | |
parent | d5ba3fe094903763b7462e773b9d7e0291773d6c (diff) | |
download | gdb-52ba01a6d0a345b48e6a65ee6669f385466415aa.zip gdb-52ba01a6d0a345b48e6a65ee6669f385466415aa.tar.gz gdb-52ba01a6d0a345b48e6a65ee6669f385466415aa.tar.bz2 |
2003-05-23 David Carlton <carlton@bactrian.org>
* Merge with mainline; tag is carlton_dictionary-20030523-merge.
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 34 | ||||
-rw-r--r-- | libiberty/aclocal.m4 | 2 | ||||
-rw-r--r-- | libiberty/config.in | 10 | ||||
-rw-r--r-- | libiberty/config.table | 4 | ||||
-rwxr-xr-x | libiberty/configure | 756 | ||||
-rw-r--r-- | libiberty/configure.in | 19 | ||||
-rw-r--r-- | libiberty/cp-demangle.c | 2 | ||||
-rw-r--r-- | libiberty/functions.texi | 8 | ||||
-rw-r--r-- | libiberty/hashtab.c | 138 | ||||
-rw-r--r-- | libiberty/hex.c | 12 | ||||
-rw-r--r-- | libiberty/splay-tree.c | 4 |
11 files changed, 445 insertions, 544 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index ae5a7c5..d26d5ef 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,37 @@ +2003-05-19 Kelley Cook <kelleycook@wideopenwest.com> + + * config.table: Accept i[345867]86 variant. + +2003-05-15 Jim Blandy <jimb@redhat.com> + + * hex.c (_hex_value): Make this unsigned. + (hex_value): Update documentation for new return type. hex_value + now expands to an unsigned int expression, to avoid unexpected + sign extension when we store it in a bfd_vma, which is larger than + int on some platforms. + * functions.texi: Regenerated. + +2003-05-07 Josef Zlomek <zlomekj@suse.cz> + + * splay-tree.c (splay_tree_predecessor): Fix comment. + (splay_tree_successor): Fix comment. + +2003-05-07 Jason Merrill <jason@redhat.com> + + * hashtab.c (iterative_hash): New fn. + * configure.in: Add AC_C_BIGENDIAN_CROSS. + * aclocal.m4: Include accross.m4. + * configure, config.in: Regenerate. + +2003-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * configure.in (AC_CHECK_FUNCS): Don't make multiple calls. + * configure: Regenerate. + +2003-05-03 Carlo Wood <carlo@alinoe.com> + + * cp-demangle.c: Fix typo in "char_traints" string-literal. + 2003-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * vsnprintf.c (vsnprintf): Don't pad string with extra nulls. diff --git a/libiberty/aclocal.m4 b/libiberty/aclocal.m4 index 6c5dc6a..a3349f3 100644 --- a/libiberty/aclocal.m4 +++ b/libiberty/aclocal.m4 @@ -1,3 +1,5 @@ +sinclude(../config/accross.m4) + dnl See whether strncmp reads past the end of its string parameters. dnl On some versions of SunOS4 at least, strncmp reads a word at a time dnl but erroneously reads past the end of strings. This can cause diff --git a/libiberty/config.in b/libiberty/config.in index 1cc6d61..14ab379 100644 --- a/libiberty/config.in +++ b/libiberty/config.in @@ -291,6 +291,16 @@ /* Define if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* whether byteorder is bigendian */ +#undef WORDS_BIGENDIAN + +/* Define if the host machine stores words of multi-word integers in + big-endian order. */ +#undef HOST_WORDS_BIG_ENDIAN + +/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ +#undef BYTEORDER + /* Define if errno must be declared even when <errno.h> is included. */ #undef NEED_DECLARATION_ERRNO diff --git a/libiberty/config.table b/libiberty/config.table index df48ce9..1867cfe 100644 --- a/libiberty/config.table +++ b/libiberty/config.table @@ -11,7 +11,7 @@ case "${host}" in *-*-freebsd2.1.*) frag=mh-fbsd21 ;; *-*-freebsd2.2.[012]) frag=mh-fbsd21 ;; i370-*-opened*) frag=mh-openedition ;; - i[345]86-*-windows*) frag=mh-windows ;; + i[34567]86-*-windows*) frag=mh-windows ;; esac if [ -n "${frag}" ]; then @@ -34,7 +34,7 @@ if [ "${shared}" = "yes" ]; then alpha*-*-linux*) frag=mh-elfalphapic ;; arm*-*-*) frag=mh-armpic ;; hppa*-*-*) frag=mh-papic ;; - i[3456]86-*-* | x86_64-*-*) + i[34567]86-*-* | x86_64-*-*) frag=mh-x86pic ;; powerpc*-*-aix*) ;; powerpc*-*-*) frag=mh-ppcpic ;; diff --git a/libiberty/configure b/libiberty/configure index f1ba0c8..d0899a2 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -1198,6 +1198,142 @@ EOF ;; esac +echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +echo "configure:1203: checking whether byte ordering is bigendian" >&5 +if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_bigendian=unknown +# See if sys/param.h defines the BYTE_ORDER macro. +cat > conftest.$ac_ext <<EOF +#line 1210 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/param.h> +int main() { + +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif +; return 0; } +EOF +if { (eval echo configure:1221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + # It does; now see whether it defined to BIG_ENDIAN or not. +cat > conftest.$ac_ext <<EOF +#line 1225 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/param.h> +int main() { + +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif +; return 0; } +EOF +if { (eval echo configure:1236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_bigendian=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_bigendian=no +fi +rm -f conftest* +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +if test $ac_cv_c_bigendian = unknown; then +if test "$cross_compiling" = yes; then + echo $ac_n "cross-compiling... " 2>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1256 "configure" +#include "confdefs.h" +main () { + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +} +EOF +if { (eval echo configure:1269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_c_bigendian=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_bigendian=yes +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_c_bigendian" 1>&6 +if test $ac_cv_c_bigendian = unknown; then +echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6 +echo "configure:1287: checking to probe for byte ordering" >&5 + +cat >conftest.c <<EOF +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } +int main() { _ascii (); _ebcdic (); return 0; } +EOF + if test -f conftest.c ; then + if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then + if test `grep -l BIGenDianSyS conftest.o` ; then + echo $ac_n ' big endian probe OK, ' 1>&6 + ac_cv_c_bigendian=yes + fi + if test `grep -l LiTTleEnDian conftest.o` ; then + echo $ac_n ' little endian probe OK, ' 1>&6 + if test $ac_cv_c_bigendian = yes ; then + ac_cv_c_bigendian=unknown; + else + ac_cv_c_bigendian=no + fi + fi + echo $ac_n 'guessing bigendian ... ' >&6 + fi + fi +echo "$ac_t""$ac_cv_c_bigendian" 1>&6 +fi +if test $ac_cv_c_bigendian = yes; then + cat >> confdefs.h <<\EOF +#define WORDS_BIGENDIAN 1 +EOF + + cat >> confdefs.h <<\EOF +#define HOST_WORDS_BIG_ENDIAN 1 +EOF + + BYTEORDER=4321 +else + BYTEORDER=1234 +fi +cat >> confdefs.h <<EOF +#define BYTEORDER $BYTEORDER +EOF + +if test $ac_cv_c_bigendian = unknown; then + { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; } +fi + @@ -1216,7 +1352,7 @@ esac # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1220: checking for a BSD compatible install" >&5 +echo "configure:1356: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1277,7 +1413,7 @@ host_makefile_frag=${frag} # able to link anything, it had better be able to at least compile # something. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1281: checking how to run the C preprocessor" >&5 +echo "configure:1417: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1292,13 +1428,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1296 "configure" +#line 1432 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1309,13 +1445,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1313 "configure" +#line 1449 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1326,13 +1462,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 1330 "configure" +#line 1466 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1360,17 +1496,17 @@ for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1364: checking for $ac_hdr" >&5 +echo "configure:1500: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1369 "configure" +#line 1505 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1397,12 +1533,12 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1401: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1537: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1406 "configure" +#line 1542 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/wait.h> @@ -1418,7 +1554,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -1439,12 +1575,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1443: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1579: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1448 "configure" +#line 1584 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -1453,7 +1589,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1475,19 +1611,19 @@ fi echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6 -echo "configure:1479: checking whether errno must be declared" >&5 +echo "configure:1615: checking whether errno must be declared" >&5 if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1484 "configure" +#line 1620 "configure" #include "confdefs.h" #include <errno.h> int main() { int x = errno; ; return 0; } EOF -if { (eval echo configure:1491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libiberty_cv_declare_errno=no else @@ -1509,12 +1645,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1513: checking for ANSI C header files" >&5 +echo "configure:1649: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1518 "configure" +#line 1654 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -1522,7 +1658,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1539,7 +1675,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 1543 "configure" +#line 1679 "configure" #include "confdefs.h" #include <string.h> EOF @@ -1557,7 +1693,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 1561 "configure" +#line 1697 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -1578,7 +1714,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 1582 "configure" +#line 1718 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1589,7 +1725,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1613,12 +1749,12 @@ EOF fi echo $ac_n "checking for uintptr_t""... $ac_c" 1>&6 -echo "configure:1617: checking for uintptr_t" >&5 +echo "configure:1753: checking for uintptr_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1622 "configure" +#line 1758 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1654,12 +1790,12 @@ EOF echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1658: checking for pid_t" >&5 +echo "configure:1794: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1663 "configure" +#line 1799 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -1748,455 +1884,23 @@ checkfuncs="$checkfuncs getsysinfo table sysctl" # These are neither executed nor required, but they help keep # autoheader happy without adding a bunch of text to acconfig.h. if test "x" = "y"; then - for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1755: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1760 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - for ac_func in getcwd getpagesize index insque mkstemps memchr memcmp memcpy -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1810: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1815 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - for ac_func in memmove mempcpy memset putenv random rename rindex sigsetmask -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1865: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1870 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - for ac_func in strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1920: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1925 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - for ac_func in strtod strtol strtoul tmpnam vasprintf vfprintf vprintf -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1975: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1980 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - for ac_func in vsprintf waitpid getrusage on_exit psignal strerror strsignal -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2030: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2035 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - for ac_func in sysconf times sbrk gettimeofday ffs snprintf vsnprintf -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2085: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2090 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - for ac_func in pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2140: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2145 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - for ac_func in realpath canonicalize_file_name + for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \ + getcwd getpagesize index insque mkstemps memchr memcmp memcpy \ + memmove mempcpy memset putenv random rename rindex sigsetmask \ + strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr \ + strtod strtol strtoul tmpnam vasprintf vfprintf vprintf \ + vsprintf waitpid getrusage on_exit psignal strerror strsignal \ + sysconf times sbrk gettimeofday ffs snprintf vsnprintf \ + pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl \ + realpath canonicalize_file_name do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2195: checking for $ac_func" >&5 +echo "configure:1899: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2200 "configure" +#line 1904 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2219,7 +1923,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2453,7 +2157,7 @@ if test -z "${setobjs}"; then # We haven't set the list of objects yet. Use the standard autoconf # tests. This will only work if the compiler works. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2457: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2161: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2464,12 +2168,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2468 "configure" +#line 2172 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2495,19 +2199,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2499: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2203: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross for ac_func in $funcs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2506: checking for $ac_func" >&5 +echo "configure:2210: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2511 "configure" +#line 2215 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2530,7 +2234,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2557,12 +2261,12 @@ done echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2561: checking whether alloca needs Cray hooks" >&5 +echo "configure:2265: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2566 "configure" +#line 2270 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -2587,12 +2291,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2591: checking for $ac_func" >&5 +echo "configure:2295: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2596 "configure" +#line 2300 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2615,7 +2319,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2641,7 +2345,7 @@ fi fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2645: checking stack direction for C alloca" >&5 +echo "configure:2349: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2649,7 +2353,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 2653 "configure" +#line 2357 "configure" #include "confdefs.h" find_stack_direction () { @@ -2668,7 +2372,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2690,17 +2394,17 @@ EOF ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:2694: checking for vfork.h" >&5 +echo "configure:2398: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2699 "configure" +#line 2403 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2725,18 +2429,18 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:2729: checking for working vfork" >&5 +echo "configure:2433: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 -echo "configure:2735: checking for vfork" >&5 +echo "configure:2439: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2740 "configure" +#line 2444 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vfork(); below. */ @@ -2759,7 +2463,7 @@ vfork(); ; return 0; } EOF -if { (eval echo configure:2763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -2781,7 +2485,7 @@ fi ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext <<EOF -#line 2785 "configure" +#line 2489 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -2876,7 +2580,7 @@ main() { } } EOF -if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -2908,12 +2612,12 @@ fi for ac_func in _doprnt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2912: checking for $ac_func" >&5 +echo "configure:2616: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2917 "configure" +#line 2621 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2936,7 +2640,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2966,12 +2670,12 @@ done for ac_func in _doprnt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2970: checking for $ac_func" >&5 +echo "configure:2674: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2975 "configure" +#line 2679 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2994,7 +2698,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3022,19 +2726,19 @@ done for v in $vars; do echo $ac_n "checking for $v""... $ac_c" 1>&6 -echo "configure:3026: checking for $v" >&5 +echo "configure:2730: checking for $v" >&5 if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3031 "configure" +#line 2735 "configure" #include "confdefs.h" int *p; int main() { extern int $v []; p = $v; ; return 0; } EOF -if { (eval echo configure:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "libiberty_cv_var_$v=yes" else @@ -3060,12 +2764,12 @@ EOF for ac_func in $checkfuncs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3064: checking for $ac_func" >&5 +echo "configure:2768: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3069 "configure" +#line 2773 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3088,7 +2792,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3113,12 +2817,12 @@ fi done echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6 -echo "configure:3117: checking whether canonicalize_file_name must be declared" >&5 +echo "configure:2821: checking whether canonicalize_file_name must be declared" >&5 if eval "test \"`echo '$''{'libiberty_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3122 "configure" +#line 2826 "configure" #include "confdefs.h" #include "confdefs.h" @@ -3140,7 +2844,7 @@ int main() { char *(*pfn) = (char *(*)) canonicalize_file_name ; return 0; } EOF -if { (eval echo configure:3144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libiberty_cv_decl_needed_canonicalize_file_name=no else @@ -3176,17 +2880,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3180: checking for $ac_hdr" >&5 +echo "configure:2884: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3185 "configure" +#line 2889 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3215,12 +2919,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3219: checking for $ac_func" >&5 +echo "configure:2923: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3224 "configure" +#line 2928 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3243,7 +2947,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3268,7 +2972,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3272: checking for working mmap" >&5 +echo "configure:2976: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3276,7 +2980,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 3280 "configure" +#line 2984 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -3416,7 +3120,7 @@ main() } EOF -if { (eval echo configure:3420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3440,7 +3144,7 @@ fi echo $ac_n "checking for working strncmp""... $ac_c" 1>&6 -echo "configure:3444: checking for working strncmp" >&5 +echo "configure:3148: checking for working strncmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3448,7 +3152,7 @@ else ac_cv_func_strncmp_works=no else cat > conftest.$ac_ext <<EOF -#line 3452 "configure" +#line 3156 "configure" #include "confdefs.h" /* Test by Jim Wilson and Kaveh Ghazi. @@ -3512,7 +3216,7 @@ main () } EOF -if { (eval echo configure:3516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_strncmp_works=yes else diff --git a/libiberty/configure.in b/libiberty/configure.in index e142cf5..4a704e8 100644 --- a/libiberty/configure.in +++ b/libiberty/configure.in @@ -114,6 +114,7 @@ AC_SUBST(OUTPUT_OPTION) AC_ISC_POSIX AC_C_CONST AC_C_INLINE +AC_C_BIGENDIAN_CROSS dnl When we start using libtool: dnl Default to a non shared library. This may be overridden by the @@ -217,15 +218,15 @@ checkfuncs="$checkfuncs getsysinfo table sysctl" # These are neither executed nor required, but they help keep # autoheader happy without adding a bunch of text to acconfig.h. if test "x" = "y"; then - AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bsearch bzero calloc clock) - AC_CHECK_FUNCS(getcwd getpagesize index insque mkstemps memchr memcmp memcpy) - AC_CHECK_FUNCS(memmove mempcpy memset putenv random rename rindex sigsetmask) - AC_CHECK_FUNCS(strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr) - AC_CHECK_FUNCS(strtod strtol strtoul tmpnam vasprintf vfprintf vprintf) - AC_CHECK_FUNCS(vsprintf waitpid getrusage on_exit psignal strerror strsignal) - AC_CHECK_FUNCS(sysconf times sbrk gettimeofday ffs snprintf vsnprintf) - AC_CHECK_FUNCS(pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl) - AC_CHECK_FUNCS(realpath canonicalize_file_name) + AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \ + getcwd getpagesize index insque mkstemps memchr memcmp memcpy \ + memmove mempcpy memset putenv random rename rindex sigsetmask \ + strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr \ + strtod strtol strtoul tmpnam vasprintf vfprintf vprintf \ + vsprintf waitpid getrusage on_exit psignal strerror strsignal \ + sysconf times sbrk gettimeofday ffs snprintf vsnprintf \ + pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl \ + realpath canonicalize_file_name) AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.]) AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.]) AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.]) diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 9adf5fd..5dcce55 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -3398,7 +3398,7 @@ demangle_substitution (dm, template_p) } else { - RETURN_IF_ERROR (result_add (dm, "std::basic_istream<char, std::char_traints<char> >")); + RETURN_IF_ERROR (result_add (dm, "std::basic_istream<char, std::char_traits<char> >")); new_last_source_name = "basic_istream"; } *template_p = 0; diff --git a/libiberty/functions.texi b/libiberty/functions.texi index 4261d86..b34c204 100644 --- a/libiberty/functions.texi +++ b/libiberty/functions.texi @@ -337,13 +337,19 @@ or zero if it is not. Note that the value you pass will be cast to @end deftypefn @c hex.c:42 -@deftypefn Extension int hex_value (int @var{c}) +@deftypefn Extension unsigned int hex_value (int @var{c}) Returns the numeric equivalent of the given character when interpreted as a hexidecimal digit. The result is undefined if you pass an invalid hex digit. Note that the value you pass will be cast to @code{unsigned char} within the macro. +The @code{hex_value} macro returns @code{unsigned int}, rather than +signed @code{int}, to make it easier to use in parsing addresses from +hex dump files: a signed @code{int} would be sign-extended when +converted to a wider unsigned type --- like @code{bfd_vma}, on some +systems. + @end deftypefn @c index.c:5 diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c index 32067af..3896328 100644 --- a/libiberty/hashtab.c +++ b/libiberty/hashtab.c @@ -709,3 +709,141 @@ htab_hash_string (p) return r; } + +/* DERIVED FROM: +-------------------------------------------------------------------- +lookup2.c, by Bob Jenkins, December 1996, Public Domain. +hash(), hash2(), hash3, and mix() are externally useful functions. +Routines to test the hash are included if SELF_TEST is defined. +You can use this free for any purpose. It has no warranty. +-------------------------------------------------------------------- +*/ + +/* +-------------------------------------------------------------------- +mix -- mix 3 32-bit values reversibly. +For every delta with one or two bit set, and the deltas of all three + high bits or all three low bits, whether the original value of a,b,c + is almost all zero or is uniformly distributed, +* If mix() is run forward or backward, at least 32 bits in a,b,c + have at least 1/4 probability of changing. +* If mix() is run forward, every bit of c will change between 1/3 and + 2/3 of the time. (Well, 22/100 and 78/100 for some 2-bit deltas.) +mix() was built out of 36 single-cycle latency instructions in a + structure that could supported 2x parallelism, like so: + a -= b; + a -= c; x = (c>>13); + b -= c; a ^= x; + b -= a; x = (a<<8); + c -= a; b ^= x; + c -= b; x = (b>>13); + ... + Unfortunately, superscalar Pentiums and Sparcs can't take advantage + of that parallelism. They've also turned some of those single-cycle + latency instructions into multi-cycle latency instructions. Still, + this is the fastest good hash I could find. There were about 2^^68 + to choose from. I only looked at a billion or so. +-------------------------------------------------------------------- +*/ +/* same, but slower, works on systems that might have 8 byte hashval_t's */ +#define mix(a,b,c) \ +{ \ + a -= b; a -= c; a ^= (c>>13); \ + b -= c; b -= a; b ^= (a<< 8); \ + c -= a; c -= b; c ^= ((b&0xffffffff)>>13); \ + a -= b; a -= c; a ^= ((c&0xffffffff)>>12); \ + b -= c; b -= a; b = (b ^ (a<<16)) & 0xffffffff; \ + c -= a; c -= b; c = (c ^ (b>> 5)) & 0xffffffff; \ + a -= b; a -= c; a = (a ^ (c>> 3)) & 0xffffffff; \ + b -= c; b -= a; b = (b ^ (a<<10)) & 0xffffffff; \ + c -= a; c -= b; c = (c ^ (b>>15)) & 0xffffffff; \ +} + +/* +-------------------------------------------------------------------- +hash() -- hash a variable-length key into a 32-bit value + k : the key (the unaligned variable-length array of bytes) + len : the length of the key, counting by bytes + level : can be any 4-byte value +Returns a 32-bit value. Every bit of the key affects every bit of +the return value. Every 1-bit and 2-bit delta achieves avalanche. +About 36+6len instructions. + +The best hash table sizes are powers of 2. There is no need to do +mod a prime (mod is sooo slow!). If you need less than 32 bits, +use a bitmask. For example, if you need only 10 bits, do + h = (h & hashmask(10)); +In which case, the hash table should have hashsize(10) elements. + +If you are hashing n strings (ub1 **)k, do it like this: + for (i=0, h=0; i<n; ++i) h = hash( k[i], len[i], h); + +By Bob Jenkins, 1996. bob_jenkins@burtleburtle.net. You may use this +code any way you wish, private, educational, or commercial. It's free. + +See http://burtleburtle.net/bob/hash/evahash.html +Use for hash table lookup, or anything where one collision in 2^32 is +acceptable. Do NOT use for cryptographic purposes. +-------------------------------------------------------------------- +*/ + +hashval_t iterative_hash (k_in, length, initval) + const PTR k_in; /* the key */ + register size_t length; /* the length of the key */ + register hashval_t initval; /* the previous hash, or an arbitrary value */ +{ + register const unsigned char *k = (const unsigned char *)k_in; + register hashval_t a,b,c,len; + + /* Set up the internal state */ + len = length; + a = b = 0x9e3779b9; /* the golden ratio; an arbitrary value */ + c = initval; /* the previous hash value */ + + /*---------------------------------------- handle most of the key */ +#ifndef WORDS_BIGENDIAN + /* On a little-endian machine, if the data is 4-byte aligned we can hash + by word for better speed. This gives nondeterministic results on + big-endian machines. */ + if (sizeof (hashval_t) == 4 && (((size_t)k)&3) == 0) + while (len >= 12) /* aligned */ + { + a += *(hashval_t *)(k+0); + b += *(hashval_t *)(k+4); + c += *(hashval_t *)(k+8); + mix(a,b,c); + k += 12; len -= 12; + } + else /* unaligned */ +#endif + while (len >= 12) + { + a += (k[0] +((hashval_t)k[1]<<8) +((hashval_t)k[2]<<16) +((hashval_t)k[3]<<24)); + b += (k[4] +((hashval_t)k[5]<<8) +((hashval_t)k[6]<<16) +((hashval_t)k[7]<<24)); + c += (k[8] +((hashval_t)k[9]<<8) +((hashval_t)k[10]<<16)+((hashval_t)k[11]<<24)); + mix(a,b,c); + k += 12; len -= 12; + } + + /*------------------------------------- handle the last 11 bytes */ + c += length; + switch(len) /* all the case statements fall through */ + { + case 11: c+=((hashval_t)k[10]<<24); + case 10: c+=((hashval_t)k[9]<<16); + case 9 : c+=((hashval_t)k[8]<<8); + /* the first byte of c is reserved for the length */ + case 8 : b+=((hashval_t)k[7]<<24); + case 7 : b+=((hashval_t)k[6]<<16); + case 6 : b+=((hashval_t)k[5]<<8); + case 5 : b+=k[4]; + case 4 : a+=((hashval_t)k[3]<<24); + case 3 : a+=((hashval_t)k[2]<<16); + case 2 : a+=((hashval_t)k[1]<<8); + case 1 : a+=k[0]; + /* case 0: nothing left to add */ + } + mix(a,b,c); + /*-------------------------------------------- report the result */ + return c; +} diff --git a/libiberty/hex.c b/libiberty/hex.c index 5f82292..f425509 100644 --- a/libiberty/hex.c +++ b/libiberty/hex.c @@ -39,13 +39,19 @@ or zero if it is not. Note that the value you pass will be cast to @end deftypefn -@deftypefn Extension int hex_value (int @var{c}) +@deftypefn Extension unsigned int hex_value (int @var{c}) Returns the numeric equivalent of the given character when interpreted as a hexidecimal digit. The result is undefined if you pass an invalid hex digit. Note that the value you pass will be cast to @code{unsigned char} within the macro. +The @code{hex_value} macro returns @code{unsigned int}, rather than +signed @code{int}, to make it easier to use in parsing addresses from +hex dump files: a signed @code{int} would be sign-extended when +converted to a wider unsigned type --- like @code{bfd_vma}, on some +systems. + @end deftypefn @undocumented _hex_array_size @@ -60,7 +66,7 @@ invalid hex digit. Note that the value you pass will be cast to && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 \ && EOF == -1 -const char _hex_value[_hex_array_size] = +const unsigned char _hex_value[_hex_array_size] = { _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* NUL SOH STX ETX */ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* EOT ENQ ACK BEL */ @@ -139,7 +145,7 @@ const char _hex_value[_hex_array_size] = #else -char _hex_value[_hex_array_size]; +unsigned char _hex_value[_hex_array_size]; #endif /* not ASCII */ diff --git a/libiberty/splay-tree.c b/libiberty/splay-tree.c index 6f90fde..fc98db1 100644 --- a/libiberty/splay-tree.c +++ b/libiberty/splay-tree.c @@ -472,7 +472,7 @@ splay_tree_predecessor (sp, key) if (comparison < 0) return sp->root; - /* Otherwise, find the leftmost element of the right subtree. */ + /* Otherwise, find the rightmost element of the left subtree. */ node = sp->root->left; if (node) while (node->right) @@ -505,7 +505,7 @@ splay_tree_successor (sp, key) if (comparison > 0) return sp->root; - /* Otherwise, find the rightmost element of the left subtree. */ + /* Otherwise, find the leftmost element of the right subtree. */ node = sp->root->right; if (node) while (node->left) |