This is patch06 to PennMUSH 1.8.6. After applying this patch, you will have version 1.8.3p6 To apply this patch, save it to a file in your top-level 1.8.3p5 MUSH directory, and do the following: % patch -p0 < 1.8.3-patch06 % rm hdrs/pcre.h # (Or otherwise delete the file) % ./configure % make update % make install If you use GNU patch 2.2, you probably want the above to be 'patch -b -p0', not just 'patch -p0'. Unix (or cygwin) users need not worry about failed hunks in src/switchinc.c, hdrs/switches.h, hdrs/cmds.h, or hdrs/funs.h. These files are automatically rebuilt on compile. On the off chance they appear not to be, simply rm them and re-run make. Then @shutdown and restart your MUSH. - Shawn/Raevnos In this patch: Major changes: * If configure finds a copy of the pcre library installed, that will be used instead of the (old) version bundled with Penn. use --with-pcre=/path/to/it if it's not in the usual places, or --with-pcre=no to force use of the bundled version. Minor changes: * @sitelock when there are no rules will now say that instead of having no output. By Talvo. * Log files use locking to prevent the small chance of more than one process writing to the same error log at the same time. * info_slave's logging is more clear as to its source. * Several places that used the select() system call now favor poll() and/or socket timeouts instead. (The main event loop still uses select() for now.) * A wildcard help topic search (help foo*) that only matches one entry will display that entry. Suggested by Cheetah. * New switches for commands no longer have to be added to the SWITCHES file; the internal list of switches is now built based on what switches are given in the command table and cmdlocal.c additions. Suggested by Talek. Flags and powers: * The announce power now also grants the ability to change the motd. Suggested by Yuriko. * New hook power grants rights to use @hook. Suggested by Paige. * Windows compile fixes by Intrevis. Commands: * @motd gives better feedback when clearing a message. * The @tport/@otport/@atport/etc. attributes that get evalulated on a @teleport now get the dbref of the object doing the teleport in %0 and the teleported object's old location in %1. Suggested by Daniel Cheng. Functions: * root() uses an improved algorithm to give a more precise result. * log(N,2) uses the C log2() function if available. * log(N,e) takes the natural logarithm of N, like ln(). * lports() now takes an optional viewer argument, a la lwho(). By Talvo. Fixes: * Typo in info_slave preventing simultaneous hostname lookups fixed. * Compiliation fix with some compilers. Reported by Kimiko. * ident lookups of new connections was broken for several patchlevels. Works again. Sometimes. * Cleaned up some warnings generated by gcc 4.2 * Fixed some minor bugs detected by running under valgrind. * OpenBSD configuration fixes. And fixes from 1.8.2p8 Prereq: 1.8.3p5 Index: Patchlevel =================================================================== --- Patchlevel (.../p5) (revision 1176) +++ Patchlevel (.../p6) (revision 1176) @@ -1,2 +1,2 @@ Do not edit this file. It is maintained by the official PennMUSH patches. -This is PennMUSH 1.8.3p5 +This is PennMUSH 1.8.3p6 Index: configure =================================================================== --- configure (.../p5) (revision 1176) +++ configure (.../p6) (revision 1176) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60. +# Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -10,7 +10,8 @@ ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -19,10 +20,13 @@ alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + + # PATH needs CR @@ -215,7 +219,7 @@ else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -233,7 +237,6 @@ # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF -# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -242,10 +245,12 @@ alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + : _ASEOF @@ -253,7 +258,6 @@ CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF -# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -262,10 +266,12 @@ alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + : (as_func_return () { @@ -512,19 +518,28 @@ as_mkdir_p=false fi -# Find out whether ``test -x'' works. Don't use a zero-byte file, as -# systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - as_executable_p="test -x" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - as_executable_p=: + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi -rm -f conf$$.file +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -565,36 +580,36 @@ # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include #endif -#if HAVE_STDINT_H +#ifdef HAVE_STDINT_H # include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif" @@ -666,6 +681,8 @@ GREP EGREP HAVE_SSL +PCRE_LIBS +PCRE_CFLAGS MYSQL_CONFIG MYSQL_VERSION MYSQL_CFLAGS @@ -686,6 +703,7 @@ CC CFLAGS LDFLAGS +LIBS CPPFLAGS SENDMAIL CPP' @@ -794,10 +812,10 @@ -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) @@ -813,10 +831,10 @@ -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ @@ -1010,19 +1028,19 @@ -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) @@ -1267,6 +1285,7 @@ --with-ssl=[DIR] look for OpenSSL in DIR (Use when it's not found with the default search path) + --with-pcre[=prefix] path to system pcre --with-mysql=[ARG] use MySQL client library [default=yes], optionally specify path to mysql_config --with-postgresql=[ARG] use PostgreSQL library [default=yes], optionally @@ -1279,6 +1298,7 @@ CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory SENDMAIL Path to sendmail @@ -1348,7 +1368,7 @@ if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.60 +generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -1362,7 +1382,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.60. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -1743,7 +1763,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -1787,7 +1807,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -1827,7 +1847,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -1884,7 +1904,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -1925,7 +1945,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1983,7 +2003,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2027,7 +2047,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2168,7 +2188,7 @@ # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. -for ac_file in $ac_files +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in @@ -2196,6 +2216,12 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2207,8 +2233,6 @@ fi ac_exeext=$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. @@ -2386,27 +2410,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -2461,27 +2468,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -2516,27 +2506,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 @@ -2572,27 +2545,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -2708,27 +2664,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 @@ -2784,6 +2723,35 @@ #include #include +// Check varargs macros. These examples are taken from C99 6.10.3.5. +#define debug(...) fprintf (stderr, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + your preprocessor is broken; +#endif +#if BIG_OK +#else + your preprocessor is broken; +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + struct incomplete_array { int datasize; @@ -2799,7 +2767,7 @@ typedef const char *ccp; static inline int -test_restrict(ccp restrict text) +test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. @@ -2809,14 +2777,14 @@ return 0; } -// Check varargs and va_copy work. +// Check varargs and va_copy. static void -test_varargs(const char *format, ...) +test_varargs (const char *format, ...) { va_list args; - va_start(args, format); + va_start (args, format); va_list args_copy; - va_copy(args_copy, args); + va_copy (args_copy, args); const char *str; int number; @@ -2827,47 +2795,46 @@ switch (*format++) { case 's': // string - str = va_arg(args_copy, const char *); + str = va_arg (args_copy, const char *); break; case 'd': // int - number = va_arg(args_copy, int); + number = va_arg (args_copy, int); break; case 'f': // float - fnumber = (float) va_arg(args_copy, double); + fnumber = va_arg (args_copy, double); break; default: break; } } - va_end(args_copy); - va_end(args); + va_end (args_copy); + va_end (args); } int main () { - // Check bool and long long datatypes. + // Check bool. _Bool success = false; - long long int bignum = -1234567890LL; - unsigned long long int ubignum = 1234567890uLL; // Check restrict. - if (test_restrict("String literal") != 0) + if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. - test_varargs("s, d' f .", "string", 65, 34.234); + test_varargs ("s, d' f .", "string", 65, 34.234); + test_varargs_macros (); - // Check incomplete arrays work. + // Check flexible array members. struct incomplete_array *ia = - malloc(sizeof(struct incomplete_array) + (sizeof(double) * 10)); + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = (double) i * 1.234; + ia->data[i] = i * 1.234; - // Check named initialisers. + // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", @@ -2877,10 +2844,11 @@ ni.number = 58; int dynamic_array[ni.number]; - dynamic_array[43] = 543; + dynamic_array[ni.number - 1] = 543; // work around unused variable warnings - return bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'; + return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' + || dynamic_array[ni.number - 1] != 543); ; return 0; @@ -2902,27 +2870,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c99=$ac_arg else echo "$as_me: failed program was:" >&5 @@ -2972,7 +2923,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GDB="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3029,7 +2980,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3069,7 +3020,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3109,7 +3060,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3198,7 +3149,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -3271,7 +3222,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3311,7 +3262,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3351,7 +3302,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_TEST="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3391,7 +3342,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3431,7 +3382,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3472,7 +3423,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_INDENT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3512,7 +3463,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CTAGS="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3552,7 +3503,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ETAGS="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3592,7 +3543,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_EXCTAGS="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3641,7 +3592,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_UPTIME="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3693,7 +3644,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SENDMAIL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3784,17 +3735,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -3828,17 +3772,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -3903,17 +3840,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -3947,17 +3877,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -4012,7 +3935,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4094,7 +4017,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4190,27 +4113,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 @@ -4386,27 +4292,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 @@ -4530,27 +4419,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdbool_h=yes else echo "$as_me: failed program was:" >&5 @@ -4600,27 +4472,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type__Bool=yes else echo "$as_me: failed program was:" >&5 @@ -4693,27 +4548,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 @@ -4771,27 +4609,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 @@ -4846,27 +4667,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -4902,17 +4706,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5003,27 +4800,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -5059,17 +4839,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5160,27 +4933,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -5216,17 +4972,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5317,27 +5066,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -5373,17 +5105,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5474,27 +5199,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -5530,17 +5238,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5631,27 +5332,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -5687,17 +5371,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5788,27 +5465,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -5844,17 +5504,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5945,27 +5598,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -6001,17 +5637,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6102,27 +5731,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -6158,17 +5770,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6259,27 +5864,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -6315,17 +5903,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6416,27 +5997,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -6472,17 +6036,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6573,27 +6130,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -6629,17 +6169,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6730,27 +6263,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -6786,17 +6302,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6887,27 +6396,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -6943,17 +6435,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -7044,27 +6529,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -7100,17 +6568,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -7201,27 +6662,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -7257,17 +6701,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -7358,27 +6795,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -7414,17 +6834,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -7515,27 +6928,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -7571,17 +6967,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -7672,27 +7061,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -7728,17 +7100,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -7838,27 +7203,152 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + +for ac_header in poll.h sys/epoll.h sys/select.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -7894,17 +7384,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -7963,7 +7446,6 @@ done - ### C language support # Only need to check C99 and GNU extensions @@ -8010,27 +7492,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_restrict=$ac_kw else echo "$as_me: failed program was:" >&5 @@ -8092,27 +7557,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 @@ -8184,27 +7632,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv___attribute__=yes else echo "$as_me: failed program was:" >&5 @@ -8264,27 +7695,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ax_cv_gcc_malloc_call=yes else echo "$as_me: failed program was:" >&5 @@ -8347,27 +7761,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 @@ -8427,27 +7824,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 @@ -8505,27 +7885,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 @@ -8586,27 +7949,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then case $ac_type in uint8_t) ac_cv_c_uint8_t=yes ;; *) ac_cv_c_uint8_t=$ac_type ;; @@ -8679,27 +8025,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then case $ac_type in uint16_t) ac_cv_c_uint16_t=yes ;; *) ac_cv_c_uint16_t=$ac_type ;; @@ -8768,27 +8097,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8820,27 +8132,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 @@ -8916,27 +8211,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then case $ac_type in uint32_t) ac_cv_c_uint32_t=yes ;; *) ac_cv_c_uint32_t=$ac_type ;; @@ -9009,27 +8287,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9061,27 +8322,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 @@ -9157,27 +8401,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then case $ac_type in uint64_t) ac_cv_c_uint64_t=yes ;; *) ac_cv_c_uint64_t=$ac_type ;; @@ -9223,12 +8450,18 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -long long int ll = 1LL; int i = 63; +long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + typedef int a[((-9223372036854775807LL < 0 + && 0 < 9223372036854775807ll) + ? 1 : -1)]; + int i = 63; int main () { -long long int llmax = (long long int) -1; - return ll << i | ll >> i | llmax / ll | llmax % ll; +long long int llmax = 9223372036854775807ll; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll)); ; return 0; } @@ -9246,18 +8479,55 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + if test "$cross_compiling" = yes; then + ac_cv_type_long_long_int=yes +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif +int +main () +{ +long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -9269,13 +8539,25 @@ (exit $ac_status); }; }; then ac_cv_type_long_long_int=yes else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_type_long_long_int=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long_long_int=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 @@ -9327,27 +8609,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_intmax_t=yes else echo "$as_me: failed program was:" >&5 @@ -9390,12 +8655,16 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -unsigned long long int ull = 1ULL; int i = 63; +unsigned long long int ull = 18446744073709551615ULL; + typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; int main () { -unsigned long long int ullmax = (unsigned long long int) -1; - return ull << i | ull >> i | ullmax / ull | ullmax % ull; +unsigned long long int ullmax = 18446744073709551615ull; + return (ull << 63 | ull >> 63 | ull << i | ull >> i + | ullmax / ull | ullmax % ull); ; return 0; } @@ -9413,27 +8682,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_type_unsigned_long_long_int=yes else echo "$as_me: failed program was:" >&5 @@ -9442,7 +8695,7 @@ ac_cv_type_unsigned_long_long_int=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5 @@ -9494,27 +8747,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_uintmax_t=yes else echo "$as_me: failed program was:" >&5 @@ -9583,27 +8819,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_int=yes else echo "$as_me: failed program was:" >&5 @@ -9617,16 +8836,15 @@ { echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 echo "${ECHO_T}$ac_cv_type_int" >&6; } +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. { echo "$as_me:$LINENO: checking size of int" >&5 echo $ECHO_N "checking size of int... $ECHO_C" >&6; } if test "${ac_cv_sizeof_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_int" = yes; then - # The cast to long int works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -9636,7 +8854,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef int ac__type_sizeof_; + typedef int ac__type_sizeof_; int main () { @@ -9660,27 +8878,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -9690,7 +8891,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef int ac__type_sizeof_; + typedef int ac__type_sizeof_; int main () { @@ -9714,27 +8915,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -9761,7 +8945,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef int ac__type_sizeof_; + typedef int ac__type_sizeof_; int main () { @@ -9785,27 +8969,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -9815,7 +8982,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef int ac__type_sizeof_; + typedef int ac__type_sizeof_; int main () { @@ -9839,27 +9006,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -9896,7 +9046,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef int ac__type_sizeof_; + typedef int ac__type_sizeof_; int main () { @@ -9920,27 +9070,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 @@ -9953,11 +9086,15 @@ done case $ac_lo in ?*) ac_cv_sizeof_int=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +'') if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi ;; esac else cat >conftest.$ac_ext <<_ACEOF @@ -9967,7 +9104,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef int ac__type_sizeof_; + typedef int ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include @@ -10026,21 +9163,25 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int) +if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_int=0 -fi fi { echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF @@ -10083,27 +9224,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 @@ -10117,16 +9241,15 @@ { echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 echo "${ECHO_T}$ac_cv_type_long" >&6; } +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. { echo "$as_me:$LINENO: checking size of long" >&5 echo $ECHO_N "checking size of long... $ECHO_C" >&6; } if test "${ac_cv_sizeof_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_long" = yes; then - # The cast to long int works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -10136,7 +9259,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long ac__type_sizeof_; + typedef long ac__type_sizeof_; int main () { @@ -10160,27 +9283,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -10190,7 +9296,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long ac__type_sizeof_; + typedef long ac__type_sizeof_; int main () { @@ -10214,27 +9320,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -10261,7 +9350,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long ac__type_sizeof_; + typedef long ac__type_sizeof_; int main () { @@ -10285,27 +9374,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -10315,7 +9387,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long ac__type_sizeof_; + typedef long ac__type_sizeof_; int main () { @@ -10339,27 +9411,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -10396,7 +9451,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long ac__type_sizeof_; + typedef long ac__type_sizeof_; int main () { @@ -10420,27 +9475,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 @@ -10453,11 +9491,15 @@ done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) +'') if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long=0 + fi ;; esac else cat >conftest.$ac_ext <<_ACEOF @@ -10467,7 +9509,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef long ac__type_sizeof_; + typedef long ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include @@ -10526,21 +9568,25 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long) +if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long=0 + fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_long=0 -fi fi { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF @@ -10583,27 +9629,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_int64_t=yes else echo "$as_me: failed program was:" >&5 @@ -10617,16 +9646,15 @@ { echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5 echo "${ECHO_T}$ac_cv_type_int64_t" >&6; } +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. { echo "$as_me:$LINENO: checking size of int64_t" >&5 echo $ECHO_N "checking size of int64_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_int64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_int64_t" = yes; then - # The cast to long int works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -10636,7 +9664,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef int64_t ac__type_sizeof_; + typedef int64_t ac__type_sizeof_; int main () { @@ -10660,27 +9688,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -10690,7 +9701,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef int64_t ac__type_sizeof_; + typedef int64_t ac__type_sizeof_; int main () { @@ -10714,27 +9725,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -10761,7 +9755,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef int64_t ac__type_sizeof_; + typedef int64_t ac__type_sizeof_; int main () { @@ -10785,27 +9779,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -10815,7 +9792,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef int64_t ac__type_sizeof_; + typedef int64_t ac__type_sizeof_; int main () { @@ -10839,27 +9816,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -10896,7 +9856,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef int64_t ac__type_sizeof_; + typedef int64_t ac__type_sizeof_; int main () { @@ -10920,27 +9880,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 @@ -10953,11 +9896,15 @@ done case $ac_lo in ?*) ac_cv_sizeof_int64_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int64_t) +'') if test "$ac_cv_type_int64_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int64_t) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int64_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int64_t=0 + fi ;; esac else cat >conftest.$ac_ext <<_ACEOF @@ -10967,7 +9914,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef int64_t ac__type_sizeof_; + typedef int64_t ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include @@ -11026,21 +9973,25 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int64_t) +if test "$ac_cv_type_int64_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int64_t) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int64_t) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int64_t=0 + fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_int64_t=0 -fi fi { echo "$as_me:$LINENO: result: $ac_cv_sizeof_int64_t" >&5 echo "${ECHO_T}$ac_cv_sizeof_int64_t" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_INT64_T $ac_cv_sizeof_int64_t _ACEOF @@ -11083,27 +10034,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_intmax_t=yes else echo "$as_me: failed program was:" >&5 @@ -11117,16 +10051,15 @@ { echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5 echo "${ECHO_T}$ac_cv_type_intmax_t" >&6; } +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. { echo "$as_me:$LINENO: checking size of intmax_t" >&5 echo $ECHO_N "checking size of intmax_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_intmax_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_intmax_t" = yes; then - # The cast to long int works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -11136,7 +10069,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef intmax_t ac__type_sizeof_; + typedef intmax_t ac__type_sizeof_; int main () { @@ -11160,27 +10093,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -11190,7 +10106,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef intmax_t ac__type_sizeof_; + typedef intmax_t ac__type_sizeof_; int main () { @@ -11214,27 +10130,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -11261,7 +10160,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef intmax_t ac__type_sizeof_; + typedef intmax_t ac__type_sizeof_; int main () { @@ -11285,27 +10184,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -11315,7 +10197,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef intmax_t ac__type_sizeof_; + typedef intmax_t ac__type_sizeof_; int main () { @@ -11339,27 +10221,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -11396,7 +10261,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef intmax_t ac__type_sizeof_; + typedef intmax_t ac__type_sizeof_; int main () { @@ -11420,27 +10285,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 @@ -11453,11 +10301,15 @@ done case $ac_lo in ?*) ac_cv_sizeof_intmax_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (intmax_t) +'') if test "$ac_cv_type_intmax_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (intmax_t) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (intmax_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_intmax_t=0 + fi ;; esac else cat >conftest.$ac_ext <<_ACEOF @@ -11467,7 +10319,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef intmax_t ac__type_sizeof_; + typedef intmax_t ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include @@ -11526,21 +10378,25 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (intmax_t) +if test "$ac_cv_type_intmax_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (intmax_t) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (intmax_t) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } + else + ac_cv_sizeof_intmax_t=0 + fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_intmax_t=0 -fi fi { echo "$as_me:$LINENO: result: $ac_cv_sizeof_intmax_t" >&5 echo "${ECHO_T}$ac_cv_sizeof_intmax_t" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t _ACEOF @@ -11583,27 +10439,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_time_t=yes else echo "$as_me: failed program was:" >&5 @@ -11617,16 +10456,15 @@ { echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5 echo "${ECHO_T}$ac_cv_type_time_t" >&6; } +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. { echo "$as_me:$LINENO: checking size of time_t" >&5 echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_time_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_time_t" = yes; then - # The cast to long int works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -11636,7 +10474,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef time_t ac__type_sizeof_; + typedef time_t ac__type_sizeof_; int main () { @@ -11660,27 +10498,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -11690,7 +10511,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef time_t ac__type_sizeof_; + typedef time_t ac__type_sizeof_; int main () { @@ -11714,27 +10535,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -11761,7 +10565,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef time_t ac__type_sizeof_; + typedef time_t ac__type_sizeof_; int main () { @@ -11785,27 +10589,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -11815,7 +10602,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef time_t ac__type_sizeof_; + typedef time_t ac__type_sizeof_; int main () { @@ -11839,27 +10626,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -11896,7 +10666,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef time_t ac__type_sizeof_; + typedef time_t ac__type_sizeof_; int main () { @@ -11920,27 +10690,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 @@ -11953,11 +10706,15 @@ done case $ac_lo in ?*) ac_cv_sizeof_time_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +'') if test "$ac_cv_type_time_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (time_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_time_t=0 + fi ;; esac else cat >conftest.$ac_ext <<_ACEOF @@ -11967,7 +10724,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef time_t ac__type_sizeof_; + typedef time_t ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include @@ -12026,21 +10783,25 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +if test "$ac_cv_type_time_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (time_t) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } + else + ac_cv_sizeof_time_t=0 + fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_time_t=0 -fi fi { echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_TIME_T $ac_cv_sizeof_time_t _ACEOF @@ -12083,27 +10844,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_void_p=yes else echo "$as_me: failed program was:" >&5 @@ -12117,16 +10861,15 @@ { echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 echo "${ECHO_T}$ac_cv_type_void_p" >&6; } +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. { echo "$as_me:$LINENO: checking size of void *" >&5 echo $ECHO_N "checking size of void *... $ECHO_C" >&6; } if test "${ac_cv_sizeof_void_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_void_p" = yes; then - # The cast to long int works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -12136,7 +10879,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef void * ac__type_sizeof_; + typedef void * ac__type_sizeof_; int main () { @@ -12160,27 +10903,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -12190,7 +10916,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef void * ac__type_sizeof_; + typedef void * ac__type_sizeof_; int main () { @@ -12214,27 +10940,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -12261,7 +10970,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef void * ac__type_sizeof_; + typedef void * ac__type_sizeof_; int main () { @@ -12285,27 +10994,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -12315,7 +11007,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef void * ac__type_sizeof_; + typedef void * ac__type_sizeof_; int main () { @@ -12339,27 +11031,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -12396,7 +11071,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef void * ac__type_sizeof_; + typedef void * ac__type_sizeof_; int main () { @@ -12420,27 +11095,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 @@ -12453,11 +11111,15 @@ done case $ac_lo in ?*) ac_cv_sizeof_void_p=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +'') if test "$ac_cv_type_void_p" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_void_p=0 + fi ;; esac else cat >conftest.$ac_ext <<_ACEOF @@ -12467,7 +11129,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef void * ac__type_sizeof_; + typedef void * ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include @@ -12526,21 +11188,25 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +if test "$ac_cv_type_void_p" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } + else + ac_cv_sizeof_void_p=0 + fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_void_p=0 -fi fi { echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF @@ -12591,27 +11257,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_m_sin=yes else echo "$as_me: failed program was:" >&5 @@ -12620,7 +11270,7 @@ ac_cv_lib_m_sin=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -12678,27 +11328,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_gettext=yes else echo "$as_me: failed program was:" >&5 @@ -12707,7 +11341,7 @@ ac_cv_lib_intl_gettext=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -12765,27 +11399,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_crypt_crypt=yes else echo "$as_me: failed program was:" >&5 @@ -12794,7 +11412,7 @@ ac_cv_lib_crypt_crypt=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -12858,27 +11476,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_search_gethostbyname=$ac_res else echo "$as_me: failed program was:" >&5 @@ -12887,7 +11489,7 @@ fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_gethostbyname+set}" = set; then break @@ -12957,27 +11559,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_search_socket=$ac_res else echo "$as_me: failed program was:" >&5 @@ -12986,7 +11572,7 @@ fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_socket+set}" = set; then break @@ -13050,27 +11636,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_socket=yes else echo "$as_me: failed program was:" >&5 @@ -13079,7 +11649,7 @@ ac_cv_lib_socket_socket=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -13164,12 +11734,215 @@ if test "$HAVE_SSL" = "yes"; then - cat >>confdefs.h <<\_ACEOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SSL 1 _ACEOF fi +# system libpcre +{ echo "$as_me:$LINENO: checking lib pcre" >&5 +echo $ECHO_N "checking lib pcre... $ECHO_C" >&6; } + +# Check whether --with-pcre was given. +if test "${with_pcre+set}" = set; then + withval=$with_pcre; +else + with_pcre="yes" +fi + +if test ".$with_pcre" = ".no" ; then + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } + +else + { echo "$as_me:$LINENO: result: (testing)" >&5 +echo "${ECHO_T}(testing)" >&6; } + +{ echo "$as_me:$LINENO: checking for pcre_study in -lpcre" >&5 +echo $ECHO_N "checking for pcre_study in -lpcre... $ECHO_C" >&6; } +if test "${ac_cv_lib_pcre_pcre_study+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpcre $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pcre_study (); +int +main () +{ +return pcre_study (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_pcre_pcre_study=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_pcre_pcre_study=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pcre_pcre_study" >&5 +echo "${ECHO_T}$ac_cv_lib_pcre_pcre_study" >&6; } +if test $ac_cv_lib_pcre_pcre_study = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPCRE 1 +_ACEOF + + LIBS="-lpcre $LIBS" + +fi + + if test "$ac_cv_lib_pcre_pcre_study" = "yes" ; then + PCRE_LIBS="-lpcre" + { echo "$as_me:$LINENO: checking lib pcre" >&5 +echo $ECHO_N "checking lib pcre... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $PCRE_LIBS" >&5 +echo "${ECHO_T}$PCRE_LIBS" >&6; } + + else + OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$with_pcre/lib" + OLDCPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS -I$with_pcre/include" + OLDLIBS="$LIBS" + +{ echo "$as_me:$LINENO: checking for pcre_compile in -lpcre" >&5 +echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6; } +if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpcre $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pcre_compile (); +int +main () +{ +return pcre_compile (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_pcre_pcre_compile=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_pcre_pcre_compile=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pcre_pcre_compile" >&5 +echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6; } +if test $ac_cv_lib_pcre_pcre_compile = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPCRE 1 +_ACEOF + + LIBS="-lpcre $LIBS" + +fi + + CPPFLAGS="$OLDCPPFLAGS" + LDFLAGS="$OLDLDFLAGS" + LIBS="$OLDLIBS" + if test "$ac_cv_lib_pcre_pcre_compile" = "yes" ; then + { echo "$as_me:$LINENO: result: .setting PCRE_LIBS -L$with_pcre/lib -lpcre" >&5 +echo "${ECHO_T}.setting PCRE_LIBS -L$with_pcre/lib -lpcre" >&6; } + PCRE_LIBS="-L$with_pcre/lib -lpcre" + test -d "$with_pcre/include" && PCRE_CFLAGS="-I$with_pcre/include" + { echo "$as_me:$LINENO: checking lib pcre" >&5 +echo $ECHO_N "checking lib pcre... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $PCRE_LIBS" >&5 +echo "${ECHO_T}$PCRE_LIBS" >&6; } + + else + { echo "$as_me:$LINENO: checking lib pcre" >&5 +echo $ECHO_N "checking lib pcre... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: no, (WARNING)" >&5 +echo "${ECHO_T}no, (WARNING)" >&6; } + + fi + fi +fi + + + +if test "no$PCRE_LIBS" != "no"; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_PCRE 1 +_ACEOF + +fi + ### Databases @@ -13218,7 +11991,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13359,7 +12132,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13555,27 +12328,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } @@ -13691,27 +12447,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_bindtextdomain=yes else echo "$as_me: failed program was:" >&5 @@ -13720,7 +12460,7 @@ ac_cv_func_bindtextdomain=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_bindtextdomain" >&5 @@ -13795,27 +12535,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_crypt=yes else echo "$as_me: failed program was:" >&5 @@ -13824,7 +12548,7 @@ ac_cv_func_crypt=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5 @@ -13904,27 +12628,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -13933,7 +12641,7 @@ eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -13957,40 +12665,24 @@ } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF @@ -14005,7 +12697,8 @@ echo "${ECHO_T}no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext { echo "$as_me:$LINENO: checking for gai_strerror" >&5 echo $ECHO_N "checking for gai_strerror... $ECHO_C" >&6; } @@ -14070,27 +12763,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gai_strerror=yes else echo "$as_me: failed program was:" >&5 @@ -14099,7 +12776,7 @@ ac_cv_func_gai_strerror=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_gai_strerror" >&5 @@ -14174,27 +12851,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 @@ -14203,7 +12864,7 @@ ac_cv_func_getaddrinfo=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 @@ -14278,27 +12939,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getdate=yes else echo "$as_me: failed program was:" >&5 @@ -14307,7 +12952,7 @@ ac_cv_func_getdate=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_getdate" >&5 @@ -14382,27 +13027,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname2=yes else echo "$as_me: failed program was:" >&5 @@ -14411,7 +13040,7 @@ ac_cv_func_gethostbyname2=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname2" >&5 @@ -14486,27 +13115,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getnameinfo=yes else echo "$as_me: failed program was:" >&5 @@ -14515,7 +13128,7 @@ ac_cv_func_getnameinfo=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5 @@ -14590,27 +13203,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpagesize=yes else echo "$as_me: failed program was:" >&5 @@ -14619,7 +13216,7 @@ ac_cv_func_getpagesize=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_getpagesize" >&5 @@ -14694,27 +13291,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getrlimit=yes else echo "$as_me: failed program was:" >&5 @@ -14723,7 +13304,7 @@ ac_cv_func_getrlimit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_getrlimit" >&5 @@ -14798,27 +13379,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getrusage=yes else echo "$as_me: failed program was:" >&5 @@ -14827,7 +13392,7 @@ ac_cv_func_getrusage=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_getrusage" >&5 @@ -14908,27 +13473,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -14937,7 +13486,7 @@ eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -15014,27 +13563,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_inet_pton=yes else echo "$as_me: failed program was:" >&5 @@ -15043,7 +13576,7 @@ ac_cv_func_inet_pton=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_inet_pton" >&5 @@ -15118,27 +13651,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_setitimer=yes else echo "$as_me: failed program was:" >&5 @@ -15147,7 +13664,7 @@ ac_cv_func_setitimer=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_setitimer" >&5 @@ -15222,27 +13739,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_setlocale=yes else echo "$as_me: failed program was:" >&5 @@ -15251,7 +13752,7 @@ ac_cv_func_setlocale=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_setlocale" >&5 @@ -15302,27 +13803,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -15358,17 +13842,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -15495,27 +13972,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -15524,7 +13985,7 @@ eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -15637,7 +14098,7 @@ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include -#if HAVE_VFORK_H +#ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming @@ -15858,27 +14319,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -15887,7 +14332,7 @@ eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -15982,7 +14427,7 @@ -for ac_func in cbrt getuid geteuid seteuid getpriority setpriority socketpair +for ac_func in cbrt log2 getuid geteuid seteuid getpriority setpriority do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -16048,27 +14493,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -16077,7 +14506,7 @@ eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -16097,7 +14526,7 @@ -for ac_func in sigaction sigprocmask imaxdiv kqueue valloc writev +for ac_func in socketpair sigaction sigprocmask imaxdiv valloc writev do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -16163,27 +14592,111 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + + + +for ac_func in fcntl pselect poll ppoll pollts kqueue epoll_ctl +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* 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 +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -16192,7 +14705,7 @@ eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -16275,27 +14788,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -16304,7 +14801,7 @@ eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -16557,27 +15054,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -16586,7 +15067,7 @@ eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -16672,27 +15153,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -16701,7 +15166,7 @@ eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -16855,27 +15320,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -16884,7 +15333,7 @@ eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -16961,27 +15410,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_sysconf=yes else echo "$as_me: failed program was:" >&5 @@ -16990,7 +15423,7 @@ ac_cv_func_sysconf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_sysconf" >&5 @@ -17065,27 +15498,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_textdomain=yes else echo "$as_me: failed program was:" >&5 @@ -17094,7 +15511,7 @@ ac_cv_func_textdomain=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_textdomain" >&5 @@ -17174,27 +15591,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -17203,7 +15604,7 @@ eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -17288,27 +15689,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@ -17317,7 +15702,7 @@ eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` @@ -17375,27 +15760,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_union_wait=yes else echo "$as_me: failed program was:" >&5 @@ -17452,8 +15820,7 @@ main () { #ifndef h_errno - char *p = (char *) h_errno; - return !p; + (void) h_errno; #endif ; @@ -17473,27 +15840,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_have_decl_h_errno=yes else echo "$as_me: failed program was:" >&5 @@ -17568,27 +15918,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_struct_sockaddr_in6=yes else echo "$as_me: failed program was:" >&5 @@ -17650,27 +15983,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_safe_toupper=yes else echo "$as_me: failed program was:" >&5 @@ -17712,8 +16028,7 @@ main () { #ifndef SIGCHLD - char *p = (char *) SIGCHLD; - return !p; + (void) SIGCHLD; #endif ; @@ -17733,27 +16048,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_have_decl_SIGCHLD=yes else echo "$as_me: failed program was:" >&5 @@ -17805,8 +16103,7 @@ main () { #ifndef SIGCLD - char *p = (char *) SIGCLD; - return !p; + (void) SIGCLD; #endif ; @@ -17826,27 +16123,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_have_decl_SIGCLD=yes else echo "$as_me: failed program was:" >&5 @@ -18065,7 +16345,8 @@ ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -18074,10 +16355,13 @@ alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + + # PATH needs CR @@ -18301,19 +16585,28 @@ as_mkdir_p=false fi -# Find out whether ``test -x'' works. Don't use a zero-byte file, as -# systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - as_executable_p="test -x" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - as_executable_p=: + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi -rm -f conf$$.file +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -18329,7 +16622,7 @@ # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.60. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18357,7 +16650,7 @@ Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -18378,7 +16671,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.60, +configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. @@ -18619,6 +16912,8 @@ GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim HAVE_SSL!$HAVE_SSL$ac_delim +PCRE_LIBS!$PCRE_LIBS$ac_delim +PCRE_CFLAGS!$PCRE_CFLAGS$ac_delim MYSQL_CONFIG!$MYSQL_CONFIG$ac_delim MYSQL_VERSION!$MYSQL_VERSION$ac_delim MYSQL_CFLAGS!$MYSQL_CFLAGS$ac_delim @@ -18634,7 +16929,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 81; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 83; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 Index: Makefile.in =================================================================== --- Makefile.in (.../p5) (revision 1176) +++ Makefile.in (.../p6) (revision 1176) @@ -3,7 +3,7 @@ # - System configuration - # VERSION=1.8.3 -PATCHLEVEL=5 +PATCHLEVEL=6 # # This section of the file should be automatically configured by @@ -20,9 +20,9 @@ SQL_CFLAGS=@MYSQL_CFLAGS@ @POSTGRESQL_CFLAGS@ @SQLITE3_CFLAGS@ SQL_LDFLAGS=@MYSQL_LDFLAGS@ @POSTGRESQL_LDFLAGS@ @SQLITE3_LDFLAGS@ -CCFLAGS=@CFLAGS@ -I.. -I../hdrs -LDFLAGS=@LDFLAGS@ -CLIBS=@LIBS@ +CCFLAGS=@CFLAGS@ -I.. -I../hdrs @PCRE_CFLAGS@ +LDFLAGS=@LDFLAGS@ +CLIBS=@LIBS@ @PCRE_LIBS@ INSTALL=@INSTALL@ INSTALLDIR=$installdir CP=@CP@ Index: hints/openbsd.txt =================================================================== --- hints/openbsd.txt (.../p5) (revision 1176) +++ hints/openbsd.txt (.../p6) (revision 1176) @@ -1,7 +1,8 @@ Penn will compile and run out of the box on OpenBSD, with the caveats below: -* If you're using an IPv6-enabled install and 'sysctl - net.inet6.ip6.v6only' prints out 1, you'll have to get a sysadmin to - change it to 0 or run configure with --disable-ipv6 to allow IPv4 - connections. +* OpenBSD (4.2, probably other releases as well) will not forward IPv4 + connection to a listening IPv6 port by default, and the sysctl + invocation that should change this fails with an 'Operation not + supported' error. Pass --disable-ipv6 to configure. + Index: src/mysocket.c =================================================================== --- src/mysocket.c (.../p5) (revision 1176) +++ src/mysocket.c (.../p6) (revision 1176) @@ -88,6 +88,10 @@ #include #endif +#ifdef HAVE_POLL_H +#include +#endif + #include "conf.h" #include "externs.h" #include "mymalloc.h" @@ -95,6 +99,10 @@ #include "ident.h" #include "confmagic.h" +static int connect_nonb + (int sockfd, const struct sockaddr *saptr, socklen_t salen, bool nonb); + + #ifndef INFOSLAVE /** Given a sockaddr structure, try to look up and return hostname info. * If we can't get a hostname from DNS (or if we're not using DNS), @@ -148,12 +156,12 @@ * \param myiterface pointer to sockaddr structure for specific interface. * \param myilen length of myiterface * \param port port to connect to. - * \param timeout pointer to timeout for connection. + * \param nonb true to do a nonblocking connect in the background. * \return file descriptor for connected socket, or -1 for failure. */ int make_socket_conn(const char *host, int socktype, struct sockaddr *myiterface, - socklen_t myilen, Port_t port, int *timeout) + socklen_t myilen, Port_t port, bool nonb) { struct addrinfo hints, *server, *save; char cport[NI_MAXSERV]; @@ -168,15 +176,19 @@ sprintf(cport, "%hu", port); if ((res = getaddrinfo(host, cport, &hints, &server)) != 0) { + lock_file(stderr); fprintf(stderr, "In getaddrinfo: %s\n", gai_strerror(res)); fprintf(stderr, "Host: %s Port %hu\n", host, port); fflush(stderr); + unlock_file(stderr); return -1; } if (!server) { + lock_file(stderr); fprintf(stderr, "Couldn't get address for host %s port %hu\n", host, port); fflush(stderr); + unlock_file(stderr); return -1; } @@ -192,15 +204,14 @@ * an IPv4 socket and an IPv6 interface. Happens with ident, which * seems to work okay without the bind(). */ if (bind(s, myiterface, myilen) < 0) - perror("bind failed (Possibly harmless)"); + penn_perror("bind failed (Possibly harmless)"); } - if ((err = connect_nonb(s, server->ai_addr, server->ai_addrlen, timeout)) == - 0) + if ((err = connect_nonb(s, server->ai_addr, server->ai_addrlen, nonb)) == 0) break; #ifdef DEBUG - perror("connect failed (Probably harmless)"); + penn_perror("connect failed (Probably harmless)"); #endif closesocket(s); @@ -217,8 +228,10 @@ if (port != IDPORT) { #endif + lock_file(stderr); fprintf(stderr, "Couldn't connect to %s on port %hu\n", host, port); fflush(stderr); + unlock_file(stderr); #ifndef DEBUG } #endif @@ -290,14 +303,14 @@ opt = 1; if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *) &opt, sizeof(opt)) < 0) { - perror("setsockopt (Possibly ignorable)"); + penn_perror("setsockopt (Possibly ignorable)"); continue; } if (bind(s, server->ai_addr, server->ai_addrlen) == 0) break; /* Success */ - perror("binding stream socket (Possibly ignorable)"); + penn_perror("binding stream socket (Possibly ignorable)"); closesocket(s); } while ((server = server->ai_next) != NULL); @@ -330,29 +343,69 @@ #ifdef WIN32 unsigned long arg = 1; if (ioctlsocket(s, FIONBIO, &arg) == -1) { + penn_perror("make_nonblocking: ioctlsocket"); + mush_panic(T("Fatal network error!")); + } #else int flags; if ((flags = fcntl(s, F_GETFL, 0)) == -1) { - perror("make_nonblocking: fcntl"); + penn_perror("make_nonblocking: fcntl"); #ifndef INFOSLAVE - mush_panic("F_GETFL fcntl failed"); + mush_panic(T("Fatal network error!")); #else exit(1); #endif } - if (fcntl(s, F_SETFL, flags | O_NDELAY) == -1) { -#endif /* WIN32 */ - perror("make_nonblocking: fcntl"); + flags |= O_NDELAY; + + if (fcntl(s, F_SETFL, flags) == -1) { + penn_perror("make_nonblocking: fcntl"); #ifndef INFOSLAVE - mush_panic("O_NDELAY fcntl failed"); + mush_panic(T("Fatal network error!")); #else exit(1); #endif } +#endif } +/** Make a socket do blocking i/o. + * \param s file descriptor of socket. + */ +void +make_blocking(int s) +{ +#ifdef WIN32 + unsigned long arg = 0; + if (ioctlsocket(s, FIONBIO, &arg) == -1) { + penn_perror("make_blocking: ioctlsocket"); + mush_panic(T("Fatal network error")); + } +#else + int flags; + + if ((flags = fcntl(s, F_GETFL, 0)) == -1) { + penn_perror("make_blocking: fcntl"); +#ifndef INFOSLAVE + mush_panic(T("Fatal network error!")); +#else + exit(1); +#endif + } + + flags &= ~O_NDELAY; + if (fcntl(s, F_SETFL, flags) == -1) { + penn_perror("make_nonblocking: fcntl"); +#ifndef INFOSLAVE + mush_panic(T("Fatal network error!")); +#else + exit(1); +#endif + } +#endif +} #ifndef INFOSLAVE /** Enable TCP keepalive on the given socket if we can. @@ -399,24 +452,19 @@ * \param sockfd file descriptor of socket. * \param saptr pointer to sockaddr structure with connection data. * \param salen length of saptr. - * \param timeout pointer to timeout value. If given, nonblocking connect. + * \param nonb true for a nonblocking connect in the background * \retval 0 success. * \retval -1 failure. */ int connect_nonb(int sockfd, const struct sockaddr *saptr, socklen_t salen, - int *timeout) + bool nonb) { - int n, error; - time_t start, end; - socklen_t len; - fd_set rset, wset; - struct timeval tval; + int n; - if (timeout && *timeout) + if (nonb) make_nonblocking(sockfd); - error = 0; if ((n = connect(sockfd, (const struct sockaddr *) saptr, salen)) < 0) #ifdef WIN32 if (n == SOCKET_ERROR && WSAGetLastError() != WSAEWOULDBLOCK) @@ -425,45 +473,52 @@ #endif return -1; - /* connect completed immediately or we did a blocking connect */ - if (!timeout || !*timeout || n == 0) - goto done; + return 0; +} - FD_ZERO(&rset); - FD_SET(sockfd, &rset); - wset = rset; - tval.tv_sec = *timeout; - tval.tv_usec = 0; - time(&start); +/** Wait up to N seconds for a non-blocking connect to establish. + * \param s the socket + * \param secs timeout value + * \return -1 on error, 0 if the socket is not yet connected, >0 on success + */ +int +wait_for_connect(int s, int secs) +{ + int res; +#ifdef HAVE_POLL + struct pollfd ev; - if ((n = select(sockfd + 1, &rset, &wset, NULL, &tval)) == 0) { - closesocket(sockfd); /* timeout */ - errno = ETIMEDOUT; - return -1; + ev.fd = s; + ev.events = POLLOUT; + if ((res = poll(&ev, 1, secs)) <= 0) { + if (res == 0) + errno = EINPROGRESS; + return res; + } else { + errno = ENOTCONN; + return ev.revents & POLLOUT; } +#else + fdset_t wrs; + struct timeval timeout, *to; - time(&end); - *timeout -= end - start; - *timeout = *timeout < 0 ? 0 : *timeout; - - if (FD_ISSET(sockfd, &rset) || FD_ISSET(sockfd, &wset)) { - len = sizeof(error); - if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *) &error, &len) < 0) - return -1; /* Solaris pending error */ + FD_ZERO(&wrs); + FD_SET(s, &wrs); + timeout.tv_secs = secs; + timeout.tv_usecs = 0; + if (secs >= 0) + to = &timeout; + if ((res = select(s + 1, NULL, &wrs, NULL, to)) <= 0) { +#ifndef WIN32 + if (res == 0) + errno = EINPROGRESS; +#endif + return res; } else - return -1; - -done: - - if (error) { - closesocket(sockfd); /* just in case */ - errno = error; - return -1; - } - return 0; + return FD_ISSET(s, &wrs); +#endif } - /* The following functions are from W. Ridhard Steven's libgai, * modified by Shawn Wagner for PennMUSH. These arn't full * implementations- they don't handle unix-domain sockets or named Index: src/fundb.c =================================================================== --- src/fundb.c (.../p5) (revision 1176) +++ src/fundb.c (.../p6) (revision 1176) @@ -1223,8 +1223,8 @@ } ltype = get_locktype(p); - if (GoodObject(it) && (ltype != NULL) - && Can_Read_Lock(executor, it, ltype)) { + if (GoodObject(it) && (ltype !=NULL) + &&Can_Read_Lock(executor, it, ltype)) { ll = getlockstruct(it, ltype); if (ll) { if (fullname) @@ -1262,7 +1262,7 @@ lock_type real_ltype; if ((ltype = strchr(args[0], '/'))) { - *ltype++ = '\0'; + *ltype ++ = '\0'; upcasestr(ltype); } @@ -1306,7 +1306,7 @@ it = match_thing(executor, args[0]); ltype = get_locktype(p); - if (!GoodObject(it) || (ltype == NULL) || !Can_Read_Lock(executor, it, ltype)) { + if (!GoodObject(it) || (ltype == NULL) ||!Can_Read_Lock(executor, it, ltype)) { safe_str("#-1", buff, bp); return; } Index: src/extchat.c =================================================================== --- src/extchat.c (.../p5) (revision 1176) +++ src/extchat.c (.../p6) (revision 1176) @@ -238,8 +238,7 @@ num_channels = i; /* Check for **END OF DUMP*** */ - fgets(buff, sizeof buff, fp); - if (!buff) + if (!fgets(buff, sizeof buff, fp)) do_rawlog(LT_ERR, T("CHAT: No end-of-dump marker in the chat database.")); else if (strcmp(buff, EOD) != 0) do_rawlog(LT_ERR, T("CHAT: Trailing garbage in the chat database.")); @@ -307,8 +306,7 @@ num_channels = i; /* Check for **END OF DUMP*** */ - fgets(buff, sizeof buff, fp); - if (!buff) + if (!fgets(buff, sizeof buff, fp)) do_rawlog(LT_ERR, T("CHAT: No end-of-dump marker in the chat database.")); else if (strcmp(buff, EOD) != 0) do_rawlog(LT_ERR, T("CHAT: Trailing garbage in the chat database.")); @@ -1853,11 +1851,11 @@ const char *p; char name[BUFFER_LEN]; - mush_strncpy(name, remove_markup(n, NULL), BUFFER_LEN); - - if (!name || !*name) + if (!n || !*n) return 0; + mush_strncpy(name, remove_markup(n, NULL), BUFFER_LEN); + /* No leading spaces */ if (isspace((unsigned char) *name)) return 0; @@ -2079,7 +2077,8 @@ if (SUPPORT_PUEBLO) notify_noenter(player, open_tag("SAMP")); notify_format(player, "%-30s %-5s %8s %-16s %-8s %-3s", - "Name", "Users", "Msgs", T("Chan Type"), "Status", "Buf"); + T("Name"), T("Users"), T("Msgs"), T("Chan Type"), T("Status"), + T("Buf")); for (c = channels; c; c = c->next) { strcpy(cleanname, remove_markup(ChanName(c), NULL)); if (Chan_Can_See(c, player) && string_prefix(cleanname, partname)) { @@ -2128,7 +2127,7 @@ /* Does the player own it? */ ChanCreator(c) == player ? '*' : '-', /* User status */ - u ? (Chanuser_Gag(u) ? "Gag" : "On") : "Off", + u ? (Chanuser_Gag(u) ? T("Gag") : T("On")) : T("Off"), (u && Chanuser_Quiet(u)) ? 'Q' : ' ', (u && Chanuser_Hide(u)) ? 'H' : ' ', bufferq_lines(ChanBufferQ(c))); Index: src/Makefile.in =================================================================== --- src/Makefile.in (.../p5) (revision 1176) +++ src/Makefile.in (.../p6) (revision 1176) @@ -147,26 +147,29 @@ indent: (set +e; for file in *.dst *.c ../hdrs/*.h ; do echo $$file; \ @INDENT@ -npro -kr -ci2 -ss -psl -ip4 -i2 -cs -l80 -lc75 -nut \ - -T acsflag -T aig_func -T ALIST -T ansi_string -T ATRALIAS -T ATTR \ - -T BOOL -T bool -T boolexp -T boolexp_type -T BQUE -T branch_chain \ - -T BUFFERQ -T bvm_opcode -T BYTE -T CDESC -T CHAN -T CHANLIST \ - -T CHANUSER -T chunk_reference_t -T CNode -T COMLIST \ - -T command_func -T COMMAND_INFO -T comp_func -T compile_data \ - -T COMSORTSTRUC -T config_func -T CType -T dbref -T Debug_Info \ - -T DESC -T dfa_match_data -T eptrblock -T EVAL_CONTEXT -T FBLOCK \ - -T fd_type -T FLAG -T FLAG_ALIAS -T FLAGSPACE -T folder_array \ - -T FUN -T function_func -T FUNTAB -T GLOBALTAB -T HASHENT \ - -T HASHTAB -T heapframe -T IVAL -T list_type_list -T lock_list \ - -T lock_type -T LOCKMSGINFO -T LONG -T MAIL -T mail_flag \ - -T makerecord -T markup_information -T match_data -T MATH -T MEM \ - -T na_lookup -T NVAL -T object_flag_type -T OPTTAB \ - -T pcre_study_data -T pcre_uint16 -T pcre_uint32 -T PE_Info \ - -T PENNCONF -T PENNCONFGROUP -T Port_t -T PRIV -T privbits \ - -T PTAB -T ptab_entry -T qsort_func -T real_pcre \ - -T recursion_info -T Region -T RegionHeader -T s_rec -T slab \ - -T sqlplatform -T StrNode -T StrTree -T switch_mask \ - -T SWITCH_VALUE -T tcheck -T tlist -T UIVAL -T uschar -T UsedAttr \ - -T USERFN_ENTRY -T WAIT_TYPE -T warn_type -T Word \ + -T _Bool -T accent_info -T acsflag -T aig_func -T ALIST \ + -T ansi_data -T ansi_string -T atr_err -T ATRALIAS -T ATTR \ + -T BOOL -T boolexp -T boolexp_type -T BQUE -T branch_chain \ + -T BUFFERQ -T bvm_opcode -T BYTE -T CHAN -T CHANLIST -T CHANUSER \ + -T chunk_reference_t -T CNode -T COMLIST -T command_func \ + -T COMMAND_INFO -T comp_func -T compile_data -T COMSORTSTRUC \ + -T config_func -T CType -T dbref -T Debug_Info -T DESC \ + -T dfa_match_data -T eptrblock -T EVAL_CONTEXT -T FBLOCK \ + -T fd_type -T FLAG -T FLAG_ALIAS -T FLAGSPACE -T folder_array \ + -T Free_t -T FUN -T function_func -T FUNTAB -T GLOBALTAB \ + -T hash_func -T HASHENT -T HASHTAB -T heapframe -T help_file \ + -T help_indx -T ident_t -T imaxdiv_t -T IVAL -T list_type_list \ + -T lock_list -T lock_type -T LOCKMSGINFO -T LONG -T ltype -T MAIL \ + -T mail_flag -T makerecord -T Malloc_t -T markup_information \ + -T match_data -T MATH -T MEM -T na_lookup -T NVAL \ + -T object_flag_type -T OPTTAB -T pcre_study_data -T pcre_uint16 \ + -T pcre_uint32 -T PE_Info -T PENNCONF -T PENNCONFGROUP -T Port_t \ + -T PRIV -T privbits -T PTAB -T ptab_entry -T qsort_func \ + -T real_pcre -T recursion_info -T Region -T RegionHeader -T s_rec \ + -T SHS_INFO -T slab -T sqlplatform -T StrNode -T StrTree \ + -T switch_mask -T SWITCH_VALUE -T tcheck -T tlist \ + -T ucp_type_table -T UIVAL -T uschar -T UsedAttr -T USERFN_ENTRY \ + -T WAIT_TYPE -T warn_type -T Word \ $$file ; done) clean: @@ -202,7 +205,7 @@ access.o: ../hdrs/ptab.h access.o: ../hdrs/chunk.h access.o: ../confmagic.h -access.o: ../hdrs/pcre.h +access.o: ../hdrs/mypcre.h access.o: ../hdrs/access.h access.o: ../hdrs/mymalloc.h access.o: ../hdrs/match.h @@ -222,7 +225,7 @@ atr_tab.o: ../hdrs/ptab.h atr_tab.o: ../hdrs/chunk.h atr_tab.o: ../confmagic.h -atr_tab.o: ../hdrs/pcre.h +atr_tab.o: ../hdrs/mypcre.h atr_tab.o: ../hdrs/attrib.h atr_tab.o: ../hdrs/atr_tab.h atr_tab.o: ../hdrs/privtab.h @@ -243,7 +246,7 @@ attrib.o: ../hdrs/ptab.h attrib.o: ../hdrs/chunk.h attrib.o: ../confmagic.h -attrib.o: ../hdrs/pcre.h +attrib.o: ../hdrs/mypcre.h attrib.o: ../hdrs/attrib.h attrib.o: ../hdrs/match.h attrib.o: ../hdrs/parse.h @@ -268,7 +271,7 @@ boolexp.o: ../hdrs/externs.h boolexp.o: ../hdrs/compile.h boolexp.o: ../confmagic.h -boolexp.o: ../hdrs/pcre.h +boolexp.o: ../hdrs/mypcre.h boolexp.o: ../hdrs/lock.h boolexp.o: ../hdrs/boolexp.h boolexp.o: ../hdrs/parse.h @@ -284,7 +287,6 @@ bsd.o: ../options.h bsd.o: ../hdrs/mushtype.h bsd.o: ../hdrs/htab.h -bsd.o: ../hdrs/wait.h bsd.o: ../hdrs/externs.h bsd.o: ../hdrs/compile.h bsd.o: ../hdrs/dbdefs.h @@ -293,7 +295,7 @@ bsd.o: ../hdrs/ptab.h bsd.o: ../hdrs/chunk.h bsd.o: ../confmagic.h -bsd.o: ../hdrs/pcre.h +bsd.o: ../hdrs/mypcre.h bsd.o: ../hdrs/lock.h bsd.o: ../hdrs/boolexp.h bsd.o: ../hdrs/help.h @@ -308,6 +310,7 @@ bsd.o: ../hdrs/patches.h bsd.o: ../hdrs/mysocket.h bsd.o: ../hdrs/ident.h +bsd.o: ../hdrs/wait.h bsd.o: ../hdrs/lookup.h bsd.o: ../hdrs/strtree.h bsd.o: ../hdrs/log.h @@ -331,7 +334,7 @@ bufferq.o: ../hdrs/ptab.h bufferq.o: ../hdrs/chunk.h bufferq.o: ../confmagic.h -bufferq.o: ../hdrs/pcre.h +bufferq.o: ../hdrs/mypcre.h bufferq.o: ../hdrs/bufferq.h bufferq.o: ../hdrs/mymalloc.h bufferq.o: ../hdrs/log.h @@ -349,7 +352,7 @@ chunk.o: ../hdrs/ptab.h chunk.o: ../hdrs/chunk.h chunk.o: ../confmagic.h -chunk.o: ../hdrs/pcre.h +chunk.o: ../hdrs/mypcre.h chunk.o: ../hdrs/command.h chunk.o: ../hdrs/switches.h chunk.o: ../hdrs/intrface.h @@ -369,7 +372,7 @@ cmdlocal.o: ../hdrs/ptab.h cmdlocal.o: ../hdrs/chunk.h cmdlocal.o: ../confmagic.h -cmdlocal.o: ../hdrs/pcre.h +cmdlocal.o: ../hdrs/mypcre.h cmdlocal.o: ../hdrs/parse.h cmdlocal.o: ../hdrs/command.h cmdlocal.o: ../hdrs/switches.h @@ -388,7 +391,7 @@ cmds.o: ../hdrs/ptab.h cmds.o: ../hdrs/chunk.h cmds.o: ../confmagic.h -cmds.o: ../hdrs/pcre.h +cmds.o: ../hdrs/mypcre.h cmds.o: ../hdrs/match.h cmds.o: ../hdrs/game.h cmds.o: ../hdrs/attrib.h @@ -417,7 +420,7 @@ command.o: ../hdrs/ptab.h command.o: ../hdrs/chunk.h command.o: ../confmagic.h -command.o: ../hdrs/pcre.h +command.o: ../hdrs/mypcre.h command.o: ../hdrs/game.h command.o: ../hdrs/match.h command.o: ../hdrs/attrib.h @@ -449,7 +452,7 @@ compress.o: ../hdrs/ptab.h compress.o: ../hdrs/chunk.h compress.o: ../confmagic.h -compress.o: ../hdrs/pcre.h +compress.o: ../hdrs/mypcre.h compress.o: ../hdrs/mymalloc.h conf.o: ../hdrs/copyrite.h conf.o: ../config.h @@ -465,7 +468,7 @@ conf.o: ../hdrs/ptab.h conf.o: ../hdrs/chunk.h conf.o: ../confmagic.h -conf.o: ../hdrs/pcre.h +conf.o: ../hdrs/mypcre.h conf.o: ../hdrs/ansi.h conf.o: ../hdrs/pueblo.h conf.o: ../hdrs/parse.h @@ -493,7 +496,7 @@ cque.o: ../hdrs/dbdefs.h cque.o: ../hdrs/chunk.h cque.o: ../confmagic.h -cque.o: ../hdrs/pcre.h +cque.o: ../hdrs/mypcre.h cque.o: ../hdrs/parse.h cque.o: ../hdrs/strtree.h cque.o: ../hdrs/mymalloc.h @@ -514,7 +517,7 @@ create.o: ../hdrs/ptab.h create.o: ../hdrs/chunk.h create.o: ../confmagic.h -create.o: ../hdrs/pcre.h +create.o: ../hdrs/mypcre.h create.o: ../hdrs/attrib.h create.o: ../hdrs/match.h create.o: ../hdrs/extchat.h @@ -541,7 +544,7 @@ db.o: ../hdrs/ptab.h db.o: ../hdrs/chunk.h db.o: ../confmagic.h -db.o: ../hdrs/pcre.h +db.o: ../hdrs/mypcre.h db.o: ../hdrs/attrib.h db.o: ../hdrs/mymalloc.h db.o: ../hdrs/game.h @@ -568,7 +571,7 @@ destroy.o: ../hdrs/dbdefs.h destroy.o: ../hdrs/chunk.h destroy.o: ../confmagic.h -destroy.o: ../hdrs/pcre.h +destroy.o: ../hdrs/mypcre.h destroy.o: ../hdrs/log.h destroy.o: ../hdrs/game.h destroy.o: ../hdrs/extmail.h @@ -590,7 +593,7 @@ extchat.o: ../hdrs/ptab.h extchat.o: ../hdrs/chunk.h extchat.o: ../confmagic.h -extchat.o: ../hdrs/pcre.h +extchat.o: ../hdrs/mypcre.h extchat.o: ../hdrs/attrib.h extchat.o: ../hdrs/match.h extchat.o: ../hdrs/extchat.h @@ -622,7 +625,7 @@ extmail.o: ../hdrs/ptab.h extmail.o: ../hdrs/chunk.h extmail.o: ../confmagic.h -extmail.o: ../hdrs/pcre.h +extmail.o: ../hdrs/mypcre.h extmail.o: ../hdrs/match.h extmail.o: ../hdrs/extmail.h extmail.o: ../hdrs/function.h @@ -653,7 +656,7 @@ filecopy.o: ../hdrs/dbdefs.h filecopy.o: ../hdrs/chunk.h filecopy.o: ../confmagic.h -filecopy.o: ../hdrs/pcre.h +filecopy.o: ../hdrs/mypcre.h filecopy.o: ../hdrs/mymalloc.h filecopy.o: ../hdrs/log.h flaglocal.o: ../hdrs/copyrite.h @@ -670,7 +673,7 @@ flaglocal.o: ../hdrs/ptab.h flaglocal.o: ../hdrs/chunk.h flaglocal.o: ../confmagic.h -flaglocal.o: ../hdrs/pcre.h +flaglocal.o: ../hdrs/mypcre.h flags.o: ../config.h flags.o: ../hdrs/conf.h flags.o: ../hdrs/copyrite.h @@ -685,7 +688,7 @@ flags.o: ../hdrs/ptab.h flags.o: ../hdrs/chunk.h flags.o: ../confmagic.h -flags.o: ../hdrs/pcre.h +flags.o: ../hdrs/mypcre.h flags.o: ../hdrs/command.h flags.o: ../hdrs/switches.h flags.o: ../hdrs/attrib.h @@ -715,7 +718,7 @@ funcrypt.o: ../hdrs/ptab.h funcrypt.o: ../hdrs/chunk.h funcrypt.o: ../confmagic.h -funcrypt.o: ../hdrs/pcre.h +funcrypt.o: ../hdrs/mypcre.h funcrypt.o: ../hdrs/version.h funcrypt.o: ../hdrs/extchat.h funcrypt.o: ../hdrs/boolexp.h @@ -742,7 +745,7 @@ function.o: ../hdrs/ptab.h function.o: ../hdrs/chunk.h function.o: ../confmagic.h -function.o: ../hdrs/pcre.h +function.o: ../hdrs/mypcre.h function.o: ../hdrs/attrib.h function.o: ../hdrs/function.h function.o: ../hdrs/match.h @@ -768,7 +771,7 @@ fundb.o: ../hdrs/ptab.h fundb.o: ../hdrs/chunk.h fundb.o: ../confmagic.h -fundb.o: ../hdrs/pcre.h +fundb.o: ../hdrs/mypcre.h fundb.o: ../hdrs/match.h fundb.o: ../hdrs/parse.h fundb.o: ../hdrs/command.h @@ -795,7 +798,7 @@ funlist.o: ../hdrs/ptab.h funlist.o: ../hdrs/chunk.h funlist.o: ../confmagic.h -funlist.o: ../hdrs/pcre.h +funlist.o: ../hdrs/mypcre.h funlist.o: ../hdrs/ansi.h funlist.o: ../hdrs/parse.h funlist.o: ../hdrs/function.h @@ -821,7 +824,7 @@ funlocal.o: ../hdrs/ptab.h funlocal.o: ../hdrs/chunk.h funlocal.o: ../confmagic.h -funlocal.o: ../hdrs/pcre.h +funlocal.o: ../hdrs/mypcre.h funlocal.o: ../hdrs/parse.h funlocal.o: ../hdrs/function.h funmath.o: ../hdrs/copyrite.h @@ -838,7 +841,7 @@ funmath.o: ../hdrs/ptab.h funmath.o: ../hdrs/chunk.h funmath.o: ../confmagic.h -funmath.o: ../hdrs/pcre.h +funmath.o: ../hdrs/mypcre.h funmath.o: ../hdrs/sort.h funmath.o: ../hdrs/parse.h funmath.o: lmathtab.c @@ -857,7 +860,7 @@ funmisc.o: ../hdrs/ptab.h funmisc.o: ../hdrs/chunk.h funmisc.o: ../confmagic.h -funmisc.o: ../hdrs/pcre.h +funmisc.o: ../hdrs/mypcre.h funmisc.o: ../hdrs/version.h funmisc.o: ../hdrs/lock.h funmisc.o: ../hdrs/boolexp.h @@ -883,7 +886,7 @@ funstr.o: ../hdrs/ptab.h funstr.o: ../hdrs/chunk.h funstr.o: ../confmagic.h -funstr.o: ../hdrs/pcre.h +funstr.o: ../hdrs/mypcre.h funstr.o: ../hdrs/ansi.h funstr.o: ../hdrs/case.h funstr.o: ../hdrs/match.h @@ -907,7 +910,7 @@ funtime.o: ../hdrs/ptab.h funtime.o: ../hdrs/chunk.h funtime.o: ../confmagic.h -funtime.o: ../hdrs/pcre.h +funtime.o: ../hdrs/mypcre.h funtime.o: ../hdrs/parse.h funtime.o: ../hdrs/log.h funtime.o: ../hdrs/match.h @@ -926,7 +929,7 @@ funufun.o: ../hdrs/ptab.h funufun.o: ../hdrs/chunk.h funufun.o: ../confmagic.h -funufun.o: ../hdrs/pcre.h +funufun.o: ../hdrs/mypcre.h funufun.o: ../hdrs/match.h funufun.o: ../hdrs/parse.h funufun.o: ../hdrs/mymalloc.h @@ -947,7 +950,7 @@ game.o: ../hdrs/ptab.h game.o: ../hdrs/chunk.h game.o: ../confmagic.h -game.o: ../hdrs/pcre.h +game.o: ../hdrs/mypcre.h game.o: ../hdrs/game.h game.o: ../hdrs/attrib.h game.o: ../hdrs/match.h @@ -985,7 +988,7 @@ help.o: ../hdrs/ptab.h help.o: ../hdrs/chunk.h help.o: ../confmagic.h -help.o: ../hdrs/pcre.h +help.o: ../hdrs/mypcre.h help.o: ../hdrs/command.h help.o: ../hdrs/switches.h help.o: ../hdrs/help.h @@ -1008,7 +1011,7 @@ htab.o: ../hdrs/ptab.h htab.o: ../hdrs/chunk.h htab.o: ../confmagic.h -htab.o: ../hdrs/pcre.h +htab.o: ../hdrs/mypcre.h htab.o: ../hdrs/mymalloc.h ident.o: ../config.h ident.o: ../hdrs/conf.h @@ -1024,7 +1027,7 @@ ident.o: ../hdrs/ptab.h ident.o: ../hdrs/chunk.h ident.o: ../confmagic.h -ident.o: ../hdrs/pcre.h +ident.o: ../hdrs/mypcre.h ident.o: ../hdrs/attrib.h ident.o: ../hdrs/ident.h ident.o: ../hdrs/mysocket.h @@ -1044,10 +1047,12 @@ local.o: ../hdrs/ptab.h local.o: ../hdrs/chunk.h local.o: ../confmagic.h -local.o: ../hdrs/pcre.h +local.o: ../hdrs/mypcre.h local.o: ../hdrs/parse.h local.o: ../hdrs/command.h local.o: ../hdrs/switches.h +local.o: ../hdrs/lock.h +local.o: ../hdrs/boolexp.h lock.o: ../hdrs/copyrite.h lock.o: ../config.h lock.o: ../hdrs/conf.h @@ -1062,7 +1067,7 @@ lock.o: ../hdrs/ptab.h lock.o: ../hdrs/chunk.h lock.o: ../confmagic.h -lock.o: ../hdrs/pcre.h +lock.o: ../hdrs/mypcre.h lock.o: ../hdrs/boolexp.h lock.o: ../hdrs/attrib.h lock.o: ../hdrs/lock.h @@ -1086,7 +1091,7 @@ log.o: ../hdrs/ptab.h log.o: ../hdrs/chunk.h log.o: ../confmagic.h -log.o: ../hdrs/pcre.h +log.o: ../hdrs/mypcre.h log.o: ../hdrs/bufferq.h log.o: ../hdrs/log.h look.o: ../config.h @@ -1103,7 +1108,7 @@ look.o: ../hdrs/ptab.h look.o: ../hdrs/chunk.h look.o: ../confmagic.h -look.o: ../hdrs/pcre.h +look.o: ../hdrs/mypcre.h look.o: ../hdrs/lock.h look.o: ../hdrs/boolexp.h look.o: ../hdrs/attrib.h @@ -1132,7 +1137,7 @@ malias.o: ../hdrs/ptab.h malias.o: ../hdrs/chunk.h malias.o: ../confmagic.h -malias.o: ../hdrs/pcre.h +malias.o: ../hdrs/mypcre.h malias.o: ../hdrs/match.h malias.o: ../hdrs/parse.h malias.o: ../hdrs/malias.h @@ -1158,7 +1163,7 @@ markup.o: ../hdrs/flags.h markup.o: ../hdrs/ptab.h markup.o: ../hdrs/chunk.h -markup.o: ../hdrs/pcre.h +markup.o: ../hdrs/mypcre.h markup.o: ../hdrs/ansi.h markup.o: ../hdrs/mymalloc.h markup.o: ../hdrs/log.h @@ -1178,7 +1183,7 @@ match.o: ../hdrs/dbdefs.h match.o: ../hdrs/chunk.h match.o: ../confmagic.h -match.o: ../hdrs/pcre.h +match.o: ../hdrs/mypcre.h match.o: ../hdrs/case.h match.o: ../hdrs/match.h match.o: ../hdrs/parse.h @@ -1196,7 +1201,7 @@ memcheck.o: ../hdrs/ptab.h memcheck.o: ../hdrs/chunk.h memcheck.o: ../confmagic.h -memcheck.o: ../hdrs/pcre.h +memcheck.o: ../hdrs/mypcre.h memcheck.o: ../hdrs/mymalloc.h memcheck.o: ../hdrs/log.h move.o: ../hdrs/copyrite.h @@ -1213,7 +1218,7 @@ move.o: ../hdrs/ptab.h move.o: ../hdrs/chunk.h move.o: ../confmagic.h -move.o: ../hdrs/pcre.h +move.o: ../hdrs/mypcre.h move.o: ../hdrs/attrib.h move.o: ../hdrs/match.h move.o: ../hdrs/lock.h @@ -1246,7 +1251,7 @@ mymalloc.o: ../hdrs/externs.h mymalloc.o: ../hdrs/compile.h mymalloc.o: ../confmagic.h -mymalloc.o: ../hdrs/pcre.h +mymalloc.o: ../hdrs/mypcre.h mymalloc.o: ../hdrs/getpgsiz.h mymalloc.o: ../hdrs/mymalloc.h mysocket.o: ../hdrs/copyrite.h @@ -1263,7 +1268,7 @@ mysocket.o: ../hdrs/ptab.h mysocket.o: ../hdrs/chunk.h mysocket.o: ../confmagic.h -mysocket.o: ../hdrs/pcre.h +mysocket.o: ../hdrs/mypcre.h mysocket.o: ../hdrs/mymalloc.h mysocket.o: ../hdrs/mysocket.h mysocket.o: ../hdrs/ident.h @@ -1282,7 +1287,7 @@ myrlimit.o: ../hdrs/ptab.h myrlimit.o: ../hdrs/chunk.h myrlimit.o: ../confmagic.h -myrlimit.o: ../hdrs/pcre.h +myrlimit.o: ../hdrs/mypcre.h myssl.o: ../hdrs/copyrite.h myssl.o: ../config.h myssl.o: ../hdrs/conf.h @@ -1298,7 +1303,7 @@ myssl.o: ../hdrs/flags.h myssl.o: ../hdrs/ptab.h myssl.o: ../hdrs/chunk.h -myssl.o: ../hdrs/pcre.h +myssl.o: ../hdrs/mypcre.h myssl.o: ../hdrs/myssl.h myssl.o: ../hdrs/log.h myssl.o: ../hdrs/parse.h @@ -1316,7 +1321,7 @@ notify.o: ../hdrs/dbdefs.h notify.o: ../hdrs/chunk.h notify.o: ../confmagic.h -notify.o: ../hdrs/pcre.h +notify.o: ../hdrs/mypcre.h notify.o: ../hdrs/lock.h notify.o: ../hdrs/boolexp.h notify.o: ../hdrs/help.h @@ -1351,7 +1356,7 @@ parse.o: ../hdrs/ptab.h parse.o: ../hdrs/chunk.h parse.o: ../confmagic.h -parse.o: ../hdrs/pcre.h +parse.o: ../hdrs/mypcre.h parse.o: ../hdrs/ansi.h parse.o: ../hdrs/function.h parse.o: ../hdrs/case.h @@ -1361,8 +1366,6 @@ parse.o: ../hdrs/log.h parse.o: ../hdrs/mymalloc.h pcre.o: ../config.h -pcre.o: ../hdrs/pcre.h -pcre.o: ../confmagic.h player.o: ../hdrs/copyrite.h player.o: ../config.h player.o: ../hdrs/conf.h @@ -1377,7 +1380,7 @@ player.o: ../hdrs/ptab.h player.o: ../hdrs/chunk.h player.o: ../confmagic.h -player.o: ../hdrs/pcre.h +player.o: ../hdrs/mypcre.h player.o: ../hdrs/attrib.h player.o: ../hdrs/access.h player.o: ../hdrs/mymalloc.h @@ -1400,7 +1403,7 @@ plyrlist.o: ../hdrs/ptab.h plyrlist.o: ../hdrs/chunk.h plyrlist.o: ../confmagic.h -plyrlist.o: ../hdrs/pcre.h +plyrlist.o: ../hdrs/mypcre.h plyrlist.o: ../hdrs/attrib.h plyrlist.o: ../hdrs/mymalloc.h predicat.o: ../hdrs/copyrite.h @@ -1417,7 +1420,7 @@ predicat.o: ../hdrs/ptab.h predicat.o: ../hdrs/chunk.h predicat.o: ../confmagic.h -predicat.o: ../hdrs/pcre.h +predicat.o: ../hdrs/mypcre.h predicat.o: ../hdrs/attrib.h predicat.o: ../hdrs/lock.h predicat.o: ../hdrs/boolexp.h @@ -1441,7 +1444,7 @@ privtab.o: ../hdrs/flags.h privtab.o: ../hdrs/ptab.h privtab.o: ../hdrs/chunk.h -privtab.o: ../hdrs/pcre.h +privtab.o: ../hdrs/mypcre.h info_master.o: ../hdrs/copyrite.h info_master.o: ../config.h info_master.o: ../hdrs/conf.h @@ -1456,7 +1459,7 @@ info_master.o: ../hdrs/ptab.h info_master.o: ../hdrs/chunk.h info_master.o: ../confmagic.h -info_master.o: ../hdrs/pcre.h +info_master.o: ../hdrs/mypcre.h info_master.o: ../hdrs/access.h info_master.o: ../hdrs/mysocket.h info_master.o: ../hdrs/ident.h @@ -1477,7 +1480,7 @@ ptab.o: ../hdrs/ptab.h ptab.o: ../hdrs/chunk.h ptab.o: ../confmagic.h -ptab.o: ../hdrs/pcre.h +ptab.o: ../hdrs/mypcre.h rob.o: ../config.h rob.o: ../hdrs/copyrite.h rob.o: ../hdrs/conf.h @@ -1492,7 +1495,7 @@ rob.o: ../hdrs/ptab.h rob.o: ../hdrs/chunk.h rob.o: ../confmagic.h -rob.o: ../hdrs/pcre.h +rob.o: ../hdrs/mypcre.h rob.o: ../hdrs/attrib.h rob.o: ../hdrs/match.h rob.o: ../hdrs/parse.h @@ -1517,7 +1520,7 @@ set.o: ../hdrs/ptab.h set.o: ../hdrs/chunk.h set.o: ../confmagic.h -set.o: ../hdrs/pcre.h +set.o: ../hdrs/mypcre.h set.o: ../hdrs/match.h set.o: ../hdrs/attrib.h set.o: ../hdrs/ansi.h @@ -1544,7 +1547,7 @@ sig.o: ../hdrs/ptab.h sig.o: ../hdrs/chunk.h sig.o: ../confmagic.h -sig.o: ../hdrs/pcre.h +sig.o: ../hdrs/mypcre.h sort.o: ../hdrs/copyrite.h sort.o: ../config.h sort.o: ../hdrs/conf.h @@ -1559,7 +1562,7 @@ sort.o: ../hdrs/ptab.h sort.o: ../hdrs/chunk.h sort.o: ../confmagic.h -sort.o: ../hdrs/pcre.h +sort.o: ../hdrs/mypcre.h sort.o: ../hdrs/parse.h sort.o: ../hdrs/ansi.h sort.o: ../hdrs/command.h @@ -1579,7 +1582,7 @@ speech.o: ../hdrs/ptab.h speech.o: ../hdrs/chunk.h speech.o: ../confmagic.h -speech.o: ../hdrs/pcre.h +speech.o: ../hdrs/mypcre.h speech.o: ../hdrs/ansi.h speech.o: ../hdrs/lock.h speech.o: ../hdrs/boolexp.h @@ -1603,7 +1606,7 @@ sql.o: ../hdrs/ptab.h sql.o: ../hdrs/chunk.h sql.o: ../confmagic.h -sql.o: ../hdrs/pcre.h +sql.o: ../hdrs/mypcre.h sql.o: ../hdrs/log.h sql.o: ../hdrs/parse.h sql.o: ../hdrs/command.h @@ -1632,7 +1635,7 @@ strtree.o: ../hdrs/ptab.h strtree.o: ../hdrs/chunk.h strtree.o: ../confmagic.h -strtree.o: ../hdrs/pcre.h +strtree.o: ../hdrs/mypcre.h strtree.o: ../hdrs/strtree.h strutil.o: ../config.h strutil.o: ../hdrs/copyrite.h @@ -1651,7 +1654,7 @@ strutil.o: ../hdrs/flags.h strutil.o: ../hdrs/ptab.h strutil.o: ../hdrs/chunk.h -strutil.o: ../hdrs/pcre.h +strutil.o: ../hdrs/mypcre.h strutil.o: ../hdrs/ansi.h strutil.o: ../hdrs/mymalloc.h strutil.o: ../hdrs/log.h @@ -1669,7 +1672,7 @@ timer.o: ../hdrs/ptab.h timer.o: ../hdrs/chunk.h timer.o: ../confmagic.h -timer.o: ../hdrs/pcre.h +timer.o: ../hdrs/mypcre.h timer.o: ../hdrs/lock.h timer.o: ../hdrs/boolexp.h timer.o: ../hdrs/extmail.h @@ -1694,7 +1697,7 @@ unparse.o: ../hdrs/ptab.h unparse.o: ../hdrs/chunk.h unparse.o: ../confmagic.h -unparse.o: ../hdrs/pcre.h +unparse.o: ../hdrs/mypcre.h unparse.o: ../hdrs/lock.h unparse.o: ../hdrs/boolexp.h unparse.o: ../hdrs/attrib.h @@ -1716,7 +1719,7 @@ utils.o: ../hdrs/ptab.h utils.o: ../hdrs/chunk.h utils.o: ../confmagic.h -utils.o: ../hdrs/pcre.h +utils.o: ../hdrs/mypcre.h utils.o: ../hdrs/ansi.h utils.o: ../hdrs/mymalloc.h utils.o: ../hdrs/log.h @@ -1738,7 +1741,7 @@ version.o: ../hdrs/ptab.h version.o: ../hdrs/chunk.h version.o: ../confmagic.h -version.o: ../hdrs/pcre.h +version.o: ../hdrs/mypcre.h version.o: ../hdrs/version.h version.o: ../hdrs/patches.h version.o: ../hdrs/buildinf.h @@ -1758,7 +1761,7 @@ warnings.o: ../hdrs/ptab.h warnings.o: ../hdrs/chunk.h warnings.o: ../confmagic.h -warnings.o: ../hdrs/pcre.h +warnings.o: ../hdrs/mypcre.h warnings.o: ../hdrs/lock.h warnings.o: ../hdrs/boolexp.h warnings.o: ../hdrs/match.h @@ -1778,7 +1781,7 @@ wild.o: ../hdrs/ptab.h wild.o: ../hdrs/chunk.h wild.o: ../confmagic.h -wild.o: ../hdrs/pcre.h +wild.o: ../hdrs/mypcre.h wild.o: ../hdrs/ansi.h wild.o: ../hdrs/mymalloc.h wild.o: ../hdrs/parse.h @@ -1796,7 +1799,7 @@ wiz.o: ../hdrs/ptab.h wiz.o: ../hdrs/chunk.h wiz.o: ../confmagic.h -wiz.o: ../hdrs/pcre.h +wiz.o: ../hdrs/mypcre.h wiz.o: ../hdrs/attrib.h wiz.o: ../hdrs/match.h wiz.o: ../hdrs/access.h Index: src/wiz.c =================================================================== --- src/wiz.c (.../p5) (revision 1176) +++ src/wiz.c (.../p6) (revision 1176) @@ -450,11 +450,12 @@ if (IsPlayer(destination) && Tel_Anywhere(player) && IsPlayer(victim) && !inside) { if (!silent && loc != Location(destination)) - did_it(victim, victim, NULL, NULL, "OXTPORT", NULL, NULL, loc); + did_it_with(victim, victim, NULL, NULL, "OXTPORT", NULL, NULL, loc, + player, NOTHING, NA_INTER_HEAR); safe_tel(victim, Location(destination), silent); if (!silent && loc != Location(destination)) - did_it(victim, victim, "TPORT", NULL, "OTPORT", NULL, "ATPORT", - Location(destination)); + did_it_with(victim, victim, "TPORT", NULL, "OTPORT", NULL, "ATPORT", + Location(destination), player, loc, NA_INTER_HEAR); return; } /* check needed for NOTHING. Especially important for unlinked exits */ @@ -538,11 +539,12 @@ (destination == Owner(victim)) || (!Fixed(Owner(victim)) && !Fixed(player)))) { if (!silent && loc != destination) - did_it(victim, victim, NULL, NULL, "OXTPORT", NULL, NULL, loc); + did_it_with(victim, victim, NULL, NULL, "OXTPORT", NULL, NULL, loc, + player, NOTHING, NA_INTER_HEAR); safe_tel(victim, destination, silent); if (!silent && loc != destination) - did_it(victim, victim, "TPORT", NULL, "OTPORT", NULL, "ATPORT", - destination); + did_it_with(victim, victim, "TPORT", NULL, "OTPORT", NULL, "ATPORT", + destination, player, loc, NA_INTER_HEAR); if ((victim != player) && !(Puppet(victim) && (Owner(victim) == Owner(player)))) { if (!Quiet(player) && !(Quiet(victim) && (Owner(victim) == player))) @@ -587,7 +589,7 @@ int j; if ((victim = match_controlled(player, what)) == NOTHING) { - notify(player, "Sorry."); + notify(player, T("Sorry.")); return; } if (options.log_forces) { @@ -1228,10 +1230,11 @@ } if (nrooms) { - notify(player, "\nROOMS:"); + notify(player, T("\nROOMS:")); for (n = 0; n < nrooms; n++) { tbp = tbuf; - safe_format(tbuf, &tbp, "%s [owner: ", object_header(player, rooms[n])); + safe_format(tbuf, &tbp, T("%s [owner: "), + object_header(player, rooms[n])); safe_str(object_header(player, Owner(rooms[n])), tbuf, &tbp); safe_chr(']', tbuf, &tbp); *tbp = '\0'; @@ -1242,7 +1245,7 @@ if (nexits) { dbref from, to; - notify(player, "\nEXITS:"); + notify(player, T("\nEXITS:")); for (n = 0; n < nexits; n++) { tbp = tbuf; if (Source(exits[n]) == NOTHING) @@ -1250,11 +1253,12 @@ else from = Source(exits[n]); to = Destination(exits[n]); - safe_format(tbuf, &tbp, "%s [from ", object_header(player, exits[n])); - safe_str((from == NOTHING) ? "NOWHERE" : object_header(player, from), + safe_format(tbuf, &tbp, T("%s [from "), + object_header(player, exits[n])); + safe_str((from == NOTHING) ? T("NOWHERE") : object_header(player, from), tbuf, &tbp); - safe_str(" to ", tbuf, &tbp); - safe_str((to == NOTHING) ? "NOWHERE" : object_header(player, to), + safe_str(T(" to "), tbuf, &tbp); + safe_str((to == NOTHING) ? T("NOWHERE") : object_header(player, to), tbuf, &tbp); safe_chr(']', tbuf, &tbp); *tbp = '\0'; @@ -1263,10 +1267,10 @@ } if (nthings) { - notify(player, "\nTHINGS:"); + notify(player, T("\nTHINGS:")); for (n = 0; n < nthings; n++) { tbp = tbuf; - safe_format(tbuf, &tbp, "%s [owner: ", + safe_format(tbuf, &tbp, T("%s [owner: "), object_header(player, things[n])); safe_str(object_header(player, Owner(things[n])), tbuf, &tbp); safe_chr(']', tbuf, &tbp); @@ -1277,7 +1281,7 @@ if (nplayers) { int is_wizard = Search_All(player) || See_All(player); - notify(player, "\nPLAYERS:"); + notify(player, T("\nPLAYERS:")); for (n = 0; n < nplayers; n++) { tbp = tbuf; safe_str(object_header(player, players[n]), tbuf, &tbp); @@ -1295,10 +1299,10 @@ T ("Totals: Rooms...%d Exits...%d Things...%d Players...%d"), nrooms, nexits, nthings, nplayers); - mush_free((Malloc_t) rooms, "dbref_list"); - mush_free((Malloc_t) exits, "dbref_list"); - mush_free((Malloc_t) things, "dbref_list"); - mush_free((Malloc_t) players, "dbref_list"); + mush_free(rooms, "dbref_list"); + mush_free(exits, "dbref_list"); + mush_free(things, "dbref_list"); + mush_free(players, "dbref_list"); } if (results) mush_free(results, "search_results"); Index: src/attrib.c =================================================================== --- src/attrib.c (.../p5) (revision 1176) +++ src/attrib.c (.../p6) (revision 1176) @@ -601,7 +601,7 @@ */ atr_err atr_add(dbref thing, const char *RESTRICT atr, const char *RESTRICT s, - dbref player, unsigned int flags) + dbref player, uint32_t flags) { ATTR *ptr, *root = NULL; char *p; Index: src/conf.c =================================================================== --- src/conf.c (.../p5) (revision 1176) +++ src/conf.c (.../p6) (revision 1176) @@ -537,6 +537,29 @@ {NULL, NULL, 0} }; +#if 0 +/* Just to mark these strings for translation */ +PENNCONFGROUP dummy[] = { + {"attribs", T("Options affecting attributes"), 0}, + {"chat", T("Chat system options"), 0}, + {"cmds", T("Options affecting command behavior"), 0}, + {"compile", T("Compile-time options"), 0}, + {"cosmetic", T("Cosmetic options"), 0}, + {"costs", T("Costs"), 0}, + {"db", T("Database options"), 0}, + {"dump", T("Options affecting dumps and other periodic processes"), 0}, + {"files", T("Files used by the MUSH"), CGP_GOD}, + {"flags", T("Default flags for new objects"), 0}, + {"funcs", T("Options affecting function behavior"), 0}, + {"limits", T("Limits and other constants"), 0}, + {"log", T("Logging options"), 0}, + {"messages", T("Message files sent by the MUSH"), CGP_GOD}, + {"net", T("Networking and connection-related options"), 0}, + {"tiny", T("TinyMUSH compatibility options"), 0}, + {NULL, NULL, 0} +}; +#endif + /** Returns a pointer to a newly allocated PENNCONF object. * \return pointer to newly allocated PENNCONF object. */ Index: src/function.c =================================================================== --- src/function.c (.../p5) (revision 1176) +++ src/function.c (.../p6) (revision 1176) @@ -498,7 +498,7 @@ {"LOCKS", fun_locks, 1, 1, FN_REG}, {"LPARENT", fun_lparent, 1, 1, FN_REG}, {"LPLAYERS", fun_dbwalker, 1, 1, FN_REG}, - {"LPORTS", fun_lports, 0, 0, FN_REG}, + {"LPORTS", fun_lports, 0, 1, FN_REG}, {"LPOS", fun_lpos, 2, 2, FN_REG}, {"LSEARCH", fun_lsearch, 1, INT_MAX, FN_REG}, {"LSEARCHR", fun_lsearch, 1, INT_MAX, FN_REG}, @@ -800,7 +800,7 @@ { /* lists all built-in functions. */ char *b = list_functions(NULL); - notify_format(player, "Functions: %s", lc ? strlower(b) : b); + notify_format(player, T("Functions: %s"), lc ? strlower(b) : b); } /** Return a list of function names. Index: src/cmds.c =================================================================== --- src/cmds.c (.../p5) (revision 1176) +++ src/cmds.c (.../p6) (revision 1176) @@ -439,7 +439,7 @@ { enum hook_type flags; - if (!Wizard(player)) { + if (!(Wizard(player) || has_power_by_name(player, "HOOK", NOTYPE))) { notify(player, T("You need a fishing license to use that hook.")); return; } Index: src/csrimalloc.c =================================================================== --- src/csrimalloc.c (.../p5) (revision 1176) +++ src/csrimalloc.c (.../p6) (revision 1176) @@ -997,10 +997,10 @@ ecalloc(size_t nelem, size_t sz); univptr_t erealloc(univptr_t ptr, size_t nbytes); -Free_t -free(univptr_t cp); -Free_t -cfree(univptr_t cp); + Free_t + free(univptr_t cp); + Free_t + cfree(univptr_t cp); #endif /* CSRI_TRACE */ int Index: src/markup.c =================================================================== --- src/markup.c (.../p5) (revision 1176) +++ src/markup.c (.../p6) (revision 1176) @@ -54,7 +54,7 @@ /* Now the code */ static int write_ansi_close(char *buff, char **bp); -static int write_ansi_letters(ansi_data cur, char *buff, char **bp); +static int write_ansi_letters(const ansi_data *cur, char *buff, char **bp); static int safe_markup(char const *a_tag, char *buf, char **bp, char type); static int safe_markup_cancel(char const *a_tag, char *buf, char **bp, char type); @@ -400,12 +400,12 @@ #undef BUILD_ANSI int -write_ansi_data(ansi_data * cur, char *buff, char **bp) +write_ansi_data(ansi_data *cur, char *buff, char **bp) { int retval = 0; retval += safe_chr(TAG_START, buff, bp); retval += safe_chr(MARKUP_COLOR, buff, bp); - retval += write_ansi_letters(*cur, buff, bp); + retval += write_ansi_letters(cur, buff, bp); retval += safe_chr(TAG_END, buff, bp); return retval; } @@ -422,15 +422,15 @@ } static int -write_ansi_letters(const ansi_data cur, char *buff, char **bp) +write_ansi_letters(const ansi_data *cur, char *buff, char **bp) { int retval = 0; char *save; save = *bp; - if (cur.fore == 'n') { - retval += safe_chr(cur.fore, buff, bp); + if (cur->fore == 'n') { + retval += safe_chr(cur->fore, buff, bp); } else { -#define CBIT_SET(x,y) (x.bits & y) +#define CBIT_SET(x,y) (x->bits & y) if (CBIT_SET(cur, CBIT_FLASH)) retval += safe_chr('f', buff, bp); if (CBIT_SET(cur, CBIT_HILITE)) @@ -440,7 +440,7 @@ if (CBIT_SET(cur, CBIT_UNDERSCORE)) retval += safe_chr('u', buff, bp); #undef CBIT_SET -#define CBIT_SET(x,y) (x.offbits & y) +#define CBIT_SET(x,y) (x->offbits & y) if (CBIT_SET(cur, CBIT_FLASH)) retval += safe_chr('F', buff, bp); if (CBIT_SET(cur, CBIT_HILITE)) @@ -451,10 +451,10 @@ retval += safe_chr('U', buff, bp); #undef CBIT_SET - if (cur.fore) - retval += safe_chr(cur.fore, buff, bp); - if (cur.back) - retval += safe_chr(cur.back, buff, bp); + if (cur->fore) + retval += safe_chr(cur->fore, buff, bp); + if (cur->back) + retval += safe_chr(cur->back, buff, bp); } if (retval) @@ -464,7 +464,7 @@ void -nest_ansi_data(ansi_data * old, ansi_data * cur) +nest_ansi_data(ansi_data *old, ansi_data *cur) { if (cur->fore != 'n') { cur->bits |= old->bits; @@ -483,7 +483,7 @@ /* We need EDGE_UP to return 1 if x has bit set and y doesn't. */ #define EDGE_UP(x,y,z) ((x.bits & z) != (y->bits & z)) int -write_raw_ansi_data(ansi_data * old, ansi_data * cur, char *buff, char **bp) +write_raw_ansi_data(ansi_data *old, ansi_data *cur, char *buff, char **bp) { int f = 0; ansi_data past = *old; @@ -555,7 +555,7 @@ #undef EDGE_UP void -define_ansi_data(ansi_data * store, const char *str) +define_ansi_data(ansi_data *store, const char *str) { *store = ansi_null; @@ -624,7 +624,7 @@ } int -read_raw_ansi_data(ansi_data * store, const char *codes) +read_raw_ansi_data(ansi_data *store, const char *codes) { int curnum; if (!codes || !store) @@ -768,12 +768,12 @@ markup_information *info; ansi_data ansistack[BUFFER_LEN]; - ansistack[0] = ansi_null; int stacktop = 0; ansi_data tmpansi; int oldcodes = 0; + ansistack[0] = ansi_null; if (!source) return NULL; @@ -1027,6 +1027,8 @@ optimize_ansi_string(ansi_string *as) { int i, j; + int target = -1; + int len = 0; if (!as) return; @@ -1065,8 +1067,6 @@ } /* end outer loop */ } /* end if_optimized */ - int target = -1; - int len = 0; j = 0; /* Get rid of all removed markups @@ -1259,6 +1259,9 @@ markup_information *dm, *sm; + ansi_data backansi; + + /* If src->len == 0, we might have only markup. Stand-alones. Ew! */ if (src->len <= 0 && src->nmarkups <= 0) return 0; @@ -1334,7 +1337,7 @@ /* Determine what old ansi might stretch across the new text. * This sets backansi to any ansi values (bits, colors) that * are continuous across an entire length of text. */ - ansi_data backansi = ansi_null; + backansi = ansi_null; if (0 < loc && loc < dst->len) { backansi.offbits = dst->ansi[loc - 1].offbits & dst->ansi[loc].offbits; backansi.bits = dst->ansi[loc - 1].bits & dst->ansi[loc].bits; @@ -1392,6 +1395,7 @@ int end, d_end; int diff; int retval = 0; + ansi_data backansi; markup_information *dm, *sm; if (loc < 0) @@ -1514,7 +1518,7 @@ * This sets backansi to any ansi values (bits, colors) that * are continuous across an entire length of text. */ - ansi_data backansi = dst->ansi[loc]; + backansi = dst->ansi[loc]; for (i = loc; i < end && !ansi_isnull(backansi); i++) { backansi.offbits &= dst->ansi[i].offbits; backansi.bits &= dst->ansi[i].bits; @@ -1911,7 +1915,6 @@ char type; ansi_data ansistack[BUFFER_LEN]; - ansistack[0] = ansi_null; ansi_data oldansi; ansi_data tmpansi; int ansitop = 0; @@ -1925,6 +1928,8 @@ int retval = 0; + ansistack[0] = ansi_null; + if (!str || !*str) return 0; @@ -2074,7 +2079,7 @@ } if (!ansi_isnull(tmpansi) && !ansi_equal(oldansi, tmpansi)) { retval += safe_str("[ansi(", buff, bp); - retval += write_ansi_letters(tmpansi, buff, bp); + retval += write_ansi_letters(&tmpansi, buff, bp); retval += safe_chr(',', buff, bp); howmanyopen++; } Index: src/access.c =================================================================== --- src/access.c (.../p5) (revision 1176) +++ src/access.c (.../p6) (revision 1176) @@ -77,7 +77,7 @@ #endif #include "conf.h" #include "externs.h" -#include "pcre.h" +#include "mypcre.h" #include "access.h" #include "mymalloc.h" #include "match.h" @@ -673,6 +673,9 @@ } } + if (rulenum == 0) { + notify(player, T("There are no access rules.")); + } } /** Parse access options into fields. Index: src/myrlimit.c =================================================================== --- src/myrlimit.c (.../p5) (revision 1176) +++ src/myrlimit.c (.../p6) (revision 1176) @@ -64,7 +64,7 @@ struct rlimit rlp; if (getrlimit(RLIMIT_NOFILE, &rlp)) { - perror("init_rlimit: getrlimit()"); + penn_perror("init_rlimit: getrlimit()"); return; } /* This check seems dumb, but apparently FreeBSD may return 0 for @@ -73,7 +73,7 @@ if (rlp.rlim_max > rlp.rlim_cur) { rlp.rlim_cur = rlp.rlim_max; if (setrlimit(RLIMIT_NOFILE, &rlp)) - perror("init_rlimit: setrlimit()"); + penn_perror("init_rlimit: setrlimit()"); } #endif return; Index: src/move.c =================================================================== --- src/move.c (.../p5) (revision 1176) +++ src/move.c (.../p6) (revision 1176) @@ -100,8 +100,9 @@ /* If the player is leaving a zone, do zone messages */ /* The tricky bit here is that we only care about the zone of * the outermost contents */ - if (GoodObject(absold) && GoodObject(Zone(absold)) - && (Zone(absloc) != Zone(absold))) + if (GoodObject(absold) && GoodObject(Zone(absold)) && + (!GoodObject(absloc) || !GoodObject(Zone(absloc)) || + (Zone(absloc) != Zone(absold)))) did_it_interact(what, Zone(absold), "ZLEAVE", NULL, "OZLEAVE", NULL, "AZLEAVE", old, NA_INTER_SEE); if (GoodObject(old) && !IsRoom(old)) @@ -111,27 +112,30 @@ did_it_interact(what, where, NULL, NULL, "OXENTER", NULL, NULL, old, NA_INTER_SEE); /* If the player is entering a new zone, do zone messages */ - if (!GoodObject(absold) - || (GoodObject(Zone(absloc)) && (Zone(absloc) != Zone(absold)))) + if (GoodObject(absloc) && GoodObject(Zone(absloc)) && + (!GoodObject(absold) || !GoodObject(Zone(absold)) || + (Zone(absloc) != Zone(absold)))) did_it_interact(what, Zone(absloc), "ZENTER", NULL, "OZENTER", NULL, "AZENTER", where, NA_INTER_SEE); - did_it_interact(what, where, "ENTER", NULL, "OENTER", T("has arrived."), - "AENTER", where, NA_INTER_PRESENCE); + did_it_interact(what, where, "ENTER", NULL, "OENTER", + T("has arrived."), "AENTER", where, NA_INTER_PRESENCE); } else { /* non-listeners only trigger the actions not the messages */ did_it(what, old, NULL, NULL, NULL, NULL, "ALEAVE", old); - if (GoodObject(absold) && GoodObject(Zone(absold)) - && (Zone(absloc) != Zone(absold))) + if (GoodObject(absold) && GoodObject(Zone(absold)) && + (!GoodObject(absloc) || !GoodObject(Zone(absloc)) || + (Zone(absloc) != Zone(absold)))) did_it(what, Zone(absold), NULL, NULL, NULL, NULL, "AZLEAVE", old); - if (!GoodObject(absold) - || (GoodObject(Zone(absloc)) && (Zone(absloc) != Zone(absold)))) + if (GoodObject(absloc) && GoodObject(Zone(absloc)) && + (!GoodObject(absold) || !GoodObject(Zone(absold)) || + (Zone(absloc) != Zone(absold)))) did_it(what, Zone(absloc), NULL, NULL, NULL, NULL, "AZENTER", where); did_it(what, where, NULL, NULL, NULL, NULL, "AENTER", where); } } if (!nomovemsgs) - did_it_interact(what, what, "MOVE", NULL, "OMOVE", NULL, "AMOVE", where, - NA_INTER_SEE); + did_it_interact(what, what, "MOVE", NULL, "OMOVE", NULL, + "AMOVE", where, NA_INTER_SEE); } /** A dropper is an object that can hear and has a connected owner */ Index: src/speech.c =================================================================== --- src/speech.c (.../p5) (revision 1176) +++ src/speech.c (.../p6) (revision 1176) @@ -25,7 +25,7 @@ #include "attrib.h" #include "parse.h" #include "game.h" -#include "pcre.h" +#include "mypcre.h" #include "sort.h" #include "confmagic.h" @@ -346,7 +346,7 @@ notify_format(player, T("Unable to whisper to:%s"), tbuf); if (!gcount) { - mush_free((Malloc_t) tbuf, "string"); + mush_free(tbuf, "string"); return; } @@ -356,7 +356,7 @@ /* Set up list of good names */ tp = tbuf; - safe_str(" to ", tbuf, &tp); + safe_str(T(" to "), tbuf, &tp); for (who = 0; who < gcount; who++) { if (noisy && (get_random_long(0, 100) < WHISPER_LOUDNESS)) overheard = 1; @@ -371,7 +371,7 @@ p = tprintf("You sense: %s%s%s", Name(player), gap, arg2); } else { notify_format(player, T("You whisper, \"%s\"%s."), arg2, tbuf); - p = tprintf("%s whispers%s: %s", Name(player), + p = tprintf(T("%s whispers%s: %s"), Name(player), gcount > 1 ? tbuf : "", arg2); } @@ -384,7 +384,7 @@ dbref first = Contents(Location(player)); if (!GoodObject(first)) return; - p = tprintf("%s whispers%s.", Name(player), tbuf); + p = tprintf(T("%s whispers%s."), Name(player), tbuf); DOLIST(first, first) { overheard = 1; for (who = 0; who < gcount; who++) { @@ -397,7 +397,7 @@ notify_noecho(first, p); } } - mush_free((Malloc_t) tbuf, "string"); + mush_free(tbuf, "string"); } /** Send an @message to a list of dbrefs, using to format it @@ -673,7 +673,7 @@ else flag_broadcast(mask, 0, "%s %s %s, \"%s\"", prefix, Name(player), - target == WALL_ALL ? "shouts" : "says", message); + target == WALL_ALL ? T("shouts") : T("says"), message); } /** messageformat. This is the wrapper that makes calling PAGEFORMAT, Index: src/bsd.c =================================================================== --- src/bsd.c (.../p5) (revision 1176) +++ src/bsd.c (.../p6) (revision 1176) @@ -112,7 +112,7 @@ #include "strtree.h" #include "log.h" -#include "pcre.h" +#include "mypcre.h" #ifdef HAS_OPENSSL #include "myssl.h" #endif @@ -159,13 +159,13 @@ static int login_number = 0; static int under_limit = 1; -char cf_motd_msg[BUFFER_LEN]; /**< The message of the day */ -char cf_wizmotd_msg[BUFFER_LEN]; /**< The wizard motd */ -char cf_downmotd_msg[BUFFER_LEN]; /**< The down message */ -char cf_fullmotd_msg[BUFFER_LEN]; /**< The 'mush full' message */ -static char poll_msg[DOING_LEN]; -char confname[BUFFER_LEN]; /**< Name of the config file */ -char errlog[BUFFER_LEN]; /**< Name of the error log file */ +char cf_motd_msg[BUFFER_LEN] = { '\0' }; /**< The message of the day */ +char cf_wizmotd_msg[BUFFER_LEN] = { '\0' }; /**< The wizard motd */ +char cf_downmotd_msg[BUFFER_LEN] = { '\0' }; /**< The down message */ +char cf_fullmotd_msg[BUFFER_LEN] = { '\0' }; /**< The 'mush full' message */ +static char poll_msg[DOING_LEN] = { '\0' }; +char confname[BUFFER_LEN] = { '\0' }; /**< Name of the config file */ +char errlog[BUFFER_LEN] = { '\0' }; /**< Name of the error log file */ /** Is this descriptor connected to a telnet-compatible terminal? */ #define TELNET_ABLE(d) ((d)->conn_flags & (CONN_TELNET | CONN_TELNET_QUERY)) @@ -468,14 +468,14 @@ child = fork(); if (child < 0) { /* Print a warning and continue */ - perror("fork"); + penn_perror("fork"); } else if (child > 0) { /* Parent process of a successful fork() */ return EXIT_SUCCESS; } else { /* Child process */ if (new_process_session() < 0) - perror("Couldn't create a new process session"); + penn_perror("Couldn't create a new process session"); } } #endif @@ -1010,7 +1010,7 @@ if (errno != EINTR) #endif { - perror("select"); + penn_perror("select"); return; } #ifdef INFO_SLAVE @@ -1116,7 +1116,7 @@ if (errno && errno != EINTR) #endif { - perror("test_connection"); + penn_perror("test_connection"); return -1; } return newsock; @@ -1587,7 +1587,7 @@ input_ready = select(d->descriptor + 1, &input_set, NULL, NULL, &pad); if (input_ready < 0) { /* Well, shoot, we have no idea. Guess and proceed. */ - perror("select in process_output"); + penn_perror("select in process_output"); input_ready = 0; } } @@ -2100,7 +2100,7 @@ set_userstring(unsigned char **userstring, const char *command) { if (*userstring) { - mush_free((Malloc_t) * userstring, "userstring"); + mush_free((Malloc_t) *userstring, "userstring"); *userstring = NULL; } while (*command && isspace((unsigned char) *command)) @@ -2288,11 +2288,11 @@ (Guest(player) && !options.guest_allow)) { if (!options.login_allow) { fcache_dump(d, fcache.down_fcache, NULL); - if (cf_downmotd_msg && *cf_downmotd_msg) + if (*cf_downmotd_msg) raw_notify(player, cf_downmotd_msg); } else if (MAX_LOGINS && !under_limit) { fcache_dump(d, fcache.full_fcache, NULL); - if (cf_fullmotd_msg && *cf_fullmotd_msg) + if (*cf_fullmotd_msg) raw_notify(player, cf_fullmotd_msg); } if (!Can_Login(player)) { @@ -2605,7 +2605,7 @@ } #endif if (shutdown(d->descriptor, 2) < 0) - perror("shutdown"); + penn_perror("shutdown"); closesocket(d->descriptor); } } @@ -3171,12 +3171,12 @@ } orator = player; - if (cf_motd_msg && *cf_motd_msg) { + if (*cf_motd_msg) { raw_notify(player, cf_motd_msg); } raw_notify(player, " "); - if (Hasprivs(player) && cf_wizmotd_msg && *cf_wizmotd_msg) { - if (cf_motd_msg && *cf_motd_msg) + if (Hasprivs(player) && *cf_wizmotd_msg) { + if (*cf_motd_msg) raw_notify(player, asterisk_line); raw_notify(player, cf_wizmotd_msg); } @@ -3394,32 +3394,39 @@ void do_motd(dbref player, enum motd_type key, const char *message) { + const char *what; - if (!Wizard(player) && key != MOTD_LIST) { + if (key != MOTD_LIST && !Can_Announce(player)) { notify(player, T ("You may get 15 minutes of fame and glory in life, but not right now.")); return; } + + if (!message || !*message) + what = T("cleared"); + else + what = T("set"); + switch (key) { case MOTD_MOTD: - strcpy(cf_motd_msg, message); - notify(player, T("Motd set.")); + mush_strncpy(cf_motd_msg, message, BUFFER_LEN); + notify_format(player, T("Motd %s."), what); break; case MOTD_WIZ: - strcpy(cf_wizmotd_msg, message); - notify(player, T("Wizard motd set.")); + mush_strncpy(cf_wizmotd_msg, message, BUFFER_LEN); + notify_format(player, T("Wizard motd %s."), what); break; case MOTD_DOWN: - strcpy(cf_downmotd_msg, message); - notify(player, T("Down motd set.")); + mush_strncpy(cf_downmotd_msg, message, BUFFER_LEN); + notify_format(player, T("Down motd %s."), what); break; case MOTD_FULL: - strcpy(cf_fullmotd_msg, message); - notify(player, T("Full motd set.")); + mush_strncpy(cf_fullmotd_msg, message, BUFFER_LEN); + notify_format(player, T("Full motd %s."), what); break; case MOTD_LIST: - notify_format(player, "MOTD: %s", cf_motd_msg); + notify_format(player, T("MOTD: %s"), cf_motd_msg); if (Hasprivs(player)) { notify_format(player, T("Wiz MOTD: %s"), cf_wizmotd_msg); notify_format(player, T("Down MOTD: %s"), cf_downmotd_msg); @@ -4043,7 +4050,7 @@ DESC *match; if (!*args[0]) safe_str(T("#-1 FUNCTION REQUIRES ONE ARGUMENT"), buff, bp); - else if ((match = lookup_desc(executor, args[0]))) + else if ((match = lookup_desc(executor, args[0])) && match->width > 0) safe_integer(match->width, buff, bp); else if (args[1]) safe_str(args[1], buff, bp); @@ -4056,7 +4063,7 @@ DESC *match; if (!*args[0]) safe_str(T("#-1 FUNCTION REQUIRES ONE ARGUMENT"), buff, bp); - else if ((match = lookup_desc(executor, args[0]))) + else if ((match = lookup_desc(executor, args[0])) && match->height > 0) safe_integer(match->height, buff, bp); else if (args[1]) safe_str(args[1], buff, bp); @@ -4121,18 +4128,33 @@ { DESC *d; int first = 1; + dbref victim; + int powered = 1; if (!Priv_Who(executor)) { safe_str(T(e_perm), buff, bp); return; } + if (nargs && args[0] && *args[0]) { + /* An argument was given. Find the victim and adjust perms */ + if ((victim = noisy_match_result(executor, args[0], NOTYPE, + MAT_EVERYTHING)) == NOTHING) { + safe_str(T(e_notvis), buff, bp); + return; + } + if (!Priv_Who(victim)) + powered = 0; + } + DESC_ITER_CONN(d) { - if (first) - first = 0; - else - safe_chr(' ', buff, bp); - safe_integer(d->descriptor, buff, bp); + if (powered || !Hidden(d)) { + if (first) + first = 0; + else + safe_chr(' ', buff, bp); + safe_integer(d->descriptor, buff, bp); + } } } Index: src/cmdlocal.dst =================================================================== --- src/cmdlocal.dst (.../p5) (revision 1176) +++ src/cmdlocal.dst (.../p6) (revision 1176) @@ -1,3 +1,4 @@ +/* -*- c -*- /*----------------------------------------------------------------- * Local stuff * @@ -52,6 +53,8 @@ { if (SW_ISSET(sw, SWITCH_NOISY)) notify_format(player, "Noisy silly with %s", arg_left); + if (SW_BY_NAME(sw, "VERY")) + notify(player, "The following line will be very silly indeed."); notify_format(player, "SillyCommand %s", arg_left); } #endif @@ -75,7 +78,7 @@ local_commands(void) { #ifdef EXAMPLE - command_add("@SILLY", CMD_T_ANY, "WIZARD ROYALTY", "SEE_ALL", "NOISY NOEVAL", - cmd_local_silly); + command_add("@SILLY", CMD_T_ANY, "WIZARD ROYALTY", "SEE_ALL", + "NOISY NOEVAL VERY", cmd_local_silly); #endif } Index: src/flags.c =================================================================== --- src/flags.c (.../p5) (revision 1176) +++ src/flags.c (.../p6) (revision 1176) @@ -915,6 +915,7 @@ add_power("Debit", '\0', NOTYPE, F_WIZARD | F_LOG, F_ANY); add_power("Pueblo_Send", '\0', NOTYPE, F_WIZARD | F_LOG, F_ANY); add_power("Many_Attribs", '\0', NOTYPE, F_WIZARD | F_LOG, F_ANY); + add_power("hook", '\0', NOTYPE, F_WIZARD | F_LOG, F_ANY); /* Aliases for other servers */ if ((f = match_power("tport_anything")) && !match_power("tel_anything")) flag_add(flags, "tel_anything", f); Index: src/funmath.c =================================================================== --- src/funmath.c (.../p5) (revision 1176) +++ src/funmath.c (.../p6) (revision 1176) @@ -1096,10 +1096,20 @@ safe_number(log(num), buff, bp); } +#ifndef HAVE_LOG2 +static double +log2(double x) +{ + return log(x) / log(2.0); +} +#endif + /* ARGSUSED */ FUNCTION(fun_log) { NVAL num, base; + bool base_is_e = false; + if (!is_number(args[0])) { safe_str(T(e_nums), buff, bp); return; @@ -1118,16 +1128,25 @@ } if (nargs == 2) { if (!is_number(args[1])) { - safe_str(T(e_nums), buff, bp); - return; - } - base = parse_number(args[1]); + if (args[1][0] == 'e' && args[1][1] == '\0') + base_is_e = true; + else { + safe_str(T(e_nums), buff, bp); + return; + } + } else + base = parse_number(args[1]); - if (base <= 1) { + if (base_is_e) + safe_number(log(num), buff, bp); + else if (base <= 1) safe_str(T("#-1 BASE OUT OF RANGE"), buff, bp); - return; - } - safe_number(log(num) / log(base), buff, bp); + else if (base == 10) + safe_number(log10(num), buff, bp); + else if (base == 2) + safe_number(log2(num), buff, bp); + else + safe_number(log(num) / log(base), buff, bp); } else safe_number(log10(num), buff, bp); } @@ -1196,8 +1215,24 @@ break; #endif default: - /* Spiffy logarithm trick */ - root = exp(log(x) / n); + { + /* Root-finding algorithm detailed at + http://en.wikipedia.org/wiki/Nth_root_algorithm */ + NVAL lastx, inverse_n, nm1, epsilon; + int count = -1; + /* See http://en.wikipedia.org/wiki/Talk:Nth_root_algorithm for + initial guess equation, which is basically the old root-finding + equation using 2 instead of e as a base. */ + root = pow(2.0, ceil(ceil(log2(x)) / n)); + inverse_n = 1.0 / n; + nm1 = n - 1.0; + epsilon = pow(0.1, FLOAT_PRECISION + 1); + do { + count += 1; + lastx = root; + root = inverse_n * ((nm1 * root) + (x / pow(root, nm1))); + } while (fabs(lastx - root) > epsilon || count < 100); + } } if (sign) Index: src/create.c =================================================================== --- src/create.c (.../p5) (revision 1176) +++ src/create.c (.../p6) (revision 1176) @@ -472,7 +472,7 @@ PUSH(thing, Contents(Source(player))); /* and we're done */ - notify_format(player, "Created: Object %s.", unparse_dbref(thing)); + notify_format(player, T("Created: Object %s."), unparse_dbref(thing)); current_state.things++; local_data_create(thing); return thing; Index: src/extmail.c =================================================================== --- src/extmail.c (.../p5) (revision 1176) +++ src/extmail.c (.../p6) (revision 1176) @@ -2059,8 +2059,7 @@ /* mail_top could be 0 from an error or actually be 0. */ if (nbuf1[0] == '0' && nbuf1[1] == '\n') { char buff[20]; - fgets(buff, sizeof buff, fp); - if (!buff) + if (!fgets(buff, sizeof buff, fp)) do_rawlog(LT_ERR, T("MAIL: Missing end-of-dump marker in mail database.")); else if (strcmp(buff, (mail_flags & MDBF_NEW_EOD) @@ -2175,8 +2174,7 @@ } { char buff[20]; - fgets(buff, sizeof buff, fp); - if (!buff) + if (!fgets(buff, sizeof buff, fp)) do_rawlog(LT_ERR, T("MAIL: Missing end-of-dump marker in mail database.")); else if (strcmp(buff, (mail_flags & MDBF_NEW_EOD) Index: src/wait.c =================================================================== --- src/wait.c (.../p5) (revision 1176) +++ src/wait.c (.../p6) (revision 1176) @@ -8,6 +8,9 @@ #ifdef HAVE_UNISTD_H #include #endif +#ifdef I_FCNTL +#include +#endif #ifdef I_SYS_TYPES #include #endif @@ -17,10 +20,13 @@ #ifdef HAVE_SYS_RESOURCE_H #include #endif +#include +#include #include - #include "wait.h" +void penn_perror(const char *); + /** Portable wait * \param child pid of specific child proccess to wait for. Only meaningful if HAVE_WAITPID is defined. * \param status pointer to store the child process's exit status in. @@ -131,3 +137,54 @@ return 0; #endif } + +/* This stuff is here because info_slave and netmud both use it + and I don't want to duplicate code, and putting it anywhere else + will draw it too much stuff into info_slave */ + +static int +lock_fp(FILE * f, bool what) +{ +#ifdef HAVE_FCNTL + struct flock lock; + int ret; + + memset(&lock, 0, sizeof lock); + lock.l_whence = SEEK_SET; + lock.l_start = 0; + lock.l_len = 0; + + if (what) + lock.l_type = F_WRLCK; + else + lock.l_type = F_UNLCK; + + ret = fcntl(fileno(f), F_SETLKW, &lock); + if (ret < 0) + penn_perror("fcntl"); + + return ret; +#else + return -1; +#endif +} + +/** Obtain an exclusive advisory lock on a file pointer. Can block. + * \param f the file to lock + * \return 0 on success, -1 on failure. + */ +int +lock_file(FILE * f) +{ + return lock_fp(f, 1); +} + +/** Release a lock on a file pointer. + * \param f the file to lock + * \return 0 on success, -1 on failure. + */ +int +unlock_file(FILE * f) +{ + return lock_fp(f, 0); +} Index: src/funcrypt.c =================================================================== --- src/funcrypt.c (.../p5) (revision 1176) +++ src/funcrypt.c (.../p6) (revision 1176) @@ -214,8 +214,10 @@ if (!text && !*text) return (char *) ""; - strcpy(codebuff, crunch_code(code)); - if (!code || !*code || !codebuff || !*codebuff) + if (!code || !*code) + return text; + mush_strncpy(codebuff, crunch_code(code), BUFFER_LEN); + if (!*codebuff) return text; textbuff[0] = '\0'; Index: src/funlist.c =================================================================== --- src/funlist.c (.../p5) (revision 1176) +++ src/funlist.c (.../p6) (revision 1176) @@ -17,7 +17,7 @@ #include "parse.h" #include "function.h" #include "mymalloc.h" -#include "pcre.h" +#include "mypcre.h" #include "match.h" #include "command.h" #include "attrib.h" @@ -138,7 +138,7 @@ * \param sep string to use as separator between words. */ void -arr2list(char *r[], int max, char *list, char **lp, char *sep) +arr2list(char *r[], int max, char *list, char **lp, const char *sep) { int i; int seplen = 0; @@ -2674,7 +2674,7 @@ FUNCTION(fun_regreplace) { pcre *re; - pcre_extra *study = NULL; + pcre_extra *extra, *study = NULL; const char *errptr; int subpatterns; int offsets[99]; @@ -2746,7 +2746,7 @@ if (all) { study = pcre_study(re, 0, &errptr); if (errptr != NULL) { - mush_free((Malloc_t) re, "pcre"); + mush_free(re, "pcre"); safe_str(T("#-1 REGEXP ERROR: "), buff, bp); safe_str(errptr, buff, bp); free_ansi_string(orig); @@ -2758,19 +2758,25 @@ add_check("pcre.extra"); } + if (study) { + extra = study; + set_match_limit(extra); + } else + extra = default_match_limit(); + search = 0; /* Do all the searches and replaces we can */ start = prebuf; - subpatterns = pcre_exec(re, study, prebuf, prelen, 0, 0, offsets, 99); + subpatterns = pcre_exec(re, extra, prebuf, prelen, 0, 0, offsets, 99); /* Match wasn't found... we're done */ if (subpatterns < 0) { safe_str(prebuf, postbuf, &postp); - mush_free((Malloc_t) re, "pcre"); + mush_free(re, "pcre"); free_ansi_string(orig); if (study) - mush_free((Malloc_t) study, "pcre.extra"); + mush_free(study, "pcre.extra"); continue; } @@ -2804,15 +2810,15 @@ if (offsets[0] == match_offset) match_offset++; } while (all && match_offset < prelen && - (subpatterns = pcre_exec(re, study, prebuf, prelen, + (subpatterns = pcre_exec(re, extra, prebuf, prelen, match_offset, 0, offsets, 99)) >= 0); safe_str(start, postbuf, &postp); *postp = '\0'; - mush_free((Malloc_t) re, "pcre"); + mush_free(re, "pcre"); if (study != NULL) - mush_free((Malloc_t) study, "pcre.extra"); + mush_free(study, "pcre.extra"); free_ansi_string(orig); } @@ -2848,7 +2854,7 @@ if (all) { study = pcre_study(re, 0, &errptr); if (errptr != NULL) { - mush_free((Malloc_t) re, "pcre"); + mush_free(re, "pcre"); safe_str(T("#-1 REGEXP ERROR: "), buff, bp); safe_str(errptr, buff, bp); free_ansi_string(orig); @@ -2859,11 +2865,17 @@ /* study */ add_check("pcre.extra"); } + if (study) { + extra = study; + set_match_limit(extra); + } else + extra = default_match_limit(); + search = 0; /* Do all the searches and replaces we can */ do { subpatterns = - pcre_exec(re, study, orig->text, orig->len, search, 0, offsets, 99); + pcre_exec(re, extra, orig->text, orig->len, search, 0, offsets, 99); if (subpatterns >= 0) { /* We have a match */ /* Process the replacement */ @@ -2900,9 +2912,9 @@ } } } while (subpatterns >= 0 && all); - mush_free((Malloc_t) re, "pcre"); + mush_free(re, "pcre"); if (study != NULL) - mush_free((Malloc_t) study, "pcre.extra"); + mush_free(study, "pcre.extra"); } safe_ansi_string(orig, 0, orig->len, buff, bp); free_ansi_string(orig); @@ -2931,6 +2943,7 @@ int i, nqregs, curq; char *qregs[NUMQ], *holder[NUMQ]; pcre *re; + pcre_extra *extra; const char *errptr; int erroffset; int offsets[99]; @@ -2964,7 +2977,9 @@ return; } add_check("pcre"); - subpatterns = pcre_exec(re, NULL, txt, arglens[0], 0, 0, offsets, 99); + extra = default_match_limit(); + + subpatterns = pcre_exec(re, extra, txt, arglens[0], 0, 0, offsets, 99); safe_integer(subpatterns >= 0, buff, bp); /* We need to parse the list of registers. Anything that we don't parse @@ -3049,9 +3064,9 @@ } } for (i = 0; i < nqregs; i++) { - mush_free((Malloc_t) holder[i], "regmatch"); + mush_free(holder[i], "regmatch"); } - mush_free((Malloc_t) re, "pcre"); + mush_free(re, "pcre"); free_ansi_string(as); } @@ -3073,8 +3088,9 @@ const char *errptr; int erroffset; int flags = 0; - + bool free_study; dbref it = match_thing(executor, args[0]); + reharg.first = 0; if (it == NOTHING || it == AMBIGUOUS) { safe_str(T(e_notvis), buff, bp); @@ -3109,15 +3125,21 @@ mush_free(reharg.re, "pcre"); return; } - if (reharg.study) + if (reharg.study) { add_check("pcre.extra"); + free_study = true; + set_match_limit(reharg.study); + } else { + free_study = false; + reharg.study = default_match_limit(); + } reharg.buff = buff; reharg.bp = bp; atr_iter_get(executor, it, args[1], 0, regrep_helper, (void *) &reharg); mush_free(reharg.re, "pcre"); - if (reharg.study) + if (free_study) mush_free(reharg.study, "pcre.extra"); } @@ -3153,7 +3175,7 @@ char *r, *s, *b, sep; size_t rlen; pcre *re; - pcre_extra *study; + pcre_extra *study, *extra; const char *errptr; int erroffset; int offsets[99]; @@ -3194,12 +3216,16 @@ mush_free(re, "pcre"); return; } - if (study) + if (study) { add_check("pcre.extra"); + extra = study; + set_match_limit(extra); + } else + extra = default_match_limit(); do { r = remove_markup(split_token(&s, sep), &rlen); - if (pcre_exec(re, study, r, rlen - 1, 0, 0, offsets, 99) >= 0) { + if (pcre_exec(re, extra, r, rlen - 1, 0, 0, offsets, 99) >= 0) { if (all && *bp != b) safe_str(osep, buff, bp); safe_str(r, buff, bp); @@ -3208,7 +3234,7 @@ } } while (s); - mush_free((Malloc_t) re, "pcre"); + mush_free(re, "pcre"); if (study) - mush_free((Malloc_t) study, "pcre.extra"); + mush_free(study, "pcre.extra"); } Index: src/lock.c =================================================================== --- src/lock.c (.../p5) (revision 1176) +++ src/lock.c (.../p6) (revision 1176) @@ -877,7 +877,7 @@ /* Find the lock's failure attribute, if it's there */ for (lm = lock_msgs; lm->type; lm++) { if (!strcmp(lm->type, ltype)) - break; + break; } if (lm->type) { strcpy(atr, lm->failbase); Index: src/htmltab.c =================================================================== --- src/htmltab.c (.../p5) (revision 1176) +++ src/htmltab.c (.../p6) (revision 1176) @@ -1,4 +1,4 @@ -/* ANSI-C code produced by gperf version 3.0.1 */ +/* ANSI-C code produced by gperf version 3.0.3p1 */ /* Command-line: gperf --output-file htmltab.c htmltab.gperf */ /* Computed positions: -k'1-2,$' */ @@ -76,13 +76,12 @@ #ifdef __GNUC__ __inline -#else -#ifdef __cplusplus -inline +#ifdef __GNUC_STDC_INLINE__ + __attribute__ ((__gnu_inline__)) #endif #endif - static unsigned int -htmltag_hash(register const char *str, register unsigned int len) + static unsigned int + htmltag_hash(register const char *str, register unsigned int len) { static const unsigned char asso_values[] = { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, @@ -126,9 +125,12 @@ #ifdef __GNUC__ __inline +#ifdef __GNUC_STDC_INLINE__ + __attribute__ ((__gnu_inline__)) #endif -const char * -is_allowed_tag(register const char *str, register unsigned int len) +#endif + const char *is_allowed_tag(register const char *str, + register unsigned int len) { enum { TOTAL_KEYWORDS = 58, Index: src/lmathtab.c =================================================================== --- src/lmathtab.c (.../p5) (revision 1176) +++ src/lmathtab.c (.../p6) (revision 1176) @@ -1,4 +1,4 @@ -/* ANSI-C code produced by gperf version 3.0.3 */ +/* ANSI-C code produced by gperf version 3.0.3p1 */ /* Command-line: gperf --output-file lmathtab.c lmathtab.gperf */ /* Computed positions: -k'1-2,5' */ @@ -114,13 +114,12 @@ #ifdef __GNUC__ __inline -#else -#ifdef __cplusplus -inline +#ifdef __GNUC_STDC_INLINE__ + __attribute__ ((__gnu_inline__)) #endif #endif - static unsigned int -math_hash(register const char *str, register unsigned int len) + static unsigned int + math_hash(register const char *str, register unsigned int len) { static unsigned char asso_values[] = { 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, Index: src/flaglocal.dst =================================================================== --- src/flaglocal.dst (.../p5) (revision 1176) +++ src/flaglocal.dst (.../p6) (revision 1176) @@ -33,7 +33,10 @@ local_flags(FLAGSPACE *flags __attribute__ ((__unused__))) { #ifdef EXAMPLE - if (strcmp(flags->name, "FLAG") == 0) + if (strcmp(flags->name, "FLAG") == 0) { add_flag("BIG", 'B', TYPE_PLAYER | TYPE_THING, F_ANY, F_ANY); + } else if (strcmp(flags->name, "POWER") == 0) { + add_power("MORPH", '\0', NOTYPE, F_WIZARD | F_LOG, F_ANY); + } #endif } Index: src/shs.c =================================================================== --- src/shs.c (.../p5) (revision 1176) +++ src/shs.c (.../p6) (revision 1176) @@ -116,7 +116,7 @@ * \param shsInfo pointer to shs data structure. */ void -shsInit(SHS_INFO * shsInfo) +shsInit(SHS_INFO *shsInfo) { /* Set the h-vars to their initial values */ shsInfo->digest[0] = h0init; @@ -131,14 +131,14 @@ } -static void shsTransform(SHS_INFO * shsInfo); +static void shsTransform(SHS_INFO *shsInfo); /* Perform the SHS transformation. Note that this code, like MD5, seems to * break some optimizing compilers - it may be necessary to split it into * sections, e.g. based on the four subrounds. */ static void -shsTransform(SHS_INFO * shsInfo) +shsTransform(SHS_INFO *shsInfo) { LONG W[80], temp; int i; @@ -341,7 +341,7 @@ * \param count size of buffer in bytes. */ void -shsUpdate(SHS_INFO * shsInfo, const BYTE *buffer, int count) +shsUpdate(SHS_INFO *shsInfo, const BYTE *buffer, int count) { /* Update bitcount */ @@ -372,7 +372,7 @@ * \param shsInfo pointer to shs data. */ void -shsFinal(SHS_INFO * shsInfo) +shsFinal(SHS_INFO *shsInfo) { int count; LONG lowBitcount = shsInfo->countLo, highBitcount = shsInfo->countHi; Index: src/wild.c =================================================================== --- src/wild.c (.../p5) (revision 1176) +++ src/wild.c (.../p6) (revision 1176) @@ -33,7 +33,7 @@ #include "ansi.h" #include "mymalloc.h" #include "parse.h" -#include "pcre.h" +#include "mypcre.h" #include "confmagic.h" /** Force a char to be lowercase */ @@ -515,6 +515,7 @@ char **matches, size_t nmatches, char *data, ssize_t len) { pcre *re; + pcre_extra *extra; size_t i; const char *errptr; const char *d; @@ -537,11 +538,12 @@ } add_check("pcre"); d = remove_markup(val, &delenn); + extra = default_match_limit(); /* * Now we try to match the pattern. The relevant fields will * automatically be filled in by this. */ - if ((subpatterns = pcre_exec(re, NULL, d, delenn - 1, 0, 0, offsets, 99)) + if ((subpatterns = pcre_exec(re, extra, d, delenn - 1, 0, 0, offsets, 99)) < 0) { mush_free(re, "pcre"); return 0; @@ -591,6 +593,7 @@ quick_regexp_match(const char *restrict s, const char *restrict d, bool cs) { pcre *re; + pcre_extra *extra; const char *sptr; size_t slen; const char *errptr; @@ -615,11 +618,12 @@ } add_check("pcre"); sptr = remove_markup(d, &slen); + extra = default_match_limit(); /* * Now we try to match the pattern. The relevant fields will * automatically be filled in by this. */ - r = pcre_exec(re, NULL, sptr, slen - 1, 0, 0, offsets, 99); + r = pcre_exec(re, extra, sptr, slen - 1, 0, 0, offsets, 99); mush_free(re, "pcre"); @@ -636,14 +640,14 @@ { int len; int offsets[99]; + pcre_extra *extra; if (!re || !subj) return false; len = strlen(subj); - - return pcre_exec(re, NULL, subj, len, 0, 0, offsets, 99) >= 0; - + extra = default_match_limit(); + return pcre_exec(re, extra, subj, len, 0, 0, offsets, 99) >= 0; } Index: src/ident.c =================================================================== --- src/ident.c (.../p5) (revision 1176) +++ src/ident.c (.../p6) (revision 1176) @@ -11,9 +11,6 @@ */ #include "config.h" -#ifdef NeXT3 -#include -#endif #include #include @@ -50,6 +47,9 @@ #endif #include #endif /* WIN32 */ +#ifdef HAVE_POLL_H +#include +#endif #ifdef I_UNISTD #include @@ -76,14 +76,14 @@ socklen_t flen, struct sockaddr *laddr, socklen_t llen, int *timeout); -static int id_query(ident_t * id, +static int id_query(ident_t *id, struct sockaddr *laddr, socklen_t llen, struct sockaddr *faddr, socklen_t flen, int *timeout); -static int id_close(ident_t * id); +static void id_close(ident_t *id); -static int id_parse(ident_t * id, int *timeout, IDENT ** ident); +static int id_parse(ident_t *id, int *timeout, IDENT ** ident); static IDENT *ident_lookup(int fd, int *timeout); @@ -94,14 +94,14 @@ union sockaddr_u localaddr, remoteaddr; socklen_t llen, rlen, len; - len = sizeof(remoteaddr); + len = sizeof remoteaddr; if (getpeername(fd, (struct sockaddr *) remoteaddr.data, &len) < 0) - return 0; + return NULL; llen = len; - len = sizeof(localaddr); + len = sizeof localaddr; if (getsockname(fd, (struct sockaddr *) localaddr.data, &len) < 0) - return 0; + return NULL; rlen = len; return ident_query(&localaddr.addr, llen, &remoteaddr.addr, rlen, timeout); @@ -121,7 +121,7 @@ { int res; ident_t *id; - IDENT *ident = 0; + IDENT *ident = NULL; if (timeout && *timeout < 0) *timeout = 0; @@ -132,33 +132,24 @@ #ifndef WIN32 errno = EINVAL; #endif -#ifdef DEBUG - fprintf(stderr, "id_open failed.\n"); -#endif - return 0; + return NULL; } res = id_query(id, raddr, rlen, laddr, llen, timeout); if (res < 0) { id_close(id); -#ifdef DEBUG - fprintf(stderr, "id_query failed.\n"); -#endif - return 0; + return NULL; } res = id_parse(id, timeout, &ident); - if (res != 1) { + if (res < 0) { id_close(id); -#ifdef DEBUG - fprintf(stderr, "id_parse failed.\n"); -#endif - return 0; + return NULL; } - id_close(id); + id_close(id); return ident; /* At last! */ } @@ -205,8 +196,6 @@ ** Author: Peter Eriksson ** Fixes: Pär Emanuelsson */ - - static ident_t * id_open(struct sockaddr *faddr, socklen_t flen, struct sockaddr *laddr, socklen_t llen, int *timeout) @@ -214,9 +203,6 @@ ident_t *id; char host[NI_MAXHOST]; union sockaddr_u myinterface; - fd_set rs, ws, es; - struct timeval to; - int res; #ifndef WIN32 int tmperrno; #endif @@ -224,10 +210,11 @@ if ((id = malloc(sizeof *id)) == NULL) return NULL; - memset(id, 0, sizeof id); + memset(id, 0, sizeof *id); if (getnameinfo(faddr, flen, host, sizeof host, NULL, 0, NI_NUMERICHOST | NI_NUMERICSERV) != 0) { + penn_perror("id_open: getnameinfo"); free(id); return NULL; } @@ -243,53 +230,18 @@ #endif id->fd = make_socket_conn(host, SOCK_STREAM, &myinterface.addr, llen, - IDPORT, timeout); + IDPORT, timeout ? *timeout : 0); if (id->fd < 0) /* Couldn't connect to an ident server */ goto ERROR_BRANCH; - if (timeout) { - time_t now, after; - - FD_ZERO(&rs); - FD_ZERO(&ws); - FD_ZERO(&es); - FD_SET(id->fd, &rs); - FD_SET(id->fd, &ws); - FD_SET(id->fd, &es); - to.tv_sec = *timeout; - to.tv_usec = 0; - now = time(NULL); - if ((res = select(id->fd + 1, &rs, &ws, &es, &to)) < 0) { -#ifdef DEBUG - perror("libident: select"); -#endif - goto ERROR_BRANCH; - } - after = time(NULL); - *timeout -= after - now; - *timeout = *timeout < 0 ? 0 : *timeout; - - if (res == 0) { -#ifndef WIN32 - errno = ETIMEDOUT; -#endif - goto ERROR_BRANCH; - } - if (FD_ISSET(id->fd, &es)) - goto ERROR_BRANCH; - - if (!FD_ISSET(id->fd, &rs) && !FD_ISSET(id->fd, &ws)) - goto ERROR_BRANCH; - } return id; ERROR_BRANCH: #ifndef WIN32 tmperrno = errno; /* Save, so close() won't erase it */ #endif - closesocket(id->fd); - free(id); + id_close(id); #ifndef WIN32 errno = tmperrno; #endif @@ -301,15 +253,11 @@ ** ** Author: Peter Eriksson */ -static int -id_close(ident_t * id) +static void +id_close(ident_t *id) { - int res; - - res = closesocket(id->fd); + closesocket(id->fd); free(id); - - return res; } @@ -320,49 +268,77 @@ static int -id_query(ident_t * id, struct sockaddr *laddr, socklen_t llen, +id_query(ident_t *id, struct sockaddr *laddr, socklen_t llen, struct sockaddr *faddr, socklen_t flen, int *timeout) { int res; char buf[80]; - char port[NI_MAXSERV]; - fd_set ws; - struct timeval to; + char fport[NI_MAXSERV], lport[NI_MAXSERV]; + time_t now, after; - getnameinfo(laddr, llen, NULL, 0, port, sizeof(port), - NI_NUMERICHOST | NI_NUMERICSERV); - sprintf(buf, "%s , ", port); - getnameinfo(faddr, flen, NULL, 0, port, sizeof(port), - NI_NUMERICHOST | NI_NUMERICSERV); - strncat(buf, port, sizeof(buf)); - strncat(buf, "\r\n", sizeof(buf)); + if (getnameinfo(laddr, llen, NULL, 0, lport, sizeof lport, + NI_NUMERICHOST | NI_NUMERICSERV) < 0) { + penn_perror("id_query: getnameinfo"); + return -1; + } + if (getnameinfo(faddr, flen, NULL, 0, fport, sizeof fport, + NI_NUMERICHOST | NI_NUMERICSERV) < 0) { + penn_perror("id_query: getnameinfo2"); + return -1; + } + + snprintf(buf, sizeof buf, "%s , %s\r\n", lport, fport); + + time(&now); + if ((res = wait_for_connect(id->fd, timeout ? *timeout : -1)) <= 0) { + if (res < 0) + penn_perror("id_query: wait_for_connect"); + return -1; + } + time(&after); if (timeout) { - time_t now, after; - FD_ZERO(&ws); - FD_SET(id->fd, &ws); - to.tv_sec = *timeout; - to.tv_usec = 0; + *timeout -= (int) difftime(after, now); + *timeout = *timeout < 0 ? 0 : *timeout; + } + + make_blocking(id->fd); + + + while (1) { + if (timeout) { + struct timeval to; + socklen_t to_len; + + to.tv_sec = *timeout; + to.tv_usec = 0; + to_len = sizeof to; + if (setsockopt(id->fd, SOL_SOCKET, SO_SNDTIMEO, &to, to_len) < 0) { + penn_perror("id_query: setsockopt"); + return -1; + } + } + now = time(NULL); - if ((res = select(id->fd + 1, NULL, &ws, NULL, &to)) < 0) - return -1; + res = send(id->fd, buf, strlen(buf), 0); after = time(NULL); - *timeout -= after - now; - *timeout = *timeout < 0 ? 0 : *timeout; - if (res == 0) { -#ifndef WIN32 - errno = ETIMEDOUT; -#endif - return -1; + if (timeout) { + *timeout -= (int) difftime(after, now); + *timeout = *timeout < 0 ? 0 : *timeout; + if (*timeout == 0) + return -1; } + if (res < 0) { + if (errno == EINTR) + continue; + else if (errno != EAGAIN && errno != EWOULDBLOCK) + penn_perror("id_query: send"); + return -1; + } else + return res; } - /* Used to ignore SIGPIPE here, but we already ignore it anyways. */ - res = send(id->fd, buf, strlen(buf), 0); - - return res; } - /* id_parse.c Receive and parse a reply from an IDENT server ** ** Author: Peter Eriksson @@ -413,13 +389,11 @@ static int -id_parse(ident_t * id, int *timeout, IDENT ** ident) +id_parse(ident_t *id, int *timeout, IDENT ** ident) { - char c, *cp, *tmp_charset; - fd_set rs; + char c, *cp, *tmp_charset = NULL; int res = 0, lp, fp; - size_t pos; - struct timeval to; + size_t pos, len; #ifndef WIN32 errno = 0; @@ -435,44 +409,53 @@ if (!*ident) return -1; - memset(*ident, 0, sizeof(IDENT)); + memset(*ident, 0, sizeof **ident); pos = strlen(id->buf); + len = IDBUFSIZE - pos; - if (timeout) { + do { time_t now, after; - FD_ZERO(&rs); - FD_SET(id->fd, &rs); - to.tv_sec = *timeout; - to.tv_usec = 0; + if (timeout) { + struct timeval to; + socklen_t to_len; + + to.tv_sec = *timeout; + to.tv_usec = 0; + to_len = sizeof to; + + if (setsockopt(id->fd, SOL_SOCKET, SO_RCVTIMEO, &to, to_len) < 0) { + penn_perror("id_parse: setsockopt"); + return -1; + } + } + now = time(NULL); - if ((res = select(id->fd + 1, &rs, NULL, NULL, &to)) < 0) - return -1; + res = recv(id->fd, id->buf + pos, len, 0); after = time(NULL); - *timeout -= after - now; - *timeout = *timeout < 0 ? 0 : *timeout; - if (res == 0) { -#ifndef WIN32 - errno = ETIMEDOUT; -#endif - return -1; + if (timeout) { + *timeout -= (int) difftime(after, now); + *timeout = *timeout < 0 ? 0 : *timeout; + if (*timeout == 0) + return -1; } - } - while (pos < sizeof(id->buf) && - (res = recv(id->fd, id->buf + pos, 1, 0)) == 1 && id->buf[pos] != '\n') - pos++; - if (res < 0) - return -1; - if (res == 0) { -#ifndef WIN32 - errno = ENOTCONN; -#endif - return -1; - } - if (id->buf[pos] != '\n') { + if (res < 0) { + if (errno == EAGAIN || errno == EWOULDBLOCK) + break; + else if (errno == EINTR) + continue; + else + return -1; + } + + len -= res; + pos += res; + } while (pos < len && res > 0 && id->buf[pos - 1] != '\n'); + + if (id->buf[pos - 1] != '\n') return 0; - } + id->buf[pos++] = '\0'; /* Get first field ( , ) */ Index: src/look.c =================================================================== --- src/look.c (.../p5) (revision 1176) +++ src/look.c (.../p6) (revision 1176) @@ -721,7 +721,7 @@ case TYPE_PLAYER: look_simple(player, thing); if (!(Opaque(thing))) - look_contents(player, thing, "Carrying:"); + look_contents(player, thing, T("Carrying:")); break; default: look_simple(player, thing); @@ -1185,12 +1185,12 @@ } else { if (Hearer(here) || Listener(here)) { if (Connected(here)) - notify_format(player, "%s [speech]. (connected)", Name(here)); + notify_format(player, T("%s [speech]. (connected)"), Name(here)); else - notify_format(player, "%s [speech].", Name(here)); + notify_format(player, T("%s [speech]."), Name(here)); } if (Commer(here)) - notify_format(player, "%s [commands].", Name(here)); + notify_format(player, T("%s [commands]."), Name(here)); } } } @@ -1201,9 +1201,9 @@ for (here = Exits(Location(player)); here != NOTHING; here = Next(here)) { if (Audible(here)) { strcpy(tbuf1, Name(here)); - for (p = tbuf1; *p && (*p != ';'); p++) ; + p = seek_char(tbuf1, ';'); *p = '\0'; - notify_format(player, "%s [broadcasting].", tbuf1); + notify_format(player, T("%s [broadcasting]."), tbuf1); } } } @@ -1225,12 +1225,12 @@ } else { if (Hearer(here) || Listener(here)) { if (Connected(here)) - notify_format(player, "%s [speech]. (connected)", Name(here)); + notify_format(player, T("%s [speech]. (connected)"), Name(here)); else - notify_format(player, "%s [speech].", Name(here)); + notify_format(player, T("%s [speech]."), Name(here)); } if (Commer(here)) - notify_format(player, "%s [commands].", Name(here)); + notify_format(player, T("%s [commands]."), Name(here)); } } } @@ -1348,7 +1348,7 @@ if (exd) { if (Location(counter) == place) { notify_format(player, - "%s(#%d) [from: %s(#%d)]", Name(counter), + T("%s(#%d) [from: %s(#%d)]"), Name(counter), counter, Name(Source(counter)), Source(counter)); exc++; } @@ -1357,7 +1357,8 @@ case TYPE_ROOM: if (rd) { if (Location(counter) == place) { - notify_format(player, "%s(#%d) [dropto]", Name(counter), counter); + notify_format(player, T("%s(#%d) [dropto]"), Name(counter), + counter); rc++; } } @@ -1365,7 +1366,7 @@ case TYPE_THING: if (td) { if (Home(counter) == place) { - notify_format(player, "%s(#%d) [home]", Name(counter), counter); + notify_format(player, T("%s(#%d) [home]"), Name(counter), counter); tc++; } } @@ -1373,7 +1374,7 @@ case TYPE_PLAYER: if (pd) { if (Home(counter) == place) { - notify_format(player, "%s(#%d) [home]", Name(counter), counter); + notify_format(player, T("%s(#%d) [home]"), Name(counter), counter); pc++; } } @@ -1388,7 +1389,8 @@ } else { notify(player, T("---------- Entrances Done ----------")); notify_format(player, - "Totals: Rooms...%d Exits...%d Objects...%d Players...%d", + T + ("Totals: Rooms...%d Exits...%d Objects...%d Players...%d"), rc, exc, tc, pc); return; } Index: src/info_master.c =================================================================== --- src/info_master.c (.../p5) (revision 1176) +++ src/info_master.c (.../p6) (revision 1176) @@ -30,6 +30,7 @@ #include #include #include +#include #include "conf.h" #include "externs.h" @@ -108,7 +109,7 @@ #ifdef HAVE_SOCKETPAIR if (socketpair(AF_LOCAL, SOCK_DGRAM, 0, socks) < 0) { - perror("creating slave datagram socketpair"); + penn_perror("creating slave datagram socketpair"); return; } if (socks[0] >= maxd) @@ -119,7 +120,7 @@ child = fork(); if (child < 0) { - perror("forking info slave"); + penn_perror("forking info slave"); #ifdef HAVE_SOCKETPAIR closesocket(socks[0]); closesocket(socks[1]); @@ -150,7 +151,7 @@ } snprintf(num, NI_MAXSERV, "%d", socks[1]); execl("./info_slave", "info_slave", num, (char *) NULL); - perror("execing info slave"); + penn_perror("execing info slave"); _exit(1); } @@ -183,9 +184,11 @@ return; } + memset(&req, 0, sizeof req); + req.rlen = MAXSOCKADDR; if (getpeername(fd, (struct sockaddr *) req.remote.data, &req.rlen) < 0) { - perror("socket peer vanished"); + penn_perror("socket peer vanished"); shutdown(fd, 2); closesocket(fd); FD_CLR(fd, &info_pending); @@ -201,7 +204,7 @@ char port[NI_MAXSERV]; if (getnameinfo(&req.remote.addr, req.rlen, NULL, 0, port, sizeof port, NI_NUMERICHOST | NI_NUMERICSERV) != 0) - perror("getting remote port number"); + penn_perror("getting remote port number"); else { if (!Deny_Silent_Site(buf, AMBIGUOUS)) { do_log(LT_CONN, 0, 0, T("[%d/%s] Refused connection (remote port %s)"), @@ -215,7 +218,7 @@ req.llen = MAXSOCKADDR; if (getsockname(fd, (struct sockaddr *) req.local.data, &req.llen) < 0) { - perror("socket self vanished"); + penn_perror("socket self vanished"); closesocket(fd); FD_CLR(fd, &info_pending); return; @@ -228,12 +231,12 @@ slen = send(info_slave, &req, sizeof req, 0); if (slen < 0) { - perror("info slave query: write error"); + penn_perror("info slave query: write error"); make_info_slave(); return; } else if (slen != (int) sizeof req) { /* Shouldn't happen! */ - perror("info slave query: partial packet"); + penn_perror("info slave query: partial packet"); make_info_slave(); return; } @@ -258,7 +261,7 @@ if (len < 0 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)) return; else if (len < 0 || len != (int) sizeof resp) { - perror("reading info_slave response"); + penn_perror("reading info_slave response"); return; } Index: src/strutil.c =================================================================== --- src/strutil.c (.../p5) (revision 1176) +++ src/strutil.c (.../p6) (revision 1176) @@ -871,7 +871,9 @@ seek_char(const char *s, char c) { char *p = (char *) s; - while (p && *p && (*p != c)) + if (!p) + return NULL; + while (*p && (*p != c)) p++; return p; } @@ -1017,7 +1019,7 @@ str += strspn(str, " "); for (p = str; *p; p++) ; /* And trailing */ - for (p--; (*p == ' ') && (p > str); p--) ; + for (p--; p > str && *p == ' '; p--) ; p++; *p = '\0'; return str; Index: src/notify.c =================================================================== --- src/notify.c (.../p5) (revision 1176) +++ src/notify.c (.../p6) (revision 1176) @@ -183,7 +183,7 @@ static enum na_type notify_type(DESC *d); static void free_strings(struct notify_strings messages[]); static void zero_strings(struct notify_strings messages[]); -static int output_ansichange(ansi_data * states, int *ansi_ptr, +static int output_ansichange(ansi_data *states, int *ansi_ptr, const unsigned char **ptr, char *buff, char **bp); static unsigned char *notify_makestring(const char *message, struct notify_strings messages[], @@ -210,7 +210,7 @@ } static int -output_ansichange(ansi_data * states, int *ansi_ptr, +output_ansichange(ansi_data *states, int *ansi_ptr, const unsigned char **ptr, char *buff, char **bp) { const unsigned char *p = *ptr; Index: src/game.c =================================================================== --- src/game.c (.../p5) (revision 1176) +++ src/game.c (.../p6) (revision 1176) @@ -67,7 +67,7 @@ #include "function.h" #include "help.h" #include "dbio.h" -#include "pcre.h" +#include "mypcre.h" #ifndef WIN32 #include "wait.h" #endif @@ -368,11 +368,11 @@ } db_close(f); if (rename_file(realtmpfl, realdumpfile) < 0) { - perror(realtmpfl); + penn_perror(realtmpfl); longjmp(db_err, 1); } } else { - perror(realtmpfl); + penn_perror(realtmpfl); longjmp(db_err, 1); } sprintf(realdumpfile, "%s%s", options.mail_db, options.compresssuff); @@ -383,11 +383,11 @@ dump_mail(f); db_close(f); if (rename_file(realtmpfl, realdumpfile) < 0) { - perror(realtmpfl); + penn_perror(realtmpfl); longjmp(db_err, 1); } } else { - perror(realtmpfl); + penn_perror(realtmpfl); longjmp(db_err, 1); } } @@ -398,11 +398,11 @@ save_chatdb(f); db_close(f); if (rename_file(realtmpfl, realdumpfile) < 0) { - perror(realtmpfl); + penn_perror(realtmpfl); longjmp(db_err, 1); } } else { - perror(realtmpfl); + penn_perror(realtmpfl); longjmp(db_err, 1); } time(&globals.last_dump_time); Index: src/parse.c =================================================================== --- src/parse.c (.../p5) (revision 1176) +++ src/parse.c (.../p6) (revision 1176) @@ -31,7 +31,7 @@ #include "mushdb.h" #include "parse.h" #include "attrib.h" -#include "pcre.h" +#include "mypcre.h" #include "flags.h" #include "log.h" #include "mymalloc.h" @@ -268,7 +268,7 @@ if (!re) re = pcre_compile("^#-?\\d+(?::\\d+)?$", 0, &errptr, &erroffset, NULL); val = remove_markup((const char *) str, &vlen); - return (pcre_exec(re, NULL, val, vlen - 1, 0, 0, NULL, 0) >= 0); + return pcre_exec(re, NULL, val, vlen - 1, 0, 0, NULL, 0) >= 0; } /** Is string an integer? @@ -1316,25 +1316,23 @@ nfargs = 0; } if ((nfargs < fp->minargs) || (nfargs > abs(fp->maxargs))) { - safe_str(T("#-1 FUNCTION ("), buff, bp); - safe_str(fp->name, buff, bp); - safe_str(") EXPECTS ", buff, bp); + safe_format(buff, bp, T("#-1 FUNCTION (%s) EXPECTS "), fp->name); if (fp->minargs == abs(fp->maxargs)) { safe_integer(fp->minargs, buff, bp); } else if ((fp->minargs + 1) == abs(fp->maxargs)) { safe_integer(fp->minargs, buff, bp); - safe_str(" OR ", buff, bp); + safe_str(T(" OR "), buff, bp); safe_integer(abs(fp->maxargs), buff, bp); } else if (fp->maxargs == INT_MAX) { - safe_str("AT LEAST ", buff, bp); + safe_str(T("AT LEAST "), buff, bp); safe_integer(fp->minargs, buff, bp); } else { - safe_str("BETWEEN ", buff, bp); + safe_str(T("BETWEEN "), buff, bp); safe_integer(fp->minargs, buff, bp); - safe_str(" AND ", buff, bp); + safe_str(T(" AND "), buff, bp); safe_integer(abs(fp->maxargs), buff, bp); } - safe_str(" ARGUMENTS BUT GOT ", buff, bp); + safe_str(T(" ARGUMENTS BUT GOT "), buff, bp); safe_integer(nfargs, buff, bp); } else { global_fun_recursions++; Index: src/atr_tab.c =================================================================== --- src/atr_tab.c (.../p5) (revision 1176) +++ src/atr_tab.c (.../p6) (revision 1176) @@ -365,7 +365,7 @@ do_list_attribs(dbref player, int lc) { char *b = list_attribs(); - notify_format(player, "Attribs: %s", lc ? strlower(b) : b); + notify_format(player, T("Attribs: %s"), lc ? strlower(b) : b); } /** Return a list of standard attributes. Index: src/command.c =================================================================== --- src/command.c (.../p5) (revision 1176) +++ src/command.c (.../p6) (revision 1176) @@ -13,6 +13,8 @@ #include "config.h" #include +#include +#include #include "conf.h" #include "externs.h" @@ -27,6 +29,7 @@ #include "version.h" #include "ptab.h" #include "htab.h" +#include "strtree.h" #include "function.h" #include "command.h" #include "mymalloc.h" @@ -45,12 +48,23 @@ static const char *command_isattr(char *command); static int command_check(dbref player, COMMAND_INFO *cmd); -static int switch_find(COMMAND_INFO *cmd, char *sw); +static int switch_find(COMMAND_INFO *cmd, const char *sw); static void strccat(char *buff, char **bp, const char *from); static int has_hook(struct hook_data *hook); -extern int global_fun_invocations; /**< Counter for function invocations */ +extern int global_fun_invocations; /**< Counter for function invocations */ extern int global_fun_recursions; /**< Counter for function recursion */ +SWITCH_VALUE *dyn_switch_list = NULL; +int switch_bytes = 0; +size_t num_switches = 0; + +enum command_load_state { CMD_LOAD_BUILTIN, + CMD_LOAD_LOCAL, + CMD_LOAD_DONE +}; +static enum command_load_state command_state = CMD_LOAD_BUILTIN; +static StrTree switch_names; + int run_hook(dbref player, dbref cause, struct hook_data *hook, char *saveregs[], int save); @@ -154,7 +168,7 @@ {"@HIDE", "NO OFF YES ON", cmd_hide, CMD_T_ANY, 0, 0}, {"@HOOK", "LIST AFTER BEFORE IGNORE OVERRIDE", cmd_hook, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_RS_ARGS, - "WIZARD", 0}, + "WIZARD", "hook"}, {"@KICK", NULL, cmd_kick, CMD_T_ANY, "WIZARD", 0}, {"@LEMIT", "NOEVAL SILENT SPOOF", cmd_lemit, @@ -395,7 +409,6 @@ {NULL, 0} }; - static void strccat(char *buff, char **bp, const char *from) { @@ -403,35 +416,61 @@ safe_str(", ", buff, bp); safe_str(from, buff, bp); } + +/* Comparison function for bsearch() */ static int -switch_find(COMMAND_INFO *cmd, char *sw) +switch_cmp(const void *a, const void *b) +{ + const char *name = a; + const SWITCH_VALUE *sw = b; + return strcmp(name, sw->name); +} + +/* This has different semantics than a prefix table, or we'd use that. */ +static int +switch_find(COMMAND_INFO *cmd, const char *sw) { SWITCH_VALUE *sw_val; - int i = 0; - int len; - if (!sw || !*sw) + + if (!sw || !*sw || !dyn_switch_list) return 0; - len = strlen(sw); - /* Special case, for init */ - sw_val = switch_list; + if (!cmd) { - while (sw_val->name) { - if (strcmp(sw_val->name, sw) == 0) - return sw_val->value; - sw_val++; - } - return 0; + sw_val = bsearch(sw, dyn_switch_list, num_switches, sizeof(SWITCH_VALUE), + switch_cmp); + if (sw_val) + return sw_val->value; + else + return 0; } else { + size_t len = strlen(sw); + if (!cmd->sw.mask) + return 0; + sw_val = dyn_switch_list; while (sw_val->name) { - i++; - if (SW_ISSET(cmd->sw, i) && (strncmp(sw_val->name, sw, len) == 0)) - return i; + if (SW_ISSET(cmd->sw.mask, sw_val->value) + && (strncmp(sw_val->name, sw, len) == 0)) + return sw_val->value; sw_val++; } } return 0; } +/** Test if a particular switch was given, using name + * \param sw the switch mask to test + * \param name the name of the switch to test for. + */ +bool +SW_BY_NAME(switch_mask sw, const char *name) +{ + int idx = switch_find(NULL, name); + if (idx) + return SW_ISSET(sw, idx); + else + return false; +} + /** Allocate and populate a COMMAND_INFO structure. * This function generates a new COMMAND_INFO structure, populates it * with given values, and returns a pointer. It should not be used @@ -447,7 +486,7 @@ COMMAND_INFO * make_command(const char *name, int type, object_flag_type flagmask, object_flag_type powers, - switch_mask *sw, command_func func) + const char *sw, command_func func) { COMMAND_INFO *cmd; cmd = slab_malloc(command_slab, NULL); @@ -458,10 +497,31 @@ cmd->type = type; cmd->flagmask = flagmask; cmd->powers = powers; - if (sw) - memcpy(cmd->sw, sw, sizeof(switch_mask)); - else - SW_ZERO(cmd->sw); + switch (command_state) { + case CMD_LOAD_BUILTIN: + cmd->sw.names = sw; + break; + case CMD_LOAD_LOCAL:{ + char sw_copy[BUFFER_LEN]; + char *pos; + cmd->sw.names = sw; + mush_strncpy(sw_copy, sw, BUFFER_LEN); + pos = sw_copy; + while (pos) { + char *thisone = split_token(&pos, ' '); + st_insert(thisone, &switch_names); + } + break; + } + case CMD_LOAD_DONE:{ + switch_mask mask = switchmask(sw); + if (mask) { + cmd->sw.mask = SW_ALLOC(); + SW_COPY(cmd->sw.mask, mask); + } else + cmd->sw.mask = NULL; + } + } cmd->hooks.before.obj = NOTHING; cmd->hooks.before.attrname = NULL; cmd->hooks.after.obj = NOTHING; @@ -488,14 +548,13 @@ const char *powerstr, const char *switchstr, command_func func) { object_flag_type flagmask = NULL, powers = NULL; - switch_mask *sw = switchmask(switchstr); if (flagstr) flagmask = string_to_bits("FLAG", flagstr); if (powerstr) powers = string_to_bits("POWER", powerstr); ptab_insert_one(&ptab_command, name, - make_command(name, type, flagmask, powers, sw, func)); + make_command(name, type, flagmask, powers, switchstr, func)); return command_find(name); } @@ -555,7 +614,7 @@ COMMAND_INFO * command_modify(const char *name, int type, object_flag_type flagmask, object_flag_type powers, - switch_mask *sw, command_func func) + switch_mask sw, command_func func) { COMMAND_INFO *cmd; cmd = command_find(name); @@ -568,7 +627,7 @@ if (powers) cmd->powers = powers; if (sw) - memcpy(cmd->sw, sw, sizeof(switch_mask)); + SW_COPY(cmd->sw.mask, sw); if (func) cmd->func = func; return cmd; @@ -580,13 +639,20 @@ * \param switches list of switches as a string. * \return pointer to a static switch mask. */ -switch_mask * +switch_mask switchmask(const char *switches) { - static switch_mask sw; + static switch_mask sw = NULL; + static int sm_bytes = 0; char buff[BUFFER_LEN]; char *p, *s; int switchnum; + + if (sm_bytes < switch_bytes) { + sw = mush_realloc(sw, switch_bytes, "cmd.switch.vector"); + sm_bytes = switch_bytes; + } + SW_ZERO(sw); if (!switches || !switches[0]) return NULL; @@ -600,7 +666,7 @@ else SW_SET(sw, switchnum); } - return &sw; + return sw; } /** Add an alias to the table of reserved aliases. @@ -617,6 +683,8 @@ hashadd(strupper(a), (void *) placeholder, &htab_reserved_aliases); } +static StrTree switch_names; + /** Initialize command tables (before reading config file). * This function performs command table initialization that should take place * before the configuration file has been read. It initializes the @@ -631,6 +699,7 @@ { struct command_perms_t *c; COMLIST *cmd; + SWITCH_VALUE *sv; static int done = 0; if (done == 1) return; @@ -638,15 +707,33 @@ ptab_init(&ptab_command); hashinit(&htab_reserved_aliases, 16); + + /* Build initial switch table. */ + st_init(&switch_names); + for (sv = switch_list; sv->name; sv++) + st_insert(sv->name, &switch_names); + command_slab = slab_create("commands", sizeof(COMMAND_INFO)); reserve_aliases(); + ptab_start_inserts(&ptab_command); + command_state = CMD_LOAD_BUILTIN; for (cmd = commands; cmd->name; cmd++) { + if (cmd->switches) { + char sw_copy[BUFFER_LEN]; + char *pos; + strcpy(sw_copy, cmd->switches); + pos = sw_copy; + while (pos) { + char *sw = split_token(&pos, ' '); + st_insert(sw, &switch_names); + } + } ptab_insert(&ptab_command, cmd->name, make_command(cmd->name, cmd->type, string_to_bits("FLAG", cmd->flagstr), string_to_bits("POWER", cmd->powers), - switchmask(cmd->switches), cmd->func)); + cmd->switches, cmd->func)); } ptab_end_inserts(&ptab_command); @@ -656,9 +743,34 @@ ptab_insert(&ptab_command_perms, c->name, c); ptab_end_inserts(&ptab_command_perms); + command_state = CMD_LOAD_LOCAL; local_commands(); } +struct bst_data { + SWITCH_VALUE *table; + size_t n; + size_t start; +}; + +static void +build_switch_table(const char *sw, int count __attribute__ ((__unused__)), + void *d) +{ + SWITCH_VALUE *s; + struct bst_data *data = d; + + for (s = switch_list; s->name; s++) { + if (strcmp(s->name, sw) == 0) { + data->table[data->n++] = *s; + return; + } + } + /* Not in switchinc.c table */ + data->table[data->n].value = data->start++; + data->table[data->n++].name = mush_strdup(sw, "switch.name"); +} + /** Initialize commands (after reading config file). * This function performs command initialization that should take place * after the configuration file has been read. @@ -667,6 +779,36 @@ void command_init_postconfig(void) { + struct bst_data sw_data; + COMMAND_INFO *c; + size_t sl_size; + + command_state = CMD_LOAD_DONE; + + /* First make the switch table */ + dyn_switch_list = mush_calloc(switch_names.count + 2, sizeof(SWITCH_VALUE), + "cmd_switch_table"); + if (!dyn_switch_list) + mush_panic(T("Unable to allocate command switch table")); + sw_data.table = dyn_switch_list; + sw_data.n = 0; + sw_data.start = sizeof switch_list / sizeof(SWITCH_VALUE); + sl_size = sw_data.start - 2; + st_walk(&switch_names, build_switch_table, &sw_data); + num_switches = sw_data.start; + dyn_switch_list[sw_data.n].name = NULL; + st_flush(&switch_names); + switch_bytes = ceil((double) num_switches / 8.0); + + /* Then convert the list of switch names in all commands to masks */ + for (c = ptab_firstentry(&ptab_command); c; c = ptab_nextentry(&ptab_command)) { + const char *switchstr = c->sw.names; + if (switchstr) { + c->sw.mask = SW_ALLOC(); + SW_COPY(c->sw.mask, switchmask(switchstr)); + } + } + return; } @@ -868,7 +1010,7 @@ char command2[BUFFER_LEN]; char b; int switchnum; - switch_mask sw; + switch_mask sw = NULL; char switch_err[BUFFER_LEN], *se; int noeval; int noevtoken = 0; @@ -876,11 +1018,11 @@ rhs_present = 0; - command = (char *) mush_malloc(BUFFER_LEN, "string"); - swtch = (char *) mush_malloc(BUFFER_LEN, "string"); - ls = (char *) mush_malloc(BUFFER_LEN, "string"); - rs = (char *) mush_malloc(BUFFER_LEN, "string"); - switches = (char *) mush_malloc(BUFFER_LEN, "string"); + command = mush_malloc(BUFFER_LEN, "string"); + swtch = mush_malloc(BUFFER_LEN, "string"); + ls = mush_malloc(BUFFER_LEN, "string"); + rs = mush_malloc(BUFFER_LEN, "string"); + switches = mush_malloc(BUFFER_LEN, "string"); if (!command || !swtch || !ls || !rs || !switches) mush_panic("Couldn't allocate memory in command_parse"); p = string; @@ -1061,7 +1203,7 @@ return NULL; } /* Parse out any switches */ - SW_ZERO(sw); + sw = SW_ALLOC(); swp = switches; *swp = '\0'; se = switch_err; @@ -1226,6 +1368,7 @@ free_global_regs("hook.regs", saveregs); } + SW_FREE(sw); command_parse_free_args; return retval; } @@ -1619,12 +1762,15 @@ notify_format(player, "Restrict : %s", buff); buff[0] = '\0'; notify(player, show_command_flags(command->flagmask, command->powers)); - bp = buff; - for (sw_val = switch_list; sw_val->name; sw_val++) - if (SW_ISSET(command->sw, sw_val->value)) - strccat(buff, &bp, sw_val->name); - *bp = '\0'; - notify_format(player, "Switches : %s", buff); + if (command->sw.mask) { + bp = buff; + for (sw_val = dyn_switch_list; sw_val->name; sw_val++) + if (SW_ISSET(command->sw.mask, sw_val->value)) + strccat(buff, &bp, sw_val->name); + *bp = '\0'; + notify_format(player, "Switches : %s", buff); + } else + notify(player, "Switches :"); buff[0] = '\0'; bp = buff; if (command->type & CMD_T_LS_ARGS) { @@ -1668,7 +1814,7 @@ do_list_commands(dbref player, int lc) { char *b = list_commands(); - notify_format(player, "Commands: %s", lc ? strlower(b) : b); + notify_format(player, T("Commands: %s"), lc ? strlower(b) : b); } /** Return a list of defined commands. @@ -1940,18 +2086,18 @@ notify(player, T("No such command.")); return; } - if (Wizard(player)) { + if (Wizard(player) || has_power_by_name(player, "HOOK", NOTYPE)) { if (GoodObject(cmd->hooks.before.obj)) - notify_format(player, "@hook/before: #%d/%s", + notify_format(player, T("@hook/before: #%d/%s"), cmd->hooks.before.obj, cmd->hooks.before.attrname); if (GoodObject(cmd->hooks.after.obj)) - notify_format(player, "@hook/after: #%d/%s", cmd->hooks.after.obj, + notify_format(player, T("@hook/after: #%d/%s"), cmd->hooks.after.obj, cmd->hooks.after.attrname); if (GoodObject(cmd->hooks.ignore.obj)) - notify_format(player, "@hook/ignore: #%d/%s", + notify_format(player, T("@hook/ignore: #%d/%s"), cmd->hooks.ignore.obj, cmd->hooks.ignore.attrname); if (GoodObject(cmd->hooks.override.obj)) - notify_format(player, "@hook/override: #%d/%s", + notify_format(player, T("@hook/override: #%d/%s"), cmd->hooks.override.obj, cmd->hooks.override.attrname); } } Index: src/timer.c =================================================================== --- src/timer.c (.../p5) (revision 1176) +++ src/timer.c (.../p6) (revision 1176) @@ -324,7 +324,7 @@ time_limit.it_interval.tv_sec = 0; time_limit.it_interval.tv_usec = 0; if (setitimer(ITIMER_PROF, &time_limit, NULL)) { - perror("setitimer"); + penn_perror("setitimer"); timer_set = 0; } } else @@ -354,7 +354,7 @@ time_limit.it_interval.tv_sec = 0; time_limit.it_interval.tv_usec = 0; if (setitimer(ITIMER_PROF, &time_limit, &time_left)) - perror("setitimer"); + penn_perror("setitimer"); #elif defined(WIN32) KillTimer(NULL, timer_id); #endif Index: src/log.c =================================================================== --- src/log.c (.../p5) (revision 1176) +++ src/log.c (.../p6) (revision 1176) @@ -26,6 +26,7 @@ #ifdef I_SYS_TYPES #include #endif +#include #include "conf.h" #include "externs.h" @@ -51,6 +52,9 @@ FILE *tracelog_fp; /**< Trace log */ FILE *cmdlog_fp; /**< Command log */ +/* From wait.c */ +int lock_file(FILE *); +int unlock_file(FILE *); static char * quick_unparse(dbref object) @@ -134,13 +138,12 @@ if (!errlog_fp) { fprintf(stderr, T("Unable to open %s. Error output to stderr.\n"), ERRLOG); } else { - + fclose(errlog_fp); if (!freopen(ERRLOG, "a", stderr)) { printf(T("Ack! Failed reopening stderr!")); exit(1); } setvbuf(stderr, NULL, _IOLBF, BUFSIZ); - fclose(errlog_fp); } #ifndef DEBUG_BYTECODE fclose(stdout); @@ -156,9 +159,10 @@ if (!filename || !*filename) return; if ((fp = (FILE *) hashfind(strupper(filename), &htab_logfiles))) { + lock_file(fp); fprintf(fp, "END OF LOG.\n"); fflush(fp); - fclose(fp); + fclose(fp); /* Implicit lock removal */ hashdelete(strupper(filename), &htab_logfiles); } } @@ -235,8 +239,10 @@ f = stderr; break; } + lock_file(f); fprintf(f, "%s %s\n", timebuf, tbuf1); fflush(f); + unlock_file(f); } /** Log a message, with useful information. @@ -494,3 +500,10 @@ if (!dump) notify(player, T("GAME: End recall")); } + +/* Wrapper for perror */ +void +penn_perror(const char *err) +{ + do_rawlog(LT_ERR, "%s:%s", err, strerror(errno)); +} Index: src/info_slave.c =================================================================== --- src/info_slave.c (.../p5) (revision 1176) +++ src/info_slave.c (.../p6) (revision 1176) @@ -44,6 +44,9 @@ #ifdef HAVE_SYS_EVENT_H #include #endif +#ifdef HAVE_POLL_H +#include +#endif #include #include @@ -54,15 +57,25 @@ #include "mysocket.h" #include "lookup.h" +#include "confmagic.h" + +#ifndef ENOTSUP +#define ENOTSUP EPERM +#endif + +void reap_children(void); static void reaper(int); int eventwait_init(void); int eventwait_watch_fd_read(int); int eventwait_watch_parent_exit(void); +int eventwait_watch_child_exit(void); int eventwait(void); -enum methods { METHOD_KQUEUE, METHOD_SELECT }; +void fputerr(const char *); -enum methods method = METHOD_SELECT; +enum methods { METHOD_KQUEUE, METHOD_POLL, METHOD_SELECT }; + +enum methods method; /** How many simultaneous lookup processes can be running? If more * attempts are made after this limit has been reached, the main @@ -83,7 +96,7 @@ char localport[NI_MAXSERV]; if (argc < 2) { - fputs("info_slave needs a port number!\n", stderr); + fputerr("info_slave needs a port number!"); return EXIT_FAILURE; } port = strtol(argv[1], NULL, 10); @@ -91,26 +104,31 @@ mush = port; /* We inherit open file descriptors and sockets from parent */ if (new_process_group() < 0) - perror("info_slave: making new process group"); + penn_perror("making new process group"); #ifdef HAVE_GETPPID netmush = getppid(); #endif if (eventwait_init() < 0) { - perror("info_slave: init_eventwait"); + penn_perror("init_eventwait"); return EXIT_FAILURE; } - install_sig_handler(SIGCHLD, reaper); - if (eventwait_watch_fd_read(mush) < 0) { - perror("info_slave: eventwait_add_fd"); + penn_perror("eventwait_add_fd"); return EXIT_FAILURE; } - if (eventwait_watch_parent_exit() < 0) - perror("info_slave: eventwait_add_fd"); + if (eventwait_watch_parent_exit() < 0) { + penn_perror("eventwait_add_fd"); + return EXIT_FAILURE; + } + + if (eventwait_watch_child_exit() < 0) { + penn_perror("eventwait_watch_child_exit"); + return EXIT_FAILURE; + } for (;;) { /* grab a request datagram */ @@ -120,22 +138,24 @@ len = recv(mush, &req, sizeof req, 0); else if (ev == (int) netmush) { /* Parent process exited. Exit too. */ - fputs - ("info_slave: Parent mush process exited unexpectedly! Shutting down.\n", - stderr); + fputerr + ("info_slave: Parent mush process exited unexpectedly! Shutting down."); return EXIT_SUCCESS; - } else { + } else if (ev < 0) { /* Error? */ - if (errno != EINTR) - perror("info_slave: do_eventwait"); + if (errno != EINTR) { + penn_perror("eventwait"); + return EXIT_FAILURE; + } else + continue; + } else /* ev == 0 */ continue; - } if (len == -1 && errno == EINTR) continue; else if (len != (int) sizeof req) { /* This shouldn't happen. */ - perror("info_slave: reading request datagram"); + penn_perror("reading request datagram"); return EXIT_FAILURE; } @@ -144,7 +164,7 @@ child = fork(); if (child < 0) { /* Just do the lookup in the main info_slave */ - perror("info_slave: unable to fork; doing lookup in master slave"); + penn_perror("unable to fork; doing lookup in master slave"); } else if (child > 0) { /* Parent info_slave; wait for the next request. */ children++; @@ -200,7 +220,7 @@ /* Should never happen. */ if (len != (int) sizeof resp) { - perror("info_slave: error writing packet"); + penn_perror("error writing packet"); return EXIT_FAILURE; } @@ -211,21 +231,27 @@ return EXIT_SUCCESS; } -static void -reaper(int signo) +void +reap_children(void) { WAIT_TYPE status; - if (mush_wait(-1, &status, WNOHANG) < 0) + while (mush_wait(-1, &status, WNOHANG) > 0) children--; +} + +static void +reaper(int signo) +{ + reap_children(); reload_sig_handler(signo, reaper); } -/* Event watching code that tries to use various system-dependant - * ways of waiting for a variety of events. - * In paritcular, on BSD (Including OS X) systems, it uses kqueue()/kevent() - * to wait for a fd to be readable or a process to exit. - * On others, it uses select(2) with a timeout and periodic checking of getppid() - * to see if the parent netmush process stil exists. +/* Event watching code that tries to use various system-dependant ways + * of waiting for a variety of events. In particular, on BSD + * (Including OS X) systems, it uses kqueue()/kevent() to wait for a + * fd to be readable or a process to exit. On others, it uses poll(2) + * or select(2) with a timeout and periodic checking of getppid() to + * see if the parent netmush process still exists. */ #define HAVE_SELECT @@ -240,6 +266,12 @@ static int kqueue_id = -1; #endif +#ifdef HAVE_POLL +static struct pollfd *poll_fds = NULL; +static int pollfd_len = 0; +#endif + + /** Initialize event loop * \return 0 on success, -1 on failure */ @@ -248,28 +280,38 @@ { #ifdef HAVE_KQUEUE kqueue_id = kqueue(); + lock_file(stderr); fputs("info_slave: trying kqueue event loop... ", stderr); - if (kqueue_id < 0) - perror("error"); - else + if (kqueue_id < 0) { + unlock_file(stderr); + penn_perror("error"); + } else { fputs("ok. Using kqueue!\n", stderr); + unlock_file(stderr); + } if (kqueue_id >= 0) { method = METHOD_KQUEUE; return 0; } else #endif +#ifdef HAVE_POLL + if (1) { + fputerr("info_slave: trying poll event loop... ok. Using poll."); + method = METHOD_POLL; + return 0; + } else +#endif #ifdef HAVE_SELECT if (1) { - fputs("info_slave: trying select event loop... ok. Using select.\n", - stderr); + fputerr("info_slave: trying select event loop... ok. Using select."); FD_ZERO(&readers); method = METHOD_SELECT; return 0; } else #endif { - fputs("info_slave: No working event loop method!\n", stderr); + fputerr("info_slave: No working event loop method!"); errno = ENOTSUP; return -1; } @@ -299,6 +341,14 @@ return kevent(kqueue_id, &add, 1, NULL, 0, &timeout); } #endif +#ifdef HAVE_POLL + case METHOD_POLL: + poll_fds = realloc(poll_fds, sizeof(struct pollfd) * (pollfd_len + 1)); + poll_fds[pollfd_len].fd = fd; + poll_fds[pollfd_len].events = POLLIN; + pollfd_len += 1; + return 0; +#endif #ifdef HAVE_SELECT case METHOD_SELECT: FD_SET(fd, &readers); @@ -345,6 +395,9 @@ return kevent(kqueue_id, &add, 1, NULL, 0, &timeout); } #endif +#ifdef HAVE_POLL + case METHOD_POLL: /* Fall through */ +#endif #ifdef HAVE_SELECT case METHOD_SELECT: parent_pid = parent; @@ -356,6 +409,43 @@ } } +/* Arrange to automatically reap exited child processes */ +int +eventwait_watch_child_exit(void) +{ + switch (method) { +#ifdef HAVE_KQUEUE + case METHOD_KQUEUE:{ + struct kevent add; + struct timespec timeout; + +#ifdef HAVE_SIGPROCMASK + sigset_t chld_mask; + + sigemptyset(&chld_mask); + sigaddset(&chld_mask, SIGCHLD); +#endif + + memset(&add, 0, sizeof(add)); + add.filter = EVFILT_SIGNAL; + add.ident = SIGCHLD; + add.flags = EV_ADD | EV_ENABLE; + + timeout.tv_sec = 0; + timeout.tv_nsec = 0; + + if (sigprocmask(SIG_BLOCK, &chld_mask, NULL) < 0) + return -1; + + return kevent(kqueue_id, &add, 1, NULL, 0, &timeout); + } +#endif + default: + install_sig_handler(SIGCHLD, reaper); + return 0; + } +} + /** Wait for an event to occur. Only returns on error or when something * happens. * \return The file descriptor or pid of a triggered event, or -1 on error. @@ -366,14 +456,58 @@ switch (method) { #ifdef HAVE_KQUEUE case METHOD_KQUEUE:{ - struct kevent triggered; + struct kevent triggered[2]; int res; while (1) { - res = kevent(kqueue_id, NULL, 0, &triggered, 1, NULL); - if (res == 1) - return triggered.ident; - else if (res < 0) + res = kevent(kqueue_id, NULL, 0, triggered, 2, NULL); + if (res == 1) { + if (triggered[0].filter == EVFILT_SIGNAL) { + reap_children(); + continue; + } else + return triggered[0].ident; + } else if (res == 2) { + if (triggered[0].filter == EVFILT_SIGNAL) { + reap_children(); + return triggered[1].ident; + } else if (triggered[1].filter == EVFILT_SIGNAL) { + reap_children(); + return triggered[0].ident; + } + } else if (res < 0) + return -1; + } + } +#endif +#if defined(HAVE_POLL) + case METHOD_POLL:{ + /* It's more complex to use poll(), since it can only poll + * file descriptor events, not process events too. Wake up every + * 5 seconds to see if the given pid has turned into 1. + */ + int timeout; + int res; + + if (parent_pid > 0) + timeout = 5000; + else + timeout = -1; + + while (1) { + res = poll(poll_fds, pollfd_len, timeout); + if (res > 0) { + int n; + for (n = 0; n < pollfd_len; n++) + if (poll_fds[n].revents & POLLIN) + return poll_fds[n].fd; + } else if (res == 0 && parent_pid) { +#ifdef HAVE_GETPPID + if (getppid() == 1) + /* Parent rocess no longer exists; parent is now init */ + return parent_pid; +#endif + } else if (res < 0) return -1; } } @@ -414,7 +548,7 @@ } else if (res == 0 && parent_pid) { #ifdef HAVE_GETPPID if (getppid() == 1) - /* Parent rocess no longer exists; parent is now init */ + /* Parent process no longer exists; parent is now init */ return parent_pid; #endif } else if (res < 0) @@ -426,3 +560,22 @@ return -1; } } + +/* Wrappers for perror */ +void +penn_perror(const char *err) +{ + lock_file(stderr); + fprintf(stderr, "info_slave: %s: %s\n", err, strerror(errno)); + unlock_file(stderr); +} + +/* Wrapper for fputs(foo,stderr) */ +void +fputerr(const char *msg) +{ + lock_file(stderr); + fputs(msg, stderr); + fputc('\n', stderr); + unlock_file(stderr); +} Index: src/help.c =================================================================== --- src/help.c (.../p5) (revision 1176) +++ src/help.c (.../p6) (revision 1176) @@ -28,14 +28,15 @@ static int help_init = 0; -static void do_new_spitfile(dbref player, char *arg1, help_file * help_dat); -static const char *string_spitfile(help_file * help_dat, char *arg1); -static help_indx *help_find_entry(help_file * help_dat, const char *the_topic); -static const char *list_matching_entries(char *pattern, help_file * help_dat, - const char *sep); -static const char *normalize_entry(help_file * help_dat, char *arg1); +static void do_new_spitfile(dbref player, char *arg1, help_file *help_dat); +static const char *string_spitfile(help_file *help_dat, char *arg1); +static help_indx *help_find_entry(help_file *help_dat, const char *the_topic); +static char **list_matching_entries(const char *pattern, + help_file *help_dat, int *len); +static void free_entry_list(char **); +static const char *normalize_entry(help_file *help_dat, const char *arg1); -static void help_build_index(help_file * h, int restricted); +static void help_build_index(help_file *h, int restricted); /** Linked list of help topic names. */ typedef struct TLIST { @@ -67,14 +68,32 @@ return; } - if (wildcard(arg_left)) - notify_format(player, T("Here are the entries which match '%s':\n%s"), - arg_left, list_matching_entries(arg_left, h, ", ")); - else + if (wildcard(arg_left)) { + int len = 0; + char **entries; + + entries = list_matching_entries(arg_left, h, &len); + if (len == 0) + notify_format(player, T("No entries matching '%s' were found."), + arg_left); + else if (len == 1) + do_new_spitfile(player, *entries, h); + else { + char buff[BUFFER_LEN]; + char *bp; + + bp = buff; + arr2list(entries, len, buff, &bp, ", "); + *bp = '\0'; + notify_format(player, T("Here are the entries which match '%s':\n%s"), + arg_left, buff); + } + free_entry_list(entries); + } else do_new_spitfile(player, arg_left, h); } -/** Initialize the helpfile hashtable, which contains the names of the +/** Initialize the helpfile hashtable, which contains the names of thes * help files. */ void @@ -156,7 +175,7 @@ } static void -do_new_spitfile(dbref player, char *arg1, help_file * help_dat) +do_new_spitfile(dbref player, char *arg1, help_file *help_dat) { help_indx *entry = NULL; FILE *fp; @@ -240,7 +259,7 @@ static help_indx * -help_find_entry(help_file * help_dat, const char *the_topic) +help_find_entry(help_file *help_dat, const char *the_topic) { help_indx *entry = NULL; @@ -329,7 +348,7 @@ } static void -help_build_index(help_file * h, int restricted) +help_build_index(help_file *h, int restricted) { long bigpos, pos = 0; bool in_topic; @@ -452,11 +471,14 @@ } if (wildcard(args[1])) { - const char *entries = list_matching_entries(args[1], h, ", "); - if (*entries) - safe_str(entries, buff, bp); - else + char **entries; + int len = 0; + entries = list_matching_entries(args[1], h, &len); + if (len == 0) safe_str(T("No matching help topics."), buff, bp); + else + arr2list(entries, len, buff, bp, ", "); + free_entry_list(entries); } else safe_str(string_spitfile(h, args[1]), buff, bp); } @@ -465,6 +487,8 @@ FUNCTION(fun_textentries) { help_file *h; + char **entries; + int len = 0; const char *sep = " "; h = hashfind(strupper(args[0]), &help_files); @@ -478,11 +502,16 @@ } if (nargs > 2) sep = args[2]; - safe_str(list_matching_entries(args[1], h, sep), buff, bp); + + entries = list_matching_entries(args[1], h, &len); + if (entries) { + arr2list(entries, len, buff, bp, sep); + free_entry_list(entries); + } } static const char * -normalize_entry(help_file * help_dat, char *arg1) +normalize_entry(help_file *help_dat, const char *arg1) { static char the_topic[LINE_SIZE + 2]; @@ -490,18 +519,15 @@ arg1 = (char *) "help"; else if (*arg1 == '&') return T("#-1 INVALID ENTRY"); - if (strlen(arg1) > LINE_SIZE) - *(arg1 + LINE_SIZE) = '\0'; - if (help_dat->admin) - sprintf(the_topic, "&%s", arg1); + snprintf(the_topic, LINE_SIZE, "&%s", arg1); else - strcpy(the_topic, arg1); + mush_strncpy(the_topic, arg1, LINE_SIZE); return the_topic; } static const char * -string_spitfile(help_file * help_dat, char *arg1) +string_spitfile(help_file *help_dat, char *arg1) { help_indx *entry = NULL; FILE *fp; @@ -541,14 +567,12 @@ } /** Return a string with all help entries that match a pattern */ -static const char * -list_matching_entries(char *pattern, help_file * help_dat, const char *sep) +static char ** +list_matching_entries(const char *pattern, help_file *help_dat, int *len) { - static char buff[BUFFER_LEN]; + char **buff; int offset; - char *bp; size_t n; - int len = 0; if (help_dat->admin) offset = 1; /* To skip the leading & */ @@ -560,31 +584,37 @@ char the_topic[LINE_SIZE + 2]; help_indx *entry = NULL; strcpy(the_topic, normalize_entry(help_dat, pattern)); - if (!help_dat->indx || help_dat->entries == 0) - return T("#-1 NO INDEX FOR FILE"); + if (!help_dat->indx || help_dat->entries == 0) { + *len = 0; + return NULL; + } entry = help_find_entry(help_dat, the_topic); - if (!entry) - return (char *) ""; - return (char *) (entry->topic + offset); + if (!entry) { + *len = 0; + return NULL; + } else { + *len = 1; + buff = mush_malloc(sizeof(char **), "help.search"); + *buff = entry->topic + offset; + return buff; + } } - bp = buff; - - if (sep) - len = strlen(sep); + buff = mush_calloc(help_dat->entries, sizeof(char *), "help.search"); + *len = 0; for (n = 0; n < help_dat->entries; n++) if (quick_wild(pattern, help_dat->indx[n].topic + offset)) { - safe_str(help_dat->indx[n].topic + offset, buff, &bp); - if (sep) - safe_strl(sep, len, buff, &bp); + buff[*len] = help_dat->indx[n].topic + offset; + *len += 1; } - if (bp > buff) - *(bp - len) = '\0'; - else { - *bp = '\0'; - } - return buff; } + +static void +free_entry_list(char **entries) +{ + if (entries) + mush_free(entries, "help.search"); +} Index: src/strtree.c =================================================================== --- src/strtree.c (.../p5) (revision 1176) +++ src/strtree.c (.../p6) (revision 1176) @@ -530,6 +530,25 @@ root->count--; } +static void +st_node_walk(StrNode *node, STFunc callback, void *data) +{ + if (node->left) + st_node_walk(node->left, callback, data); + callback(node->string, node->info >> ST_COLOR, data); + if (node->right) + st_node_walk(node->right, callback, data); +} + +/** Call a function for each node in the tree, in-order */ +void +st_walk(StrTree *tree, STFunc callback, void *data) +{ + if (!tree || !tree->root) + return; + st_node_walk(tree->root, callback, data); +} + /* Print the tree, for debugging purposes. */ static void st_print_tree(StrNode *node, int tree_depth, int lead) @@ -588,7 +607,7 @@ if (node->info >= ST_USE_LIMIT) (*perms)++; else - (*nperms) += node->info; + (*nperms) += node->info >> ST_COLOR; if (count > *maxdepth) *maxdepth = count; Index: src/pcre.c =================================================================== --- src/pcre.c (.../p5) (revision 1176) +++ src/pcre.c (.../p6) (revision 1176) @@ -44,7 +44,13 @@ /* Modified by Alan Schwartz for PennMUSH to change the use of * 'isblank' as a variable (reported to Philip Hazel for pcre 4.5) */ +#include #include "config.h" +#include "mypcre.h" + +/* Only use if a system libpcre isn't present. */ +#ifndef HAVE_PCRE + #include #include #include @@ -52,8 +58,6 @@ #include #include #include -#include -#include "pcre.h" #include "confmagic.h" #undef min #undef max @@ -9219,3 +9223,28 @@ } /* End of pcre_exec.c */ + +#endif /* !HAVE_PCRE */ + +/** Return a default pcre_extra pointer pointing to a static region + set up to use a fairly low match-limit setting. +*/ +struct pcre_extra * +default_match_limit(void) +{ + static struct pcre_extra ex; + memset(&ex, 0, sizeof ex); + set_match_limit(&ex); + return &ex; +} + + +/** Set a low match-limit setting in an existing pcre_extra struct. */ +void +set_match_limit(struct pcre_extra *ex) +{ + if (!ex) + return; + ex->flags |= PCRE_EXTRA_MATCH_LIMIT; + ex->match_limit = PENN_MATCH_LIMIT; +} Index: src/set.c =================================================================== --- src/set.c (.../p5) (revision 1176) +++ src/set.c (.../p6) (revision 1176) @@ -731,12 +731,12 @@ free((Malloc_t) text); /* safe_uncompress malloc()s memory */ if (copies) { notify_format(player, T("Attribute %s (%d copies)"), - (move ? "moved" : "copied"), copies); + (move ? T("moved") : T("copied")), copies); if (move) do_set_atr(oldobj, AL_NAME(a), NULL, player, 1); } else { notify_format(player, T("Unable to %s attribute."), - (move ? "move" : "copy")); + (move ? T("move") : T("copy"))); } return; } @@ -886,9 +886,9 @@ if (do_set_atr(thing, AL_NAME(a), tbuf1, player, 0) && !AreQuiet(player, thing)) { if (!ansi_long_flag && ShowAnsi(player)) - notify_format(player, "%s - Set: %s", AL_NAME(a), tbuf_ansi); + notify_format(player, T("%s - Set: %s"), AL_NAME(a), tbuf_ansi); else - notify_format(player, "%s - Set: %s", AL_NAME(a), tbuf1); + notify_format(player, T("%s - Set: %s"), AL_NAME(a), tbuf1); } } else { /* We don't do it - we just pemit it. */ @@ -1018,7 +1018,7 @@ fail_lock(player, thing, Use_Lock, T("Permission denied."), NOTHING); return; } else - did_it(player, thing, "USE", "Used.", "OUSE", NULL, "AUSE", NOTHING); + did_it(player, thing, "USE", T("Used."), "OUSE", NULL, "AUSE", NOTHING); } } Index: src/cque.c =================================================================== --- src/cque.c (.../p5) (revision 1176) +++ src/cque.c (.../p6) (revision 1176) @@ -1017,7 +1017,8 @@ if (!quick) notify(player, T("------------ Queue Done ------------")); notify_format(player, - "Totals: Player...%d/%d[%ddel] Object...%d/%d[%ddel] Wait...%d/%d Semaphore...%d/%d", + T + ("Totals: Player...%d/%d[%ddel] Object...%d/%d[%ddel] Wait...%d/%d Semaphore...%d/%d"), pq, tpq, dpq, oq, toq, doq, wq, twq, sq, tsq); } } Index: MANIFEST =================================================================== --- MANIFEST (.../p5) (revision 1176) +++ MANIFEST (.../p6) (revision 1176) @@ -111,7 +111,7 @@ hdrs/myssl.h hdrs/oldflags.h hdrs/parse.h -hdrs/pcre.h +hdrs/mypcre.h hdrs/privtab.h hdrs/ptab.h hdrs/pueblo.h Index: game/txt/hlp/pennfunc.hlp =================================================================== --- game/txt/hlp/pennfunc.hlp (.../p5) (revision 1176) +++ game/txt/hlp/pennfunc.hlp (.../p6) (revision 1176) @@ -2273,7 +2273,11 @@ & LOG() log([, ]) - Returns the logarithm (base 10, or the given base) of . + Returns the logarithm (base 10, or the given base) of . + can be a floating-point number, or 'e' for the natural + logarithm. + +See also: ln() & LPARENT() lparent() @@ -3078,7 +3082,7 @@ See also: @poll, doing(), @doing & LPORTS() & PORTS() - lports() + lports([]) ports() These function returns the list of descriptors ("ports") that are used by @@ -3087,7 +3091,9 @@ is connected to, from most recent to least recent. Only players who are See_All or privileged may use these functions; in other cases, lports() returns #-1, and ports() an empty list. As an exception, - players can use ports() on themselves. + players can use ports() on themselves. If lports() is given a , + only the ports of connections which can see are returned (in the + same order as dbrefs returned by lwho()). These port numbers also appear in the wizard WHO, and can be used with @boot/port, page/port, and the functions that return information Index: game/txt/hlp/pennv182.hlp =================================================================== --- game/txt/hlp/pennv182.hlp (.../p5) (revision 1176) +++ game/txt/hlp/pennv182.hlp (.../p6) (revision 1176) @@ -1,3 +1,16 @@ +& 1.8.2p8 +Version 1.8.2 patchlevel 8 Jan 01, 2008 + +Minor changes: + * 'make versions' now provides some feedback. + +Fixes: + * width() and height() do not return 0 when set to invalid input. + By Talvo. + * Array underflow bug found by running under Valgrind. + * Crash bug when too many objects are nested. Reported by Paige, fixed + by Javelin and Intervis. + & 1.8.2p7 Version 1.8.2 patchlevel 7 October 6, 2007 @@ -11,6 +24,8 @@ failure one. Reported by Cooee. * The open database file wasn't getting closed on a failed save. * Crash bug in sortkey(). Fix by Nathan Baum. + * Crash bug in pathological container cases reported by Paige@M*U*S*H + fixed by Javelin. * 'help @desc' brings up @describe instead of @descformat. Suggested by Nymeria. * Removed mention of Win32 requiring a particular attribute Index: game/txt/hlp/pennv183.hlp =================================================================== --- game/txt/hlp/pennv183.hlp (.../p5) (revision 1176) +++ game/txt/hlp/pennv183.hlp (.../p6) (revision 1176) @@ -1,4 +1,4 @@ -& 1.8.3p5 +& 1.8.3p6 & changes This is a list of changes in this patchlevel which are probably of interest to players. More information about new commands and functions @@ -11,6 +11,62 @@ A list of the patchlevels associated with each release can be read in 'help patchlevels'. +Version 1.8.3 patchlevel 6 Jan 01, 2008 + +Major changes: + * If configure finds a copy of the pcre library installed, that will + be used instead of the (old) version bundled with Penn. use + --with-pcre=/path/to/it if it's not in the usual places, or + --with-pcre=no to force use of the bundled version. + +Minor changes: + * @sitelock when there are no rules will now say that instead of + having no output. By Talvo. + * Log files use locking to prevent the small chance of more than one + process writing to the same error log at the same time. + * info_slave's logging is more clear as to its source. + * Several places that used the select() system call now favor poll() + and/or socket timeouts instead. (The main event loop still uses + select() for now.) + * A wildcard help topic search (help foo*) that only matches one + entry will display that entry. Suggested by Cheetah. + * New switches for commands no longer have to be added to the + SWITCHES file; the internal list of switches is now built based on + what switches are given in the command table and cmdlocal.c + additions. Suggested by Talek. + + +Flags and powers: + * The announce power now also grants the ability to change the motd. + Suggested by Yuriko. + * New hook power grants rights to use @hook. Suggested by Paige. + * Windows compile fixes by Intrevis. + +Commands: + * @motd gives better feedback when clearing a message. + * The @tport/@otport/@atport/etc. attributes that get evalulated on a + @teleport now get the dbref of the object doing the teleport in %0 + and the teleported object's old location in %1. Suggested by Daniel + Cheng. + +Functions: + * root() uses an improved algorithm to give a more precise + result. + * log(N,2) uses the C log2() function if available. + * log(N,e) takes the natural logarithm of N, like ln(). + * lports() now takes an optional viewer argument, a la lwho(). By + Talvo. + +Fixes: + * Typo in info_slave preventing simultaneous hostname lookups fixed. + * Compiliation fix with some compilers. Reported by Kimiko. + * ident lookups of new connections was broken for several + patchlevels. Works again. Sometimes. + * Cleaned up some warnings generated by gcc 4.2 + * Fixed some minor bugs detected by running under valgrind. + * OpenBSD configuration fixes. + +& 1.8.3p5 Version 1.8.3 patchlevel 5 October 6, 2007 Major changes: Index: game/txt/hlp/penntop.hlp =================================================================== --- game/txt/hlp/penntop.hlp (.../p5) (revision 1176) +++ game/txt/hlp/penntop.hlp (.../p6) (revision 1176) @@ -1049,6 +1049,7 @@ guest Guest. Restricted command set. halt Can @halt others' objects and do @allhalt. hide Can hide on the WHO list. + hook Can use the @hook command. idle No inactivity timeout. link_anywhere Can @link an exit to anyplace. login Not subject to login restrictions. Index: game/txt/hlp/penncmd.hlp =================================================================== --- game/txt/hlp/penncmd.hlp (.../p5) (revision 1176) +++ game/txt/hlp/penncmd.hlp (.../p6) (revision 1176) @@ -355,7 +355,10 @@ teleported. These actions are done after has arrived in its new location. -See also: @tel, ACTION LISTS + %0 is the object causing the teleport, and %1 is the old location + of the teleported object. + +See also: @tel, ACTION LISTS, @tport, @otport, @oxtport & @atrchown @atrchown / = . Like @chown except it changes the control of an attribute from one person @@ -2564,6 +2567,9 @@ is teleported to. If you want to set a message that will be shown to the room that the object is teleported OUT of, use @oxtport. + %0 is the object causing the teleport, and %1 is the old location + of the teleported object. + If the = part is omitted, the message will be reset. See also: @teleport, @oxtport @@ -3303,33 +3309,41 @@ & @teleport @teleport[/silent][/inside] [=] . - Teleports to . must be a thing; if you do not - supply a thing, the object is assumed to be yourself. The destination - must be either JUMP_OK or controlled by you, and you must either - control or 's current location. Also, the destination, - if a room, cannot be teleport-locked against . Mortals cannot - teleport HEAVY objects. If the target room has a drop-to, - will go to the drop-to room instead. + Teleports to . must be a thing; if you do + not supply a thing, the object is assumed to be yourself. The + destination must be either JUMP_OK or controlled by you, and you + must either control or 's current location. Also, + the destination, if a room, cannot be teleport-locked against + . Mortals cannot teleport HEAVY objects. If the target room + has a drop-to, will go to the drop-to room instead. Privileged players who teleport a player to another player send them - to the location of the target, unless the /inside switch is used, - in which case they are sent to the inventory of the target. + to the location of the target, unless the /inside switch is used, in + which case they are sent to the inventory of the target. Teleportation from a room can be stopped by setting the NO_TEL flag. - Royalty and Wizards can _always_ teleport to any location, regardless - of NO_TEL or teleport locks. + Royalty and Wizards can _always_ teleport to any location, + regardless of NO_TEL or teleport locks. - Teleportation triggers the @oxtport/@tport/@otport/@atport attributes, - unless is an exit or the /silent switch is given. + Teleportation triggers the @oxtport/@tport/@otport/@atport + attributes, unless is an exit or the /silent switch is + given. With @oxtport, %0 is the dbref of the object causing the + dbref. The others, in addition to %0, get the former location of the + object that was teleported passed in %1. - As a special case, using "home" as the teleports the object - to its home. + As a special case, using "home" as the has the same effect as + the home command, and does not act like a normal teleport. See also: JUMP_OK, NO_TEL, @oxtport, @tport, @otport, @atport, @lock & @tport @tport [=] Sets the shown to when is teleported. + + %0 is the object causing the teleport, and %1 is the old location + of the teleported object. + +See also: @otport, @atport, @oxtport & @trigger @trigger / [=,,...,] Index: game/txt/hlp/pennvOLD.hlp =================================================================== --- game/txt/hlp/pennvOLD.hlp (.../p5) (revision 1176) +++ game/txt/hlp/pennvOLD.hlp (.../p6) (revision 1176) @@ -4417,8 +4417,8 @@ For information on a specific patchlevel of one of the versions listed, type 'help p'. For example, 'help 1.7.2p3' -1.8.3: 0, 1, 2, 3, 4, 5 -1.8.2: 0, 1, 2, 3, 4, 5, 6, 7 +1.8.3: 0, 1, 2, 3, 4, 5, 6 +1.8.2: 0, 1, 2, 3, 4, 5, 6, 7, 8 1.8.1: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 1.8.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 1.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, Index: confmagic.h =================================================================== --- confmagic.h (.../p5) (revision 1176) +++ confmagic.h (.../p6) (revision 1176) @@ -12,7 +12,9 @@ #ifndef _confmagic_h_ #define _confmagic_h_ - /* +#define inline __inline + +/* * (which isn't exportable from the U.S.), then don't encrypt */ #ifndef HAS_CRYPT @@ -54,4 +56,10 @@ #endif #endif +#if defined(HAVE_POLLTS) && !defined(HAVE_PPOLL) +/* Linux's ppoll() is identical to NetBSD's pollts() in all but name. */ +#define ppoll pollts +#define HAVE_PPOLL +#endif + #endif Index: test/testtrim.pl =================================================================== --- test/testtrim.pl (.../p5) (revision 0) +++ test/testtrim.pl (.../p6) (revision 1176) @@ -0,0 +1,18 @@ +run tests: +test('trimpenn.1', $god, 'think trimpenn(XXXfooXXX, X, l)', 'fooXXX'); +test('trimpenn.2', $god, 'think trimpenn(XXXfooXXX, X, r)', 'XXXfoo'); +test('trimpenn.3', $god, 'think trimpenn(XXXfooXXX, X, b)', 'foo'); +test('trimpenn.4', $god, 'think trimpenn(XXXfooXXX, Y, l)', 'XXXfooXXX'); + +test('trimtiny.1', $god, 'think trimtiny(XXXfooXXX, L, X)', 'fooXXX'); +test('trimtiny.2', $god, 'think trimtiny(XXXfooXXX, R, X)', 'XXXfoo'); +test('trimtiny.3', $god, 'think trimtiny(XXXfooXXX, B, X)', 'foo'); +test('trimtiny.4', $god, 'think trimtiny(XXXfooXXX, l, Y)', 'XXXfooXXX'); + +$god->command('@config/set tiny_trim_fun=yes'); +test('trim.1', $god, 'think trim(XXXfooXXX, l, X)', 'fooXXX'); +$god->command('@config/set tiny_trim_fun=no'); +test('trim.2', $god, 'think trim(XXXfooXXX, X, l)', 'fooXXX'); +test('trim.3', $god, 'think @[trim(%b%bfoo%b%b)]@', 'foo'); + + Index: test/README =================================================================== --- test/README (.../p5) (revision 0) +++ test/README (.../p6) (revision 1176) @@ -0,0 +1,22 @@ +Regression tests for Penn functions and commands. + +Usage: + perl runtest.pl testFOO.pl ... + +or + ./alltests.sh + +The test*.pl files are frameworks for tests, not actual perl scripts. + +Their format: + + login mortal + expect N failures! + run tests: + perl code + +All the lines above the 'run tests:' one are optional. + +Look at existing files for how to write tests. Some hints: $god is +always available as a test connection. If 'login mortal' was given, +$mortal is too. Index: test/testmath.pl =================================================================== --- test/testmath.pl (.../p5) (revision 1176) +++ test/testmath.pl (.../p6) (revision 1176) @@ -6,23 +6,40 @@ test('abs.5', $god, 'think abs(-0)', '0'); test('abs.6', $god, 'think abs(99999999999)', '99999999999'); test('abs.7', $god, 'think abs(-99999999999)', '99999999999'); -test('trig.1',$god, 'think cos(90,d)', '^-?0\s*$'); -test('trig.2',$god, 'think cos(pi(),r)', '^-1\s*$'); -test('trig.3',$god, 'think cos(pi())', '^-1\s*$'); -test('trig.4',$god, 'think acos(cos(90,d),d)', '^90\s*$'); -test('trig.5',$god, 'think acos(cos(1,r))', '^1\s*$'); -test('trig.6',$god, 'think acos(cos(1,r),r)', '^1\s*$'); -test('trig.7',$god, 'think sin(90,d)', '^1\s*$'); -test('trig.8',$god, 'think sin(pi(),r)', '^-?0\s*$'); -test('trig.9',$god, 'think sin(pi())', '^-?0\s*$'); -test('trig.10',$god, 'think asin(sin(90,d),d)', '^90\s*$'); -test('trig.11',$god, 'think asin(sin(1,r))', '^1\s*$'); -test('trig.12',$god, 'think asin(sin(1,r),r)', '^1\s*$'); -test('trig.13',$god, 'think tan(45,d)', '^1\s*$'); -test('trig.14',$god, 'think tan(pi(),r)', '^-?0\s*$'); -test('trig.15',$god, 'think tan(pi())', '^-?0\s*$'); -test('trig.16',$god, 'think atan(tan(45,d),d)', '^45\s*$'); -test('trig.17',$god, 'think atan(tan(1,r))', '^1\s*$'); -test('trig.18',$god, 'think atan(tan(1,r),r)', '^1\s*$'); -test('trig.19',$god, 'think ctu(90,d,r)', '^1.570\d*\s*$'); -test('trig.20',$god, 'think ctu(pi(),r,d)','^180(\.00\d*)?\s*$'); + +test('cos.1',$god, 'think cos(90,d)', '^-?0\s*$'); +test('cos.2',$god, 'think cos(pi(),r)', '^-1\s*$'); +test('cos.3',$god, 'think cos(pi())', '^-1\s*$'); + +test('acos.1',$god, 'think acos(cos(90,d),d)', '^90\s*$'); +test('acos.2',$god, 'think acos(cos(1,r))', '^1\s*$'); +test('acos.3',$god, 'think acos(cos(1,r),r)', '^1\s*$'); + +test('sin.1',$god, 'think sin(90,d)', '^1\s*$'); +test('sin.2',$god, 'think sin(pi(),r)', '^-?0\s*$'); +test('sin.3',$god, 'think sin(pi())', '^-?0\s*$'); + +test('asin.1',$god, 'think asin(sin(90,d),d)', '^90\s*$'); +test('asin.2',$god, 'think asin(sin(1,r))', '^1\s*$'); +test('asin.3',$god, 'think asin(sin(1,r),r)', '^1\s*$'); + +test('tan.1',$god, 'think tan(45,d)', '^1\s*$'); +test('tan.2',$god, 'think tan(pi(),r)', '^-?0\s*$'); +test('tan.3',$god, 'think tan(pi())', '^-?0\s*$'); + +test('atan.1',$god, 'think atan(tan(45,d),d)', '^45\s*$'); +test('atan.2',$god, 'think atan(tan(1,r))', '^1\s*$'); +test('atan.3',$god, 'think atan(tan(1,r),r)', '^1\s*$'); + +test('ctu.1',$god, 'think ctu(90,d,r)', '^1.570\d*\s*$'); +test('ctu.2',$god, 'think ctu(pi(),r,d)','^180(\.00\d*)?\s*$'); + +test('sqrt.1', $god, 'think sqrt(4)', '2'); +test('sqrt.2', $god, 'think sqrt(-1)', '#-1 IMAGINARY NUMBER'); + +test('root.1', $god, 'think root(4,2)', '2'); +test('root.2', $god, 'think root(-1,2)', '#-1 IMAGINARY NUMBER'); +test('root.3', $god, 'think root(27, 3)', '3'); +test('root.4', $god, 'think root(-27, 3)', '-3'); +$god->command('@config/set float_precision=10'); +test('root.5', $god, 'think root(125, 5)', '2.6265278044'); Index: CHANGES.182 =================================================================== --- CHANGES.182 (.../p5) (revision 1176) +++ CHANGES.182 (.../p6) (revision 1176) @@ -13,6 +13,18 @@ ========================================================================== +Version 1.8.2 patchlevel 8 Jan 01, 2008 + +Minor changes: + * 'make versions' now provides some feedback. + +Fixes: + * width() and height() do not return 0 when set to invalid input. + By Talvo. + * Array underflow bug found by running under Valgrind. + * Crash bug when too many objects are nested. Reported by Paige, fixed + by Javelin and Intervis. + Version 1.8.2 patchlevel 7 October 6, 2007 Minor changes: @@ -25,6 +37,8 @@ failure one. Reported by Cooee. * The open database file wasn't getting closed on a failed save. * Crash bug in sortkey(). Fix by Nathan Baum. + * Crash bug in pathological container cases reported by Paige@M*U*S*H + fixed by Javelin. * 'help @desc' brings up @describe instead of @descformat. Suggested by Nymeria. * Removed mention of Win32 requiring a particular attribute Index: CHANGES.183 =================================================================== --- CHANGES.183 (.../p5) (revision 1176) +++ CHANGES.183 (.../p6) (revision 1176) @@ -14,6 +14,61 @@ ========================================================================== +Version 1.8.3 patchlevel 6 Jan 01, 2008 + +Major changes: + * If configure finds a copy of the pcre library installed, that will + be used instead of the (old) version bundled with Penn. use + --with-pcre=/path/to/it if it's not in the usual places, or + --with-pcre=no to force use of the bundled version. + +Minor changes: + * @sitelock when there are no rules will now say that instead of + having no output. By Talvo. + * Log files use locking to prevent the small chance of more than one + process writing to the same error log at the same time. + * info_slave's logging is more clear as to its source. + * Several places that used the select() system call now favor poll() + and/or socket timeouts instead. (The main event loop still uses + select() for now.) + * A wildcard help topic search (help foo*) that only matches one + entry will display that entry. Suggested by Cheetah. + * New switches for commands no longer have to be added to the + SWITCHES file; the internal list of switches is now built based on + what switches are given in the command table and cmdlocal.c + additions. Suggested by Talek. + + +Flags and powers: + * The announce power now also grants the ability to change the motd. + Suggested by Yuriko. + * New hook power grants rights to use @hook. Suggested by Paige. + * Windows compile fixes by Intrevis. + +Commands: + * @motd gives better feedback when clearing a message. + * The @tport/@otport/@atport/etc. attributes that get evalulated on a + @teleport now get the dbref of the object doing the teleport in %0 + and the teleported object's old location in %1. Suggested by Daniel + Cheng. + +Functions: + * root() uses an improved algorithm to give a more precise + result. + * log(N,2) uses the C log2() function if available. + * log(N,e) takes the natural logarithm of N, like ln(). + * lports() now takes an optional viewer argument, a la lwho(). By + Talvo. + +Fixes: + * Typo in info_slave preventing simultaneous hostname lookups fixed. + * Compiliation fix with some compilers. Reported by Kimiko. + * ident lookups of new connections was broken for several + patchlevels. Works again. Sometimes. + * Cleaned up some warnings generated by gcc 4.2 + * Fixed some minor bugs detected by running under valgrind. + * OpenBSD configuration fixes. + Version 1.8.3 patchlevel 5 October 6, 2007 Major changes: Index: configure.in =================================================================== --- configure.in (.../p5) (revision 1176) +++ configure.in (.../p6) (revision 1176) @@ -105,7 +105,7 @@ AC_CHECK_HEADER(sys/stat.h, [AC_DEFINE(I_SYS_STAT)]) AC_CHECK_HEADER(sys/types.h, [AC_DEFINE(I_SYS_TYPES)]) AC_CHECK_HEADERS([sys/un.h ieeefp.h sys/resource.h sys/event.h sys/uio.h]) - +AC_CHECK_HEADERS([poll.h sys/epoll.h sys/select.h]) ### C language support # Only need to check C99 and GNU extensions @@ -148,7 +148,13 @@ # with_ssl=set CHECK_SSL if test "$HAVE_SSL" = "yes"; then - AC_DEFINE(HAVE_SSL) + AC_DEFINE(HAVE_SSL) +fi + +# system libpcre +AX_PATH_LIB_PCRE() +if test "no$PCRE_LIBS" != "no"; then + AC_DEFINE(HAVE_PCRE) fi ### Databases @@ -162,7 +168,7 @@ AC_CHECK_FUNC(crypt, [AC_DEFINE(HAS_CRYPT)]) AC_CHECK_FUNCS([fpsetmask fpsetround]) AC_MSG_CHECKING([for isnormal]) -AC_COMPILE_IFELSE([ +AC_LINK_IFELSE([ #include int main(void) { return !isnormal(1.0); @@ -189,8 +195,9 @@ if test $ac_cv_func_setpgrp = yes; then AC_FUNC_SETPGRP fi -AC_CHECK_FUNCS([cbrt getuid geteuid seteuid getpriority setpriority socketpair]) -AC_CHECK_FUNCS([sigaction sigprocmask imaxdiv kqueue valloc writev]) +AC_CHECK_FUNCS([cbrt log2 getuid geteuid seteuid getpriority setpriority]) +AC_CHECK_FUNCS([socketpair sigaction sigprocmask imaxdiv valloc writev]) +AC_CHECK_FUNCS([fcntl pselect poll ppoll pollts kqueue epoll_ctl]) AC_FUNC_SNPRINTF if test "x$ac_cv_have_working_snprintf" = xyes; then Index: hdrs/pcre.h =================================================================== --- hdrs/pcre.h (.../p5) (revision 1176) +++ hdrs/pcre.h (.../p6) (revision 1176) @@ -1,203 +0,0 @@ -/************************************************* -* Perl-Compatible Regular Expressions * -*************************************************/ - -/* In its original form, this is the .in file that is transformed by -"configure" into pcre.h. - - Copyright (c) 1997-2005 University of Cambridge - ------------------------------------------------------------------------------ -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the University of Cambridge nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------ -*/ - -/* Modified a bit by Shawn Wagner for inclusion in PennMUSH. See - pcre.c for details. */ - -#ifndef _PCRE_H -#define _PCRE_H - -#define PCRE_MAJOR 6 -#define PCRE_MINOR 4 -#define PCRE_DATE 05-Sep-2005 - -#ifndef PCRE_DATA_SCOPE -# define PCRE_DATA_SCOPE extern -#endif - -/* Have to include stdlib.h in order to ensure that size_t is defined; -it is needed here for malloc. */ - -#include - -/* Allow for C++ users */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Options */ - -#define PCRE_CASELESS 0x00000001 -#define PCRE_MULTILINE 0x00000002 -#define PCRE_DOTALL 0x00000004 -#define PCRE_EXTENDED 0x00000008 -#define PCRE_ANCHORED 0x00000010 -#define PCRE_DOLLAR_ENDONLY 0x00000020 -#define PCRE_EXTRA 0x00000040 -#define PCRE_NOTBOL 0x00000080 -#define PCRE_NOTEOL 0x00000100 -#define PCRE_UNGREEDY 0x00000200 -#define PCRE_NOTEMPTY 0x00000400 -#define PCRE_UTF8 0x00000800 -#define PCRE_NO_AUTO_CAPTURE 0x00001000 -#define PCRE_NO_UTF8_CHECK 0x00002000 -#define PCRE_AUTO_CALLOUT 0x00004000 -#define PCRE_PARTIAL 0x00008000 -#define PCRE_DFA_SHORTEST 0x00010000 -#define PCRE_DFA_RESTART 0x00020000 -#define PCRE_FIRSTLINE 0x00040000 - - -/* Exec-time and get/set-time error codes */ - -#define PCRE_ERROR_NOMATCH (-1) -#define PCRE_ERROR_NULL (-2) -#define PCRE_ERROR_BADOPTION (-3) -#define PCRE_ERROR_BADMAGIC (-4) -#define PCRE_ERROR_UNKNOWN_NODE (-5) -#define PCRE_ERROR_NOMEMORY (-6) -#define PCRE_ERROR_NOSUBSTRING (-7) -#define PCRE_ERROR_MATCHLIMIT (-8) -#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */ -#define PCRE_ERROR_BADUTF8 (-10) -#define PCRE_ERROR_BADUTF8_OFFSET (-11) -#define PCRE_ERROR_PARTIAL (-12) -#define PCRE_ERROR_BADPARTIAL (-13) -#define PCRE_ERROR_INTERNAL (-14) -#define PCRE_ERROR_BADCOUNT (-15) -#define PCRE_ERROR_DFA_UITEM (-16) -#define PCRE_ERROR_DFA_UCOND (-17) -#define PCRE_ERROR_DFA_UMLIMIT (-18) -#define PCRE_ERROR_DFA_WSSIZE (-19) -#define PCRE_ERROR_DFA_RECURSE (-20) - -/* Request types for pcre_fullinfo() */ - -#define PCRE_INFO_OPTIONS 0 -#define PCRE_INFO_SIZE 1 -#define PCRE_INFO_CAPTURECOUNT 2 -#define PCRE_INFO_BACKREFMAX 3 -#define PCRE_INFO_FIRSTBYTE 4 -#define PCRE_INFO_FIRSTCHAR 4 /* For backwards compatibility */ -#define PCRE_INFO_FIRSTTABLE 5 -#define PCRE_INFO_LASTLITERAL 6 -#define PCRE_INFO_NAMEENTRYSIZE 7 -#define PCRE_INFO_NAMECOUNT 8 -#define PCRE_INFO_NAMETABLE 9 -#define PCRE_INFO_STUDYSIZE 10 -#define PCRE_INFO_DEFAULT_TABLES 11 - -/* Request types for pcre_config() */ - -#define PCRE_CONFIG_UTF8 0 -#define PCRE_CONFIG_NEWLINE 1 -#define PCRE_CONFIG_LINK_SIZE 2 -#define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3 -#define PCRE_CONFIG_MATCH_LIMIT 4 - -/* Bit flags for the pcre_extra structure */ - -#define PCRE_EXTRA_STUDY_DATA 0x0001 -#define PCRE_EXTRA_MATCH_LIMIT 0x0002 -#define PCRE_EXTRA_CALLOUT_DATA 0x0004 -#define PCRE_EXTRA_TABLES 0x0008 - -/* Types */ - - struct real_pcre; /* declaration; the definition is private */ - typedef struct real_pcre pcre; - -/* The structure for passing additional data to pcre_exec(). This is defined in -such as way as to be extensible. */ - - typedef struct pcre_extra { - unsigned long int flags; /* Bits for which fields are set */ - void *study_data; /* Opaque data from pcre_study() */ - unsigned long int match_limit; /* Maximum number of calls to match() */ - void *callout_data; /* Data passed back in callouts */ - const unsigned char *tables; /* Pointer to character tables */ - } pcre_extra; - -/* The structure for passing out data via the pcre_callout_function. We use a -structure so that new fields can be added on the end in future versions, -without changing the API of the function, thereby allowing old clients to work -without modification. */ - - typedef struct pcre_callout_block { - int version; /* Identifies version of block */ - /* ------------------------ Version 0 ------------------------------- */ - int callout_number; /* Number compiled into pattern */ - int *offset_vector; /* The offset vector */ - const char *subject; /* The subject being matched */ - int subject_length; /* The length of the subject */ - int start_match; /* Offset to start of this match attempt */ - int current_position; /* Where we currently are in the subject */ - int capture_top; /* Max current capture */ - int capture_last; /* Most recently closed capture */ - void *callout_data; /* Data passed in with the call */ - /* ------------------- Added for Version 1 -------------------------- */ - int pattern_position; /* Offset to next item in the pattern */ - int next_item_length; /* Length of next item in the pattern */ - /* ------------------------------------------------------------------ */ - } pcre_callout_block; - - -/* Exported PCRE functions */ - - extern pcre *pcre_compile(const char *, int, const char **, - int *, const unsigned char *); - extern int pcre_copy_substring(const char *, int *, int, int, char *, int); - int pcre_get_substring(const char *, int *, int, int, const char **); - extern int pcre_exec(const pcre *, const pcre_extra *, - const char *, int, int, int, int *, int); - extern const unsigned char *pcre_maketables(void); - extern pcre_extra *pcre_study(const pcre *, int, const char **); - extern int pcre_fullinfo(const pcre * argument_re, - const pcre_extra * extra_data, int what, - void *where); - extern int pcre_get_stringnumber(const pcre * code, const char *stringname); - extern int - pcre_copy_named_substring(const pcre * code, const char *subject, - int *ovector, int stringcount, - const char *stringname, char *buffer, int size); - -#ifdef __cplusplus -} /* extern "C" */ -#endif -#endif /* End of pcre.h */ Index: hdrs/ansi.h =================================================================== --- hdrs/ansi.h (.../p5) (revision 1176) +++ hdrs/ansi.h (.../p6) (revision 1176) @@ -17,7 +17,7 @@ #define __ANSI_H #include "mushtype.h" -#include "pcre.h" +#include "mypcre.h" #define BEEP_CHAR '\a' #define ESC_CHAR '\x1B' @@ -89,15 +89,14 @@ char back; } ansi_data; -int read_raw_ansi_data(ansi_data * store, const char *codes); -int write_raw_ansi_data(ansi_data * old, ansi_data * cur, char *buff, - char **bp); +int read_raw_ansi_data(ansi_data *store, const char *codes); +int write_raw_ansi_data(ansi_data *old, ansi_data *cur, char *buff, char **bp); -void define_ansi_data(ansi_data * store, const char *str); -int write_ansi_data(ansi_data * cur, char *buff, char **bp); +void define_ansi_data(ansi_data *store, const char *str); +int write_ansi_data(ansi_data *cur, char *buff, char **bp); -void nest_ansi_data(ansi_data * old, ansi_data * cur); +void nest_ansi_data(ansi_data *old, ansi_data *cur); #define MARKUP_COLOR 'c' #define MARKUP_COLOR_STR "c" Index: hdrs/mysocket.h =================================================================== --- hdrs/mysocket.h (.../p5) (revision 1176) +++ hdrs/mysocket.h (.../p6) (revision 1176) @@ -64,11 +64,11 @@ /* Connect somewhere using TCP */ int make_socket_conn(const char *host, int socktype, struct sockaddr *myiterface, socklen_t myilen, Port_t port, - int *timeout); + bool nonb); +int wait_for_connect(int, int); void make_nonblocking(int s); +void make_blocking(int s); void set_keepalive(int s); -int connect_nonb - (int sockfd, const struct sockaddr *saptr, socklen_t salen, int *nsec); /* Win32 uses closesocket() to close a socket, and so will we */ #ifndef WIN32 #define closesocket(s) close(s) Index: hdrs/mypcre.h =================================================================== --- hdrs/mypcre.h (.../p5) (revision 0) +++ hdrs/mypcre.h (.../p6) (revision 1176) @@ -0,0 +1,215 @@ +#ifndef _MYPCRE_H +#define _MYPCRE_H + +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* In its original form, this is the .in file that is transformed by +"configure" into pcre.h. + + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + +/* Modified a bit by Shawn Wagner for inclusion in PennMUSH. See + pcre.c for details. */ + + +#define PENN_MATCH_LIMIT 100000 +struct pcre_extra; +void set_match_limit(struct pcre_extra *); +struct pcre_extra *default_match_limit(void); + +#ifdef HAVE_PCRE +#include +#else + + +#define PCRE_MAJOR 6 +#define PCRE_MINOR 4 +#define PCRE_DATE 05-Sep-2005 + +#ifndef PCRE_DATA_SCOPE +# define PCRE_DATA_SCOPE extern +#endif + +/* Have to include stdlib.h in order to ensure that size_t is defined; +it is needed here for malloc. */ + +#include + +/* Allow for C++ users */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Options */ + +#define PCRE_CASELESS 0x00000001 +#define PCRE_MULTILINE 0x00000002 +#define PCRE_DOTALL 0x00000004 +#define PCRE_EXTENDED 0x00000008 +#define PCRE_ANCHORED 0x00000010 +#define PCRE_DOLLAR_ENDONLY 0x00000020 +#define PCRE_EXTRA 0x00000040 +#define PCRE_NOTBOL 0x00000080 +#define PCRE_NOTEOL 0x00000100 +#define PCRE_UNGREEDY 0x00000200 +#define PCRE_NOTEMPTY 0x00000400 +#define PCRE_UTF8 0x00000800 +#define PCRE_NO_AUTO_CAPTURE 0x00001000 +#define PCRE_NO_UTF8_CHECK 0x00002000 +#define PCRE_AUTO_CALLOUT 0x00004000 +#define PCRE_PARTIAL 0x00008000 +#define PCRE_DFA_SHORTEST 0x00010000 +#define PCRE_DFA_RESTART 0x00020000 +#define PCRE_FIRSTLINE 0x00040000 + + +/* Exec-time and get/set-time error codes */ + +#define PCRE_ERROR_NOMATCH (-1) +#define PCRE_ERROR_NULL (-2) +#define PCRE_ERROR_BADOPTION (-3) +#define PCRE_ERROR_BADMAGIC (-4) +#define PCRE_ERROR_UNKNOWN_NODE (-5) +#define PCRE_ERROR_NOMEMORY (-6) +#define PCRE_ERROR_NOSUBSTRING (-7) +#define PCRE_ERROR_MATCHLIMIT (-8) +#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */ +#define PCRE_ERROR_BADUTF8 (-10) +#define PCRE_ERROR_BADUTF8_OFFSET (-11) +#define PCRE_ERROR_PARTIAL (-12) +#define PCRE_ERROR_BADPARTIAL (-13) +#define PCRE_ERROR_INTERNAL (-14) +#define PCRE_ERROR_BADCOUNT (-15) +#define PCRE_ERROR_DFA_UITEM (-16) +#define PCRE_ERROR_DFA_UCOND (-17) +#define PCRE_ERROR_DFA_UMLIMIT (-18) +#define PCRE_ERROR_DFA_WSSIZE (-19) +#define PCRE_ERROR_DFA_RECURSE (-20) + +/* Request types for pcre_fullinfo() */ + +#define PCRE_INFO_OPTIONS 0 +#define PCRE_INFO_SIZE 1 +#define PCRE_INFO_CAPTURECOUNT 2 +#define PCRE_INFO_BACKREFMAX 3 +#define PCRE_INFO_FIRSTBYTE 4 +#define PCRE_INFO_FIRSTCHAR 4 /* For backwards compatibility */ +#define PCRE_INFO_FIRSTTABLE 5 +#define PCRE_INFO_LASTLITERAL 6 +#define PCRE_INFO_NAMEENTRYSIZE 7 +#define PCRE_INFO_NAMECOUNT 8 +#define PCRE_INFO_NAMETABLE 9 +#define PCRE_INFO_STUDYSIZE 10 +#define PCRE_INFO_DEFAULT_TABLES 11 + +/* Request types for pcre_config() */ + +#define PCRE_CONFIG_UTF8 0 +#define PCRE_CONFIG_NEWLINE 1 +#define PCRE_CONFIG_LINK_SIZE 2 +#define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3 +#define PCRE_CONFIG_MATCH_LIMIT 4 + +/* Bit flags for the pcre_extra structure */ + +#define PCRE_EXTRA_STUDY_DATA 0x0001 +#define PCRE_EXTRA_MATCH_LIMIT 0x0002 +#define PCRE_EXTRA_CALLOUT_DATA 0x0004 +#define PCRE_EXTRA_TABLES 0x0008 + +/* Types */ + + struct real_pcre; /* declaration; the definition is private */ + typedef struct real_pcre pcre; + +/* The structure for passing additional data to pcre_exec(). This is defined in +such as way as to be extensible. */ + + typedef struct pcre_extra { + unsigned long int flags; /* Bits for which fields are set */ + void *study_data; /* Opaque data from pcre_study() */ + unsigned long int match_limit; /* Maximum number of calls to match() */ + void *callout_data; /* Data passed back in callouts */ + const unsigned char *tables; /* Pointer to character tables */ + } pcre_extra; + +/* The structure for passing out data via the pcre_callout_function. We use a +structure so that new fields can be added on the end in future versions, +without changing the API of the function, thereby allowing old clients to work +without modification. */ + + typedef struct pcre_callout_block { + int version; /* Identifies version of block */ + /* ------------------------ Version 0 ------------------------------- */ + int callout_number; /* Number compiled into pattern */ + int *offset_vector; /* The offset vector */ + const char *subject; /* The subject being matched */ + int subject_length; /* The length of the subject */ + int start_match; /* Offset to start of this match attempt */ + int current_position; /* Where we currently are in the subject */ + int capture_top; /* Max current capture */ + int capture_last; /* Most recently closed capture */ + void *callout_data; /* Data passed in with the call */ + /* ------------------- Added for Version 1 -------------------------- */ + int pattern_position; /* Offset to next item in the pattern */ + int next_item_length; /* Length of next item in the pattern */ + /* ------------------------------------------------------------------ */ + } pcre_callout_block; + + +/* Exported PCRE functions */ + + extern pcre *pcre_compile(const char *, int, const char **, + int *, const unsigned char *); + extern int pcre_copy_substring(const char *, int *, int, int, char *, int); + int pcre_get_substring(const char *, int *, int, int, const char **); + extern int pcre_exec(const pcre *, const pcre_extra *, + const char *, int, int, int, int *, int); + extern const unsigned char *pcre_maketables(void); + extern pcre_extra *pcre_study(const pcre *, int, const char **); + extern int pcre_fullinfo(const pcre * argument_re, + const pcre_extra * extra_data, int what, + void *where); + extern int pcre_get_stringnumber(const pcre * code, const char *stringname); + extern int + pcre_copy_named_substring(const pcre * code, const char *subject, + int *ovector, int stringcount, + const char *stringname, char *buffer, int size); + +#ifdef __cplusplus +} /* extern "C" */ +#endif +#endif /* !HAVE_PCRE */ +#endif /* End of pcre.h */ Index: hdrs/shs.h =================================================================== --- hdrs/shs.h (.../p5) (revision 1176) +++ hdrs/shs.h (.../p6) (revision 1176) @@ -39,7 +39,7 @@ BYTE reverse_wanted; /**< true to reverse (little_endian) false to not */ } SHS_INFO; -void shsInit(SHS_INFO * shsInfo); -void shsUpdate(SHS_INFO * shsInfo, const BYTE *buffer, int count); -void shsFinal(SHS_INFO * shsInfo); +void shsInit(SHS_INFO *shsInfo); +void shsUpdate(SHS_INFO *shsInfo, const BYTE *buffer, int count); +void shsFinal(SHS_INFO *shsInfo); #endif Index: hdrs/parse.h =================================================================== --- hdrs/parse.h (.../p5) (revision 1176) +++ hdrs/parse.h (.../p6) (revision 1176) @@ -82,15 +82,15 @@ bool is_boolean(char const *str); /* Split a sep-delimited string into individual elements */ -extern int list2arr(char *r[], int max, char *list, char sep); +int list2arr(char *r[], int max, char *list, char sep); /* The reverse */ -extern void arr2list(char *r[], int max, char *list, char **lp, char *sep); +void arr2list(char *r[], int max, char *list, char **lp, const char *sep); /* Split a sep-delimited string into individual elements. * Uses mush_strdup, so freearr() is required on all * list2arr_ansi()'d arrays (r) */ -extern int list2arr_ansi(char *r[], int max, char *list, char sep); +int list2arr_ansi(char *r[], int max, char *list, char sep); /* Free an array generated by list2arr_ansi */ -extern void freearr(char *r[], int size); +void freearr(char *r[], int size); /* All function declarations follow the format: */ #ifndef HAVE_FUN_DEFINED Index: hdrs/command.h =================================================================== --- hdrs/command.h (.../p5) (revision 1176) +++ hdrs/command.h (.../p6) (revision 1176) @@ -1,12 +1,17 @@ #ifndef __COMMAND_H #define __COMMAND_H -#define NUM_BYTES 20 -typedef unsigned char switch_mask[NUM_BYTES]; + +typedef uint8_t *switch_mask; +extern int switch_bytes; +#define SW_ALLOC() mush_calloc(switch_bytes, 1, "cmd.switch.vector"); +#define SW_FREE(s) mush_free((s), "cmd.switch.vector"); #define SW_SET(m,n) (m[(n) >> 3] |= (1 << ((n) & 0x7))) #define SW_CLR(m,n) (m[(n) >> 3] &= ~(1 << ((n) & 0x7))) #define SW_ISSET(m,n) (m[(n) >> 3] & (1 << ((n) & 0x7))) -#define SW_ZERO(m) memset(m, 0, NUM_BYTES) +bool SW_BY_NAME(switch_mask, const char *); +#define SW_ZERO(m) memset(m, 0, switch_bytes) +#define SW_COPY(new,old) memcpy((new), (old), switch_bytes) /* These are type restrictors */ #define CMD_T_ROOM 0x80000000 @@ -128,7 +133,11 @@ unsigned int type; /**< Types of objects that can use the command */ object_flag_type flagmask; /**< Flags to which the command is restricted */ object_flag_type powers; /**< Powers to which the command is restricted */ - switch_mask sw; /**< Bitflags of switches this command can take */ + /** Switches for this command. */ + union { + switch_mask mask; /**< Bitflags of switches this command can take */ + const char *names; /**< Space-seperated list of switches */ + } sw; /** Hooks on this command. */ struct { @@ -188,39 +197,38 @@ #define SWITCH_NONE 0 #include "switches.h" -extern switch_mask *switchmask(const char *switches); -extern COMMAND_INFO *command_find(const char *name); -extern COMMAND_INFO *command_find_exact(const char *name); -extern COMMAND_INFO *command_add +switch_mask switchmask(const char *switches); +COMMAND_INFO *command_find(const char *name); +COMMAND_INFO *command_find_exact(const char *name); +COMMAND_INFO *command_add (const char *name, int type, const char *flagstr, const char *powers, const char *switchstr, command_func func); -extern COMMAND_INFO *make_command +COMMAND_INFO *make_command (const char *name, int type, object_flag_type flagmask, - object_flag_type powers, switch_mask *sw, command_func func); -extern COMMAND_INFO *command_modify(const char *name, int type, - object_flag_type flagmask, - object_flag_type powers, switch_mask *sw, - command_func func); -extern void reserve_alias(const char *a); -extern int alias_command(const char *command, const char *alias); -extern void command_init_preconfig(void); -extern void command_init_postconfig(void); -extern void command_splitup + object_flag_type powers, const char *sw, command_func func); +COMMAND_INFO *command_modify(const char *name, int type, + object_flag_type flagmask, + object_flag_type powers, switch_mask sw, + command_func func); +void reserve_alias(const char *a); +int alias_command(const char *command, const char *alias); +void command_init_preconfig(void); +void command_init_postconfig(void); +void command_splitup (dbref player, dbref cause, char *from, char *to, char **args, COMMAND_INFO *cmd, int side); -extern void command_argparse +void command_argparse (dbref player, dbref cause, char **from, char *to, char **argv, COMMAND_INFO *cmd, int side, int forcenoparse); -extern char *command_parse - (dbref player, dbref cause, char *string, int fromport); -extern void do_list_commands(dbref player, int lc); -extern char *list_commands(void); -extern int command_check_byname(dbref player, const char *name); -extern int restrict_command(const char *name, const char *restriction); -extern void reserve_aliases(void); -extern void local_commands(void); -extern void do_command_add(dbref player, char *name, int flags); -extern void do_command_delete(dbref player, char *name); +char *command_parse(dbref player, dbref cause, char *string, int fromport); +void do_list_commands(dbref player, int lc); +char *list_commands(void); +int command_check_byname(dbref player, const char *name); +int restrict_command(const char *name, const char *restriction); +void reserve_aliases(void); +void local_commands(void); +void do_command_add(dbref player, char *name, int flags); +void do_command_delete(dbref player, char *name); #endif /* __COMMAND_H */ Index: hdrs/version.h =================================================================== --- hdrs/version.h (.../p5) (revision 1176) +++ hdrs/version.h (.../p6) (revision 1176) @@ -1,4 +1,4 @@ #define VERSION "1.8.3" -#define PATCHLEVEL "5" -#define PATCHDATE "[10/06/2007]" -#define NUMVERSION 1008003005 +#define PATCHLEVEL "6" +#define PATCHDATE "[01/01/2008]" +#define NUMVERSION 1008003006 Index: hdrs/externs.h =================================================================== --- hdrs/externs.h (.../p5) (revision 1176) +++ hdrs/externs.h (.../p6) (revision 1176) @@ -28,7 +28,7 @@ #include "mushtype.h" #include "dbdefs.h" #include "confmagic.h" -#include "pcre.h" +#include "mypcre.h" #ifndef HAVE_STRCASECMP #ifdef HAVE__STRICMP @@ -86,6 +86,13 @@ void init_timer(void); #endif /* WIN32 */ +/* From log.c */ +void penn_perror(const char *); + +/* From wait.c */ +int lock_file(FILE *); +int unlock_file(FILE *); + /* From bsd.c */ extern FILE *connlog_fp; extern FILE *checklog_fp; Index: hdrs/strtree.h =================================================================== --- hdrs/strtree.h (.../p5) (revision 1176) +++ hdrs/strtree.h (.../p6) (revision 1176) @@ -36,6 +36,8 @@ char const *st_find(char const *s, StrTree *root); void st_delete(char const *s, StrTree *root); void st_print(StrTree *root); +typedef void (*STFunc) (const char *, int, void *); +void st_walk(StrTree *, STFunc, void *); void st_flush(StrTree *root); extern long st_count; Index: config.h.in =================================================================== --- config.h.in (.../p5) (revision 1176) +++ config.h.in (.../p6) (revision 1176) @@ -66,6 +66,12 @@ #undef HAVE_SYS_UIO_H +#undef HAVE_POLL_H + +#undef HAVE_SYS_EPOLL_H + +#undef HAVE_SYS_SELECT_H + /* C99ish headers. The first two are really really nice to have. */ #undef HAVE_STDINT_H @@ -88,6 +94,8 @@ #define HAS_OPENSSL #endif +#undef HAVE_PCRE + /* Types */ #undef HAVE__BOOL @@ -165,6 +173,8 @@ #undef HAVE_CBRT +#undef HAVE_LOG2 + #undef HAS_CRYPT #undef HAVE_FPSETMASK @@ -274,12 +284,24 @@ #undef HAVE_GETPPID +#undef HAVE_PSELECT + +#undef HAVE_POLL + +#undef HAVE_PPOLL + +#undef HAVE_POLLTS + #undef HAVE_KQUEUE +#undef HAVE_EPOLL_CTL + #undef HAVE_VALLOC #undef HAVE_WRITEV +#undef HAVE_FCNTL + /* Variables and defines */ #undef HAVE_H_ERRNO Index: utils/mkvershlp.pl =================================================================== --- utils/mkvershlp.pl (.../p5) (revision 1176) +++ utils/mkvershlp.pl (.../p6) (revision 1176) @@ -2,6 +2,8 @@ # # Generate game/txt/hlp/ files from the CHANGES file(s). # Should be run by Makefile from top-level directory +# +# Requires the extra Sort::Versions module. Install through CPAN. # # Usage: mkvershlp game/txt/hlp CHANGES.176 CHANGES.OLD ... # @@ -12,9 +14,17 @@ use Sort::Versions; use Text::Wrap; +BEGIN { + print "Rebuilding HELP CHANGES entries...\n"; +} + +END { + print "Done.\n"; +} + my $targetdir = shift; my @sources = @ARGV; -my $verspat = '^Version (\S+) patchlevel (\S+)'; +my $verspat = qr'^Version (\S+) patchlevel (\S+)'; my %patchlevels; @sources = sort byrevision @sources; @@ -22,10 +32,10 @@ my $really_started = 0; foreach my $file (@sources) { next if $file =~ /~$/o; - warn "Can't open $file!\n", next unless open(IN,"<$file"); + warn "Can't open $file!\n", next unless open IN, "<", $file; my $target = $file; $target =~ s/.*\.(.*)/pennv$1.hlp/; - open(OUT,">$targetdir/$target") or die "Unable to open $targetdir/$target\n"; + open(OUT,">","$targetdir/$target") or die "Unable to open $targetdir/$target\n"; my $started = 0; while () { if (/$verspat/o) { Index: win32/funs.h =================================================================== --- win32/funs.h (.../p5) (revision 1176) +++ win32/funs.h (.../p6) (revision 1176) @@ -199,6 +199,7 @@ FUNCTION_PROTO(fun_median); FUNCTION_PROTO(fun_member); FUNCTION_PROTO(fun_merge); +FUNCTION_PROTO(fun_message); FUNCTION_PROTO(fun_mid); FUNCTION_PROTO(fun_min); FUNCTION_PROTO(fun_mix); Index: win32/cmds.h =================================================================== --- win32/cmds.h (.../p5) (revision 1176) +++ win32/cmds.h (.../p6) (revision 1176) @@ -74,6 +74,7 @@ COMMAND_PROTO(cmd_mail); COMMAND_PROTO(cmd_malias); COMMAND_PROTO(cmd_map); +COMMAND_PROTO(cmd_message); COMMAND_PROTO(cmd_motd); COMMAND_PROTO(cmd_mvattr); COMMAND_PROTO(cmd_name); Index: win32/confmagic.h =================================================================== --- win32/confmagic.h (.../p5) (revision 1176) +++ win32/confmagic.h (.../p6) (revision 1176) @@ -12,7 +12,9 @@ #ifndef _confmagic_h_ #define _confmagic_h_ - /* +#define inline __inline + +/* * (which isn't exportable from the U.S.), then don't encrypt */ #ifndef HAS_CRYPT Index: aclocal.m4 =================================================================== --- aclocal.m4 (.../p5) (revision 1176) +++ aclocal.m4 (.../p6) (revision 1176) @@ -881,3 +881,99 @@ [most gcc compilers know a function __attribute__((__malloc__))]) fi ]) +##### http://autoconf-archive.cryp.to/ax_path_lib_pcre.html +# +# SYNOPSIS +# +# AX_PATH_LIB_PCRE [(A/NA)] +# +# DESCRIPTION +# +# check for pcre lib and set PCRE_LIBS and PCRE_CFLAGS accordingly. +# +# also provide --with-pcre option that may point to the $prefix of +# the pcre installation - the macro will check $pcre/include and +# $pcre/lib to contain the necessary files. +# +# the usual two ACTION-IF-FOUND / ACTION-IF-NOT-FOUND are supported +# and they can take advantage of the LIBS/CFLAGS additions. +# +# LAST MODIFICATION +# +# 2006-10-13 +# +# COPYLEFT +# +# Copyright (c) 2006 Guido U. Draheim +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# +# As a special exception, the respective Autoconf Macro's copyright +# owner gives unlimited permission to copy, distribute and modify the +# configure scripts that are the output of Autoconf when processing +# the Macro. You need not follow the terms of the GNU General Public +# License when using or distributing such scripts, even though +# portions of the text of the Macro appear in them. The GNU General +# Public License (GPL) does govern all other use of the material that +# constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the +# Autoconf Macro released by the Autoconf Macro Archive. When you +# make and distribute a modified version of the Autoconf Macro, you +# may extend this special exception to the GPL to apply to your +# modified version as well. + +AC_DEFUN([AX_PATH_LIB_PCRE],[dnl +AC_MSG_CHECKING([lib pcre]) +AC_ARG_WITH(pcre, +[ --with-pcre[[=prefix]] path to system pcre],, + with_pcre="yes") +if test ".$with_pcre" = ".no" ; then + AC_MSG_RESULT([disabled]) + m4_ifval($2,$2) +else + AC_MSG_RESULT([(testing)]) + AC_CHECK_LIB(pcre, pcre_study) + if test "$ac_cv_lib_pcre_pcre_study" = "yes" ; then + PCRE_LIBS="-lpcre" + AC_MSG_CHECKING([lib pcre]) + AC_MSG_RESULT([$PCRE_LIBS]) + m4_ifval($1,$1) + else + OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$with_pcre/lib" + OLDCPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS -I$with_pcre/include" + OLDLIBS="$LIBS" + AC_CHECK_LIB(pcre, pcre_compile) + CPPFLAGS="$OLDCPPFLAGS" + LDFLAGS="$OLDLDFLAGS" + LIBS="$OLDLIBS" + if test "$ac_cv_lib_pcre_pcre_compile" = "yes" ; then + AC_MSG_RESULT(.setting PCRE_LIBS -L$with_pcre/lib -lpcre) + PCRE_LIBS="-L$with_pcre/lib -lpcre" + test -d "$with_pcre/include" && PCRE_CFLAGS="-I$with_pcre/include" + AC_MSG_CHECKING([lib pcre]) + AC_MSG_RESULT([$PCRE_LIBS]) + m4_ifval($1,$1) + else + AC_MSG_CHECKING([lib pcre]) + AC_MSG_RESULT([no, (WARNING)]) + m4_ifval($2,$2) + fi + fi +fi +AC_SUBST([PCRE_LIBS]) +AC_SUBST([PCRE_CFLAGS]) +])