This is patch03 to PennMUSH 1.8.3. After applying this patch, you will have version 1.8.3p3 This patch is intended for a 1.8.3p2 source tree unpacked from the tar file for that version. Use 1.8.3-patch03-from-02-patch for a source tree that has been upgraded to 1.8.3p2 from 1.8.3p1 by the 1.8.3-patch02 patch, which includes files missing from that patch. Alternatively, use 1.8.3-patch03-from-01, which is a direct update to 1.8.3p3 from 1.8.3p1. To apply this patch, save it to a file in your top-level MUSH directory, and do the following: patch -p0 < 1.8.3-patch03-from-02-tarball make clean ./configure (If this does not work, do a 'chmod +x configure' first.) 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: Minor changes: * The sockets used to talk to info_slave changed from streams to datagrams, simplifying code. [SW] * info_slave deals better with simultaneous connections. [SW] * info_slave requires the presence of the socketpair(2) function. It was already using it anyways. * Use of some system calls with portability issues encapsulated in wrapper functions. [SW] * sql() returns error codes directly instead of notifying %!. [SW] Functions: * lattr() and lattrp() take an optional delimiter argument. Suggested by Nathan Baum. [SW] * New csecs() and msecs() functions, like ctime() and mtime() but returning the time in seconds instead of a formatted string. Based on a patch by Talvo. * ctime() and mtime() take an optional second argument to control which time zone the time is displayed for: UTC or the server's. [SW] * fn() by Javelin * letq(). Suggested by Nathan Baum. [SW] Fixes: * Assorted compiler warning fixes. [SW] * Compile fix on OS X 10.3. Reported by Viila. [SW] * @sql wasn't enabled if Sqlite3 was the only database turned on. Reported by qa'toq. * Problems with sql() using Sqlite3. Reported by qa'toq. [SW] * Problems with null queries using MySQL. Reported by duckwa. [SW] * Start fixing code that assumes that int and long are the same size. [SW] * Linting of code that uses strcpy, strncpy() and sprintf() to rule out remote possibilities of buffer overflows. [SW] * align() off-by-one error in left coalescing fixed. Reported by Sketch. [Javelin] * User locks were broken in the last patch. Reported by Michael Brazaitis. [SW] * ./configure --without-ssl works. Reported by Starr. [SW] * objid matcher didn't work properly. [SW] * Many functions that used parse_dbref updated to use parse_objid, to see more objid compliance. [GM] Index: Patchlevel =================================================================== Prereq: 1.8.3p2 *** Patchlevel (.../p2) (revision 920) --- Patchlevel (.../p3) (revision 920) *************** *** 1,2 **** Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.8.3p2 --- 1,2 ---- Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.8.3p3 Index: configure =================================================================== *** configure (.../p2) (revision 920) --- configure (.../p3) (revision 920) *************** *** 643,648 **** --- 643,649 ---- ac_ct_CC EXEEXT OBJEXT + GDB CHMOD CP ECHO *************** *** 673,681 **** POSTGRESQL_VERSION POSTGRESQL_CFLAGS POSTGRESQL_LDFLAGS - CXX - CXXFLAGS - ac_ct_CXX SQLITE3_CFLAGS SQLITE3_LDFLAGS SQLITE3_VERSION --- 674,679 ---- *************** *** 690,699 **** LDFLAGS CPPFLAGS SENDMAIL ! CPP ! CXX ! CXXFLAGS ! CCC' # Initialize some variables set by options. --- 688,694 ---- LDFLAGS CPPFLAGS SENDMAIL ! CPP' # Initialize some variables set by options. *************** *** 1268,1275 **** Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ! --with-ssl enable ssl will check /usr/local/ssl ! /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr --with-mysql=[ARG] use MySQL client library [default=yes], optionally specify path to mysql_config --- 1263,1271 ---- Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ! ! --with-ssl=[DIR] look for OpenSSL in DIR (Use when it's not found ! with the default search path) --with-mysql=[ARG] use MySQL client library [default=yes], optionally specify path to mysql_config *************** *** 1287,1294 **** you have headers in a nonstandard directory SENDMAIL Path to sendmail CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. --- 1283,1288 ---- *************** *** 1715,1720 **** --- 1709,1721 ---- ac_config_headers="$ac_config_headers config.h" + if test "x$CFLAGS" = "x"; then + CFLAGS="-O" + DEFAULT_CFLAGS=yes + else + DEFAULT_CFLAGS=no + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' *************** *** 2764,2769 **** --- 2765,3016 ---- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + { echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5 + echo $ECHO_N "checking for $CC option to accept ISO C99... $ECHO_C" >&6; } + if test "${ac_cv_prog_cc_c99+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_prog_cc_c99=no + ac_save_CC=$CC + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + #include + #include + #include + #include + + struct incomplete_array + { + int datasize; + double data[]; + }; + + struct named_init { + int number; + const wchar_t *name; + double average; + }; + + typedef const char *ccp; + + static inline int + test_restrict(ccp restrict text) + { + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\0'; ++i) + continue; + return 0; + } + + // Check varargs and va_copy work. + static void + test_varargs(const char *format, ...) + { + va_list args; + va_start(args, format); + va_list args_copy; + va_copy(args_copy, args); + + const char *str; + int number; + float fnumber; + + while (*format) + { + switch (*format++) + { + case 's': // string + str = va_arg(args_copy, const char *); + break; + case 'd': // int + number = va_arg(args_copy, int); + break; + case 'f': // float + fnumber = (float) va_arg(args_copy, double); + break; + default: + break; + } + } + va_end(args_copy); + va_end(args); + } + + int + main () + { + + // Check bool and long long datatypes. + _Bool success = false; + long long int bignum = -1234567890LL; + unsigned long long int ubignum = 1234567890uLL; + + // Check restrict. + if (test_restrict("String literal") != 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + test_varargs("s, d' f .", "string", 65, 34.234); + + // Check incomplete arrays work. + struct incomplete_array *ia = + 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; + + // Check named initialisers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[43] = 543; + + // work around unused variable warnings + return bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'; + + ; + return 0; + } + _ACEOF + for ac_arg in '' -std=gnu99 -c99 -qlanglvl=extc99 + do + CC="$ac_save_CC $ac_arg" + 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_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); } && + { 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 + ac_cv_prog_cc_c99=$ac_arg + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + + rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c99" != "xno" && break + done + rm -f conftest.$ac_ext + CC=$ac_save_CC + + fi + # AC_CACHE_VAL + case "x$ac_cv_prog_cc_c99" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 + echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 + echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c99" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5 + echo "${ECHO_T}$ac_cv_prog_cc_c99" >&6; } ;; + esac + + + + # Extract the first word of "gdb", so it can be a program name with args. + set dummy gdb; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_GDB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $GDB in + [\\/]* | ?:[\\/]*) + ac_cv_path_GDB="$GDB" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + 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 + 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 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + GDB=$ac_cv_path_GDB + if test -n "$GDB"; then + { echo "$as_me:$LINENO: result: $GDB" >&5 + echo "${ECHO_T}$GDB" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + + # Set good debug and warning options if using gcc + # and custom CFLAGS aren't being used. + # Todo: Look into the warnings setting macros in the autoconf archive, + # maybe use them instead? + if test $DEFAULT_CFLAGS = yes; then + if test "x$GDB" != x; then + if test "x$ac_cv_c_compiler_gnu" = xyes; then + CFLAGS="-ggdb $CFLAGS -W -Wall -pedantic -Wno-comment" + else + CFLAGS="-g $CFLAGS -W" + fi + else + CFLAGS="-g $CFLAGS -W" + fi + fi + # Extract the first word of "chmod", so it can be a program name with args. set dummy chmod; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 *************** *** 4097,4105 **** fi ! { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 ! echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } ! if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF --- 4344,4366 ---- fi ! # On IRIX 5.3, sys/types and inttypes.h are conflicting. ! ! ! ! ! ! ! ! ! ! for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ ! inttypes.h stdint.h unistd.h ! do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! { 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 cat >conftest.$ac_ext <<_ACEOF *************** *** 4108,4128 **** cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! #include ! #include ! #ifndef WEXITSTATUS ! # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif ! #ifndef WIFEXITED ! # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { ! int s; ! wait (&s); ! s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } --- 4369,4518 ---- 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_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); } && ! { 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 ! eval "$as_ac_Header=yes" ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! eval "$as_ac_Header=no" ! fi ! ! rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ! fi ! ac_res=`eval echo '${'$as_ac_Header'}'` ! { echo "$as_me:$LINENO: result: $ac_res" >&5 ! echo "${ECHO_T}$ac_res" >&6; } ! 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 ! ! ! { echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 ! echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; } ! if test "${ac_cv_header_stdbool_h+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. */ ! ! #include ! #ifndef bool ! "error: bool is not defined" #endif ! #ifndef false ! "error: false is not defined" ! #endif ! #if false ! "error: false is not 0" ! #endif ! #ifndef true ! "error: true is not defined" ! #endif ! #if true != 1 ! "error: true is not 1" ! #endif ! #ifndef __bool_true_false_are_defined ! "error: __bool_true_false_are_defined is not defined" #endif + struct s { _Bool s: 1; _Bool t; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + bool e = &s; + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + # if defined __xlc__ || defined __GNUC__ + /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 + reported by James Lemley on 2005-10-05; see + http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html + This test is not quite right, since xlc is allowed to + reject this program, as the initializer for xlcbug is + not one of the forms that C requires support for. + However, doing the test right would require a runtime + test, and that would make cross-compilation harder. + Let us hope that IBM fixes the xlc bug, and also adds + support for this kind of constant expression. In the + meantime, this test will reject xlc, which is OK, since + our stdbool.h substitute should suffice. We also test + this with GCC, where it should work, to detect more + quickly whether someone messes up the test in the + future. */ + char digs[] = "0123456789"; + int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); + # endif + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; + int main () { ! ! *pq |= q; ! *pq |= ! q; ! /* Refer to every declared value, to avoid compiler optimizations. */ ! return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l ! + !m + !n + !o + !p + !q + !pq); ! ; return 0; } *************** *** 4161,4189 **** ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ! { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 ! echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } ! if test $ac_cv_header_sys_wait_h = yes; then ! ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_SYS_WAIT_H 1 ! _ACEOF ! ! fi ! ! { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 ! echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } ! if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF --- 4551,4571 ---- ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_header_stdbool_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ! { echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 ! echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6; } ! { echo "$as_me:$LINENO: checking for _Bool" >&5 ! echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; } ! if test "${ac_cv_type__Bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF *************** *** 4192,4206 **** cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! #include ! #include ! #include ! int main () { ! if ((struct tm *) 0) ! return 0; ; return 0; } --- 4574,4588 ---- cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! $ac_includes_default ! typedef _Bool ac__type_new_; int main () { ! if ((ac__type_new_ *) 0) ! return 0; ! if (sizeof (ac__type_new_)) ! return 0; ; return 0; } *************** *** 4239,4281 **** ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ! { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 ! echo "${ECHO_T}$ac_cv_header_time" >&6; } ! if test $ac_cv_header_time = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define TIME_WITH_SYS_TIME 1 _ACEOF fi ! # On IRIX 5.3, sys/types and inttypes.h are conflicting. ! for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ ! inttypes.h stdint.h unistd.h ! do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! { 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 cat >conftest.$ac_ext <<_ACEOF --- 4621,4742 ---- ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_type__Bool=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_type__Bool=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ! { echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 ! echo "${ECHO_T}$ac_cv_type__Bool" >&6; } ! if test $ac_cv_type__Bool = yes; then ! cat >>confdefs.h <<_ACEOF ! #define HAVE__BOOL 1 _ACEOF + fi ! if test $ac_cv_header_stdbool_h = yes; then + cat >>confdefs.h <<\_ACEOF + #define HAVE_STDBOOL_H 1 + _ACEOF + fi + { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 + echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } + if test "${ac_cv_header_sys_wait_h+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. */ + #include + #include + #ifndef WEXITSTATUS + # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) + #endif + #ifndef WIFEXITED + # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) + #endif + int + main () + { + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; + } + _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_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); } && + { 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 + ac_cv_header_sys_wait_h=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_sys_wait_h=no + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 + echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } + if test $ac_cv_header_sys_wait_h = yes; then + cat >>confdefs.h <<\_ACEOF + #define HAVE_SYS_WAIT_H 1 + _ACEOF + fi ! { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 ! echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } ! if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF *************** *** 4284,4292 **** 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" --- 4745,4762 ---- cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! #include ! #include ! #include ! int ! main () ! { ! if ((struct tm *) 0) ! return 0; ! ; ! return 0; ! } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" *************** *** 4322,4350 **** ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ! ac_res=`eval echo '${'$as_ac_Header'}'` ! { echo "$as_me:$LINENO: result: $ac_res" >&5 ! echo "${ECHO_T}$ac_res" >&6; } ! 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 - - if test "${ac_cv_header_sys_time_h+set}" = set; then { echo "$as_me:$LINENO: checking for sys/time.h" >&5 echo $ECHO_N "checking for sys/time.h... $ECHO_C" >&6; } --- 4792,4817 ---- ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ! { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 ! echo "${ECHO_T}$ac_cv_header_time" >&6; } ! if test $ac_cv_header_time = yes; then ! ! cat >>confdefs.h <<\_ACEOF ! #define TIME_WITH_SYS_TIME 1 _ACEOF fi if test "${ac_cv_header_sys_time_h+set}" = set; then { echo "$as_me:$LINENO: checking for sys/time.h" >&5 echo $ECHO_N "checking for sys/time.h... $ECHO_C" >&6; } *************** *** 7329,7335 **** ! for ac_header in ieeefp.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 --- 7796,7805 ---- ! ! ! ! for ac_header in sys/un.h ieeefp.h sys/resource.h sys/event.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 *************** *** 7839,7844 **** --- 8309,8394 ---- ### Types # Again, no need to check for standard C89 types. + { echo "$as_me:$LINENO: checking for ssize_t" >&5 + echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } + if test "${ac_cv_type_ssize_t+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. */ + $ac_includes_default + typedef ssize_t ac__type_new_; + int + main () + { + if ((ac__type_new_ *) 0) + return 0; + if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _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_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); } && + { 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 + ac_cv_type_ssize_t=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_ssize_t=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 + echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } + if test $ac_cv_type_ssize_t = yes; then + : + else + + cat >>confdefs.h <<_ACEOF + #define ssize_t int + _ACEOF + + fi + { echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then *************** *** 8179,8184 **** --- 8729,8882 ---- esac + { echo "$as_me:$LINENO: checking for int32_t" >&5 + echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; } + if test "${ac_cv_c_int32_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_c_int32_t=no + for ac_type in 'int32_t' 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + 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 + int + main () + { + static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + 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 + int + main () + { + static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1) + < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + case $ac_type in + int32_t) ac_cv_c_int32_t=yes ;; + *) ac_cv_c_int32_t=$ac_type ;; + esac + + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_int32_t" != no && break + done + fi + { echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5 + echo "${ECHO_T}$ac_cv_c_int32_t" >&6; } + case $ac_cv_c_int32_t in #( + no|yes) ;; #( + *) + + cat >>confdefs.h <<_ACEOF + #define int32_t $ac_cv_c_int32_t + _ACEOF + ;; + esac + + { echo "$as_me:$LINENO: checking for uint32_t" >&5 echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; } if test "${ac_cv_c_uint32_t+set}" = set; then *************** *** 8272,8277 **** --- 8970,12551 ---- esac + { echo "$as_me:$LINENO: checking for int64_t" >&5 + echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; } + if test "${ac_cv_c_int64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_c_int64_t=no + for ac_type in 'int64_t' 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + 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 + int + main () + { + static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + 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 + int + main () + { + static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1) + < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + case $ac_type in + int64_t) ac_cv_c_int64_t=yes ;; + *) ac_cv_c_int64_t=$ac_type ;; + esac + + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_int64_t" != no && break + done + fi + { echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5 + echo "${ECHO_T}$ac_cv_c_int64_t" >&6; } + case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) + + cat >>confdefs.h <<_ACEOF + #define int64_t $ac_cv_c_int64_t + _ACEOF + ;; + esac + + + { echo "$as_me:$LINENO: checking for uint64_t" >&5 + echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; } + if test "${ac_cv_c_uint64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_c_uint64_t=no + for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + 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 + int + main () + { + static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + case $ac_type in + uint64_t) ac_cv_c_uint64_t=yes ;; + *) ac_cv_c_uint64_t=$ac_type ;; + esac + + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_uint64_t" != no && break + done + fi + { echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5 + echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; } + case $ac_cv_c_uint64_t in #( + no|yes) ;; #( + *) + + cat >>confdefs.h <<\_ACEOF + #define _UINT64_T 1 + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define uint64_t $ac_cv_c_uint64_t + _ACEOF + ;; + esac + + + { echo "$as_me:$LINENO: checking for long long int" >&5 + echo $ECHO_N "checking for long long int... $ECHO_C" >&6; } + if test "${ac_cv_type_long_long_int+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. */ + long long int ll = 1LL; int i = 63; + int + main () + { + long long int llmax = (long long int) -1; + return ll << i | ll >> i | llmax / ll | llmax % ll; + ; + 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); } && + { 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 + ac_cv_type_long_long_int=yes + 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 \ + conftest$ac_exeext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 + echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; } + if test $ac_cv_type_long_long_int = yes; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_LONG_LONG_INT 1 + _ACEOF + + fi + + + + { echo "$as_me:$LINENO: checking for intmax_t" >&5 + echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6; } + if test "${ac_cv_type_intmax_t+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. */ + $ac_includes_default + typedef intmax_t ac__type_new_; + int + main () + { + if ((ac__type_new_ *) 0) + return 0; + if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _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_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); } && + { 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 + ac_cv_type_intmax_t=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_intmax_t=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5 + echo "${ECHO_T}$ac_cv_type_intmax_t" >&6; } + if test $ac_cv_type_intmax_t = yes; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_INTMAX_T 1 + _ACEOF + + else + test $ac_cv_type_long_long_int = yes \ + && ac_type='long long int' \ + || ac_type='long int' + + cat >>confdefs.h <<_ACEOF + #define intmax_t $ac_type + _ACEOF + + fi + + + + { echo "$as_me:$LINENO: checking for unsigned long long int" >&5 + echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6; } + if test "${ac_cv_type_unsigned_long_long_int+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. */ + unsigned long long int ull = 1ULL; int i = 63; + int + main () + { + unsigned long long int ullmax = (unsigned long long int) -1; + return ull << i | ull >> i | ullmax / ull | ullmax % ull; + ; + 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); } && + { 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 + ac_cv_type_unsigned_long_long_int=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_unsigned_long_long_int=no + fi + + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5 + echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_UNSIGNED_LONG_LONG_INT 1 + _ACEOF + + fi + + + + { echo "$as_me:$LINENO: checking for uintmax_t" >&5 + echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6; } + if test "${ac_cv_type_uintmax_t+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. */ + $ac_includes_default + typedef uintmax_t ac__type_new_; + int + main () + { + if ((ac__type_new_ *) 0) + return 0; + if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _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_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); } && + { 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 + ac_cv_type_uintmax_t=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_uintmax_t=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_type_uintmax_t" >&5 + echo "${ECHO_T}$ac_cv_type_uintmax_t" >&6; } + if test $ac_cv_type_uintmax_t = yes; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_UINTMAX_T 1 + _ACEOF + + else + test $ac_cv_type_unsigned_long_long_int = yes \ + && ac_type='unsigned long long int' \ + || ac_type='unsigned long int' + + cat >>confdefs.h <<_ACEOF + #define uintmax_t $ac_type + _ACEOF + + fi + + + + { echo "$as_me:$LINENO: checking for int" >&5 + echo $ECHO_N "checking for int... $ECHO_C" >&6; } + if test "${ac_cv_type_int+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. */ + $ac_includes_default + typedef int ac__type_new_; + int + main () + { + if ((ac__type_new_ *) 0) + return 0; + if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _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_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); } && + { 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 + ac_cv_type_int=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_int=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 + echo "${ECHO_T}$ac_cv_type_int" >&6; } + + { 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 + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default + typedef int ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_lo=0 ac_mid=0 + while :; do + 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 + typedef int ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + typedef int ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=-1 ac_mid=-1 + while :; do + 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 + typedef int ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_lo=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Binary search between lo and hi bounds. + while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + 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 + typedef int ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=$ac_mid + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + case $ac_lo in + ?*) ac_cv_sizeof_int=$ac_lo;; + '') { { 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; }; } ;; + esac + else + 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 + 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 + #include + int + main () + { + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 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_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./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 + ac_cv_sizeof_int=`cat conftest.val` + 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 ) + { { 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; }; } + 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 + + + { echo "$as_me:$LINENO: checking for long" >&5 + echo $ECHO_N "checking for long... $ECHO_C" >&6; } + if test "${ac_cv_type_long+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. */ + $ac_includes_default + typedef long ac__type_new_; + int + main () + { + if ((ac__type_new_ *) 0) + return 0; + if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _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_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); } && + { 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 + ac_cv_type_long=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 + echo "${ECHO_T}$ac_cv_type_long" >&6; } + + { 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 + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default + typedef long ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_lo=0 ac_mid=0 + while :; do + 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 + typedef long ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + typedef long ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=-1 ac_mid=-1 + while :; do + 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 + typedef long ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_lo=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Binary search between lo and hi bounds. + while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + 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 + typedef long ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=$ac_mid + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + case $ac_lo in + ?*) ac_cv_sizeof_long=$ac_lo;; + '') { { 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; }; } ;; + esac + else + 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 + 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 + #include + int + main () + { + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 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_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./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 + ac_cv_sizeof_long=`cat conftest.val` + 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 ) + { { 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; }; } + 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 + + + { echo "$as_me:$LINENO: checking for int64_t" >&5 + echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; } + if test "${ac_cv_type_int64_t+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. */ + $ac_includes_default + typedef int64_t ac__type_new_; + int + main () + { + if ((ac__type_new_ *) 0) + return 0; + if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _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_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); } && + { 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 + ac_cv_type_int64_t=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_int64_t=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5 + echo "${ECHO_T}$ac_cv_type_int64_t" >&6; } + + { 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 + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default + typedef int64_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_lo=0 ac_mid=0 + while :; do + 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 + typedef int64_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + typedef int64_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=-1 ac_mid=-1 + while :; do + 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 + typedef int64_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_lo=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Binary search between lo and hi bounds. + while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + 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 + typedef int64_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=$ac_mid + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + case $ac_lo in + ?*) ac_cv_sizeof_int64_t=$ac_lo;; + '') { { 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; }; } ;; + esac + else + 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 + 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 + #include + int + main () + { + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 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_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./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 + ac_cv_sizeof_int64_t=`cat conftest.val` + 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 ) + { { 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; }; } + 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 + + + { echo "$as_me:$LINENO: checking for intmax_t" >&5 + echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6; } + if test "${ac_cv_type_intmax_t+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. */ + $ac_includes_default + typedef intmax_t ac__type_new_; + int + main () + { + if ((ac__type_new_ *) 0) + return 0; + if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _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_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); } && + { 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 + ac_cv_type_intmax_t=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_intmax_t=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5 + echo "${ECHO_T}$ac_cv_type_intmax_t" >&6; } + + { 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 + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default + typedef intmax_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_lo=0 ac_mid=0 + while :; do + 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 + typedef intmax_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + typedef intmax_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=-1 ac_mid=-1 + while :; do + 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 + typedef intmax_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_lo=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Binary search between lo and hi bounds. + while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + 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 + typedef intmax_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=$ac_mid + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + case $ac_lo in + ?*) ac_cv_sizeof_intmax_t=$ac_lo;; + '') { { 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; }; } ;; + esac + else + 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 + 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 + #include + int + main () + { + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 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_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./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 + ac_cv_sizeof_intmax_t=`cat conftest.val` + 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 ) + { { 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; }; } + 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 + + + { echo "$as_me:$LINENO: checking for time_t" >&5 + echo $ECHO_N "checking for time_t... $ECHO_C" >&6; } + if test "${ac_cv_type_time_t+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. */ + $ac_includes_default + typedef time_t ac__type_new_; + int + main () + { + if ((ac__type_new_ *) 0) + return 0; + if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _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_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); } && + { 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 + ac_cv_type_time_t=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_time_t=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5 + echo "${ECHO_T}$ac_cv_type_time_t" >&6; } + + { 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 + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default + typedef time_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_lo=0 ac_mid=0 + while :; do + 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 + typedef time_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + typedef time_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=-1 ac_mid=-1 + while :; do + 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 + typedef time_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_lo=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Binary search between lo and hi bounds. + while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + 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 + typedef time_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=$ac_mid + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + case $ac_lo in + ?*) ac_cv_sizeof_time_t=$ac_lo;; + '') { { 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; }; } ;; + esac + else + 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 + 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 + #include + int + main () + { + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 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_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./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 + ac_cv_sizeof_time_t=`cat conftest.val` + 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 ) + { { 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; }; } + 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 + + + { echo "$as_me:$LINENO: checking for void *" >&5 + echo $ECHO_N "checking for void *... $ECHO_C" >&6; } + if test "${ac_cv_type_void_p+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. */ + $ac_includes_default + typedef void * ac__type_new_; + int + main () + { + if ((ac__type_new_ *) 0) + return 0; + if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _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_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); } && + { 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 + ac_cv_type_void_p=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_void_p=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 + echo "${ECHO_T}$ac_cv_type_void_p" >&6; } + + { 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 + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default + typedef void * ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_lo=0 ac_mid=0 + while :; do + 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 + typedef void * ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + 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 + typedef void * ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=-1 ac_mid=-1 + while :; do + 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 + typedef void * ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_lo=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Binary search between lo and hi bounds. + while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + 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 + typedef void * ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _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_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); } && + { 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 + ac_hi=$ac_mid + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + case $ac_lo in + ?*) ac_cv_sizeof_void_p=$ac_lo;; + '') { { 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; }; } ;; + esac + else + 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 + 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 + #include + int + main () + { + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 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_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./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 + ac_cv_sizeof_void_p=`cat conftest.val` + 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 ) + { { 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; }; } + 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 + + + ### Libraries { echo "$as_me:$LINENO: checking for sin in -lm" >&5 *************** *** 8818,8862 **** ! with_ssl=set ! { echo "$as_me:$LINENO: checking if ssl is wanted" >&5 ! echo $ECHO_N "checking if ssl is wanted... $ECHO_C" >&6; } # Check whether --with-ssl was given. if test "${with_ssl+set}" = set; then ! withval=$with_ssl; { echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6; } ! for dir in $withval /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr; do ssldir="$dir" if test -f "$dir/include/openssl/ssl.h"; then found_ssl="yes"; CFLAGS="$CFLAGS -I$ssldir/include/"; - CXXFLAGS="$CXXFLAGS -I$ssldir/include/"; break; fi if test -f "$dir/include/ssl.h"; then found_ssl="yes"; CFLAGS="$CFLAGS -I$ssldir/include/"; ! CXXFLAGS="$CXXFLAGS -I$ssldir/include/"; ! break fi done if test x_$found_ssl != x_yes; then ! { { echo "$as_me:$LINENO: error: Cannot find ssl libraries" >&5 ! echo "$as_me: error: Cannot find ssl libraries" >&2;} ! { (exit 1); exit 1; }; } else ! printf "OpenSSL found in $ssldir\n"; LIBS="$LIBS -lssl -lcrypto"; LDFLAGS="$LDFLAGS -L$ssldir/lib"; ! HAVE_SSL=yes fi else ! { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi --- 13092,13163 ---- ! # with_ssl=set # Check whether --with-ssl was given. if test "${with_ssl+set}" = set; then ! withval=$with_ssl; if test "x$with_ssl" != xno; then ! { echo "$as_me:$LINENO: checking for OpenSSL" >&5 ! echo $ECHO_N "checking for OpenSSL... $ECHO_C" >&6; } ! for dir in $with_ssl /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr; do ssldir="$dir" if test -f "$dir/include/openssl/ssl.h"; then found_ssl="yes"; CFLAGS="$CFLAGS -I$ssldir/include/"; break; fi if test -f "$dir/include/ssl.h"; then found_ssl="yes"; CFLAGS="$CFLAGS -I$ssldir/include/"; ! break; fi done if test x_$found_ssl != x_yes; then ! { echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6; } else ! { echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6; } LIBS="$LIBS -lssl -lcrypto"; LDFLAGS="$LDFLAGS -L$ssldir/lib"; ! HAVE_SSL="yes"; ! fi + else + { echo "$as_me:$LINENO: ssl support disabled" >&5 + echo "$as_me: ssl support disabled" >&6;} + + fi else ! { echo "$as_me:$LINENO: checking for OpenSSL" >&5 ! echo $ECHO_N "checking for OpenSSL... $ECHO_C" >&6; } ! for dir in /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr; do ! ssldir="$dir" ! if test -f "$dir/include/openssl/ssl.h"; then ! found_ssl="yes"; ! CFLAGS="$CFLAGS -I$ssldir/include/"; ! break; ! fi ! if test -f "$dir/include/ssl.h"; then ! found_ssl="yes"; ! CFLAGS="$CFLAGS -I$ssldir/include/"; ! break; ! fi ! done ! if test x_$found_ssl != x_yes; then ! { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } + else + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + LIBS="$LIBS -lssl -lcrypto"; + LDFLAGS="$LDFLAGS -L$ssldir/lib"; + HAVE_SSL="yes"; + + fi fi *************** *** 8941,8949 **** fi ! if test "$MYSQL_CONFIG" != "no"; then ! { echo "$as_me:$LINENO: checking for MySQL libraries" >&5 echo $ECHO_N "checking for MySQL libraries... $ECHO_C" >&6; } MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`" MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`" --- 13242,13250 ---- fi ! { echo "$as_me:$LINENO: checking for MySQL libraries" >&5 echo $ECHO_N "checking for MySQL libraries... $ECHO_C" >&6; } + if test "$MYSQL_CONFIG" != "no"; then MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`" MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`" *************** *** 9152,9590 **** - ac_ext=cpp - ac_cpp='$CXXCPP $CPPFLAGS' - ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. - set dummy $ac_tool_prefix$ac_prog; ac_word=$2 - { echo "$as_me:$LINENO: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } - if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. - else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - for as_dir in $PATH - do - 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 - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done - done - IFS=$as_save_IFS - - fi - fi - CXX=$ac_cv_prog_CXX - if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 - echo "${ECHO_T}$CXX" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6; } - fi - - - test -n "$CXX" && break - done - fi - if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - { echo "$as_me:$LINENO: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } - if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. - else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - for as_dir in $PATH - do - 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 - ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done - done - IFS=$as_save_IFS - - fi - fi - ac_ct_CXX=$ac_cv_prog_ac_ct_CXX - if test -n "$ac_ct_CXX"; then - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 - echo "${ECHO_T}$ac_ct_CXX" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6; } - fi - - - test -n "$ac_ct_CXX" && break - done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in - yes:) - { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools - whose name does not start with the host triplet. If you think this - configuration is useful to you, please write to autoconf@gnu.org." >&5 - echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools - whose name does not start with the host triplet. If you think this - configuration is useful to you, please write to autoconf@gnu.org." >&2;} - ac_tool_warned=yes ;; - esac - CXX=$ac_ct_CXX - fi - fi - - fi - fi - # Provide some information about the compiler. - echo "$as_me:$LINENO: checking for C++ compiler version" >&5 - ac_compiler=`set X $ac_compile; echo $2` - { (ac_try="$ac_compiler --version >&5" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - { (ac_try="$ac_compiler -v >&5" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - { (ac_try="$ac_compiler -V >&5" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - - { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 - echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } - if test "${ac_cv_cxx_compiler_gnu+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. */ - - int - main () - { - #ifndef __GNUC__ - choke me - #endif - - ; - return 0; - } - _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_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); } && - { ac_try='test -z "$ac_cxx_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 - ac_compiler_gnu=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no - fi - - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - - fi - { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 - echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } - GXX=`test $ac_compiler_gnu = yes && echo yes` - ac_test_CXXFLAGS=${CXXFLAGS+set} - ac_save_CXXFLAGS=$CXXFLAGS - { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 - echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } - if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - int - main () - { - - ; - return 0; - } - _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_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); } && - { ac_try='test -z "$ac_cxx_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 - ac_cv_prog_cxx_g=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - int - main () - { - - ; - return 0; - } - _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_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); } && - { ac_try='test -z "$ac_cxx_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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - int - main () - { - - ; - return 0; - } - _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_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); } && - { ac_try='test -z "$ac_cxx_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 - ac_cv_prog_cxx_g=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - - fi - - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - fi - { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 - echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } - if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS - elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi - else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi - fi - ac_ext=cpp - ac_cpp='$CXXCPP $CPPFLAGS' - ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - # Check whether --with-sqlite3 was given. --- 13453,13458 ---- *************** *** 9649,9661 **** saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $ac_sqlite3_cppflags" - - ac_ext=cpp - ac_cpp='$CXXCPP $CPPFLAGS' - ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ --- 13517,13522 ---- *************** *** 9669,9675 **** { #if (SQLITE_VERSION_NUMBER >= $sqlite3_version_req_number) ! // Everything is okay #else # error SQLite version is too old #endif --- 13530,13536 ---- { #if (SQLITE_VERSION_NUMBER >= $sqlite3_version_req_number) ! /* Everything is okay */ #else # error SQLite version is too old #endif *************** *** 9694,9700 **** cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && ! { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; --- 13555,13561 ---- 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;; *************** *** 9732,9743 **** fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu - CPPFLAGS="$saved_CPPFLAGS" --- 13593,13598 ---- *************** *** 9771,9778 **** fi - - ### Functions { echo "$as_me:$LINENO: checking for bindtextdomain" >&5 echo $ECHO_N "checking for bindtextdomain... $ECHO_C" >&6; } --- 13626,13631 ---- *************** *** 9878,9993 **** fi - - for ac_func in cbrt - 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_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_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 - 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$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 - { echo "$as_me:$LINENO: checking for crypt" >&5 echo $ECHO_N "checking for crypt... $ECHO_C" >&6; } if test "${ac_cv_func_crypt+set}" = set; then --- 13731,13736 ---- *************** *** 11132,11140 **** fi ! { echo "$as_me:$LINENO: checking for gettext" >&5 ! echo $ECHO_N "checking for gettext... $ECHO_C" >&6; } ! if test "${ac_cv_func_gettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF --- 14875,14889 ---- fi ! ! ! ! for ac_func in gettext getpid getppid ! 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 *************** *** 11143,11154 **** cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! /* Define gettext to an innocuous variant, in case declares gettext. For example, HP-UX 11i declares gettimeofday. */ ! #define gettext innocuous_gettext /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char gettext (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ --- 14892,14903 ---- 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. */ *************** *** 11158,11164 **** # include #endif ! #undef gettext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC --- 14907,14913 ---- # 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 *************** *** 11166,11183 **** #ifdef __cplusplus extern "C" #endif ! char gettext (); /* 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_gettext || defined __stub___gettext choke me #endif int main () { ! return gettext (); ; return 0; } --- 14915,14932 ---- #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; } *************** *** 11216,11240 **** ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_gettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_func_gettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi ! { echo "$as_me:$LINENO: result: $ac_cv_func_gettext" >&5 ! echo "${ECHO_T}$ac_cv_func_gettext" >&6; } ! if test $ac_cv_func_gettext = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAS_GETTEXT 1 _ACEOF fi { echo "$as_me:$LINENO: checking for inet_pton" >&5 echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; } --- 14965,14991 ---- ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; 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$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 { echo "$as_me:$LINENO: checking for inet_pton" >&5 echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; } *************** *** 11548,11556 **** fi ! { echo "$as_me:$LINENO: checking for setpgrp" >&5 ! echo $ECHO_N "checking for setpgrp... $ECHO_C" >&6; } ! if test "${ac_cv_func_setpgrp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF --- 15299,15476 ---- fi ! ! for ac_header in vfork.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_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); } && ! { 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 ! 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_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); } >/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 ! 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_func in fork vfork ! 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 *************** *** 11559,11570 **** cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! /* Define setpgrp to an innocuous variant, in case declares setpgrp. For example, HP-UX 11i declares gettimeofday. */ ! #define setpgrp innocuous_setpgrp /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char setpgrp (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ --- 15479,15490 ---- 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. */ *************** *** 11574,11580 **** # include #endif ! #undef setpgrp /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC --- 15494,15500 ---- # 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 *************** *** 11582,11599 **** #ifdef __cplusplus extern "C" #endif ! char setpgrp (); /* 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_setpgrp || defined __stub___setpgrp choke me #endif int main () { ! return setpgrp (); ; return 0; } --- 15502,15519 ---- #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; } *************** *** 11632,11666 **** ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_setpgrp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_func_setpgrp=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi ! { echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp" >&5 ! echo "${ECHO_T}$ac_cv_func_setpgrp" >&6; } ! if test $ac_cv_func_setpgrp = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAS_SETPGRP 1 _ACEOF fi ! { echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5 ! echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6; } ! if test "${ac_cv_func_setpgrp_void+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ! { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5 ! echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;} ! { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ --- 15552,15587 ---- ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; 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$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 ! if test "x$ac_cv_func_fork" = xyes; then ! { echo "$as_me:$LINENO: checking for working fork" >&5 ! echo $ECHO_N "checking for working fork... $ECHO_C" >&6; } ! if test "${ac_cv_func_fork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ! ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ *************** *** 11672,11681 **** int main () { ! /* If this system has a BSD-style setpgrp which takes arguments, ! setpgrp(1, 1) will fail with ESRCH and return -1, in that case ! exit successfully. */ ! return setpgrp (1,1) != -1; ; return 0; } --- 15593,15602 ---- int main () { ! ! /* By Ruediger Kuhlmann. */ ! return fork () < 0; ! ; return 0; } *************** *** 11700,11733 **** ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_setpgrp_void=no 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_func_setpgrp_void=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! { echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5 ! echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6; } ! if test $ac_cv_func_setpgrp_void = yes; then cat >>confdefs.h <<\_ACEOF ! #define SETPGRP_VOID 1 _ACEOF fi ! for ac_func in getuid geteuid seteuid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 --- 15621,15834 ---- ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_fork_works=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_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! { echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 ! echo "${ECHO_T}$ac_cv_func_fork_works" >&6; } ! ! else ! ac_cv_func_fork_works=$ac_cv_func_fork ! fi ! if test "x$ac_cv_func_fork_works" = xcross; then ! case $host in ! *-*-amigaos* | *-*-msdosdjgpp*) ! # Override, as these systems have only a dummy fork() stub ! ac_cv_func_fork_works=no ! ;; ! *) ! ac_cv_func_fork_works=yes ! ;; ! esac ! { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 ! echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} ! fi ! ac_cv_func_vfork_works=$ac_cv_func_vfork ! if test "x$ac_cv_func_vfork" = xyes; then ! { echo "$as_me:$LINENO: checking for working vfork" >&5 ! echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; } ! if test "${ac_cv_func_vfork_works+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test "$cross_compiling" = yes; then ! ac_cv_func_vfork_works=cross ! else ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! /* Thanks to Paul Eggert for this test. */ ! $ac_includes_default ! #include ! #if HAVE_VFORK_H ! # include ! #endif ! /* On some sparc systems, changes by the child to local and incoming ! argument registers are propagated back to the parent. The compiler ! is told about this with #include , but some compilers ! (e.g. gcc -O) don't grok . Test for this by using a ! static variable whose address is put into a register that is ! clobbered by the vfork. */ ! static void ! #ifdef __cplusplus ! sparc_address_test (int arg) ! # else ! sparc_address_test (arg) int arg; ! #endif ! { ! static pid_t child; ! if (!child) { ! child = vfork (); ! if (child < 0) { ! perror ("vfork"); ! _exit(2); ! } ! if (!child) { ! arg = getpid(); ! write(-1, "", 0); ! _exit (arg); ! } ! } ! } ! ! int ! main () ! { ! pid_t parent = getpid (); ! pid_t child; ! ! sparc_address_test (0); ! ! child = vfork (); ! ! if (child == 0) { ! /* Here is another test for sparc vfork register problems. This ! test uses lots of local variables, at least as many local ! variables as main has allocated so far including compiler ! temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris ! 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should ! reuse the register of parent for one of the local variables, ! since it will think that parent can't possibly be used any more ! in this routine. Assigning to the local variable will thus ! munge parent in the parent process. */ ! pid_t ! p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), ! p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); ! /* Convince the compiler that p..p7 are live; otherwise, it might ! use the same hardware register for all 8 local variables. */ ! if (p != p1 || p != p2 || p != p3 || p != p4 ! || p != p5 || p != p6 || p != p7) ! _exit(1); ! ! /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent ! from child file descriptors. If the child closes a descriptor ! before it execs or exits, this munges the parent's descriptor ! as well. Test for this by closing stdout in the child. */ ! _exit(close(fileno(stdout)) != 0); ! } else { ! int status; ! struct stat st; ! ! while (wait(&status) != child) ! ; ! return ( ! /* Was there some problem with vforking? */ ! child < 0 ! ! /* Did the child fail? (This shouldn't happen.) */ ! || status ! ! /* Did the vfork/compiler bug occur? */ ! || parent != getpid() ! ! /* Did the file descriptor bug occur? */ ! || fstat(fileno(stdout), &st) != 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_link") 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./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 ! ac_cv_func_vfork_works=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_func_vfork_works=no ! fi ! rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ! fi ! ! ! fi ! { echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 ! echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; } ! ! fi; ! if test "x$ac_cv_func_fork_works" = xcross; then ! ac_cv_func_vfork_works=$ac_cv_func_vfork ! { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 ! echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} ! fi ! ! if test "x$ac_cv_func_vfork_works" = xyes; then cat >>confdefs.h <<\_ACEOF ! #define HAVE_WORKING_VFORK 1 ! _ACEOF ! ! else ! ! cat >>confdefs.h <<\_ACEOF ! #define vfork fork _ACEOF fi + if test "x$ac_cv_func_fork_works" = xyes; then + cat >>confdefs.h <<\_ACEOF + #define HAVE_WORKING_FORK 1 + _ACEOF + fi ! ! ! for ac_func in setsid setpgid setpgrp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 *************** *** 11836,11921 **** fi done ! ! ! for ac_func in getpriority setpriority ! 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_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_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; --- 15937,15982 ---- fi done ! if test $ac_cv_func_setpgrp = yes; then ! { echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5 ! echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6; } ! if test "${ac_cv_func_setpgrp_void+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5 + echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;} + { (exit 1); exit 1; }; } + else 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 int main () { ! /* If this system has a BSD-style setpgrp which takes arguments, ! setpgrp(1, 1) will fail with ESRCH and return -1, in that case ! exit successfully. */ ! return setpgrp (1,1) != -1; ; 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_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; *************** *** 11925,11955 **** ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; 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$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 ! { echo "$as_me:$LINENO: checking for sigaction" >&5 ! echo $ECHO_N "checking for sigaction... $ECHO_C" >&6; } ! if test "${ac_cv_func_sigaction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF --- 15986,16029 ---- ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_setpgrp_void=no 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_func_setpgrp_void=yes ! fi ! rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi ! fi ! { echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5 ! echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6; } ! if test $ac_cv_func_setpgrp_void = yes; then ! ! cat >>confdefs.h <<\_ACEOF ! #define SETPGRP_VOID 1 _ACEOF fi ! fi ! ! ! ! ! ! ! ! for ac_func in cbrt getuid geteuid seteuid getpriority setpriority socketpair ! 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 *************** *** 11958,11969 **** cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! /* Define sigaction to an innocuous variant, in case declares sigaction. For example, HP-UX 11i declares gettimeofday. */ ! #define sigaction innocuous_sigaction /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char sigaction (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ --- 16032,16043 ---- 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. */ *************** *** 11973,11979 **** # include #endif ! #undef sigaction /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC --- 16047,16053 ---- # 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 *************** *** 11981,11998 **** #ifdef __cplusplus extern "C" #endif ! char sigaction (); /* 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_sigaction || defined __stub___sigaction choke me #endif int main () { ! return sigaction (); ; return 0; } --- 16055,16072 ---- #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; } *************** *** 12031,12059 **** ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_sigaction=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_func_sigaction=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi ! { echo "$as_me:$LINENO: result: $ac_cv_func_sigaction" >&5 ! echo "${ECHO_T}$ac_cv_func_sigaction" >&6; } ! if test $ac_cv_func_sigaction = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAS_SIGACTION 1 _ACEOF fi ! { echo "$as_me:$LINENO: checking for sigprocmask" >&5 ! echo $ECHO_N "checking for sigprocmask... $ECHO_C" >&6; } ! if test "${ac_cv_func_sigprocmask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF --- 16105,16142 ---- ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; 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$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 sigaction sigprocmask imaxdiv kqueue ! 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 *************** *** 12062,12073 **** cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! /* Define sigprocmask to an innocuous variant, in case declares sigprocmask. For example, HP-UX 11i declares gettimeofday. */ ! #define sigprocmask innocuous_sigprocmask /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char sigprocmask (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ --- 16145,16156 ---- 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. */ *************** *** 12077,12083 **** # include #endif ! #undef sigprocmask /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC --- 16160,16166 ---- # 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 *************** *** 12085,12102 **** #ifdef __cplusplus extern "C" #endif ! char sigprocmask (); /* 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_sigprocmask || defined __stub___sigprocmask choke me #endif int main () { ! return sigprocmask (); ; return 0; } --- 16168,16185 ---- #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; } *************** *** 12135,12159 **** ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_sigprocmask=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_func_sigprocmask=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi ! { echo "$as_me:$LINENO: result: $ac_cv_func_sigprocmask" >&5 ! echo "${ECHO_T}$ac_cv_func_sigprocmask" >&6; } ! if test $ac_cv_func_sigprocmask = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAS_SIGPROCMASK 1 _ACEOF fi --- 16218,16244 ---- ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; 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$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 *************** *** 12440,12448 **** fi ! { echo "$as_me:$LINENO: checking for socketpair" >&5 ! echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; } ! if test "${ac_cv_func_socketpair+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF --- 16525,16536 ---- fi ! for ac_func in _vsnprintf_s ! 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 *************** *** 12451,12462 **** cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! /* Define socketpair to an innocuous variant, in case declares socketpair. For example, HP-UX 11i declares gettimeofday. */ ! #define socketpair innocuous_socketpair /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char socketpair (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ --- 16539,16550 ---- 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. */ *************** *** 12466,12472 **** # include #endif ! #undef socketpair /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC --- 16554,16560 ---- # 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 *************** *** 12474,12491 **** #ifdef __cplusplus extern "C" #endif ! char socketpair (); /* 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_socketpair || defined __stub___socketpair choke me #endif int main () { ! return socketpair (); ; return 0; } --- 16562,16579 ---- #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; } *************** *** 12524,12554 **** ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_socketpair=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_func_socketpair=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi ! { echo "$as_me:$LINENO: result: $ac_cv_func_socketpair" >&5 ! echo "${ECHO_T}$ac_cv_func_socketpair" >&6; } ! if test $ac_cv_func_socketpair = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAS_SOCKETPAIR 1 _ACEOF fi - # Assume that the strn versions are also there if these are ! for ac_func in strcasecmp _stricmp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 --- 16612,16646 ---- ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; 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$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 strcasecmp strncasecmp _stricmp _strnicmp strdup do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 *************** *** 12657,12767 **** fi done - - { echo "$as_me:$LINENO: checking for strdup" >&5 - echo $ECHO_N "checking for strdup... $ECHO_C" >&6; } - if test "${ac_cv_func_strdup+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 strdup to an innocuous variant, in case declares strdup. - For example, HP-UX 11i declares gettimeofday. */ - #define strdup innocuous_strdup - - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char strdup (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - - #ifdef __STDC__ - # include - #else - # include - #endif - - #undef strdup - - /* 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 strdup (); - /* 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_strdup || defined __stub___strdup - choke me - #endif - - int - main () - { - return strdup (); - ; - 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); } && - { 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 - ac_cv_func_strdup=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_strdup=no - fi - - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - { echo "$as_me:$LINENO: result: $ac_cv_func_strdup" >&5 - echo "${ECHO_T}$ac_cv_func_strdup" >&6; } - if test $ac_cv_func_strdup = yes; then - cat >>confdefs.h <<\_ACEOF - #define HAS_STRDUP 1 - _ACEOF - - fi - { echo "$as_me:$LINENO: checking for working strcoll" >&5 echo $ECHO_N "checking for working strcoll... $ECHO_C" >&6; } if test "${ac_cv_func_strcoll_works+set}" = set; then --- 16749,16754 ---- *************** *** 12831,12839 **** fi ! { echo "$as_me:$LINENO: checking for strxfrm" >&5 ! echo $ECHO_N "checking for strxfrm... $ECHO_C" >&6; } ! if test "${ac_cv_func_strxfrm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF --- 16818,16834 ---- fi ! ! ! ! ! ! for ac_func in strxfrm _strncoll _stricoll _strnicoll strdup ! 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 *************** *** 12842,12853 **** cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! /* Define strxfrm to an innocuous variant, in case declares strxfrm. For example, HP-UX 11i declares gettimeofday. */ ! #define strxfrm innocuous_strxfrm /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char strxfrm (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ --- 16837,16848 ---- 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. */ *************** *** 12857,12863 **** # include #endif ! #undef strxfrm /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC --- 16852,16858 ---- # 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 *************** *** 12865,12882 **** #ifdef __cplusplus extern "C" #endif ! char strxfrm (); /* 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_strxfrm || defined __stub___strxfrm choke me #endif int main () { ! return strxfrm (); ; return 0; } --- 16860,16877 ---- #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; } *************** *** 12915,12939 **** ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_strxfrm=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_func_strxfrm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi ! { echo "$as_me:$LINENO: result: $ac_cv_func_strxfrm" >&5 ! echo "${ECHO_T}$ac_cv_func_strxfrm" >&6; } ! if test $ac_cv_func_strxfrm = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAS_STRXFRM 1 _ACEOF fi { echo "$as_me:$LINENO: checking for sysconf" >&5 echo $ECHO_N "checking for sysconf... $ECHO_C" >&6; } --- 16910,16936 ---- ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; 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$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 { echo "$as_me:$LINENO: checking for sysconf" >&5 echo $ECHO_N "checking for sysconf... $ECHO_C" >&6; } *************** *** 13144,13152 **** fi ! { echo "$as_me:$LINENO: checking for waitpid" >&5 ! echo $ECHO_N "checking for waitpid... $ECHO_C" >&6; } ! if test "${ac_cv_func_waitpid+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF --- 17141,17153 ---- fi ! ! for ac_func in waitpid ! 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 *************** *** 13155,13166 **** cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! /* Define waitpid to an innocuous variant, in case declares waitpid. For example, HP-UX 11i declares gettimeofday. */ ! #define waitpid innocuous_waitpid /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char waitpid (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ --- 17156,17167 ---- 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. */ *************** *** 13170,13176 **** # include #endif ! #undef waitpid /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC --- 17171,17177 ---- # 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 *************** *** 13178,13195 **** #ifdef __cplusplus extern "C" #endif ! char waitpid (); /* 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_waitpid || defined __stub___waitpid choke me #endif int main () { ! return waitpid (); ; return 0; } --- 17179,17196 ---- #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; } *************** *** 13228,13253 **** ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ! ac_cv_func_waitpid=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ! ac_cv_func_waitpid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi ! { echo "$as_me:$LINENO: result: $ac_cv_func_waitpid" >&5 ! echo "${ECHO_T}$ac_cv_func_waitpid" >&6; } ! if test $ac_cv_func_waitpid = yes; then ! cat >>confdefs.h <<\_ACEOF ! #define HAS_WAITPID 1 _ACEOF else ! { echo "$as_me:$LINENO: checking checking for union wait" >&5 echo $ECHO_N "checking checking for union wait... $ECHO_C" >&6; } { echo "$as_me:$LINENO: checking for union wait" >&5 echo $ECHO_N "checking for union wait... $ECHO_C" >&6; } --- 17229,17371 ---- ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; 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$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 + + + if test $ac_cv_func_waitpid = no; then + + + + for ac_func in wait3 wait + 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_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_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 ! 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$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 ! ! { echo "$as_me:$LINENO: checking checking for union wait" >&5 echo $ECHO_N "checking checking for union wait... $ECHO_C" >&6; } { echo "$as_me:$LINENO: checking for union wait" >&5 echo $ECHO_N "checking for union wait... $ECHO_C" >&6; } *************** *** 13261,13269 **** cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default ! #ifdef I_SYS_WAIT ! #include ! #endif typedef union wait ac__type_new_; --- 17379,17387 ---- cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default ! #ifdef I_SYS_WAIT ! #include ! #endif typedef union wait ac__type_new_; *************** *** 13334,13348 **** #define UNION_WAIT 1 _ACEOF ! { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi - fi ### Variables, constants, defines and other misc. stuff --- 17452,17466 ---- #define UNION_WAIT 1 _ACEOF ! { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi + fi ### Variables, constants, defines and other misc. stuff *************** *** 13442,13447 **** --- 17560,17653 ---- + { echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5 + echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6; } + if test "${ac_cv_type_struct_sockaddr_in6+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. */ + $ac_includes_default + #ifdef I_NETINET_IN + #include + #endif + + + typedef struct sockaddr_in6 ac__type_new_; + int + main () + { + if ((ac__type_new_ *) 0) + return 0; + if (sizeof (ac__type_new_)) + return 0; + ; + return 0; + } + _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_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); } && + { 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 + ac_cv_type_struct_sockaddr_in6=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_struct_sockaddr_in6=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5 + echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6; } + if test $ac_cv_type_struct_sockaddr_in6 = yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_STRUCT_SOCKADDR_IN6 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_SOCKADDR_IN6 1 + _ACEOF + + fi + + # Will toupper()ing an already uppercase character be a problem? { echo "$as_me:$LINENO: checking if it is safe to toupper uppers" >&5 echo $ECHO_N "checking if it is safe to toupper uppers... $ECHO_C" >&6; } *************** *** 14422,14427 **** --- 18628,18634 ---- ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim + GDB!$GDB$ac_delim CHMOD!$CHMOD$ac_delim CP!$CP$ac_delim ECHO!$ECHO$ac_delim *************** *** 14452,14460 **** POSTGRESQL_VERSION!$POSTGRESQL_VERSION$ac_delim POSTGRESQL_CFLAGS!$POSTGRESQL_CFLAGS$ac_delim POSTGRESQL_LDFLAGS!$POSTGRESQL_LDFLAGS$ac_delim - CXX!$CXX$ac_delim - CXXFLAGS!$CXXFLAGS$ac_delim - ac_ct_CXX!$ac_ct_CXX$ac_delim SQLITE3_CFLAGS!$SQLITE3_CFLAGS$ac_delim SQLITE3_LDFLAGS!$SQLITE3_LDFLAGS$ac_delim SQLITE3_VERSION!$SQLITE3_VERSION$ac_delim --- 18659,18664 ---- *************** *** 14462,14468 **** LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF ! 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 --- 18666,18672 ---- LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF ! if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 81; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 Index: Makefile.in =================================================================== *** Makefile.in (.../p2) (revision 920) --- Makefile.in (.../p3) (revision 920) *************** *** 2,7 **** --- 2,10 ---- # - System configuration - # + VERSION=1.8.3 + PATCHLEVEL=3 + # # This section of the file should be automatically configured by # the Configure script. If it doesn't work, you might try starting *************** *** 43,54 **** @echo "Run that first. If you did just run configure and" @echo "it said that config.h was unchanged, 'touch config.h'" @echo "to suppress this message and continue compiling." ! exit 1 options.h: options.h.dist @echo "Please use 'make update' to update your options.h file from options.h.dist" @echo "You must cp options.h.dist to options.h and edit it." ! exit 1 autogen: hdrs/cmds.h hdrs/funs.h hdrs/switches.h --- 46,57 ---- @echo "Run that first. If you did just run configure and" @echo "it said that config.h was unchanged, 'touch config.h'" @echo "to suppress this message and continue compiling." ! @exit 1 options.h: options.h.dist @echo "Please use 'make update' to update your options.h file from options.h.dist" @echo "You must cp options.h.dist to options.h and edit it." ! @exit 1 autogen: hdrs/cmds.h hdrs/funs.h hdrs/switches.h *************** *** 92,101 **** (cd src; make portmsg "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \ "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" ) - announce: - (cd src; make announce "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \ - "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" ) - ssl_slave: (cd src; make ssl_slave "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \ "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" "MAKE=$(MAKE)" \ --- 95,100 ---- *************** *** 124,132 **** indent: @(cd src; make indent) - protoize: - (cd src; make protoize "CCFLAGS=$(CCFLAGS)") - customize: update-conf -@@PERL@ utils/customize.pl --- 123,128 ---- *************** *** 176,184 **** distclean: (cd hdrs; rm -f *.orig *~ \#* *.rej *.bak funs.h cmds.h buildinf.h patches.h) ! (cd utils; rm -f *.orig *~ \#* *.rej *.bak mkcmds.sh) (cd game; rm -rf *.log netmush info_slave *.orig *.rej *~ *.bak mush.cnf) - (cd os2; rm -rf *.rej *.orig *~ *.bak) (cd src; make distclean; rm -f Makefile) (cd game/txt; make clean) (rm -rf .config Makefile config.h config.sh options.h) --- 172,179 ---- distclean: (cd hdrs; rm -f *.orig *~ \#* *.rej *.bak funs.h cmds.h buildinf.h patches.h) ! (cd utils; rm -f *.orig *~ \#* *.rej *.bak mkcmds.sh *.o) (cd game; rm -rf *.log netmush info_slave *.orig *.rej *~ *.bak mush.cnf) (cd src; make distclean; rm -f Makefile) (cd game/txt; make clean) (rm -rf .config Makefile config.h config.sh options.h) *************** *** 188,206 **** (cd src; rm -rf *.rej) -rm -f Makefile - distci: distclean ci-src ci-game - - ci-src: - -(yes . | ci -l -f -N$(NAME) FAQ* BUGS COPY* CHANGE* READ* MANIFEST \ - Configure utils/* Makefile.SH Patchlevel config_h.SH confmagic.h \ - *.dist src/Makefile src/SWITCHES src/*.c src/*.dst \ - hdrs/* hints/* os2/*) - - ci-game: - -(yes . | ci -l -f -N$(NAME) game/restart game/mushcnf.dst \ - game/access.README \ - game/txt/* game/txt/nws/* game/txt/evt/* game/txt/hlp/* ) - diffs: @make indent > /dev/null 2>&1 @make versions > /dev/null 2>&1 --- 183,188 ---- *************** *** 208,216 **** @make autogen > /dev/null 2>&1 @(prcs diff -r$(VS) -N pennmush `cat MANIFEST` | grep -v 'Index:') - checkin: versions autogen - @prcs checkin - commit: indent @svn commit --- 190,195 ---- *************** *** 224,248 **** ctags: (cd src; make ctags) - dist.tar.Z: distclean dist.tar - compress /tmp/dist.tar - - dist.tar.gz: distclean dist.tar - gzip /tmp/dist.tar - touchswitches: @@TOUCH@ src/SWITCHES ! dist.tar: indent distclean versions touchswitches autogen ! makedist -c pennmush ! tar -cvf /tmp/dist.tar pennmush ! -pgp -sb /tmp/dist.tar ! -rm -rf pennmush ! ! CSRImalloc.tar.Z: ! (cd src/CSRI; make clean) ! (tar -cvFFf /tmp/CSRImalloc.tar `cat exclude.tar`) ! compress /tmp/CSRImalloc.tar globalinstall: install (cd game/txt; make clean compose.sh) --- 203,223 ---- ctags: (cd src; make ctags) touchswitches: @@TOUCH@ src/SWITCHES ! dist.tar: ! svn checkout svn+ssh://svn.pennmush.org/svn/pennmush/$(VERSION)/trunk ! sed -e "s#^#pennmush-$(VERSION)p$(PATCHLEVEL)/#" < trunk/MANIFEST \ ! > DISTFILES ! mv -f trunk pennmush-$(VERSION)p$(PATCHLEVEL) ! tar -cvf dist.tar --files-from=DISTFILES ! -gpg -sb /tmp/dist.tar ! bzip2 -k /tmp/dist.tar ! openssl dgst -sha1 -out /tmp/dist.tar.bz2.sha1 /tmp/dist.tar.bz2 ! gzip -k /tmp/dist.tar ! openssl dgst -sha1 -out /tmp/dist.tar.gz.sha1 /tmp/dist.tar.gz ! -rm -rf pennmush-$(VERSION)p$(PATCHLEVEL) DISTFILES globalinstall: install (cd game/txt; make clean compose.sh) Index: hints/freebsd.txt =================================================================== *** hints/freebsd.txt (.../p2) (revision 920) --- hints/freebsd.txt (.../p3) (revision 920) *************** *** 5,7 **** --- 5,8 ---- 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. + Index: hints/linux.txt =================================================================== *** hints/linux.txt (.../p2) (revision 920) --- hints/linux.txt (.../p3) (revision 920) *************** *** 2,5 **** distributions. Exceptions are listed below: ! * SuSE 9.X reportedly needs CFLAGS=-D__USE_POSIX \ No newline at end of file --- 2,6 ---- distributions. Exceptions are listed below: ! * SuSE 9.X reportedly needs CFLAGS=-D__USE_POSIX ! Index: src/mysocket.c =================================================================== *** src/mysocket.c (.../p2) (revision 920) --- src/mysocket.c (.../p3) (revision 920) *************** *** 95,109 **** #include "ident.h" #include "confmagic.h" - #ifndef __ptr_t - #if defined (__cplusplus) || (defined (__STDC__) && __STDC__) - #define __ptr_t void * - #else - #define __ptr_t char * - #endif - #endif - - #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), --- 95,100 ---- *************** *** 120,126 **** static char port[NI_MAXSERV]; if (getnameinfo(host, len, hostname, sizeof hostname, port, sizeof port, ! (USE_DNS ? 0 : NI_NUMERICHOST) | NI_NUMERICSERV) != 0) { return NULL; } hi.hostname = hostname; --- 111,117 ---- static char port[NI_MAXSERV]; if (getnameinfo(host, len, hostname, sizeof hostname, port, sizeof port, ! (USE_DNS ? 0 : NI_NUMERICHOST) | NI_NUMERICSERV) != 0) { return NULL; } hi.hostname = hostname; *************** *** 141,158 **** static char port[NI_MAXSERV]; if (getnameinfo(host, len, hostname, sizeof hostname, port, sizeof port, ! NI_NUMERICHOST | NI_NUMERICSERV) != 0) { return NULL; } hi.hostname = hostname; hi.port = port; return &hi; } ! #endif /* INFOSLAVE */ ! /** Open a tcp connection to a given host and port. Basically * tcp_connect from UNPv1 * \param host hostname or ip address to connect to, as a string. * \param myiterface pointer to sockaddr structure for specific interface. * \param myilen length of myiterface * \param port port to connect to. --- 132,150 ---- static char port[NI_MAXSERV]; if (getnameinfo(host, len, hostname, sizeof hostname, port, sizeof port, ! NI_NUMERICHOST | NI_NUMERICSERV) != 0) { return NULL; } hi.hostname = hostname; hi.port = port; return &hi; } ! #endif /* INFOSLAVE */ ! /** Open a connection to a given host and port. Basically * tcp_connect from UNPv1 * \param host hostname or ip address to connect to, as a string. + * \param socktype The type of socket - SOCK_STREAM or SOCK_DGRAM * \param myiterface pointer to sockaddr structure for specific interface. * \param myilen length of myiterface * \param port port to connect to. *************** *** 160,167 **** * \return file descriptor for connected socket, or -1 for failure. */ int ! make_socket_conn(const char *host, struct sockaddr *myiterface, ! socklen_t myilen, Port_t port, int *timeout) { struct addrinfo hints, *server, *save; char cport[NI_MAXSERV]; --- 152,159 ---- * \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) { struct addrinfo hints, *server, *save; char cport[NI_MAXSERV]; *************** *** 170,178 **** int err; memset(&hints, 0, sizeof(struct addrinfo)); ! hints.ai_flags = AI_PASSIVE; ! hints.ai_family = AF_UNSPEC; /* Try to use IPv6 if available */ ! hints.ai_socktype = SOCK_STREAM; sprintf(cport, "%hu", port); --- 162,169 ---- int err; memset(&hints, 0, sizeof(struct addrinfo)); ! hints.ai_family = AF_UNSPEC; /* Try to use IPv6 if available */ ! hints.ai_socktype = socktype; sprintf(cport, "%hu", port); *************** *** 196,209 **** if (s < 0) continue; ! if (myiterface && myilen > 0) { ! /* Bind to a specific interface. Needed for ident lookups */ if (bind(s, myiterface, myilen) < 0) ! perror("bind failed (Possibly harmless)"); } if ((err = connect_nonb(s, server->ai_addr, server->ai_addrlen, timeout)) == ! 0) break; #ifdef DEBUG --- 187,202 ---- if (s < 0) continue; ! if (myiterface && myilen > 0 && myiterface->sa_family == server->ai_family) { ! /* Bind to a specific interface. Don't even try for the case of ! * 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)"); } if ((err = connect_nonb(s, server->ai_addr, server->ai_addrlen, timeout)) == ! 0) break; #ifdef DEBUG *************** *** 234,250 **** return s; } ! /** Start listening to TCP on a given port. Basically tcp_listen * from UNPv1 * \param port port to listen on. * \param addr pointer to sockaddr to copy address data to. * \param len length of addr. * \param host hostname or address to listen on, as a string. * \return file descriptor of listening socket, or -1 for failure. */ int ! make_socket(Port_t port, union sockaddr_u *addr, socklen_t * len, ! const char *host) { int s, opt, ipv = 4; /* Use getaddrinfo() to fill in the sockaddr fields. This --- 227,245 ---- return s; } ! ! /** Start listening on a given port. Basically tcp_listen * from UNPv1 * \param port port to listen on. + * \param socktype the type of socket - SOCK_STREAM or SOCK_DGRAM * \param addr pointer to sockaddr to copy address data to. * \param len length of addr. * \param host hostname or address to listen on, as a string. * \return file descriptor of listening socket, or -1 for failure. */ int ! make_socket(Port_t port, int socktype, union sockaddr_u *addr, socklen_t * len, ! const char *host) { int s, opt, ipv = 4; /* Use getaddrinfo() to fill in the sockaddr fields. This *************** *** 253,272 **** * Unix Network Programming, vol 1. If getaddrinfo() isn't * present on the system, we'll use our own version, also from UNPv1. */ struct addrinfo *server, *save, hints; ! char cport[NI_MAXSERV]; int res; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_flags = AI_PASSIVE; #ifdef FORCE_IPV4 ! hints.ai_family = AF_INET; /* OpenBSD apparently doesn't properly ! map IPv4 connections to IPv6 servers. */ #else ! hints.ai_family = AF_UNSPEC; /* Try to use IPv6 if available */ #endif ! hints.ai_socktype = SOCK_STREAM; ! sprintf(cport, "%hu", port); if (strlen(host) == 0) host = NULL; --- 248,271 ---- * Unix Network Programming, vol 1. If getaddrinfo() isn't * present on the system, we'll use our own version, also from UNPv1. */ struct addrinfo *server, *save, hints; ! char portbuf[NI_MAXSERV], *cport; int res; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_flags = AI_PASSIVE; #ifdef FORCE_IPV4 ! hints.ai_family = AF_INET; /* OpenBSD apparently doesn't properly ! map IPv4 connections to IPv6 servers. */ #else ! hints.ai_family = AF_UNSPEC; /* Try to use IPv6 if available */ #endif ! hints.ai_socktype = socktype; ! if (port > 0) { ! sprintf(portbuf, "%hu", port); ! cport = portbuf; ! } else ! cport = NULL; if (strlen(host) == 0) host = NULL; *************** *** 296,302 **** } if (bind(s, server->ai_addr, server->ai_addrlen) == 0) ! break; /* Success */ perror("binding stream socket (Possibly ignorable)"); closesocket(s); --- 295,301 ---- } if (bind(s, server->ai_addr, server->ai_addrlen) == 0) ! break; /* Success */ perror("binding stream socket (Possibly ignorable)"); closesocket(s); *************** *** 344,350 **** } if (fcntl(s, F_SETFL, flags | O_NDELAY) == -1) { ! #endif /* WIN32 */ perror("make_nonblocking: fcntl"); #ifndef INFOSLAVE mush_panic("O_NDELAY fcntl failed"); --- 343,349 ---- } if (fcntl(s, F_SETFL, flags | O_NDELAY) == -1) { ! #endif /* WIN32 */ perror("make_nonblocking: fcntl"); #ifndef INFOSLAVE mush_panic("O_NDELAY fcntl failed"); *************** *** 371,377 **** /* enable TCP keepalive */ if (setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, ! (void *) &keepalive, sizeof(keepalive)) == -1) fprintf(stderr, "[%d] could not set SO_KEEPALIVE: errno %d", s, errno); /* And set the ping time to something reasonable instead of the --- 370,376 ---- /* enable TCP keepalive */ if (setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, ! (void *) &keepalive, sizeof(keepalive)) == -1) fprintf(stderr, "[%d] could not set SO_KEEPALIVE: errno %d", s, errno); /* And set the ping time to something reasonable instead of the *************** *** 379,389 **** this. OS X and possibly others use TCP_KEEPALIVE. */ #if defined(TCP_KEEPIDLE) if (setsockopt(s, IPPROTO_TCP, TCP_KEEPIDLE, ! (void *) &keepidle, sizeof(keepidle)) == -1) fprintf(stderr, "[%d] could not set TCP_KEEPIDLE: errno %d", s, errno); #elif defined(TCP_KEEPALIVE) if (setsockopt(s, IPPROTO_TCP, TCP_KEEPALIVE, ! (void *) &keepidle, sizeof(keepidle)) == -1) fprintf(stderr, "[%d] could not set TCP_KEEPALIVE: errno %d", s, errno); #endif #endif --- 378,388 ---- this. OS X and possibly others use TCP_KEEPALIVE. */ #if defined(TCP_KEEPIDLE) if (setsockopt(s, IPPROTO_TCP, TCP_KEEPIDLE, ! (void *) &keepidle, sizeof(keepidle)) == -1) fprintf(stderr, "[%d] could not set TCP_KEEPIDLE: errno %d", s, errno); #elif defined(TCP_KEEPALIVE) if (setsockopt(s, IPPROTO_TCP, TCP_KEEPALIVE, ! (void *) &keepidle, sizeof(keepidle)) == -1) fprintf(stderr, "[%d] could not set TCP_KEEPALIVE: errno %d", s, errno); #endif #endif *************** *** 406,412 **** */ int connect_nonb(int sockfd, const struct sockaddr *saptr, socklen_t salen, ! int *timeout) { int n, error; time_t start, end; --- 405,411 ---- */ int connect_nonb(int sockfd, const struct sockaddr *saptr, socklen_t salen, ! int *timeout) { int n, error; time_t start, end; *************** *** 438,444 **** time(&start); if ((n = select(sockfd + 1, &rset, &wset, NULL, &tval)) == 0) { ! closesocket(sockfd); /* timeout */ errno = ETIMEDOUT; return -1; } --- 437,443 ---- time(&start); if ((n = select(sockfd + 1, &rset, &wset, NULL, &tval)) == 0) { ! closesocket(sockfd); /* timeout */ errno = ETIMEDOUT; return -1; } *************** *** 449,463 **** if (FD_ISSET(sockfd, &rset) || FD_ISSET(sockfd, &wset)) { len = sizeof(error); ! if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (__ptr_t) & error, &len) < 0) ! return -1; /* Solaris pending error */ } else return -1; done: if (error) { ! closesocket(sockfd); /* just in case */ errno = error; return -1; } --- 448,462 ---- 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 */ } else return -1; done: if (error) { ! closesocket(sockfd); /* just in case */ errno = error; return -1; } *************** *** 502,508 **** #define INT16SZ 2 #ifndef AF_INET6 ! #define AF_INET6 AF_MAX+1 /* just to let this compile */ #endif /* --- 501,507 ---- #define INT16SZ 2 #ifndef AF_INET6 ! #define AF_INET6 AF_MAX+1 /* just to let this compile */ #endif /* *************** *** 598,611 **** for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) { if (words[i] == 0) { if (cur.base == -1) ! cur.base = i, cur.len = 1; else ! cur.len++; } else { if (cur.base != -1) { ! if (best.base == -1 || cur.len > best.len) ! best = cur; ! cur.base = -1; } } } --- 597,610 ---- for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) { if (words[i] == 0) { if (cur.base == -1) ! cur.base = i, cur.len = 1; else ! cur.len++; } else { if (cur.base != -1) { ! if (best.base == -1 || cur.len > best.len) ! best = cur; ! cur.base = -1; } } } *************** *** 624,630 **** /* Are we inside the best run of 0x00's? */ if (best.base != -1 && i >= best.base && i < (best.base + best.len)) { if (i == best.base) ! *tp++ = ':'; continue; } /* Are we following an initial run of 0x00s or any real hex? */ --- 623,629 ---- /* Are we inside the best run of 0x00's? */ if (best.base != -1 && i >= best.base && i < (best.base + best.len)) { if (i == best.base) ! *tp++ = ':'; continue; } /* Are we following an initial run of 0x00s or any real hex? */ *************** *** 632,640 **** *tp++ = ':'; /* Is this address an encapsulated IPv4? */ if (i == 6 && best.base == 0 && ! (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) { if (!inet_ntop4(src + 12, tp, sizeof tmp - (tp - tmp))) ! return (NULL); tp += strlen(tp); break; } --- 631,639 ---- *tp++ = ':'; /* Is this address an encapsulated IPv4? */ if (i == 6 && best.base == 0 && ! (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) { if (!inet_ntop4(src + 12, tp, sizeof tmp - (tp - tmp))) ! return (NULL); tp += strlen(tp); break; } *************** *** 738,753 **** unsigned int new = *tp * 10 + (pch - digits); if (new > 255) ! return (0); *tp = new; if (!saw_digit) { ! if (++octets > 4) ! return (0); ! saw_digit = 1; } } else if (ch == '.' && saw_digit) { if (octets == 4) ! return (0); *++tp = 0; saw_digit = 0; } else --- 737,752 ---- unsigned int new = *tp * 10 + (pch - digits); if (new > 255) ! return (0); *tp = new; if (!saw_digit) { ! if (++octets > 4) ! return (0); ! saw_digit = 1; } } else if (ch == '.' && saw_digit) { if (octets == 4) ! return (0); *++tp = 0; saw_digit = 0; } else *************** *** 802,821 **** val <<= 4; val |= (pch - xdigits); if (val > 0xffff) ! return (0); saw_xdigit = 1; continue; } if (ch == ':') { curtok = src; if (!saw_xdigit) { ! if (colonp) ! return (0); ! colonp = tp; ! continue; } if (tp + INT16SZ > endp) ! return (0); *tp++ = (unsigned char) (val >> 8) & 0xff; *tp++ = (unsigned char) val & 0xff; saw_xdigit = 0; --- 801,820 ---- val <<= 4; val |= (pch - xdigits); if (val > 0xffff) ! return (0); saw_xdigit = 1; continue; } if (ch == ':') { curtok = src; if (!saw_xdigit) { ! if (colonp) ! return (0); ! colonp = tp; ! continue; } if (tp + INT16SZ > endp) ! return (0); *tp++ = (unsigned char) (val >> 8) & 0xff; *tp++ = (unsigned char) val & 0xff; saw_xdigit = 0; *************** *** 825,831 **** if (ch == '.' && ((tp + INADDRSZ) <= endp) && inet_pton4(curtok, tp) > 0) { tp += INADDRSZ; saw_xdigit = 0; ! break; /* '\0' was seen by inet_pton4(). */ } return (0); } --- 824,830 ---- if (ch == '.' && ((tp + INADDRSZ) <= endp) && inet_pton4(curtok, tp) > 0) { tp += INADDRSZ; saw_xdigit = 0; ! break; /* '\0' was seen by inet_pton4(). */ } return (0); } *************** *** 859,865 **** #ifndef HAS_GETNAMEINFO static int gn_ipv46(char *, size_t, char *, size_t, void *, size_t, ! int, int, int); /* * Handle either an IPv4 or an IPv6 address and port. --- 858,864 ---- #ifndef HAS_GETNAMEINFO static int gn_ipv46(char *, size_t, char *, size_t, void *, size_t, ! int, int, int); /* * Handle either an IPv4 or an IPv6 address and port. *************** *** 868,874 **** /* include gn_ipv46 */ static int gn_ipv46(char *host, size_t hostlen, char *serv, size_t servlen, ! void *aptr, size_t alen, int family, int port, int flags) { char *ptr; struct hostent *hptr; --- 867,873 ---- /* include gn_ipv46 */ static int gn_ipv46(char *host, size_t hostlen, char *serv, size_t servlen, ! void *aptr, size_t alen, int family, int port, int flags) { char *ptr; struct hostent *hptr; *************** *** 876,900 **** if (hostlen > 0) { if (flags & NI_NUMERICHOST) { if (inet_ntop(family, aptr, host, hostlen) == NULL) ! return (1); } else { hptr = gethostbyaddr(aptr, alen, family); if (hptr != NULL && hptr->h_name != NULL) { ! if (flags & NI_NOFQDN) { ! if ((ptr = strchr(hptr->h_name, '.')) != NULL) ! *ptr = 0; /* overwrite first dot */ ! } #ifdef HAS_SNPRINTF ! snprintf(host, hostlen, "%s", hptr->h_name); #else ! strncpy(host, hptr->h_name, hostlen); ! host[hostlen - 1] = '\0'; #endif } else { ! if (flags & NI_NAMEREQD) ! return (1); ! if (inet_ntop(family, aptr, host, hostlen) == NULL) ! return (1); } } } --- 875,899 ---- if (hostlen > 0) { if (flags & NI_NUMERICHOST) { if (inet_ntop(family, aptr, host, hostlen) == NULL) ! return (1); } else { hptr = gethostbyaddr(aptr, alen, family); if (hptr != NULL && hptr->h_name != NULL) { ! if (flags & NI_NOFQDN) { ! if ((ptr = strchr(hptr->h_name, '.')) != NULL) ! *ptr = 0; /* overwrite first dot */ ! } #ifdef HAS_SNPRINTF ! snprintf(host, hostlen, "%s", hptr->h_name); #else ! strncpy(host, hptr->h_name, hostlen); ! host[hostlen - 1] = '\0'; #endif } else { ! if (flags & NI_NAMEREQD) ! return (1); ! if (inet_ntop(family, aptr, host, hostlen) == NULL) ! return (1); } } } *************** *** 925,931 **** /* include getnameinfo */ int getnameinfo(const struct sockaddr *sa, socklen_t salen, ! char *host, size_t hostlen, char *serv, size_t servlen, int flags) { switch (sa->sa_family) { --- 924,930 ---- /* include getnameinfo */ int getnameinfo(const struct sockaddr *sa, socklen_t salen, ! char *host, size_t hostlen, char *serv, size_t servlen, int flags) { switch (sa->sa_family) { *************** *** 934,951 **** struct sockaddr_in *sain = (struct sockaddr_in *) sa; return (gn_ipv46(host, hostlen, serv, servlen, ! &sain->sin_addr, sizeof(struct in_addr), ! AF_INET, sain->sin_port, flags)); } #endif ! #ifdef HAS_IPV6 case AF_INET6:{ struct sockaddr_in6 *sain = (struct sockaddr_in6 *) sa; return (gn_ipv46(host, hostlen, serv, servlen, ! &sain->sin6_addr, sizeof(struct in6_addr), ! AF_INET6, sain->sin6_port, flags)); } #endif --- 933,950 ---- struct sockaddr_in *sain = (struct sockaddr_in *) sa; return (gn_ipv46(host, hostlen, serv, servlen, ! &sain->sin_addr, sizeof(struct in_addr), ! AF_INET, sain->sin_port, flags)); } #endif ! #ifdef HAVE_SOCKADDR_IN6 case AF_INET6:{ struct sockaddr_in6 *sain = (struct sockaddr_in6 *) sa; return (gn_ipv46(host, hostlen, serv, servlen, ! &sain->sin6_addr, sizeof(struct in6_addr), ! AF_INET6, sain->sin6_port, flags)); } #endif *************** *** 962,973 **** /* include ga1 */ struct search { ! const char *host; /* hostname or address string */ ! int family; /* AF_xxx */ }; static int ga_aistruct(struct addrinfo ***, const struct addrinfo *, ! const void *, int); static struct addrinfo *ga_clone(struct addrinfo *); static int ga_echeck(const char *, const char *, int, int, int, int); static int ga_nsearch(const char *, const struct addrinfo *, struct search *); --- 961,972 ---- /* include ga1 */ struct search { ! const char *host; /* hostname or address string */ ! int family; /* AF_xxx */ }; static int ga_aistruct(struct addrinfo ***, const struct addrinfo *, ! const void *, int); static struct addrinfo *ga_clone(struct addrinfo *); static int ga_echeck(const char *, const char *, int, int, int, int); static int ga_nsearch(const char *, const struct addrinfo *, struct search *); *************** *** 977,983 **** int getaddrinfo(const char *hostname, const char *servname, ! const struct addrinfo *hintsp, struct addrinfo **result) { int rc, error, nsearch; char **ap, *canon; --- 976,982 ---- int getaddrinfo(const char *hostname, const char *servname, ! const struct addrinfo *hintsp, struct addrinfo **result) { int rc, error, nsearch; char **ap, *canon; *************** *** 991,997 **** */ #define error(e) { error = (e); goto bad; } ! aihead = NULL; /* initialize automatic variables */ aipnext = &aihead; canon = NULL; --- 990,996 ---- */ #define error(e) { error = (e); goto bad; } ! aihead = NULL; /* initialize automatic variables */ aipnext = &aihead; canon = NULL; *************** *** 999,1009 **** memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; } else ! hints = *hintsp; /* struct copy */ /* 4first some basic error checking */ if ((rc = ga_echeck(hostname, servname, hints.ai_flags, hints.ai_family, ! hints.ai_socktype, hints.ai_protocol)) != 0) error(rc); /* end ga1 */ --- 998,1008 ---- memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; } else ! hints = *hintsp; /* struct copy */ /* 4first some basic error checking */ if ((rc = ga_echeck(hostname, servname, hints.ai_flags, hints.ai_family, ! hints.ai_socktype, hints.ai_protocol)) != 0) error(rc); /* end ga1 */ *************** *** 1018,1090 **** struct in_addr inaddr; if (inet_pton(AF_INET, sptr->host, &inaddr) == 1) { ! if (hints.ai_family != AF_UNSPEC && hints.ai_family != AF_INET) ! error(EAI_ADDRFAMILY); ! if (sptr->family != AF_INET) ! continue; /* ignore */ ! rc = ga_aistruct(&aipnext, &hints, &inaddr, AF_INET); ! if (rc != 0) ! error(rc); ! continue; } } #endif ! #ifdef HAS_IPV6 /* 4check for an IPv6 hex string */ if ((isxdigit((unsigned char) sptr->host[0]) || sptr->host[0] == ':') && ! (strchr(sptr->host, ':') != NULL)) { struct in6_addr in6addr; if (inet_pton(AF_INET6, sptr->host, &in6addr) == 1) { ! if (hints.ai_family != AF_UNSPEC && hints.ai_family != AF_INET6) ! error(EAI_ADDRFAMILY); ! if (sptr->family != AF_INET6) ! continue; /* ignore */ ! rc = ga_aistruct(&aipnext, &hints, &in6addr, AF_INET6); ! if (rc != 0) ! error(rc); ! continue; } } #endif /* end ga3 */ /* include ga4 */ /* 4remainder of for() to look up hostname */ ! #ifdef HAS_IPV6 if ((_res.options & RES_INIT) == 0) ! res_init(); /* need this to set _res.options */ #endif if (nsearch == 2) { ! #ifdef HAS_IPV6 _res.options &= ~RES_USE_INET6; #endif hptr = gethostbyname2(sptr->host, sptr->family); } else { ! #ifdef HAS_IPV6 if (sptr->family == AF_INET6) ! _res.options |= RES_USE_INET6; else ! _res.options &= ~RES_USE_INET6; #endif hptr = gethostbyname(sptr->host); } if (hptr == NULL) { if (nsearch == 2) ! continue; /* failure OK if multiple searches */ switch (h_errno) { case HOST_NOT_FOUND: ! error(EAI_NONAME); case TRY_AGAIN: ! error(EAI_AGAIN); case NO_RECOVERY: ! error(EAI_FAIL); case NO_DATA: ! error(EAI_NODATA); default: ! error(EAI_NONAME); } } --- 1017,1089 ---- struct in_addr inaddr; if (inet_pton(AF_INET, sptr->host, &inaddr) == 1) { ! if (hints.ai_family != AF_UNSPEC && hints.ai_family != AF_INET) ! error(EAI_ADDRFAMILY); ! if (sptr->family != AF_INET) ! continue; /* ignore */ ! rc = ga_aistruct(&aipnext, &hints, &inaddr, AF_INET); ! if (rc != 0) ! error(rc); ! continue; } } #endif ! #ifdef HAVE_SOCKADDR_IN6 /* 4check for an IPv6 hex string */ if ((isxdigit((unsigned char) sptr->host[0]) || sptr->host[0] == ':') && ! (strchr(sptr->host, ':') != NULL)) { struct in6_addr in6addr; if (inet_pton(AF_INET6, sptr->host, &in6addr) == 1) { ! if (hints.ai_family != AF_UNSPEC && hints.ai_family != AF_INET6) ! error(EAI_ADDRFAMILY); ! if (sptr->family != AF_INET6) ! continue; /* ignore */ ! rc = ga_aistruct(&aipnext, &hints, &in6addr, AF_INET6); ! if (rc != 0) ! error(rc); ! continue; } } #endif /* end ga3 */ /* include ga4 */ /* 4remainder of for() to look up hostname */ ! #ifdef HAVE_SOCKADDR_IN6 if ((_res.options & RES_INIT) == 0) ! res_init(); /* need this to set _res.options */ #endif if (nsearch == 2) { ! #ifdef HAVE_SOCKADDR_IN6 _res.options &= ~RES_USE_INET6; #endif hptr = gethostbyname2(sptr->host, sptr->family); } else { ! #ifdef HAVE_SOCKADDR_IN6 if (sptr->family == AF_INET6) ! _res.options |= RES_USE_INET6; else ! _res.options &= ~RES_USE_INET6; #endif hptr = gethostbyname(sptr->host); } if (hptr == NULL) { if (nsearch == 2) ! continue; /* failure OK if multiple searches */ switch (h_errno) { case HOST_NOT_FOUND: ! error(EAI_NONAME); case TRY_AGAIN: ! error(EAI_AGAIN); case NO_RECOVERY: ! error(EAI_FAIL); case NO_DATA: ! error(EAI_NODATA); default: ! error(EAI_NONAME); } } *************** *** 1094,1123 **** /* 4save canonical name first time */ if (hostname != NULL && hostname[0] != '\0' && ! (hints.ai_flags & AI_CANONNAME) && canon == NULL) { if ((canon = strdup(hptr->h_name)) == NULL) ! error(EAI_MEMORY); } /* 4create one addrinfo{} for each returned address */ for (ap = hptr->h_addr_list; *ap != NULL; ap++) { rc = ga_aistruct(&aipnext, &hints, *ap, hptr->h_addrtype); if (rc != 0) ! error(rc); } } if (aihead == NULL) ! error(EAI_NONAME); /* nothing found */ /* end ga4 */ /* include ga5 */ /* 4return canonical name */ if (hostname != NULL && hostname[0] != '\0' && hints.ai_flags & AI_CANONNAME) { if (canon != NULL) ! aihead->ai_canonname = canon; /* strdup'ed earlier */ else { if ((aihead->ai_canonname = strdup(search[0].host)) == NULL) ! error(EAI_MEMORY); } } --- 1093,1122 ---- /* 4save canonical name first time */ if (hostname != NULL && hostname[0] != '\0' && ! (hints.ai_flags & AI_CANONNAME) && canon == NULL) { if ((canon = strdup(hptr->h_name)) == NULL) ! error(EAI_MEMORY); } /* 4create one addrinfo{} for each returned address */ for (ap = hptr->h_addr_list; *ap != NULL; ap++) { rc = ga_aistruct(&aipnext, &hints, *ap, hptr->h_addrtype); if (rc != 0) ! error(rc); } } if (aihead == NULL) ! error(EAI_NONAME); /* nothing found */ /* end ga4 */ /* include ga5 */ /* 4return canonical name */ if (hostname != NULL && hostname[0] != '\0' && hints.ai_flags & AI_CANONNAME) { if (canon != NULL) ! aihead->ai_canonname = canon; /* strdup'ed earlier */ else { if ((aihead->ai_canonname = strdup(search[0].host)) == NULL) ! error(EAI_MEMORY); } } *************** *** 1127,1137 **** error(rc); } ! *result = aihead; /* pointer to first structure in linked list */ return (0); bad: ! freeaddrinfo(aihead); /* free any alloc'ed memory */ return (error); } --- 1126,1136 ---- error(rc); } ! *result = aihead; /* pointer to first structure in linked list */ return (0); bad: ! freeaddrinfo(aihead); /* free any alloc'ed memory */ return (error); } *************** *** 1144,1157 **** /* include ga_echeck */ static int ga_echeck(const char *hostname, const char *servname, ! int flags, int family, int socktype, int protocol) { if (flags & ~(AI_PASSIVE | AI_CANONNAME)) ! return (EAI_BADFLAGS); /* unknown flag bits */ if (hostname == NULL || hostname[0] == '\0') { if (servname == NULL || servname[0] == '\0') ! return (EAI_NONAME); /* host or service must be specified */ } switch (family) { --- 1143,1156 ---- /* include ga_echeck */ static int ga_echeck(const char *hostname, const char *servname, ! int flags, int family, int socktype, int protocol) { if (flags & ~(AI_PASSIVE | AI_CANONNAME)) ! return (EAI_BADFLAGS); /* unknown flag bits */ if (hostname == NULL || hostname[0] == '\0') { if (servname == NULL || servname[0] == '\0') ! return (EAI_NONAME); /* host or service must be specified */ } switch (family) { *************** *** 1160,1180 **** #ifdef IPv4 case AF_INET: if (socktype != 0 && ! (socktype != SOCK_STREAM && ! socktype != SOCK_DGRAM && socktype != SOCK_RAW)) ! return (EAI_SOCKTYPE); /* invalid socket type */ break; #endif ! #ifdef HAS_IPV6 case AF_INET6: if (socktype != 0 && ! (socktype != SOCK_STREAM && ! socktype != SOCK_DGRAM && socktype != SOCK_RAW)) ! return (EAI_SOCKTYPE); /* invalid socket type */ break; #endif default: ! return (EAI_FAMILY); /* unknown protocol family */ } return (0); } --- 1159,1179 ---- #ifdef IPv4 case AF_INET: if (socktype != 0 && ! (socktype != SOCK_STREAM && ! socktype != SOCK_DGRAM && socktype != SOCK_RAW)) ! return (EAI_SOCKTYPE); /* invalid socket type */ break; #endif ! #ifdef HAVE_SOCKADDR_IN6 case AF_INET6: if (socktype != 0 && ! (socktype != SOCK_STREAM && ! socktype != SOCK_DGRAM && socktype != SOCK_RAW)) ! return (EAI_SOCKTYPE); /* invalid socket type */ break; #endif default: ! return (EAI_FAMILY); /* unknown protocol family */ } return (0); } *************** *** 1190,1196 **** /* include ga_nsearch1 */ static int ga_nsearch(const char *hostname, const struct addrinfo *hintsp, ! struct search *search) { int nsearch = 0; --- 1189,1195 ---- /* include ga_nsearch1 */ static int ga_nsearch(const char *hostname, const struct addrinfo *hintsp, ! struct search *search) { int nsearch = 0; *************** *** 1200,1229 **** switch (hintsp->ai_family) { #ifdef IPv4 case AF_INET: ! search[nsearch].host = "0.0.0.0"; ! search[nsearch].family = AF_INET; ! nsearch++; ! break; #endif ! #ifdef HAS_IPV6 case AF_INET6: ! search[nsearch].host = "0::0"; ! search[nsearch].family = AF_INET6; ! nsearch++; ! break; #endif case AF_UNSPEC: ! #ifdef HAS_IPV6 ! search[nsearch].host = "0::0"; /* IPv6 first, then IPv4 */ ! search[nsearch].family = AF_INET6; ! nsearch++; #endif #ifdef IPv4 ! search[nsearch].host = "0.0.0.0"; ! search[nsearch].family = AF_INET; ! nsearch++; #endif ! break; } /* end ga_nsearch1 */ /* include ga_nsearch2 */ --- 1199,1228 ---- switch (hintsp->ai_family) { #ifdef IPv4 case AF_INET: ! search[nsearch].host = "0.0.0.0"; ! search[nsearch].family = AF_INET; ! nsearch++; ! break; #endif ! #ifdef HAVE_SOCKADDR_IN6 case AF_INET6: ! search[nsearch].host = "0::0"; ! search[nsearch].family = AF_INET6; ! nsearch++; ! break; #endif case AF_UNSPEC: ! #ifdef HAVE_SOCKADDR_IN6 ! search[nsearch].host = "0::0"; /* IPv6 first, then IPv4 */ ! search[nsearch].family = AF_INET6; ! nsearch++; #endif #ifdef IPv4 ! search[nsearch].host = "0.0.0.0"; ! search[nsearch].family = AF_INET; ! nsearch++; #endif ! break; } /* end ga_nsearch1 */ /* include ga_nsearch2 */ *************** *** 1232,1266 **** switch (hintsp->ai_family) { #ifdef IPv4 case AF_INET: ! search[nsearch].host = "localhost"; /* 127.0.0.1 */ ! search[nsearch].family = AF_INET; ! nsearch++; ! break; #endif ! #ifdef HAS_IPV6 case AF_INET6: ! search[nsearch].host = "0::1"; ! search[nsearch].family = AF_INET6; ! nsearch++; ! break; #endif case AF_UNSPEC: ! #ifdef HAS_IPV6 ! search[nsearch].host = "0::1"; /* IPv6 first, then IPv4 */ ! search[nsearch].family = AF_INET6; ! nsearch++; #endif #ifdef IPv4 ! search[nsearch].host = "localhost"; ! search[nsearch].family = AF_INET; ! nsearch++; #endif ! break; } } /* end ga_nsearch2 */ /* include ga_nsearch3 */ ! } else { /* host is specified */ switch (hintsp->ai_family) { #ifdef IPv4 case AF_INET: --- 1231,1265 ---- switch (hintsp->ai_family) { #ifdef IPv4 case AF_INET: ! search[nsearch].host = "localhost"; /* 127.0.0.1 */ ! search[nsearch].family = AF_INET; ! nsearch++; ! break; #endif ! #ifdef HAVE_SOCKADDR_IN6 case AF_INET6: ! search[nsearch].host = "0::1"; ! search[nsearch].family = AF_INET6; ! nsearch++; ! break; #endif case AF_UNSPEC: ! #ifdef HAVE_SOCKADDR_IN6 ! search[nsearch].host = "0::1"; /* IPv6 first, then IPv4 */ ! search[nsearch].family = AF_INET6; ! nsearch++; #endif #ifdef IPv4 ! search[nsearch].host = "localhost"; ! search[nsearch].family = AF_INET; ! nsearch++; #endif ! break; } } /* end ga_nsearch2 */ /* include ga_nsearch3 */ ! } else { /* host is specified */ switch (hintsp->ai_family) { #ifdef IPv4 case AF_INET: *************** *** 1269,1275 **** nsearch++; break; #endif ! #ifdef HAS_IPV6 case AF_INET6: search[nsearch].host = hostname; search[nsearch].family = AF_INET6; --- 1268,1274 ---- nsearch++; break; #endif ! #ifdef HAVE_SOCKADDR_IN6 case AF_INET6: search[nsearch].host = hostname; search[nsearch].family = AF_INET6; *************** *** 1277,1290 **** break; #endif case AF_UNSPEC: ! #ifdef HAS_IPV6 search[nsearch].host = hostname; ! search[nsearch].family = AF_INET6; /* IPv6 first */ nsearch++; #endif #ifdef IPv4 search[nsearch].host = hostname; ! search[nsearch].family = AF_INET; /* then IPv4 */ nsearch++; #endif break; --- 1276,1289 ---- break; #endif case AF_UNSPEC: ! #ifdef HAVE_SOCKADDR_IN6 search[nsearch].host = hostname; ! search[nsearch].family = AF_INET6; /* IPv6 first */ nsearch++; #endif #ifdef IPv4 search[nsearch].host = hostname; ! search[nsearch].family = AF_INET; /* then IPv4 */ nsearch++; #endif break; *************** *** 1307,1313 **** /* include ga_aistruct1 */ int ga_aistruct(struct addrinfo ***paipnext, const struct addrinfo *hintsp, ! const void *addr, int family) { struct addrinfo *ai; --- 1306,1312 ---- /* include ga_aistruct1 */ int ga_aistruct(struct addrinfo ***paipnext, const struct addrinfo *hintsp, ! const void *addr, int family) { struct addrinfo *ai; *************** *** 1332,1338 **** /* 4allocate sockaddr_in{} and fill in all but port */ if ((sinptr = calloc(1, sizeof(struct sockaddr_in))) == NULL) ! return (EAI_MEMORY); #ifdef HAVE_SOCKADDR_SA_LEN sinptr->sin_len = sizeof(struct sockaddr_in); #endif --- 1331,1337 ---- /* 4allocate sockaddr_in{} and fill in all but port */ if ((sinptr = calloc(1, sizeof(struct sockaddr_in))) == NULL) ! return (EAI_MEMORY); #ifdef HAVE_SOCKADDR_SA_LEN sinptr->sin_len = sizeof(struct sockaddr_in); #endif *************** *** 1342,1355 **** ai->ai_addrlen = sizeof(struct sockaddr_in); break; } ! #endif /* IPV4 */ ! #ifdef HAS_IPV6 case AF_INET6:{ struct sockaddr_in6 *sin6ptr; /* 4allocate sockaddr_in6{} and fill in all but port */ if ((sin6ptr = calloc(1, sizeof(struct sockaddr_in6))) == NULL) ! return (EAI_MEMORY); #ifdef HAVE_SOCKADDR_SA_LEN sin6ptr->sin6_len = sizeof(struct sockaddr_in6); #endif --- 1341,1354 ---- ai->ai_addrlen = sizeof(struct sockaddr_in); break; } ! #endif /* IPV4 */ ! #ifdef HAVE_SOCKADDR_IN6 case AF_INET6:{ struct sockaddr_in6 *sin6ptr; /* 4allocate sockaddr_in6{} and fill in all but port */ if ((sin6ptr = calloc(1, sizeof(struct sockaddr_in6))) == NULL) ! return (EAI_MEMORY); #ifdef HAVE_SOCKADDR_SA_LEN sin6ptr->sin6_len = sizeof(struct sockaddr_in6); #endif *************** *** 1359,1365 **** ai->ai_addrlen = sizeof(struct sockaddr_in6); break; } ! #endif /* IPV6 */ } return (0); --- 1358,1364 ---- ai->ai_addrlen = sizeof(struct sockaddr_in6); break; } ! #endif /* IPV6 */ } return (0); *************** *** 1374,1407 **** /* include ga_serv */ int ga_serv(struct addrinfo *aihead, const struct addrinfo *hintsp, ! const char *serv) { int port, rc, nfound; nfound = 0; ! if (isdigit((unsigned char) serv[0])) { /* check for port number string first */ port = (int) htons((unsigned short) atoi(serv)); if (hintsp->ai_socktype) { /* 4caller specifies socket type */ if ((rc = ga_port(aihead, port, hintsp->ai_socktype)) < 0) ! return (EAI_MEMORY); nfound += rc; } else { /* 4caller does not specify socket type */ if ((rc = ga_port(aihead, port, SOCK_STREAM)) < 0) ! return (EAI_MEMORY); nfound += rc; if ((rc = ga_port(aihead, port, SOCK_DGRAM)) < 0) ! return (EAI_MEMORY); nfound += rc; } } if (nfound == 0) { if (hintsp->ai_socktype == 0) ! return (EAI_NONAME); /* all calls to getservbyname() failed */ else ! return (EAI_SERVICE); /* service not supported for socket type */ } return (0); } --- 1373,1406 ---- /* include ga_serv */ int ga_serv(struct addrinfo *aihead, const struct addrinfo *hintsp, ! const char *serv) { int port, rc, nfound; nfound = 0; ! if (isdigit((unsigned char) serv[0])) { /* check for port number string first */ port = (int) htons((unsigned short) atoi(serv)); if (hintsp->ai_socktype) { /* 4caller specifies socket type */ if ((rc = ga_port(aihead, port, hintsp->ai_socktype)) < 0) ! return (EAI_MEMORY); nfound += rc; } else { /* 4caller does not specify socket type */ if ((rc = ga_port(aihead, port, SOCK_STREAM)) < 0) ! return (EAI_MEMORY); nfound += rc; if ((rc = ga_port(aihead, port, SOCK_DGRAM)) < 0) ! return (EAI_MEMORY); nfound += rc; } } if (nfound == 0) { if (hintsp->ai_socktype == 0) ! return (EAI_NONAME); /* all calls to getservbyname() failed */ else ! return (EAI_SERVICE); /* service not supported for socket type */ } return (0); } *************** *** 1438,1444 **** /* include ga_port */ int ga_port(struct addrinfo *aihead, int port, int socktype) ! /* port must be in network byte order */ { int nfound = 0; struct addrinfo *ai; --- 1437,1443 ---- /* include ga_port */ int ga_port(struct addrinfo *aihead, int port, int socktype) ! /* port must be in network byte order */ { int nfound = 0; struct addrinfo *ai; *************** *** 1446,1457 **** for (ai = aihead; ai != NULL; ai = ai->ai_next) { if (ai->ai_flags & AI_CLONE) { if (ai->ai_socktype != 0) { ! if ((ai = ga_clone(ai)) == NULL) ! return (-1); /* memory allocation error */ ! /* ai points to newly cloned entry, which is what we want */ } } else if (ai->ai_socktype != socktype) ! continue; /* ignore if mismatch on socket type */ ai->ai_socktype = socktype; --- 1445,1456 ---- for (ai = aihead; ai != NULL; ai = ai->ai_next) { if (ai->ai_flags & AI_CLONE) { if (ai->ai_socktype != 0) { ! if ((ai = ga_clone(ai)) == NULL) ! return (-1); /* memory allocation error */ ! /* ai points to newly cloned entry, which is what we want */ } } else if (ai->ai_socktype != socktype) ! continue; /* ignore if mismatch on socket type */ ai->ai_socktype = socktype; *************** *** 1462,1468 **** nfound++; break; #endif ! #ifdef HAS_IPV6 case AF_INET6: ((struct sockaddr_in6 *) ai->ai_addr)->sin6_port = port; nfound++; --- 1461,1467 ---- nfound++; break; #endif ! #ifdef HAVE_SOCKADDR_IN6 case AF_INET6: ((struct sockaddr_in6 *) ai->ai_addr)->sin6_port = port; nfound++; *************** *** 1491,1497 **** new->ai_next = ai->ai_next; ai->ai_next = new; ! new->ai_flags = 0; /* make sure AI_CLONE is off */ new->ai_family = ai->ai_family; new->ai_socktype = ai->ai_socktype; new->ai_protocol = ai->ai_protocol; --- 1490,1496 ---- new->ai_next = ai->ai_next; ai->ai_next = new; ! new->ai_flags = 0; /* make sure AI_CLONE is off */ new->ai_family = ai->ai_family; new->ai_socktype = ai->ai_socktype; new->ai_protocol = ai->ai_protocol; *************** *** 1505,1511 **** } /* end ga_clone */ ! #endif /* HAS_GETADDRINFO */ /* * Return a string containing some additional information after an --- 1504,1510 ---- } /* end ga_clone */ ! #endif /* HAS_GETADDRINFO */ /* * Return a string containing some additional information after an *************** *** 1543,1549 **** return ("unknown getaddrinfo() error"); } } ! #endif /* HAS_GAI_STRERROR */ #ifndef HAS_GETADDRINFO --- 1542,1548 ---- return ("unknown getaddrinfo() error"); } } ! #endif /* HAS_GAI_STRERROR */ #ifndef HAS_GETADDRINFO *************** *** 1555,1570 **** for (ai = aihead; ai != NULL; ai = ainext) { if (ai->ai_addr != NULL) ! free(ai->ai_addr); /* socket address structure */ if (ai->ai_canonname != NULL) free(ai->ai_canonname); ! ainext = ai->ai_next; /* can't fetch ai_next after free() */ ! free(ai); /* the addrinfo{} itself */ } } /* end freeaddrinfo */ ! #endif /* HAS_GETADDRINFO */ --- 1554,1569 ---- for (ai = aihead; ai != NULL; ai = ainext) { if (ai->ai_addr != NULL) ! free(ai->ai_addr); /* socket address structure */ if (ai->ai_canonname != NULL) free(ai->ai_canonname); ! ainext = ai->ai_next; /* can't fetch ai_next after free() */ ! free(ai); /* the addrinfo{} itself */ } } /* end freeaddrinfo */ ! #endif /* HAS_GETADDRINFO */ Index: src/fundb.c =================================================================== *** src/fundb.c (.../p2) (revision 920) --- src/fundb.c (.../p3) (revision 920) *************** *** 28,45 **** #include "confmagic.h" #ifdef WIN32 ! #pragma warning( disable : 4761) /* NJG: disable warning re conversion */ #endif extern PRIV attr_privs_view[]; static lock_type get_locktype(char *str); extern struct db_stat_info *get_stats(dbref owner); static int lattr_helper(dbref player, dbref thing, dbref parent, ! char const *pattern, ATTR *atr, void *args); static dbref dbwalk(char *buff, char **bp, dbref executor, dbref enactor, ! int type, dbref loc, dbref after, int skipdark, ! int start, int count, int *retcount); const char * --- 28,45 ---- #include "confmagic.h" #ifdef WIN32 ! #pragma warning( disable : 4761) /* NJG: disable warning re conversion */ #endif extern PRIV attr_privs_view[]; static lock_type get_locktype(char *str); extern struct db_stat_info *get_stats(dbref owner); static int lattr_helper(dbref player, dbref thing, dbref parent, ! char const *pattern, ATTR *atr, void *args); static dbref dbwalk(char *buff, char **bp, dbref executor, dbref enactor, ! int type, dbref loc, dbref after, int skipdark, ! int start, int count, int *retcount); const char * *************** *** 52,60 **** if (a) { if (Can_Read_Attr(executor, thing, a)) { if (strlen(value = atr_value(a)) < BUFFER_LEN) ! return value; else ! return T("#-1 ATTRIBUTE LENGTH TOO LONG"); } return T(e_atrperm); } --- 52,60 ---- if (a) { if (Can_Read_Attr(executor, thing, a)) { if (strlen(value = atr_value(a)) < BUFFER_LEN) ! return value; else ! return T("#-1 ATTRIBUTE LENGTH TOO LONG"); } return T(e_atrperm); } *************** *** 71,82 **** /** Structure containing arguments for lattr_helper */ struct lh_args { ! int first; /**< Is this is the first attribute, or later? */ int nattr; ! int start; /**< Where do we start counting? */ ! int count; /**< How many do we count? */ ! char *buff; /**< Buffer to store output */ ! char **bp; /**< Pointer to address of insertion point in buff */ }; /* this function produces a space-separated list of attributes that are --- 71,83 ---- /** Structure containing arguments for lattr_helper */ struct lh_args { ! int first; /**< Is this is the first attribute, or later? */ int nattr; ! int start; /**< Where do we start counting? */ ! int count; /**< How many do we count? */ ! char *buff; /**< Buffer to store output */ ! char **bp; /**< Pointer to address of insertion point in buff */ ! char delim; /**< Delimiter */ }; /* this function produces a space-separated list of attributes that are *************** *** 85,94 **** /* ARGSUSED */ static int lattr_helper(dbref player __attribute__ ((__unused__)), ! dbref thing __attribute__ ((__unused__)), ! dbref parent __attribute__ ((__unused__)), ! char const *pattern __attribute__ ((__unused__)), ! ATTR *atr, void *args) { struct lh_args *lh = args; lh->nattr++; --- 86,95 ---- /* ARGSUSED */ static int lattr_helper(dbref player __attribute__ ((__unused__)), ! dbref thing __attribute__ ((__unused__)), ! dbref parent __attribute__ ((__unused__)), ! char const *pattern __attribute__ ((__unused__)), ! ATTR *atr, void *args) { struct lh_args *lh = args; lh->nattr++; *************** *** 97,103 **** if (lh->first) lh->first = 0; else ! safe_chr(' ', lh->buff, lh->bp); safe_str(AL_NAME(atr), lh->buff, lh->bp); return 1; } --- 98,104 ---- if (lh->first) lh->first = 0; else ! safe_chr(lh->delim, lh->buff, lh->bp); safe_str(AL_NAME(atr), lh->buff, lh->bp); return 1; } *************** *** 109,122 **** { dbref thing; int doparent; ! static const char *matchall = "**"; /* count atrees by default too */ char *pattern; pattern = strchr(args[0], '/'); if (pattern) *pattern++ = '\0'; else ! pattern = (char *) matchall; /* match anything */ thing = match_thing(executor, args[0]); if (!GoodObject(thing)) { --- 110,123 ---- { dbref thing; int doparent; ! static const char *matchall = "**"; /* count atrees by default too */ char *pattern; pattern = strchr(args[0], '/'); if (pattern) *pattern++ = '\0'; else ! pattern = (char *) matchall; /* match anything */ thing = match_thing(executor, args[0]); if (!GoodObject(thing)) { *************** *** 130,136 **** safe_integer(AttrCount(thing), buff, bp); } else { safe_integer(atr_pattern_count(executor, thing, pattern, doparent, ! !Can_Examine(executor, thing)), buff, bp); } } --- 131,137 ---- safe_integer(AttrCount(thing), buff, bp); } else { safe_integer(atr_pattern_count(executor, thing, pattern, doparent, ! !Can_Examine(executor, thing)), buff, bp); } } *************** *** 140,145 **** --- 141,147 ---- dbref thing; char *pattern; struct lh_args lh; + char delim; lh.nattr = lh.start = lh.count = 0; *************** *** 156,168 **** safe_str(T("#-1 ARGUMENT OUT OF RANGE"), buff, bp); return; } } pattern = strchr(args[0], '/'); if (pattern) *pattern++ = '\0'; else ! pattern = (char *) "*"; /* match anything */ thing = match_thing(executor, args[0]); if (!GoodObject(thing)) { --- 158,177 ---- safe_str(T("#-1 ARGUMENT OUT OF RANGE"), buff, bp); return; } + + if (!delim_check(buff, bp, nargs, args, 4, &delim)) + return; + } else { + /* lattr()/lattrp*( */ + if (!delim_check(buff, bp, nargs, args, 2, &delim)) + return; } pattern = strchr(args[0], '/'); if (pattern) *pattern++ = '\0'; else ! pattern = (char *) "*"; /* match anything */ thing = match_thing(executor, args[0]); if (!GoodObject(thing)) { *************** *** 172,184 **** lh.first = 1; lh.buff = buff; lh.bp = bp; if (strchr(called_as, 'P')) { (void) atr_iter_get_parent(executor, thing, pattern, ! !Can_Examine(executor, thing), lattr_helper, ! &lh); } else { (void) atr_iter_get(executor, thing, pattern, ! !Can_Examine(executor, thing), lattr_helper, &lh); } } --- 181,195 ---- lh.first = 1; lh.buff = buff; lh.bp = bp; + lh.delim = delim; + if (strchr(called_as, 'P')) { (void) atr_iter_get_parent(executor, thing, pattern, ! !Can_Examine(executor, thing), lattr_helper, ! &lh); } else { (void) atr_iter_get(executor, thing, pattern, ! !Can_Examine(executor, thing), lattr_helper, &lh); } } *************** *** 264,270 **** dp = mstr; sp = args[i - 1]; process_expression(mstr, &dp, &sp, executor, caller, enactor, PE_DEFAULT, ! PT_DEFAULT, pe_info); *dp = '\0'; parse_attrib(executor, mstr, &thing, &attrib); if (GoodObject(thing) && attrib && Can_Read_Attr(executor, thing, attrib)) { --- 275,281 ---- dp = mstr; sp = args[i - 1]; process_expression(mstr, &dp, &sp, executor, caller, enactor, PE_DEFAULT, ! PT_DEFAULT, pe_info); *dp = '\0'; parse_attrib(executor, mstr, &thing, &attrib); if (GoodObject(thing) && attrib && Can_Read_Attr(executor, thing, attrib)) { *************** *** 278,284 **** /* We couldn't get it. Evaluate the last arg and return it */ sp = args[nargs - 1]; process_expression(buff, bp, &sp, executor, caller, enactor, ! PE_DEFAULT, PT_DEFAULT, pe_info); return; } --- 289,295 ---- /* We couldn't get it. Evaluate the last arg and return it */ sp = args[nargs - 1]; process_expression(buff, bp, &sp, executor, caller, enactor, ! PE_DEFAULT, PT_DEFAULT, pe_info); return; } *************** *** 306,312 **** tp = tbuf = safe_atr_value(a); add_check("fun_eval.attr_value"); process_expression(buff, bp, &tp, thing, executor, executor, ! PE_DEFAULT, PT_DEFAULT, pe_info); mush_free((Malloc_t) tbuf, "fun_eval.attr_value"); return; } else if (a || !Can_Examine(executor, thing)) { --- 317,323 ---- tp = tbuf = safe_atr_value(a); add_check("fun_eval.attr_value"); process_expression(buff, bp, &tp, thing, executor, executor, ! PE_DEFAULT, PT_DEFAULT, pe_info); mush_free((Malloc_t) tbuf, "fun_eval.attr_value"); return; } else if (a || !Can_Examine(executor, thing)) { *************** *** 346,352 **** tp = tbuf = safe_atr_value(a); add_check("fun_eval.attr_value"); process_expression(buff, bp, &tp, thing, executor, executor, ! PE_DEFAULT, PT_DEFAULT, pe_info); mush_free((Malloc_t) tbuf, "fun_eval.attr_value"); return; } else if (a || !Can_Examine(executor, thing)) { --- 357,363 ---- tp = tbuf = safe_atr_value(a); add_check("fun_eval.attr_value"); process_expression(buff, bp, &tp, thing, executor, executor, ! PE_DEFAULT, PT_DEFAULT, pe_info); mush_free((Malloc_t) tbuf, "fun_eval.attr_value"); return; } else if (a || !Can_Examine(executor, thing)) { *************** *** 371,377 **** dp = mstr; sp = args[0]; process_expression(mstr, &dp, &sp, executor, caller, enactor, ! PE_DEFAULT, PT_DEFAULT, pe_info); *dp = '\0'; parse_attrib(executor, mstr, &thing, &attrib); if (GoodObject(thing) && attrib && Can_Read_Attr(executor, thing, attrib)) { --- 382,388 ---- dp = mstr; sp = args[0]; process_expression(mstr, &dp, &sp, executor, caller, enactor, ! PE_DEFAULT, PT_DEFAULT, pe_info); *dp = '\0'; parse_attrib(executor, mstr, &thing, &attrib); if (GoodObject(thing) && attrib && Can_Read_Attr(executor, thing, attrib)) { *************** *** 383,396 **** sp = sbuf = safe_atr_value(attrib); add_check("fun_edefault.attr_value"); process_expression(buff, bp, &sp, thing, executor, executor, ! PE_DEFAULT, PT_DEFAULT, pe_info); mush_free((Malloc_t) sbuf, "fun_edefault.attr_value"); return; } /* We couldn't get it. Evaluate args[1] and return it */ sp = args[1]; process_expression(buff, bp, &sp, executor, caller, enactor, ! PE_DEFAULT, PT_DEFAULT, pe_info); return; } --- 394,407 ---- sp = sbuf = safe_atr_value(attrib); add_check("fun_edefault.attr_value"); process_expression(buff, bp, &sp, thing, executor, executor, ! PE_DEFAULT, PT_DEFAULT, pe_info); mush_free((Malloc_t) sbuf, "fun_edefault.attr_value"); return; } /* We couldn't get it. Evaluate args[1] and return it */ sp = args[1]; process_expression(buff, bp, &sp, executor, caller, enactor, ! PE_DEFAULT, PT_DEFAULT, pe_info); return; } *************** *** 414,420 **** case '8': case '9': if (global_eval_context.wenv[c - '0']) ! safe_str(global_eval_context.wenv[c - '0'], buff, bp); return; case '#': /* enactor dbref */ --- 425,431 ---- case '8': case '9': if (global_eval_context.wenv[c - '0']) ! safe_str(global_eval_context.wenv[c - '0'], buff, bp); return; case '#': /* enactor dbref */ *************** *** 513,519 **** } #ifdef WIN32 ! #pragma warning( disable : 4761) /* Disable bogus conversion warning */ #endif /* ARGSUSED */ FUNCTION(fun_haspower) --- 524,530 ---- } #ifdef WIN32 ! #pragma warning( disable : 4761) /* Disable bogus conversion warning */ #endif /* ARGSUSED */ FUNCTION(fun_haspower) *************** *** 553,559 **** } #ifdef WIN32 ! #pragma warning( default : 4761) /* Re-enable conversion warning */ #endif /* ARGSUSED */ --- 564,570 ---- } #ifdef WIN32 ! #pragma warning( default : 4761) /* Re-enable conversion warning */ #endif /* ARGSUSED */ *************** *** 658,685 **** * use type == TYPE_PLAYER for this check. :-/. */ if (!(Typeof(thing) & type) || ! !can_interact(thing, executor, INTERACT_SEE) || ! (skipdark && Dark(thing) && !Light(thing) && !Light(loc)) || ! ((type == TYPE_PLAYER) && skipdark && !Connected(thing))) ! continue; nthing += 1; if (count < 1 || (nthing >= start && nthing < start + count)) { ! if (buff) { ! if (first) ! first = 0; ! else ! safe_chr(' ', buff, bp); ! safe_dbref(thing, buff, bp); ! } } if (result == NOTHING) { ! if (after == NOTHING) ! result = thing; ! if (after == thing) ! after = NOTHING; } if (retcount) ! *retcount = nthing; } } else if (buff) safe_str("#-1", buff, bp); --- 669,696 ---- * use type == TYPE_PLAYER for this check. :-/. */ if (!(Typeof(thing) & type) || ! !can_interact(thing, executor, INTERACT_SEE) || ! (skipdark && Dark(thing) && !Light(thing) && !Light(loc)) || ! ((type == TYPE_PLAYER) && skipdark && !Connected(thing))) ! continue; nthing += 1; if (count < 1 || (nthing >= start && nthing < start + count)) { ! if (buff) { ! if (first) ! first = 0; ! else ! safe_chr(' ', buff, bp); ! safe_dbref(thing, buff, bp); ! } } if (result == NOTHING) { ! if (after == NOTHING) ! result = thing; ! if (after == thing) ! after = NOTHING; } if (retcount) ! *retcount = nthing; } } else if (buff) safe_str("#-1", buff, bp); *************** *** 727,742 **** } switch (*ptr) { ! case 'C': /* con */ type = TYPE_THING | TYPE_PLAYER; break; ! case 'T': /* things */ type = TYPE_THING; break; ! case 'P': /* players */ type = TYPE_PLAYER; break; ! case 'E': /* exits */ type = TYPE_EXIT; break; default: --- 738,753 ---- } switch (*ptr) { ! case 'C': /* con */ type = TYPE_THING | TYPE_PLAYER; break; ! case 'T': /* things */ type = TYPE_THING; break; ! case 'P': /* players */ type = TYPE_PLAYER; break; ! case 'E': /* exits */ type = TYPE_EXIT; break; default: *************** *** 745,751 **** } dbwalk(buffptr, bptr, executor, enactor, type, loc, NOTHING, ! vis, start, count, &result); if (!buffptr) { safe_integer(result, buff, bp); --- 756,762 ---- } dbwalk(buffptr, bptr, executor, enactor, type, loc, NOTHING, ! vis, start, count, &result); if (!buffptr) { safe_integer(result, buff, bp); *************** *** 757,764 **** { dbref loc = match_thing(executor, args[0]); safe_dbref(dbwalk ! (NULL, NULL, executor, enactor, TYPE_THING | TYPE_PLAYER, loc, ! NOTHING, 0, 0, 0, NULL), buff, bp); } /* ARGSUSED */ --- 768,775 ---- { dbref loc = match_thing(executor, args[0]); safe_dbref(dbwalk ! (NULL, NULL, executor, enactor, TYPE_THING | TYPE_PLAYER, loc, ! NOTHING, 0, 0, 0, NULL), buff, bp); } /* ARGSUSED */ *************** *** 766,773 **** { dbref loc = match_thing(executor, args[0]); safe_dbref(dbwalk ! (NULL, NULL, executor, enactor, TYPE_EXIT, loc, NOTHING, 0, 0, 0, ! NULL), buff, bp); } /* ARGSUSED */ --- 777,784 ---- { dbref loc = match_thing(executor, args[0]); safe_dbref(dbwalk ! (NULL, NULL, executor, enactor, TYPE_EXIT, loc, NOTHING, 0, 0, 0, ! NULL), buff, bp); } /* ARGSUSED */ *************** *** 779,792 **** switch (Typeof(it)) { case TYPE_EXIT: safe_dbref(dbwalk ! (NULL, NULL, executor, enactor, TYPE_EXIT, Source(it), it, 0, ! 0, 0, NULL), buff, bp); break; case TYPE_THING: case TYPE_PLAYER: safe_dbref(dbwalk ! (NULL, NULL, executor, enactor, TYPE_THING | TYPE_PLAYER, ! Location(it), it, 0, 0, 0, NULL), buff, bp); break; default: safe_str("#-1", buff, bp); --- 790,803 ---- switch (Typeof(it)) { case TYPE_EXIT: safe_dbref(dbwalk ! (NULL, NULL, executor, enactor, TYPE_EXIT, Source(it), it, 0, ! 0, 0, NULL), buff, bp); break; case TYPE_THING: case TYPE_PLAYER: safe_dbref(dbwalk ! (NULL, NULL, executor, enactor, TYPE_THING | TYPE_PLAYER, ! Location(it), it, 0, 0, 0, NULL), buff, bp); break; default: safe_str("#-1", buff, bp); *************** *** 812,818 **** dbref counter; dbref entrance; int found; ! int exd, td, pd, rd; /* what we're looking for */ char *p; if (!command_check_byname(executor, "@entrances")) { --- 823,829 ---- dbref counter; dbref entrance; int found; ! int exd, td, pd, rd; /* what we're looking for */ char *p; if (!command_check_byname(executor, "@entrances")) { *************** *** 837,863 **** switch (*p) { case 'a': case 'A': ! exd = td = pd = rd = 1; ! break; case 'e': case 'E': ! exd = 1; ! break; case 't': case 'T': ! td = 1; ! break; case 'p': case 'P': ! pd = 1; ! break; case 'r': case 'R': ! rd = 1; ! break; default: ! safe_str(T("#-1 INVALID SECOND ARGUMENT"), buff, bp); ! return; } p++; } --- 848,874 ---- switch (*p) { case 'a': case 'A': ! exd = td = pd = rd = 1; ! break; case 'e': case 'E': ! exd = 1; ! break; case 't': case 'T': ! td = 1; ! break; case 'p': case 'P': ! pd = 1; ! break; case 'r': case 'R': ! rd = 1; ! break; default: ! safe_str(T("#-1 INVALID SECOND ARGUMENT"), buff, bp); ! return; } p++; } *************** *** 896,902 **** } if (!payfor(executor, FIND_COST)) { notify_format(executor, T("You don't have %d %s to do that."), ! FIND_COST, ((FIND_COST == 1) ? MONEY : MONIES)); safe_str("#-1", buff, bp); return; } --- 907,913 ---- } if (!payfor(executor, FIND_COST)) { notify_format(executor, T("You don't have %d %s to do that."), ! FIND_COST, ((FIND_COST == 1) ? MONEY : MONIES)); safe_str("#-1", buff, bp); return; } *************** *** 905,923 **** for (counter = low; counter <= high; counter++) { if (controls(executor, where) || controls(executor, counter)) { if ((exd && IsExit(counter)) || ! (td && IsThing(counter)) || ! (pd && IsPlayer(counter)) || (rd && IsRoom(counter))) { ! if (Mobile(counter)) ! entrance = Home(counter); ! else ! entrance = Location(counter); ! if (entrance == where) { ! if (!found) ! found = 1; ! else ! safe_chr(' ', buff, bp); ! safe_dbref(counter, buff, bp); ! } } } } --- 916,934 ---- for (counter = low; counter <= high; counter++) { if (controls(executor, where) || controls(executor, counter)) { if ((exd && IsExit(counter)) || ! (td && IsThing(counter)) || ! (pd && IsPlayer(counter)) || (rd && IsRoom(counter))) { ! if (Mobile(counter)) ! entrance = Home(counter); ! else ! entrance = Location(counter); ! if (entrance == where) { ! if (!found) ! found = 1; ! else ! safe_chr(' ', buff, bp); ! safe_dbref(counter, buff, bp); ! } } } } *************** *** 954,960 **** else if (!GoodObject(thing)) safe_str(T("#-1 ARG2 NOT FOUND"), buff, bp); else if (!(controls(executor, it) || controls(executor, thing) ! || See_All(executor))) safe_str(T(e_perm), buff, bp); else safe_chr(controls(it, thing) ? '1' : '0', buff, bp); --- 965,971 ---- else if (!GoodObject(thing)) safe_str(T("#-1 ARG2 NOT FOUND"), buff, bp); else if (!(controls(executor, it) || controls(executor, thing) ! || See_All(executor))) safe_str(T(e_perm), buff, bp); else safe_chr(controls(it, thing) ? '1' : '0', buff, bp); *************** *** 1022,1028 **** default: safe_str("WEIRD OBJECT", buff, bp); do_rawlog(LT_ERR, T("WARNING: Weird object #%d (type %d)\n"), it, ! Typeof(it)); } } --- 1033,1039 ---- default: safe_str("WEIRD OBJECT", buff, bp); do_rawlog(LT_ERR, T("WARNING: Weird object #%d (type %d)\n"), it, ! Typeof(it)); } } *************** *** 1031,1043 **** { dbref thing; ATTR *attrib; ! int f; if (strchr(args[0], '/')) { parse_attrib(executor, args[0], &thing, &attrib); if (!attrib) safe_str("#-1", buff, bp); ! else if ((f = string_to_atrflag(executor, args[1])) < 0) safe_str("#-1", buff, bp); else safe_boolean(AL_FLAGS(attrib) & f, buff, bp); --- 1042,1054 ---- { dbref thing; ATTR *attrib; ! privbits f = 0; if (strchr(args[0], '/')) { parse_attrib(executor, args[0], &thing, &attrib); if (!attrib) safe_str("#-1", buff, bp); ! else if (string_to_atrflag(executor, args[1], &f) < 0) safe_str("#-1", buff, bp); else safe_boolean(AL_FLAGS(attrib) & f, buff, bp); *************** *** 1067,1093 **** case 'r': case 'R': if (IsRoom(it)) ! found = 1; break; case 'e': case 'E': if (IsExit(it)) ! found = 1; break; case 'p': case 'P': if (IsPlayer(it)) ! found = 1; break; case 't': case 'T': if (IsThing(it)) ! found = 1; break; case 'g': case 'G': if (IsGarbage(it)) ! found = 1; break; default: safe_str(T("#-1 NO SUCH TYPE"), buff, bp); --- 1078,1104 ---- case 'r': case 'R': if (IsRoom(it)) ! found = 1; break; case 'e': case 'E': if (IsExit(it)) ! found = 1; break; case 'p': case 'P': if (IsPlayer(it)) ! found = 1; break; case 't': case 'T': if (IsThing(it)) ! found = 1; break; case 'g': case 'G': if (IsGarbage(it)) ! found = 1; break; default: safe_str(T("#-1 NO SUCH TYPE"), buff, bp); *************** *** 1127,1136 **** dbref it = match_thing(executor, args[0]); if (!strcmp(called_as, "ORLPOWERS")) safe_boolean(flaglist_check_long("POWER", executor, it, args[1], 0), buff, ! bp); else safe_boolean(flaglist_check_long("FLAG", executor, it, args[1], 0), buff, ! bp); } /* ARGSUSED */ --- 1138,1147 ---- dbref it = match_thing(executor, args[0]); if (!strcmp(called_as, "ORLPOWERS")) safe_boolean(flaglist_check_long("POWER", executor, it, args[1], 0), buff, ! bp); else safe_boolean(flaglist_check_long("FLAG", executor, it, args[1], 0), buff, ! bp); } /* ARGSUSED */ *************** *** 1139,1148 **** dbref it = match_thing(executor, args[0]); if (!strcmp(called_as, "ANDLPOWERS")) safe_boolean(flaglist_check_long("POWER", executor, it, args[1], 1), buff, ! bp); else safe_boolean(flaglist_check_long("FLAG", executor, it, args[1], 1), buff, ! bp); } static lock_type --- 1150,1159 ---- dbref it = match_thing(executor, args[0]); if (!strcmp(called_as, "ANDLPOWERS")) safe_boolean(flaglist_check_long("POWER", executor, it, args[1], 1), buff, ! bp); else safe_boolean(flaglist_check_long("FLAG", executor, it, args[1], 1), buff, ! bp); } static lock_type *************** *** 1191,1197 **** lock_list *ll; lock_type ltype; ! if (called_as[1] == 'L') /* LLOCKFLAGS */ fullname = 1; if (nargs == 0) { --- 1202,1208 ---- lock_list *ll; lock_type ltype; ! if (called_as[1] == 'L') /* LLOCKFLAGS */ fullname = 1; if (nargs == 0) { *************** *** 1217,1225 **** ll = getlockstruct(it, ltype); if (ll) { if (fullname) ! safe_str(lock_flags_long(ll), buff, bp); else ! safe_str(lock_flags(ll), buff, bp); return; } else { safe_str("#-1 NO SUCH LOCK", buff, bp); --- 1228,1236 ---- ll = getlockstruct(it, ltype); if (ll) { if (fullname) ! safe_str(lock_flags_long(ll), buff, bp); else ! safe_str(lock_flags(ll), buff, bp); return; } else { safe_str("#-1 NO SUCH LOCK", buff, bp); *************** *** 1274,1280 **** if (GoodObject(it) && (real_ltype != NULL) && Can_Read_Lock(executor, it, real_ltype)) { safe_str(unparse_boolexp(executor, getlock(it, real_ltype), UB_DBREF), ! buff, bp); return; } safe_str("#-1", buff, bp); --- 1285,1291 ---- if (GoodObject(it) && (real_ltype != NULL) && Can_Read_Lock(executor, it, real_ltype)) { safe_str(unparse_boolexp(executor, getlock(it, real_ltype), UB_DBREF), ! buff, bp); return; } safe_str("#-1", buff, bp); *************** *** 1317,1323 **** else if (!GoodObject(victim)) safe_str(T("#-1 ARG2 NOT FOUND"), buff, bp); else if (!See_All(executor) && !controls(executor, obj) && ! !controls(executor, victim)) safe_str(T(e_perm), buff, bp); else safe_boolean(Can_Locate(obj, victim), buff, bp); --- 1328,1334 ---- else if (!GoodObject(victim)) safe_str(T("#-1 ARG2 NOT FOUND"), buff, bp); else if (!See_All(executor) && !controls(executor, obj) && ! !controls(executor, victim)) safe_str(T(e_perm), buff, bp); else safe_boolean(Can_Locate(obj, victim), buff, bp); *************** *** 1349,1372 **** /* ARGSUSED */ FUNCTION(fun_ctime) { dbref it = match_thing(executor, args[0]); ! if (GoodObject(it) && !IsGarbage(it)) ! safe_str(show_time(CreTime(it), 0), buff, bp); else safe_str(T(e_notvis), buff, bp); } /* ARGSUSED */ FUNCTION(fun_mtime) { dbref it = match_thing(executor, args[0]); if (!GoodObject(it) || IsGarbage(it)) safe_str(T(e_notvis), buff, bp); else if (!Can_Examine(executor, it) || IsPlayer(it)) safe_str(T(e_perm), buff, bp); else ! safe_str(show_time(ModTime(it), 0), buff, bp); } /* ARGSUSED */ --- 1360,1418 ---- /* ARGSUSED */ FUNCTION(fun_ctime) { + bool utc = 0; dbref it = match_thing(executor, args[0]); ! if (nargs == 2) ! utc = parse_boolean(args[1]); ! ! if (!GoodObject(it) || IsGarbage(it)) ! safe_str(T(e_notvis), buff, bp); ! else if (!Can_Examine(executor, it)) ! safe_str(T(e_perm), buff, bp); else + safe_str(show_time(CreTime(it), utc), buff, bp); + } + + FUNCTION(fun_csecs) + { + dbref it = match_thing(executor, args[0]); + + if (!GoodObject(it) || IsGarbage(it)) safe_str(T(e_notvis), buff, bp); + else if (!Can_Examine(executor, it)) + safe_str(T(e_perm), buff, bp); + else + safe_integer((intmax_t) CreTime(it), buff, bp); } /* ARGSUSED */ FUNCTION(fun_mtime) { + bool utc = 0; dbref it = match_thing(executor, args[0]); + + if (nargs == 2) + utc = parse_boolean(args[1]); + if (!GoodObject(it) || IsGarbage(it)) safe_str(T(e_notvis), buff, bp); else if (!Can_Examine(executor, it) || IsPlayer(it)) safe_str(T(e_perm), buff, bp); else ! safe_str(show_time(ModTime(it), utc), buff, bp); ! } ! ! /* ARGSUSED */ ! FUNCTION(fun_msecs) ! { ! dbref it = match_thing(executor, args[0]); ! if (!GoodObject(it) || IsGarbage(it)) ! safe_str(T(e_notvis), buff, bp); ! else if (!Can_Examine(executor, it) || IsPlayer(it)) ! safe_str(T(e_perm), buff, bp); ! else ! safe_integer((intmax_t) ModTime(it), buff, bp); } /* ARGSUSED */ *************** *** 1419,1425 **** else { for (i = 0; i < deep; i++) { if (!GoodObject(it) || IsRoom(it)) ! break; it = Location(it); } safe_dbref(it, buff, bp); --- 1465,1471 ---- else { for (i = 0; i < deep; i++) { if (!GoodObject(it) || IsRoom(it)) ! break; it = Location(it); } safe_dbref(it, buff, bp); *************** *** 1528,1536 **** if (is_integer(args[0])) { int a = parse_integer(args[0]); if (abs(a) == 1) ! safe_str(MONEY, buff, bp); else ! safe_str(MONIES, buff, bp); } else { /* Guess we're just making a typo or something. */ safe_str("#-1", buff, bp); --- 1574,1582 ---- if (is_integer(args[0])) { int a = parse_integer(args[0]); if (abs(a) == 1) ! safe_str(MONEY, buff, bp); else ! safe_str(MONIES, buff, bp); } else { /* Guess we're just making a typo or something. */ safe_str("#-1", buff, bp); *************** *** 1562,1568 **** if (strchr(args[0], '/')) { parse_attrib(executor, args[0], &thing, &attrib); if (!GoodObject(thing) || !attrib ! || !Can_Read_Attr(executor, thing, attrib)) safe_str("#-1", buff, bp); else safe_dbref(attrib->creator, buff, bp); --- 1608,1614 ---- if (strchr(args[0], '/')) { parse_attrib(executor, args[0], &thing, &attrib); if (!GoodObject(thing) || !attrib ! || !Can_Read_Attr(executor, thing, attrib)) safe_str("#-1", buff, bp); else safe_dbref(attrib->creator, buff, bp); *************** *** 1587,1593 **** /* Support changing alias via function if side-effects are enabled */ if (nargs == 2) { if (!command_check_byname(executor, "ATTRIB_SET") ! || fun->flags & FN_NOSIDEFX) { safe_str(T(e_perm), buff, bp); return; } --- 1633,1639 ---- /* Support changing alias via function if side-effects are enabled */ if (nargs == 2) { if (!command_check_byname(executor, "ATTRIB_SET") ! || fun->flags & FN_NOSIDEFX) { safe_str(T(e_perm), buff, bp); return; } *************** *** 1666,1677 **** if (GoodObject(it)) { /* You must either be see_all, control it, or be inside it */ if (!(controls(executor, it) || See_All(executor) || ! (Location(executor) == it))) { safe_str(T(e_perm), buff, bp); return; } if (nameformat(executor, it, tbuf1, ! IsExit(it) ? shortname(it) : (char *) accented_name(it))) safe_str(tbuf1, buff, bp); else if (IsExit(it)) safe_str(shortname(it), buff, bp); --- 1712,1723 ---- if (GoodObject(it)) { /* You must either be see_all, control it, or be inside it */ if (!(controls(executor, it) || See_All(executor) || ! (Location(executor) == it))) { safe_str(T(e_perm), buff, bp); return; } if (nameformat(executor, it, tbuf1, ! IsExit(it) ? shortname(it) : (char *) accented_name(it))) safe_str(tbuf1, buff, bp); else if (IsExit(it)) safe_str(shortname(it), buff, bp); *************** *** 1835,1841 **** match_flags |= MAT_ENGLISH; break; case 'X': ! ambig_ok = 1; /* okay to pick last match */ break; default: notify_format(executor, T("I don't understand switch '%c'."), *p); --- 1881,1887 ---- match_flags |= MAT_ENGLISH; break; case 'X': ! ambig_ok = 1; /* okay to pick last match */ break; default: notify_format(executor, T("I don't understand switch '%c'."), *p); *************** *** 1872,1884 **** if (Can_Examine(executor, loc)) safe_dbref(item, buff, bp); else if (can_interact(item, executor, INTERACT_SEE) ! && (!DarkLegal(item) || Light(loc) || Light(item))) safe_dbref(item, buff, bp); else safe_dbref(NOTHING, buff, bp); } else { if (can_interact(item, executor, INTERACT_SEE) ! && (See_All(executor) || !DarkLegal(item) || Light(item))) safe_dbref(item, buff, bp); else safe_dbref(NOTHING, buff, bp); --- 1918,1930 ---- if (Can_Examine(executor, loc)) safe_dbref(item, buff, bp); else if (can_interact(item, executor, INTERACT_SEE) ! && (!DarkLegal(item) || Light(loc) || Light(item))) safe_dbref(item, buff, bp); else safe_dbref(NOTHING, buff, bp); } else { if (can_interact(item, executor, INTERACT_SEE) ! && (See_All(executor) || !DarkLegal(item) || Light(item))) safe_dbref(item, buff, bp); else safe_dbref(NOTHING, buff, bp); *************** *** 2148,2157 **** si = get_stats(who); if (who != ANY_OWNER) { safe_format(buff, bp, "%d %d %d %d %d", si->total - si->garbage, si->rooms, ! si->exits, si->things, si->players); } else { safe_format(buff, bp, "%d %d %d %d %d %d", si->total, si->rooms, si->exits, ! si->things, si->players, si->garbage); } } --- 2194,2203 ---- si = get_stats(who); if (who != ANY_OWNER) { safe_format(buff, bp, "%d %d %d %d %d", si->total - si->garbage, si->rooms, ! si->exits, si->things, si->players); } else { safe_format(buff, bp, "%d %d %d %d %d %d", si->total, si->rooms, si->exits, ! si->things, si->players, si->garbage); } } *************** *** 2172,2180 **** if (status == 1) { if (FUNCTION_SIDE_EFFECTS) { if (!command_check_byname(executor, "@atrlock") ! || fun->flags & FN_NOSIDEFX) { ! safe_str(T(e_perm), buff, bp); ! return; } do_atrlock(executor, args[0], args[1]); return; --- 2218,2226 ---- if (status == 1) { if (FUNCTION_SIDE_EFFECTS) { if (!command_check_byname(executor, "@atrlock") ! || fun->flags & FN_NOSIDEFX) { ! safe_str(T(e_perm), buff, bp); ! return; } do_atrlock(executor, args[0], args[1]); return; *************** *** 2195,2201 **** if ((thing = noisy_match_result(executor, args[0], NOTYPE, ! MAT_EVERYTHING)) == NOTHING) { safe_str(T(e_notvis), buff, bp); return; } --- 2241,2247 ---- if ((thing = noisy_match_result(executor, args[0], NOTYPE, ! MAT_EVERYTHING)) == NOTHING) { safe_str(T(e_notvis), buff, bp); return; } Index: src/sql.c =================================================================== *** src/sql.c (.../p2) (revision 920) --- src/sql.c (.../p3) (revision 920) *************** *** 35,41 **** #include #define sleep Sleep #endif ! #ifdef HAS_MYSQL #include #include static MYSQL *mysql_connp = NULL; --- 35,41 ---- #include #define sleep Sleep #endif ! #ifdef HAVE_MYSQL #include #include static MYSQL *mysql_connp = NULL; *************** *** 72,88 **** #define sql_test_result(qres) \ if (!qres) { \ if (affected_rows >= 0) { \ - notify_format(executor, "SQL: %d rows affected.", affected_rows); \ } else if (!sql_connected()) { \ ! notify(executor, "No SQL database connection."); \ } else { \ ! notify_format(executor, "SQL: Error: %s", sql_error()); \ ! safe_str("#-1", buff, bp); \ } \ return; \ } ! #ifdef HAS_MYSQL static MYSQL_RES *penn_mysql_sql_query(const char *, int *); static void penn_mysql_free_sql_query(MYSQL_RES * qres); static int penn_mysql_sql_init(void); --- 72,86 ---- #define sql_test_result(qres) \ if (!qres) { \ if (affected_rows >= 0) { \ } else if (!sql_connected()) { \ ! safe_str("#-1 SQL ERROR: NO DATABASE CONNECTED", buff, bp); \ } else { \ ! safe_format(buff, bp, "#-1 SQL ERROR: %s", sql_error()); \ } \ return; \ } ! #ifdef HAVE_MYSQL static MYSQL_RES *penn_mysql_sql_query(const char *, int *); static void penn_mysql_free_sql_query(MYSQL_RES * qres); static int penn_mysql_sql_init(void); *************** *** 100,106 **** static int penn_sqlite3_sql_init(void); static void penn_sqlite3_sql_shutdown(void); static int penn_sqlite3_sql_connected(void); ! static sqlite3_stmt *penn_sqlite3_sql_query(const char *); static void penn_sqlite3_free_sql_query(sqlite3_stmt *); #endif static sqlplatform sql_platform(void); --- 98,104 ---- static int penn_sqlite3_sql_init(void); static void penn_sqlite3_sql_shutdown(void); static int penn_sqlite3_sql_connected(void); ! static sqlite3_stmt *penn_sqlite3_sql_query(const char *, int *); static void penn_sqlite3_free_sql_query(sqlite3_stmt *); #endif static sqlplatform sql_platform(void); *************** *** 113,119 **** sql_platform(void) { static sqlplatform platform = SQL_PLATFORM_DISABLED; ! #ifdef HAS_MYSQL if (!strcasecmp(SQL_PLATFORM, "mysql")) platform = SQL_PLATFORM_MYSQL; #endif --- 111,117 ---- sql_platform(void) { static sqlplatform platform = SQL_PLATFORM_DISABLED; ! #ifdef HAVE_MYSQL if (!strcasecmp(SQL_PLATFORM, "mysql")) platform = SQL_PLATFORM_MYSQL; #endif *************** *** 137,143 **** sql_init(void) { switch (sql_platform()) { ! #ifdef HAS_MYSQL case SQL_PLATFORM_MYSQL: return penn_mysql_sql_init(); #endif --- 135,141 ---- sql_init(void) { switch (sql_platform()) { ! #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: return penn_mysql_sql_init(); #endif *************** *** 159,165 **** sql_connected(void) { switch (sql_platform()) { ! #ifdef HAS_MYSQL case SQL_PLATFORM_MYSQL: return penn_mysql_sql_connected(); #endif --- 157,163 ---- sql_connected(void) { switch (sql_platform()) { ! #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: return penn_mysql_sql_connected(); #endif *************** *** 181,187 **** sql_error(void) { switch (sql_platform()) { ! #ifdef HAS_MYSQL case SQL_PLATFORM_MYSQL: return mysql_error(mysql_connp); #endif --- 179,185 ---- sql_error(void) { switch (sql_platform()) { ! #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: return mysql_error(mysql_connp); #endif *************** *** 204,210 **** sql_shutdown(void) { switch (sql_platform()) { ! #ifdef HAS_MYSQL case SQL_PLATFORM_MYSQL: penn_mysql_sql_shutdown(); break; --- 202,208 ---- sql_shutdown(void) { switch (sql_platform()) { ! #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: penn_mysql_sql_shutdown(); break; *************** *** 225,234 **** } static void ! free_sql_query(void *queryp) { switch (sql_platform()) { ! #ifdef HAS_MYSQL case SQL_PLATFORM_MYSQL: penn_mysql_free_sql_query((MYSQL_RES *) queryp); break; --- 223,232 ---- } static void ! free_sql_query(void *queryp __attribute__ ((__unused__))) { switch (sql_platform()) { ! #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: penn_mysql_free_sql_query((MYSQL_RES *) queryp); break; *************** *** 249,258 **** } static void * ! sql_query(const char *query_str, int *affected_rows) { switch (sql_platform()) { ! #ifdef HAS_MYSQL case SQL_PLATFORM_MYSQL: return penn_mysql_sql_query(query_str, affected_rows); break; --- 247,257 ---- } static void * ! sql_query(const char *query_str __attribute__ ((__unused__)), int *affected_rows ! __attribute__ ((__unused__))) { switch (sql_platform()) { ! #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: return penn_mysql_sql_query(query_str, affected_rows); break; *************** *** 264,270 **** #endif #ifdef HAVE_SQLITE3 case SQL_PLATFORM_SQLITE3: ! return penn_sqlite3_sql_query(query_str); #endif default: return NULL; --- 263,269 ---- #endif #ifdef HAVE_SQLITE3 case SQL_PLATFORM_SQLITE3: ! return penn_sqlite3_sql_query(query_str, affected_rows); #endif default: return NULL; *************** *** 294,300 **** } } switch (sql_platform()) { ! #ifdef HAS_MYSQL case SQL_PLATFORM_MYSQL: chars_written = mysql_real_escape_string(mysql_connp, bigbuff, args[0], arglens[0]); --- 293,299 ---- } } switch (sql_platform()) { ! #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: chars_written = mysql_real_escape_string(mysql_connp, bigbuff, args[0], arglens[0]); *************** *** 326,332 **** COMMAND(cmd_sql) { ! #ifdef HAS_MYSQL MYSQL_FIELD *fields = NULL; #endif void *qres; --- 325,331 ---- COMMAND(cmd_sql) { ! #ifdef HAVE_MYSQL MYSQL_FIELD *fields = NULL; #endif void *qres; *************** *** 344,350 **** qres = sql_query(arg_left, &affected_rows); if (!qres) { ! if (!sql_connected()) { notify(player, "No SQL database connection."); } else { notify_format(player, "SQL: Error: %s", sql_error()); --- 343,351 ---- qres = sql_query(arg_left, &affected_rows); if (!qres) { ! if (affected_rows >= 0) { ! notify_format(player, "SQL: %d rows affected.", affected_rows); ! } else if (!sql_connected()) { notify(player, "No SQL database connection."); } else { notify_format(player, "SQL: Error: %s", sql_error()); *************** *** 352,367 **** return; } - if (affected_rows >= 0) - notify_format(player, "SQL: %d rows affected.", affected_rows); - /* Get results. A silent query (INSERT, UPDATE, etc.) will return NULL */ switch (sql_platform()) { ! #ifdef HAS_MYSQL case SQL_PLATFORM_MYSQL: affected_rows = mysql_affected_rows(mysql_connp); numfields = mysql_num_fields(qres); ! numrows = mysql_num_rows(qres); fields = mysql_fetch_fields(qres); break; #endif --- 353,366 ---- return; } /* Get results. A silent query (INSERT, UPDATE, etc.) will return NULL */ switch (sql_platform()) { ! #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: affected_rows = mysql_affected_rows(mysql_connp); numfields = mysql_num_fields(qres); ! numrows = INT_MAX; /* Using mysql_use_result() doesn't know the number ! of rows ahead of time. */ fields = mysql_fetch_fields(qres); break; #endif *************** *** 382,451 **** } for (rownum = 0; rownum < numrows; rownum++) { ! #ifdef HAS_MYSQL MYSQL_ROW row_p = NULL; ! if (sql_platform() == SQL_PLATFORM_MYSQL) row_p = mysql_fetch_row(qres); #endif #ifdef HAVE_SQLITE3 if (sql_platform() == SQL_PLATFORM_SQLITE3) { int retcode = sqlite3_step(qres); if (retcode == SQLITE_DONE) ! break; else if (retcode != SQLITE_ROW) { ! notify_format(player, "SQL: Error: %s", sql_error()); ! break; } } #endif if (numfields > 0) { for (i = 0; i < numfields; i++) { ! switch (sql_platform()) { ! #ifdef HAS_MYSQL ! case SQL_PLATFORM_MYSQL: ! cell = row_p[i]; ! name = fields[i].name; ! break; #endif #ifdef HAVE_POSTGRESQL ! case SQL_PLATFORM_POSTGRESQL: ! cell = PQgetvalue(qres, rownum, i); ! name = PQfname(qres, i); ! break; #endif #ifdef HAVE_SQLITE3 ! case SQL_PLATFORM_SQLITE3: ! cell = (char *) sqlite3_column_text(qres, i); ! name = (char *) sqlite3_column_name(qres, i); ! break; #endif ! default: ! /* Not reached, shuts up compiler */ ! break; ! } ! if (cell && *cell) { ! if (strchr(cell, ESC_CHAR)) { ! /* Old style ANSI string */ ! tbp = tbuf; ! as = parse_ansi_string_real(cell, 1); ! safe_ansi_string(as, 0, as->len, tbuf, &tbp); ! *tbp = '\0'; ! free_ansi_string(as); ! cell = tbuf; ! } else if (strchr(cell, TAG_START)) { ! /* Either old or new style ANSI string, ! * We assume new style. */ ! tbp = tbuf; ! as = parse_ansi_string_real(cell, 2); ! safe_ansi_string(as, 0, as->len, tbuf, &tbp); ! *tbp = '\0'; ! free_ansi_string(as); ! cell = tbuf; ! } ! } ! notify_format(player, "Row %d, Field %s: %s", ! rownum + 1, name, (cell && *cell) ? cell : "NULL"); } } else notify_format(player, "Row %d: NULL", rownum + 1); --- 381,453 ---- } for (rownum = 0; rownum < numrows; rownum++) { ! #ifdef HAVE_MYSQL MYSQL_ROW row_p = NULL; ! if (sql_platform() == SQL_PLATFORM_MYSQL) { row_p = mysql_fetch_row(qres); + if (!row_p) + break; + } #endif #ifdef HAVE_SQLITE3 if (sql_platform() == SQL_PLATFORM_SQLITE3) { int retcode = sqlite3_step(qres); if (retcode == SQLITE_DONE) ! break; else if (retcode != SQLITE_ROW) { ! notify_format(player, "SQL: Error: %s", sql_error()); ! break; } } #endif if (numfields > 0) { for (i = 0; i < numfields; i++) { ! switch (sql_platform()) { ! #ifdef HAVE_MYSQL ! case SQL_PLATFORM_MYSQL: ! cell = row_p[i]; ! name = fields[i].name; ! break; #endif #ifdef HAVE_POSTGRESQL ! case SQL_PLATFORM_POSTGRESQL: ! cell = PQgetvalue(qres, rownum, i); ! name = PQfname(qres, i); ! break; #endif #ifdef HAVE_SQLITE3 ! case SQL_PLATFORM_SQLITE3: ! cell = (char *) sqlite3_column_text(qres, i); ! name = (char *) sqlite3_column_name(qres, i); ! break; #endif ! default: ! /* Not reached, shuts up compiler */ ! break; ! } ! if (cell && *cell) { ! if (strchr(cell, ESC_CHAR)) { ! /* Old style ANSI string */ ! tbp = tbuf; ! as = parse_ansi_string_real(cell, 1); ! safe_ansi_string(as, 0, as->len, tbuf, &tbp); ! *tbp = '\0'; ! free_ansi_string(as); ! cell = tbuf; ! } else if (strchr(cell, TAG_START)) { ! /* Either old or new style ANSI string, ! * We assume new style. */ ! tbp = tbuf; ! as = parse_ansi_string_real(cell, 2); ! safe_ansi_string(as, 0, as->len, tbuf, &tbp); ! *tbp = '\0'; ! free_ansi_string(as); ! cell = tbuf; ! } ! } ! notify_format(player, "Row %d, Field %s: %s", ! rownum + 1, name, (cell && *cell) ? cell : "NULL"); } } else notify_format(player, "Row %d: NULL", rownum + 1); *************** *** 473,479 **** char *tbp; char *cell = NULL; ansi_string *as; ! #ifdef HAS_MYSQL MYSQL_FIELD *fields = NULL; #endif --- 475,481 ---- char *tbp; char *cell = NULL; ansi_string *as; ! #ifdef HAVE_MYSQL MYSQL_FIELD *fields = NULL; #endif *************** *** 508,517 **** /* Get results. A silent query (INSERT, UPDATE, etc.) will return NULL */ switch (sql_platform()) { ! #ifdef HAS_MYSQL case SQL_PLATFORM_MYSQL: numfields = mysql_num_fields(qres); ! numrows = mysql_num_rows(qres); break; #endif #ifdef HAVE_POSTGRESQL --- 510,519 ---- /* Get results. A silent query (INSERT, UPDATE, etc.) will return NULL */ switch (sql_platform()) { ! #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: numfields = mysql_num_fields(qres); ! numrows = INT_MAX; break; #endif #ifdef HAVE_POSTGRESQL *************** *** 531,537 **** } if (do_fieldnames) { ! strncpy(numbuff, unparse_integer(0), 20); wenv[0] = numbuff; #ifdef HAVE_MYSQL if (sql_platform() == SQL_PLATFORM_MYSQL) --- 533,539 ---- } if (do_fieldnames) { ! mush_strncpy(numbuff, unparse_integer(0), 20); wenv[0] = numbuff; #ifdef HAVE_MYSQL if (sql_platform() == SQL_PLATFORM_MYSQL) *************** *** 541,561 **** switch (sql_platform()) { #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: ! wenv[i + 1] = fields[i].name; ! break; #endif #ifdef HAVE_POSTGRESQL case SQL_PLATFORM_POSTGRESQL: ! wenv[i + 1] = PQfname(qres, i); ! break; #endif #ifdef HAVE_SQLITE3 case SQL_PLATFORM_SQLITE3: ! wenv[i + 1] = (char *) sqlite3_column_name(qres, i); ! break; #endif default: ! break; } } if (call_ufun(&ufun, wenv, i + 1, rbuff, executor, enactor, pe_info)) --- 543,563 ---- switch (sql_platform()) { #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: ! wenv[i + 1] = fields[i].name; ! break; #endif #ifdef HAVE_POSTGRESQL case SQL_PLATFORM_POSTGRESQL: ! wenv[i + 1] = PQfname(qres, i); ! break; #endif #ifdef HAVE_SQLITE3 case SQL_PLATFORM_SQLITE3: ! wenv[i + 1] = (char *) sqlite3_column_name(qres, i); ! break; #endif default: ! break; } } if (call_ufun(&ufun, wenv, i + 1, rbuff, executor, enactor, pe_info)) *************** *** 564,629 **** } for (rownum = 0; rownum < numrows; rownum++) { ! #ifdef HAS_MYSQL MYSQL_ROW row_p = NULL; ! if (sql_platform() == SQL_PLATFORM_MYSQL) row_p = mysql_fetch_row(qres); #endif #ifdef HAVE_SQLITE3 if (sql_platform() == SQL_PLATFORM_SQLITE3) { int retcode = sqlite3_step(qres); if (retcode == SQLITE_DONE) ! break; else if (retcode != SQLITE_ROW) ! goto finished; } #endif if (rownum > 0 || do_fieldnames) { safe_str(osep, buff, bp); } ! strncpy(numbuff, unparse_integer(rownum + 1), 20); wenv[0] = numbuff; for (i = 0; (i < numfields) && (i < 9); i++) { switch (sql_platform()) { ! #ifdef HAS_MYSQL case SQL_PLATFORM_MYSQL: ! cell = row_p[i]; ! break; #endif #ifdef HAVE_POSTGRESQL case SQL_PLATFORM_POSTGRESQL: ! cell = PQgetvalue(qres, rownum, i); ! break; #endif #ifdef HAVE_SQLITE3 case SQL_PLATFORM_SQLITE3: ! cell = (char *) sqlite3_column_text(qres, i); ! break; #endif default: ! break; } if (strchr(cell, ESC_CHAR)) { ! /* Old style ANSI string */ ! tbp = buffs[i]; ! as = parse_ansi_string_real(cell, 1); ! safe_ansi_string(as, 0, as->len, buffs[i], &tbp); ! *tbp = '\0'; ! free_ansi_string(as); ! cell = buffs[i]; } else if (strchr(cell, TAG_START)) { ! /* Either old or new style ANSI string, ! * We assume new style. */ ! tbp = buffs[i]; ! as = parse_ansi_string_real(cell, 2); ! safe_ansi_string(as, 0, as->len, buffs[i], &tbp); ! *tbp = '\0'; ! free_ansi_string(as); ! cell = buffs[i]; } wenv[i + 1] = cell; if (!wenv[i + 1]) ! wenv[i + 1] = (char *) ""; } /* Now call the ufun. */ if (call_ufun(&ufun, wenv, i + 1, rbuff, executor, enactor, pe_info)) --- 566,634 ---- } for (rownum = 0; rownum < numrows; rownum++) { ! #ifdef HAVE_MYSQL MYSQL_ROW row_p = NULL; ! if (sql_platform() == SQL_PLATFORM_MYSQL) { row_p = mysql_fetch_row(qres); + if (!row_p) + break; + } #endif #ifdef HAVE_SQLITE3 if (sql_platform() == SQL_PLATFORM_SQLITE3) { int retcode = sqlite3_step(qres); if (retcode == SQLITE_DONE) ! break; else if (retcode != SQLITE_ROW) ! goto finished; } #endif if (rownum > 0 || do_fieldnames) { safe_str(osep, buff, bp); } ! mush_strncpy(numbuff, unparse_integer(rownum + 1), 20); wenv[0] = numbuff; for (i = 0; (i < numfields) && (i < 9); i++) { switch (sql_platform()) { ! #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: ! cell = row_p[i]; ! break; #endif #ifdef HAVE_POSTGRESQL case SQL_PLATFORM_POSTGRESQL: ! cell = PQgetvalue(qres, rownum, i); ! break; #endif #ifdef HAVE_SQLITE3 case SQL_PLATFORM_SQLITE3: ! cell = (char *) sqlite3_column_text(qres, i); ! break; #endif default: ! break; } if (strchr(cell, ESC_CHAR)) { ! /* Old style ANSI string */ ! tbp = buffs[i]; ! as = parse_ansi_string_real(cell, 1); ! safe_ansi_string(as, 0, as->len, buffs[i], &tbp); ! *tbp = '\0'; ! free_ansi_string(as); ! cell = buffs[i]; } else if (strchr(cell, TAG_START)) { ! /* Either old or new style ANSI string, ! * We assume new style. */ ! tbp = buffs[i]; ! as = parse_ansi_string_real(cell, 2); ! safe_ansi_string(as, 0, as->len, buffs[i], &tbp); ! *tbp = '\0'; ! free_ansi_string(as); ! cell = buffs[i]; } wenv[i + 1] = cell; if (!wenv[i + 1]) ! wenv[i + 1] = (char *) ""; } /* Now call the ufun. */ if (call_ufun(&ufun, wenv, i + 1, rbuff, executor, enactor, pe_info)) *************** *** 674,683 **** /* Get results. A silent query (INSERT, UPDATE, etc.) will return NULL */ switch (sql_platform()) { ! #ifdef HAS_MYSQL case SQL_PLATFORM_MYSQL: numfields = mysql_num_fields(qres); ! numrows = mysql_num_rows(qres); break; #endif #ifdef HAVE_POSTGRESQL --- 679,688 ---- /* Get results. A silent query (INSERT, UPDATE, etc.) will return NULL */ switch (sql_platform()) { ! #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: numfields = mysql_num_fields(qres); ! numrows = INT_MAX; break; #endif #ifdef HAVE_POSTGRESQL *************** *** 697,763 **** } for (rownum = 0; rownum < numrows; rownum++) { ! #ifdef HAS_MYSQL MYSQL_ROW row_p = NULL; ! if (sql_platform() == SQL_PLATFORM_MYSQL) row_p = mysql_fetch_row(qres); #endif #ifdef HAVE_SQLITE3 if (sql_platform() == SQL_PLATFORM_SQLITE3) { int retcode = sqlite3_step(qres); if (retcode == SQLITE_DONE) ! break; else if (retcode != SQLITE_ROW) ! break; } #endif if (rownum > 0) safe_str(rowsep, buff, bp); for (i = 0; i < numfields; i++) { if (i > 0) { ! if (safe_str(fieldsep, buff, bp)) ! goto finished; } switch (sql_platform()) { ! #ifdef HAS_MYSQL case SQL_PLATFORM_MYSQL: ! cell = row_p[i]; ! break; #endif #ifdef HAVE_POSTGRESQL case SQL_PLATFORM_POSTGRESQL: ! cell = PQgetvalue(qres, rownum, i); ! break; #endif #ifdef HAVE_SQLITE3 case SQL_PLATFORM_SQLITE3: ! cell = (char *) sqlite3_column_text(qres, i); ! break; #endif default: ! break; } if (cell && *cell) { ! if (strchr(cell, ESC_CHAR)) { ! /* Old style ANSI string */ ! tbp = tbuf; ! as = parse_ansi_string_real(cell, 1); ! safe_ansi_string(as, 0, as->len, tbuf, &tbp); ! *tbp = '\0'; ! free_ansi_string(as); ! cell = tbuf; ! } else if (strchr(cell, TAG_START)) { ! /* Either old or new style ANSI string, ! * We assume new style. */ ! tbp = tbuf; ! as = parse_ansi_string_real(cell, 2); ! safe_ansi_string(as, 0, as->len, tbuf, &tbp); ! *tbp = '\0'; ! free_ansi_string(as); ! cell = tbuf; ! } ! if (safe_str(cell, buff, bp)) ! goto finished; /* We filled the buffer, best stop */ } } } --- 702,771 ---- } for (rownum = 0; rownum < numrows; rownum++) { ! #ifdef HAVE_MYSQL MYSQL_ROW row_p = NULL; ! if (sql_platform() == SQL_PLATFORM_MYSQL) { row_p = mysql_fetch_row(qres); + if (!row_p) + break; + } #endif #ifdef HAVE_SQLITE3 if (sql_platform() == SQL_PLATFORM_SQLITE3) { int retcode = sqlite3_step(qres); if (retcode == SQLITE_DONE) ! break; else if (retcode != SQLITE_ROW) ! break; } #endif if (rownum > 0) safe_str(rowsep, buff, bp); for (i = 0; i < numfields; i++) { if (i > 0) { ! if (safe_str(fieldsep, buff, bp)) ! goto finished; } switch (sql_platform()) { ! #ifdef HAVE_MYSQL case SQL_PLATFORM_MYSQL: ! cell = row_p[i]; ! break; #endif #ifdef HAVE_POSTGRESQL case SQL_PLATFORM_POSTGRESQL: ! cell = PQgetvalue(qres, rownum, i); ! break; #endif #ifdef HAVE_SQLITE3 case SQL_PLATFORM_SQLITE3: ! cell = (char *) sqlite3_column_text(qres, i); ! break; #endif default: ! break; } if (cell && *cell) { ! if (strchr(cell, ESC_CHAR)) { ! /* Old style ANSI string */ ! tbp = tbuf; ! as = parse_ansi_string_real(cell, 1); ! safe_ansi_string(as, 0, as->len, tbuf, &tbp); ! *tbp = '\0'; ! free_ansi_string(as); ! cell = tbuf; ! } else if (strchr(cell, TAG_START)) { ! /* Either old or new style ANSI string, ! * We assume new style. */ ! tbp = tbuf; ! as = parse_ansi_string_real(cell, 2); ! safe_ansi_string(as, 0, as->len, tbuf, &tbp); ! *tbp = '\0'; ! free_ansi_string(as); ! cell = tbuf; ! } ! if (safe_str(cell, buff, bp)) ! goto finished; /* We filled the buffer, best stop */ } } } *************** *** 768,774 **** /* MYSQL-specific functions */ ! #ifdef HAS_MYSQL static void penn_mysql_sql_shutdown(void) --- 776,782 ---- /* MYSQL-specific functions */ ! #ifdef HAVE_MYSQL static void penn_mysql_sql_shutdown(void) *************** *** 808,815 **** sql_shutdown(); /* Parse SQL_HOST into sql_host and sql_port */ ! strncpy(sql_host, SQL_HOST, BUFFER_LEN); ! sql_host[BUFFER_LEN - 1] = '\0'; if ((p = strchr(sql_host, ':'))) { *p++ = '\0'; sql_port = atoi(p); --- 816,822 ---- sql_shutdown(); /* Parse SQL_HOST into sql_host and sql_port */ ! mush_strncpy(sql_host, SQL_HOST, BUFFER_LEN); if ((p = strchr(sql_host, ':'))) { *p++ = '\0'; sql_port = atoi(p); *************** *** 824,832 **** mysql_connp = mysql_init(NULL); if (!mysql_real_connect ! (mysql_connp, sql_host, SQL_USER, SQL_PASS, SQL_DB, sql_port, 0, 0)) { do_rawlog(LT_ERR, "Failed mysql connection: %s\n", ! mysql_error(mysql_connp)); sql_shutdown(); sleep(1); } --- 831,839 ---- mysql_connp = mysql_init(NULL); if (!mysql_real_connect ! (mysql_connp, sql_host, SQL_USER, SQL_PASS, SQL_DB, sql_port, 0, 0)) { do_rawlog(LT_ERR, "Failed mysql connection: %s\n", ! mysql_error(mysql_connp)); sql_shutdown(); sleep(1); } *************** *** 879,885 **** if (mysql_field_count(mysql_connp) == 0) { /* We didn't expect data back, so see if we modified anything */ if (affected_rows) ! *affected_rows = mysql_affected_rows(mysql_connp); return NULL; } else { /* Oops, we should have had data! */ --- 886,892 ---- if (mysql_field_count(mysql_connp) == 0) { /* We didn't expect data back, so see if we modified anything */ if (affected_rows) ! *affected_rows = mysql_affected_rows(mysql_connp); return NULL; } else { /* Oops, we should have had data! */ *************** *** 938,946 **** sql_shutdown(); /* Parse SQL_HOST into sql_host and sql_port */ ! strncpy(sql_host, SQL_HOST, BUFFER_LEN); strcpy(sql_port, "5432"); - sql_host[BUFFER_LEN - 1] = '\0'; if ((p = strchr(sql_host, ':'))) { *p++ = '\0'; if (*p) --- 945,952 ---- sql_shutdown(); /* Parse SQL_HOST into sql_host and sql_port */ ! mush_strncpy(sql_host, SQL_HOST, BUFFER_LEN); strcpy(sql_port, "5432"); if ((p = strchr(sql_host, ':'))) { *p++ = '\0'; if (*p) *************** *** 951,962 **** /* Try to connect to the database host. */ char conninfo[BUFFER_LEN]; snprintf(conninfo, BUFFER_LEN, ! "host=%s port=%s dbname=%s user=%s password=%s", sql_host, ! sql_port, SQL_DB, SQL_USER, SQL_PASS); postgres_connp = PQconnectdb(conninfo); if (PQstatus(postgres_connp) != CONNECTION_OK) { do_rawlog(LT_ERR, "Failed postgresql connection to %s: %s\n", ! PQdb(postgres_connp), PQerrorMessage(postgres_connp)); sql_shutdown(); sleep(1); } --- 957,968 ---- /* Try to connect to the database host. */ char conninfo[BUFFER_LEN]; snprintf(conninfo, BUFFER_LEN, ! "host=%s port=%s dbname=%s user=%s password=%s", sql_host, ! sql_port, SQL_DB, SQL_USER, SQL_PASS); postgres_connp = PQconnectdb(conninfo); if (PQstatus(postgres_connp) != CONNECTION_OK) { do_rawlog(LT_ERR, "Failed postgresql connection to %s: %s\n", ! PQdb(postgres_connp), PQerrorMessage(postgres_connp)); sql_shutdown(); sleep(1); } *************** *** 992,1004 **** /* Send the query. If it returns non-zero, we have an error. */ qres = PQexec(postgres_connp, q_string); if (!qres || (PQresultStatus(qres) != PGRES_COMMAND_OK && ! PQresultStatus(qres) != PGRES_TUPLES_OK)) { /* Serious error, try one more time */ sql_init(); if (sql_connected()) qres = PQexec(postgres_connp, q_string); if (!qres || (PQresultStatus(qres) != PGRES_COMMAND_OK && ! PQresultStatus(qres) != PGRES_TUPLES_OK)) { return NULL; } } --- 998,1010 ---- /* Send the query. If it returns non-zero, we have an error. */ qres = PQexec(postgres_connp, q_string); if (!qres || (PQresultStatus(qres) != PGRES_COMMAND_OK && ! PQresultStatus(qres) != PGRES_TUPLES_OK)) { /* Serious error, try one more time */ sql_init(); if (sql_connected()) qres = PQexec(postgres_connp, q_string); if (!qres || (PQresultStatus(qres) != PGRES_COMMAND_OK && ! PQresultStatus(qres) != PGRES_TUPLES_OK)) { return NULL; } } *************** *** 1016,1022 **** { PQclear(qres); } ! #endif /* HAVE_POSTGRESQL */ #ifdef HAVE_SQLITE3 --- 1022,1028 ---- { PQclear(qres); } ! #endif /* HAVE_POSTGRESQL */ #ifdef HAVE_SQLITE3 *************** *** 1050,1056 **** } static sqlite3_stmt * ! penn_sqlite3_sql_query(const char *query) { int q_len, retcode; const char *eoq = NULL; --- 1056,1062 ---- } static sqlite3_stmt * ! penn_sqlite3_sql_query(const char *query, int *affected_rows) { int q_len, retcode; const char *eoq = NULL; *************** *** 1069,1074 **** --- 1075,1082 ---- retcode = sqlite3_prepare(sqlite3_connp, query, q_len, &statement, &eoq); #endif + *affected_rows = -1; /* Can't find this out yet */ + if (retcode == SQLITE_OK) return statement; else *************** *** 1080,1083 **** { sqlite3_finalize(stmt); } ! #endif /* HAVE_SQLITE3 */ --- 1088,1091 ---- { sqlite3_finalize(stmt); } ! #endif /* HAVE_SQLITE3 */ Index: src/extchat.c =================================================================== *** src/extchat.c (.../p2) (revision 920) --- src/extchat.c (.../p3) (revision 920) *************** *** 63,71 **** static int yesno(const char *str); static int canstilladd(dbref player); static enum cmatch_type find_channel_partial_on(const char *name, CHAN **chan, ! dbref player); static enum cmatch_type find_channel_partial_off(const char *name, CHAN **chan, ! dbref player); static char *list_cuflags(CHANUSER *u, int verbose); static void channel_join_self(dbref player, const char *name); static void channel_leave_self(dbref player, const char *name); --- 63,71 ---- static int yesno(const char *str); static int canstilladd(dbref player); static enum cmatch_type find_channel_partial_on(const char *name, CHAN **chan, ! dbref player); static enum cmatch_type find_channel_partial_off(const char *name, CHAN **chan, ! dbref player); static char *list_cuflags(CHANUSER *u, int verbose); static void channel_join_self(dbref player, const char *name); static void channel_leave_self(dbref player, const char *name); *************** *** 73,92 **** void chat_player_announce(dbref player, char *msg, int ungag); static int ok_channel_name(const char *n); static void format_channel_broadcast(CHAN *chan, CHANUSER *u, dbref victim, ! int flags, const char *msg, ! const char *extra); static void list_partial_matches(dbref player, const char *name, ! enum chan_match_type type); ! const char *chan_speak_lock = "ChanSpeakLock"; /**< Name of speak lock */ ! const char *chan_join_lock = "ChanJoinLock"; /**< Name of join lock */ ! const char *chan_mod_lock = "ChanModLock"; /**< Name of modify lock */ ! const char *chan_see_lock = "ChanSeeLock"; /**< Name of see lock */ ! const char *chan_hide_lock = "ChanHideLock"; /**< Name of hide lock */ ! #define YES 1 /**< An affirmative. */ ! #define NO 0 /**< A negative. */ ! #define ERR -1 /**< An error. Clever, eh? */ /** Wrapper for insert_user() that generates a new CHANUSER and inserts it */ #define insert_user_by_dbref(who,chan) \ --- 73,92 ---- void chat_player_announce(dbref player, char *msg, int ungag); static int ok_channel_name(const char *n); static void format_channel_broadcast(CHAN *chan, CHANUSER *u, dbref victim, ! int flags, const char *msg, ! const char *extra); static void list_partial_matches(dbref player, const char *name, ! enum chan_match_type type); ! const char *chan_speak_lock = "ChanSpeakLock"; /**< Name of speak lock */ ! const char *chan_join_lock = "ChanJoinLock"; /**< Name of join lock */ ! const char *chan_mod_lock = "ChanModLock"; /**< Name of modify lock */ ! const char *chan_see_lock = "ChanSeeLock"; /**< Name of see lock */ ! const char *chan_hide_lock = "ChanHideLock"; /**< Name of hide lock */ ! #define YES 1 /**< An affirmative. */ ! #define NO 0 /**< A negative. */ ! #define ERR -1 /**< An error. Clever, eh? */ /** Wrapper for insert_user() that generates a new CHANUSER and inserts it */ #define insert_user_by_dbref(who,chan) \ *************** *** 97,103 **** int num_channels; /**< Number of channels defined */ ! CHAN *channels; /**< Pointer to channel list */ static PRIV priv_table[] = { {"Disabled", 'D', CHANNEL_DISABLED, CHANNEL_DISABLED}, --- 97,103 ---- int num_channels; /**< Number of channels defined */ ! CHAN *channels; /**< Pointer to channel list */ static PRIV priv_table[] = { {"Disabled", 'D', CHANNEL_DISABLED, CHANNEL_DISABLED}, *************** *** 276,286 **** if (strcmp(chat_timestamp, db_timestamp)) do_rawlog(LT_ERR, ! T ! ("CHAT: warning: chatdb and game db were saved at different times!")); /* How many channels? */ ! db_read_this_labeled_number(fp, "channels", &num_channels); if (num_channels > MAX_CHANNELS) return 0; --- 276,286 ---- if (strcmp(chat_timestamp, db_timestamp)) do_rawlog(LT_ERR, ! T ! ("CHAT: warning: chatdb and game db were saved at different times!")); /* How many channels? */ ! db_read_this_labeled_int(fp, "channels", &num_channels); if (num_channels > MAX_CHANNELS) return 0; *************** *** 394,400 **** if (feof(fp)) return 0; strcpy(ChanTitle(ch), getstring_noalloc(fp)); ! ChanType(ch) = getref(fp); ChanCreator(ch) = getref(fp); ChanCost(ch) = getref(fp); ChanNumMsgs(ch) = 0; --- 394,400 ---- if (feof(fp)) return 0; strcpy(ChanTitle(ch), getstring_noalloc(fp)); ! ChanType(ch) = (privbits) getref(fp); ChanCreator(ch) = getref(fp); ChanCost(ch) = getref(fp); ChanNumMsgs(ch) = 0; *************** *** 426,436 **** strcpy(ChanName(ch), tmp); db_read_this_labeled_string(fp, "description", &tmp); strcpy(ChanTitle(ch), tmp); ! db_read_this_labeled_number(fp, "flags", &i); ! ChanType(ch) = i; db_read_this_labeled_dbref(fp, "creator", &d); ChanCreator(ch) = d; ! db_read_this_labeled_number(fp, "cost", &i); ChanCost(ch) = i; ChanNumMsgs(ch) = 0; while (1) { --- 426,436 ---- strcpy(ChanName(ch), tmp); db_read_this_labeled_string(fp, "description", &tmp); strcpy(ChanTitle(ch), tmp); ! db_read_this_labeled_int(fp, "flags", &i); ! ChanType(ch) = (privbits) i; db_read_this_labeled_dbref(fp, "creator", &d); ChanCreator(ch) = d; ! db_read_this_labeled_int(fp, "cost", &i); ChanCost(ch) = i; ChanNumMsgs(ch) = 0; while (1) { *************** *** 473,483 **** strcpy(CUtitle(user), getstring_noalloc(fp)); CUnext(user) = NULL; if (insert_user(user, ch)) ! num++; } else { /* But be sure to read (and discard) the player's info */ do_log(LT_ERR, 0, 0, T("Bad object #%d removed from channel %s"), ! player, ChanName(ch)); (void) getref(fp); (void) getstring_noalloc(fp); } --- 473,483 ---- strcpy(CUtitle(user), getstring_noalloc(fp)); CUnext(user) = NULL; if (insert_user(user, ch)) ! num++; } else { /* But be sure to read (and discard) the player's info */ do_log(LT_ERR, 0, 0, T("Bad object #%d removed from channel %s"), ! player, ChanName(ch)); (void) getref(fp); (void) getstring_noalloc(fp); } *************** *** 498,515 **** /* Don't bother if the player isn't a valid dbref or the wrong type */ if (GoodObject(player) && Chan_Ok_Type(ch, player)) { user = new_user(player); ! db_read_this_labeled_number(fp, "flags", &n); CUtype(user) = n; db_read_this_labeled_string(fp, "title", &tmp); strcpy(CUtitle(user), tmp); CUnext(user) = NULL; if (insert_user(user, ch)) ! num++; } else { /* But be sure to read (and discard) the player's info */ do_log(LT_ERR, 0, 0, T("Bad object #%d removed from channel %s"), ! player, ChanName(ch)); ! db_read_this_labeled_number(fp, "type", &n); db_read_this_labeled_string(fp, "title", &tmp); } } --- 498,515 ---- /* Don't bother if the player isn't a valid dbref or the wrong type */ if (GoodObject(player) && Chan_Ok_Type(ch, player)) { user = new_user(player); ! db_read_this_labeled_int(fp, "flags", &n); CUtype(user) = n; db_read_this_labeled_string(fp, "title", &tmp); strcpy(CUtitle(user), tmp); CUnext(user) = NULL; if (insert_user(user, ch)) ! num++; } else { /* But be sure to read (and discard) the player's info */ do_log(LT_ERR, 0, 0, T("Bad object #%d removed from channel %s"), ! player, ChanName(ch)); ! db_read_this_labeled_int(fp, "type", &n); db_read_this_labeled_string(fp, "title", &tmp); } } *************** *** 617,625 **** } else { /* Otherwise, find which channel this channel should be inserted after */ for (; ! p->next ! && (strcasecoll(ChanName(p->next->chan), ChanName(*ch)) < 0); ! p = p->next) ; if (p->next && !strcasecmp(ChanName(p->next->chan), ChanName(*ch))) { /* Don't add the same channel twice! */ free_chanlist(tmp); --- 617,625 ---- } else { /* Otherwise, find which channel this channel should be inserted after */ for (; ! p->next ! && (strcasecoll(ChanName(p->next->chan), ChanName(*ch)) < 0); ! p = p->next) ; if (p->next && !strcasecmp(ChanName(p->next->chan), ChanName(*ch))) { /* Don't add the same channel twice! */ free_chanlist(tmp); *************** *** 711,719 **** } else { /* Otherwise, find which user this user should be inserted after */ for (; ! p->next ! && (strcasecoll(Name(CUdbref(p->next)), Name(CUdbref(user))) <= 0); ! p = p->next) ; if (CUdbref(p) == CUdbref(user)) { /* Don't add the same user twice! */ mush_free((Malloc_t) user, "CHANUSER"); --- 711,719 ---- } else { /* Otherwise, find which user this user should be inserted after */ for (; ! p->next ! && (strcasecoll(Name(CUdbref(p->next)), Name(CUdbref(user))) <= 0); ! p = p->next) ; if (CUdbref(p) == CUdbref(user)) { /* Don't add the same user twice! */ mush_free((Malloc_t) user, "CHANUSER"); *************** *** 776,782 **** /* How many channels? */ OUTPUT(fprintf(fp, "+V%d\n", default_flags)); db_write_labeled_string(fp, "savedtime", show_time(mudtime, 1)); ! db_write_labeled_number(fp, "channels", num_channels); for (ch = channels; ch; ch = ch->next) { save_channel(fp, ch); } --- 776,782 ---- /* How many channels? */ OUTPUT(fprintf(fp, "+V%d\n", default_flags)); db_write_labeled_string(fp, "savedtime", show_time(mudtime, 1)); ! db_write_labeled_int(fp, "channels", num_channels); for (ch = channels; ch; ch = ch->next) { save_channel(fp, ch); } *************** *** 793,801 **** db_write_labeled_string(fp, " name", ChanName(ch)); db_write_labeled_string(fp, " description", ChanTitle(ch)); ! db_write_labeled_number(fp, " flags", ChanType(ch)); db_write_labeled_dbref(fp, " creator", ChanCreator(ch)); ! db_write_labeled_number(fp, " cost", ChanCost(ch)); db_write_labeled_string(fp, " lock", "join"); putboolexp(fp, ChanJoinLock(ch)); db_write_labeled_string(fp, " lock", "speak"); --- 793,801 ---- db_write_labeled_string(fp, " name", ChanName(ch)); db_write_labeled_string(fp, " description", ChanTitle(ch)); ! db_write_labeled_int(fp, " flags", ChanType(ch)); db_write_labeled_dbref(fp, " creator", ChanCreator(ch)); ! db_write_labeled_int(fp, " cost", ChanCost(ch)); db_write_labeled_string(fp, " lock", "join"); putboolexp(fp, ChanJoinLock(ch)); db_write_labeled_string(fp, " lock", "speak"); *************** *** 806,812 **** putboolexp(fp, ChanSeeLock(ch)); db_write_labeled_string(fp, " lock", "hide"); putboolexp(fp, ChanHideLock(ch)); ! db_write_labeled_number(fp, " users", ChanNumUsers(ch)); for (cu = ChanUsers(ch); cu; cu = cu->next) save_chanuser(fp, cu); return 1; --- 806,812 ---- putboolexp(fp, ChanSeeLock(ch)); db_write_labeled_string(fp, " lock", "hide"); putboolexp(fp, ChanHideLock(ch)); ! db_write_labeled_int(fp, " users", ChanNumUsers(ch)); for (cu = ChanUsers(ch); cu; cu = cu->next) save_chanuser(fp, cu); return 1; *************** *** 817,823 **** save_chanuser(FILE * fp, CHANUSER *user) { db_write_labeled_dbref(fp, " dbref", CUdbref(user)); ! db_write_labeled_number(fp, " flags", CUtype(user)); db_write_labeled_string(fp, " title", CUtitle(user)); return 1; } --- 817,823 ---- save_chanuser(FILE * fp, CHANUSER *user) { db_write_labeled_dbref(fp, " dbref", CUdbref(user)); ! db_write_labeled_int(fp, " flags", CUtype(user)); db_write_labeled_string(fp, " title", CUtitle(user)); return 1; } *************** *** 891,906 **** if (!strcasecmp(cleanname, cleanp)) { *chan = p; if (Chan_Can_See(*chan, player) || onchannel(player, *chan)) ! return CMATCH_EXACT; else ! return CMATCH_NONE; } if (string_prefix(cleanp, name)) { /* Keep the alphabetically first channel if we've got one */ if (Chan_Can_See(p, player) || onchannel(player, p)) { ! if (!*chan) ! *chan = p; ! count++; } } } --- 891,906 ---- if (!strcasecmp(cleanname, cleanp)) { *chan = p; if (Chan_Can_See(*chan, player) || onchannel(player, *chan)) ! return CMATCH_EXACT; else ! return CMATCH_NONE; } if (string_prefix(cleanp, name)) { /* Keep the alphabetically first channel if we've got one */ if (Chan_Can_See(p, player) || onchannel(player, p)) { ! if (!*chan) ! *chan = p; ! count++; } } } *************** *** 952,958 **** * our best candidate so far. */ if (!*chan || (!onchannel(player, *chan) && onchannel(player, p))) ! *chan = p; count++; } } --- 952,958 ---- * our best candidate so far. */ if (!*chan || (!onchannel(player, *chan) && onchannel(player, p))) ! *chan = p; count++; } } *************** *** 983,994 **** if (!Chan_Can_See(p, player)) continue; if ((type == PMATCH_ALL) || ((type == PMATCH_ON) ! ? !!onchannel(player, p) ! : !onchannel(player, p))) { strcpy(cleanp, remove_markup(ChanName(p), NULL)); if (string_prefix(cleanp, cleanname)) { ! safe_chr(' ', buff, &bp); ! safe_str(ChanName(p), buff, &bp); } } } --- 983,994 ---- if (!Chan_Can_See(p, player)) continue; if ((type == PMATCH_ALL) || ((type == PMATCH_ON) ! ? !!onchannel(player, p) ! : !onchannel(player, p))) { strcpy(cleanp, remove_markup(ChanName(p), NULL)); if (string_prefix(cleanp, cleanname)) { ! safe_chr(' ', buff, &bp); ! safe_str(ChanName(p), buff, &bp); } } } *************** *** 1031,1043 **** if (onchannel(player, p)) { strcpy(cleanp, remove_markup(ChanName(p), NULL)); if (!strcasecmp(cleanname, cleanp)) { ! *chan = p; ! return CMATCH_EXACT; } if (string_prefix(cleanp, cleanname) && onchannel(player, p)) { ! if (!*chan) ! *chan = p; ! count++; } } } --- 1031,1043 ---- if (onchannel(player, p)) { strcpy(cleanp, remove_markup(ChanName(p), NULL)); if (!strcasecmp(cleanname, cleanp)) { ! *chan = p; ! return CMATCH_EXACT; } if (string_prefix(cleanp, cleanname) && onchannel(player, p)) { ! if (!*chan) ! *chan = p; ! count++; } } } *************** *** 1080,1092 **** if (!onchannel(player, p)) { strcpy(cleanp, remove_markup(ChanName(p), NULL)); if (!strcasecmp(cleanname, cleanp)) { ! *chan = p; ! return CMATCH_EXACT; } if (string_prefix(cleanp, cleanname)) { ! if (!*chan) ! *chan = p; ! count++; } } } --- 1080,1092 ---- if (!onchannel(player, p)) { strcpy(cleanp, remove_markup(ChanName(p), NULL)); if (!strcasecmp(cleanname, cleanp)) { ! *chan = p; ! return CMATCH_EXACT; } if (string_prefix(cleanp, cleanname)) { ! if (!*chan) ! *chan = p; ! count++; } } } *************** *** 1153,1160 **** if (!Chan_Can_See(chan, player)) { if (onchannel(player, chan)) notify_format(player, ! T("CHAT: You can't do that with channel <%s>."), ! ChanName(chan)); else notify(player, T("CHAT: I don't recognize that channel.")); return; --- 1153,1160 ---- if (!Chan_Can_See(chan, player)) { if (onchannel(player, chan)) notify_format(player, ! T("CHAT: You can't do that with channel <%s>."), ! ChanName(chan)); else notify(player, T("CHAT: I don't recognize that channel.")); return; *************** *** 1174,1184 **** if (!target || !*target) { notify(player, T("I don't understand what you want to do.")); return; ! } else if ((victim = lookup_player(target)) != NOTHING) ; ! else if (Channel_Object(chan)) victim = match_result(player, target, TYPE_THING, MAT_OBJECTS); ! else ! victim = NOTHING; if (!GoodObject(victim)) { notify(player, T("Invalid target.")); return; --- 1174,1185 ---- if (!target || !*target) { notify(player, T("I don't understand what you want to do.")); return; ! } ! ! victim = lookup_player(target); ! if (victim == NOTHING && Channel_Object(chan)) victim = match_result(player, target, TYPE_THING, MAT_OBJECTS); ! if (!GoodObject(victim)) { notify(player, T("Invalid target.")); return; *************** *** 1186,1193 **** if (!strcasecmp("on", com) || !strcasecmp("join", com)) { if (!Chan_Ok_Type(chan, victim)) { notify_format(player, ! T("Sorry, wrong type of thing for channel <%s>."), ! ChanName(chan)); return; } if (Guest(player)) { --- 1187,1194 ---- if (!strcasecmp("on", com) || !strcasecmp("join", com)) { if (!Chan_Ok_Type(chan, victim)) { notify_format(player, ! T("Sorry, wrong type of thing for channel <%s>."), ! ChanName(chan)); return; } if (Guest(player)) { *************** *** 1201,1239 **** /* Is victim already on the channel? */ if (onchannel(victim, chan)) { notify_format(player, ! T("%s is already on channel <%s>."), Name(victim), ! ChanName(chan)); return; } /* Does victim pass the joinlock? */ if (!Chan_Can_Join(chan, victim)) { if (Wizard(player)) { ! /* Wizards can override join locks */ ! notify(player, ! T ! ("CHAT: Warning: Target does not meet channel join permissions (joining anyway)")); } else { ! notify(player, T("Permission to join denied.")); ! return; } } if (insert_user_by_dbref(victim, chan)) { notify_format(victim, ! T("CHAT: %s joins you to channel <%s>."), Name(player), ! ChanName(chan)); notify_format(player, ! T("CHAT: You join %s to channel <%s>."), Name(victim), ! ChanName(chan)); u = onchannel(victim, chan); if (!Channel_Quiet(chan) && !DarkLegal(victim)) { ! format_channel_broadcast(chan, u, victim, CB_CHECKQUIET | CB_PRESENCE, ! T("<%s> %s has joined this channel."), NULL); } ChanNumUsers(chan)++; } else { notify_format(player, ! T("%s is already on channel <%s>."), Name(victim), ! ChanName(chan)); } return; } else if (!strcasecmp("off", com) || !strcasecmp("leave", com)) { --- 1202,1240 ---- /* Is victim already on the channel? */ if (onchannel(victim, chan)) { notify_format(player, ! T("%s is already on channel <%s>."), Name(victim), ! ChanName(chan)); return; } /* Does victim pass the joinlock? */ if (!Chan_Can_Join(chan, victim)) { if (Wizard(player)) { ! /* Wizards can override join locks */ ! notify(player, ! T ! ("CHAT: Warning: Target does not meet channel join permissions (joining anyway)")); } else { ! notify(player, T("Permission to join denied.")); ! return; } } if (insert_user_by_dbref(victim, chan)) { notify_format(victim, ! T("CHAT: %s joins you to channel <%s>."), Name(player), ! ChanName(chan)); notify_format(player, ! T("CHAT: You join %s to channel <%s>."), Name(victim), ! ChanName(chan)); u = onchannel(victim, chan); if (!Channel_Quiet(chan) && !DarkLegal(victim)) { ! format_channel_broadcast(chan, u, victim, CB_CHECKQUIET | CB_PRESENCE, ! T("<%s> %s has joined this channel."), NULL); } ChanNumUsers(chan)++; } else { notify_format(player, ! T("%s is already on channel <%s>."), Name(victim), ! ChanName(chan)); } return; } else if (!strcasecmp("off", com) || !strcasecmp("leave", com)) { *************** *** 1251,1269 **** strcpy(title, (u && CUtitle(u)) ? CUtitle(u) : ""); if (remove_user(u, chan)) { if (!Channel_Quiet(chan) && !DarkLegal(victim)) { ! format_channel_broadcast(chan, NULL, victim, ! CB_CHECKQUIET | CB_PRESENCE, ! T("<%s> %s has left this channel."), title); } notify_format(victim, ! T("CHAT: %s removes you from channel <%s>."), ! Name(player), ChanName(chan)); notify_format(player, ! T("CHAT: You remove %s from channel <%s>."), ! Name(victim), ChanName(chan)); } else { notify_format(player, T("%s is not on channel <%s>."), Name(victim), ! ChanName(chan)); } return; } else { --- 1252,1270 ---- strcpy(title, (u && CUtitle(u)) ? CUtitle(u) : ""); if (remove_user(u, chan)) { if (!Channel_Quiet(chan) && !DarkLegal(victim)) { ! format_channel_broadcast(chan, NULL, victim, ! CB_CHECKQUIET | CB_PRESENCE, ! T("<%s> %s has left this channel."), title); } notify_format(victim, ! T("CHAT: %s removes you from channel <%s>."), ! Name(player), ChanName(chan)); notify_format(player, ! T("CHAT: You remove %s from channel <%s>."), ! Name(victim), ChanName(chan)); } else { notify_format(player, T("%s is not on channel <%s>."), Name(victim), ! ChanName(chan)); } return; } else { *************** *** 1287,1293 **** case CMATCH_NONE: if (find_channel_partial_on(name, &chan, player)) notify_format(player, T("CHAT: You are already on channel <%s>"), ! ChanName(chan)); else notify(player, T("CHAT: I don't recognize that channel.")); return; --- 1288,1294 ---- case CMATCH_NONE: if (find_channel_partial_on(name, &chan, player)) notify_format(player, T("CHAT: You are already on channel <%s>"), ! ChanName(chan)); else notify(player, T("CHAT: I don't recognize that channel.")); return; *************** *** 1304,1311 **** } if (!Chan_Ok_Type(chan, player)) { notify_format(player, ! T("Sorry, wrong type of thing for channel <%s>."), ! ChanName(chan)); return; } /* Does victim pass the joinlock? */ --- 1305,1312 ---- } if (!Chan_Ok_Type(chan, player)) { notify_format(player, ! T("Sorry, wrong type of thing for channel <%s>."), ! ChanName(chan)); return; } /* Does victim pass the joinlock? */ *************** *** 1313,1320 **** if (Wizard(player)) { /* Wizards can override join locks */ notify(player, ! T ! ("CHAT: Warning: You don't meet channel join permissions (joining anyway)")); } else { notify(player, T("Permission to join denied.")); return; --- 1314,1321 ---- if (Wizard(player)) { /* Wizards can override join locks */ notify(player, ! T ! ("CHAT: Warning: You don't meet channel join permissions (joining anyway)")); } else { notify(player, T("Permission to join denied.")); return; *************** *** 1325,1337 **** u = onchannel(player, chan); if (!Channel_Quiet(chan) && !DarkLegal(player)) format_channel_broadcast(chan, u, player, CB_CHECKQUIET | CB_PRESENCE, ! T("<%s> %s has joined this channel."), NULL); ChanNumUsers(chan)++; } else { /* Should never happen */ notify_format(player, ! T("%s is already on channel <%s>."), Name(player), ! ChanName(chan)); } } --- 1326,1338 ---- u = onchannel(player, chan); if (!Channel_Quiet(chan) && !DarkLegal(player)) format_channel_broadcast(chan, u, player, CB_CHECKQUIET | CB_PRESENCE, ! T("<%s> %s has joined this channel."), NULL); ChanNumUsers(chan)++; } else { /* Should never happen */ notify_format(player, ! T("%s is already on channel <%s>."), Name(player), ! ChanName(chan)); } } *************** *** 1349,1357 **** switch (find_channel_partial_on(name, &chan, player)) { case CMATCH_NONE: if (find_channel_partial_off(name, &chan, player) ! && Chan_Can_See(chan, player)) notify_format(player, T("CHAT: You are not on channel <%s>"), ! ChanName(chan)); else notify(player, T("CHAT: I don't recognize that channel.")); return; --- 1350,1358 ---- switch (find_channel_partial_on(name, &chan, player)) { case CMATCH_NONE: if (find_channel_partial_off(name, &chan, player) ! && Chan_Can_See(chan, player)) notify_format(player, T("CHAT: You are not on channel <%s>"), ! ChanName(chan)); else notify(player, T("CHAT: I don't recognize that channel.")); return; *************** *** 1367,1378 **** if (remove_user(u, chan)) { if (!Channel_Quiet(chan) && !DarkLegal(player)) format_channel_broadcast(chan, NULL, player, CB_CHECKQUIET | CB_PRESENCE, ! T("<%s> %s has left this channel."), title); notify_format(player, T("CHAT: You leave channel <%s>."), ChanName(chan)); } else { /* Should never happen */ notify_format(player, T("%s is not on channel <%s>."), Name(player), ! ChanName(chan)); } } --- 1368,1379 ---- if (remove_user(u, chan)) { if (!Channel_Quiet(chan) && !DarkLegal(player)) format_channel_broadcast(chan, NULL, player, CB_CHECKQUIET | CB_PRESENCE, ! T("<%s> %s has left this channel."), title); notify_format(player, T("CHAT: You leave channel <%s>."), ChanName(chan)); } else { /* Should never happen */ notify_format(player, T("%s is not on channel <%s>."), Name(player), ! ChanName(chan)); } } *************** *** 1457,1464 **** notify(player, T("CHAT: I don't know which channel you mean.")); list_partial_matches(player, name, PMATCH_ON); notify(player, ! T ! ("CHAT: You may wish to set the CHAN_USEFIRSTMATCH flag on yourself.")); return 1; } case CMATCH_EXACT: --- 1458,1465 ---- notify(player, T("CHAT: I don't know which channel you mean.")); list_partial_matches(player, name, PMATCH_ON); notify(player, ! T ! ("CHAT: You may wish to set the CHAN_USEFIRSTMATCH flag on yourself.")); return 1; } case CMATCH_EXACT: *************** *** 1468,1474 **** case CMATCH_NONE: if (find_channel(name, &c, player) == CMATCH_NONE) { if (source) ! notify(player, T("CHAT: No such channel.")); return 0; } } --- 1469,1475 ---- case CMATCH_NONE: if (find_channel(name, &c, player) == CMATCH_NONE) { if (source) ! notify(player, T("CHAT: No such channel.")); return 0; } } *************** *** 1490,1509 **** const char *someone = "Someone"; char *title; const char *name; ! int canhear; if (!Chan_Ok_Type(chan, player)) { notify_format(player, ! T ! ("Sorry, you're not the right type to be on channel <%s>."), ! ChanName(chan)); return; } if (!Loud(player) && !Chan_Can_Speak(chan, player)) { if (Chan_Can_See(chan, player)) notify_format(player, ! T("Sorry, you're not allowed to speak on channel <%s>."), ! ChanName(chan)); else notify(player, T("No such channel.")); return; --- 1491,1510 ---- const char *someone = "Someone"; char *title; const char *name; ! bool canhear; if (!Chan_Ok_Type(chan, player)) { notify_format(player, ! T ! ("Sorry, you're not the right type to be on channel <%s>."), ! ChanName(chan)); return; } if (!Loud(player) && !Chan_Can_Speak(chan, player)) { if (Chan_Can_See(chan, player)) notify_format(player, ! T("Sorry, you're not allowed to speak on channel <%s>."), ! ChanName(chan)); else notify(player, T("No such channel.")); return; *************** *** 1546,1571 **** case POSE_TOKEN: arg1 = arg1 + 1; channel_broadcast(chan, player, 0, "<%s> %s%s%s%s%s%s", ChanName(chan), ! title ? title : "", title ? ANSI_ENDALL : "", ! (title && name) ? " " : "", name ? name : "", gap, arg1); if (!canhear) notify_format(player, T("To channel %s: %s%s%s%s%s%s"), ChanName(chan), ! title ? title : "", title ? ANSI_ENDALL : "", ! (title && name) ? " " : "", name ? name : "", gap, arg1); break; default: if (CHAT_STRIP_QUOTE && (*arg1 == SAY_TOKEN)) arg1 = arg1 + 1; channel_broadcast(chan, player, 0, T("<%s> %s%s%s%s says, \"%s\""), ! ChanName(chan), title ? title : "", ! title ? ANSI_ENDALL : "", (title && name) ? " " : "", ! name ? name : "", arg1); if (!canhear) notify_format(player, ! T("To channel %s: %s%s%s%s says, \"%s\""), ! ChanName(chan), title ? title : "", ! title ? ANSI_ENDALL : "", (title && name) ? " " : "", ! name ? name : "", arg1); break; } --- 1547,1572 ---- case POSE_TOKEN: arg1 = arg1 + 1; channel_broadcast(chan, player, 0, "<%s> %s%s%s%s%s%s", ChanName(chan), ! title ? title : "", title ? ANSI_ENDALL : "", ! (title && name) ? " " : "", name ? name : "", gap, arg1); if (!canhear) notify_format(player, T("To channel %s: %s%s%s%s%s%s"), ChanName(chan), ! title ? title : "", title ? ANSI_ENDALL : "", ! (title && name) ? " " : "", name ? name : "", gap, arg1); break; default: if (CHAT_STRIP_QUOTE && (*arg1 == SAY_TOKEN)) arg1 = arg1 + 1; channel_broadcast(chan, player, 0, T("<%s> %s%s%s%s says, \"%s\""), ! ChanName(chan), title ? title : "", ! title ? ANSI_ENDALL : "", (title && name) ? " " : "", ! name ? name : "", arg1); if (!canhear) notify_format(player, ! T("To channel %s: %s%s%s%s says, \"%s\""), ! ChanName(chan), title ? title : "", ! title ? ANSI_ENDALL : "", (title && name) ? " " : "", ! name ? name : "", arg1); break; } *************** *** 1616,1630 **** override_checks = 1; if (!override_checks && !Chan_Ok_Type(chan, player)) { notify_format(player, ! T ! ("Sorry, you're not the right type to be on channel <%s>."), ! ChanName(chan)); return; } if (!override_checks && !Chan_Can_Cemit(chan, player)) { notify_format(player, ! T("Sorry, you're not allowed to @cemit on channel <%s>."), ! ChanName(chan)); return; } u = onchannel(player, chan); --- 1617,1631 ---- override_checks = 1; if (!override_checks && !Chan_Ok_Type(chan, player)) { notify_format(player, ! T ! ("Sorry, you're not the right type to be on channel <%s>."), ! ChanName(chan)); return; } if (!override_checks && !Chan_Can_Cemit(chan, player)) { notify_format(player, ! T("Sorry, you're not allowed to @cemit on channel <%s>."), ! ChanName(chan)); return; } u = onchannel(player, chan); *************** *** 1646,1655 **** } if (!(flags & PEMIT_SILENT)) channel_broadcast(chan, player, (flags & PEMIT_SPOOF) ? 0 : CB_NOSPOOF, ! "<%s> %s", ChanName(chan), msg); else channel_broadcast(chan, player, (flags & PEMIT_SPOOF) ? 0 : CB_NOSPOOF, ! "%s", msg); if (!canhear) notify_format(player, T("Cemit to channel %s: %s"), ChanName(chan), msg); ChanNumMsgs(chan)++; --- 1647,1656 ---- } if (!(flags & PEMIT_SILENT)) channel_broadcast(chan, player, (flags & PEMIT_SPOOF) ? 0 : CB_NOSPOOF, ! "<%s> %s", ChanName(chan), msg); else channel_broadcast(chan, player, (flags & PEMIT_SPOOF) ? 0 : CB_NOSPOOF, ! "%s", msg); if (!canhear) notify_format(player, T("Cemit to channel %s: %s"), ChanName(chan), msg); ChanNumMsgs(chan)++; *************** *** 1670,1676 **** do_chan_admin(dbref player, char *name, const char *perms, int flag) { CHAN *chan = NULL, *temp = NULL; ! long int type; int res; boolexp key; char old[CHAN_NAME_LEN]; --- 1671,1677 ---- do_chan_admin(dbref player, char *name, const char *perms, int flag) { CHAN *chan = NULL, *temp = NULL; ! privbits type; int res; boolexp key; char old[CHAN_NAME_LEN]; *************** *** 1729,1735 **** /* Can the player afford it? There's a cost */ if (!payfor(Owner(player), CHANNEL_COST)) { notify_format(player, T("You can't afford the %d %s."), CHANNEL_COST, ! MONIES); return; } /* Ok, let's do it */ --- 1730,1736 ---- /* Can the player afford it? There's a cost */ if (!payfor(Owner(player), CHANNEL_COST)) { notify_format(player, T("You can't afford the %d %s."), CHANNEL_COST, ! MONIES); return; } /* Ok, let's do it */ *************** *** 1751,1757 **** if (type) ChanType(chan) = type; ChanCreator(chan) = Owner(player); ! strcpy(ChanName(chan), name); insert_channel(&chan); notify_format(player, T("CHAT: Channel <%s> created."), ChanName(chan)); break; --- 1752,1758 ---- if (type) ChanType(chan) = type; ChanCreator(chan) = Owner(player); ! mush_strncpy(ChanName(chan), name, CHAN_NAME_LEN); insert_channel(&chan); notify_format(player, T("CHAT: Channel <%s> created."), ChanName(chan)); break; *************** *** 1785,1792 **** * itself */ if (temp != chan) { ! notify(player, T("The channel needs a more unique new name.")); ! return; } } if (strlen(perms) > CHAN_NAME_LEN - 1) { --- 1786,1793 ---- * itself */ if (temp != chan) { ! notify(player, T("The channel needs a more unique new name.")); ! return; } } if (strlen(perms) > CHAN_NAME_LEN - 1) { *************** *** 1799,1806 **** strcpy(ChanName(chan), perms); insert_channel(&chan); channel_broadcast(chan, player, 0, ! "<%s> %s has renamed channel %s to %s.", ! ChanName(chan), Name(player), old, ChanName(chan)); notify(player, T("Channel renamed.")); break; case 3: --- 1800,1807 ---- strcpy(ChanName(chan), perms); insert_channel(&chan); channel_broadcast(chan, player, 0, ! "<%s> %s has renamed channel %s to %s.", ! ChanName(chan), Name(player), old, ChanName(chan)); notify(player, T("Channel renamed.")); break; case 3: *************** *** 1819,1831 **** notify(player, T("Warning: channel will be disabled.")); if (type == ChanType(chan)) { notify_format(player, ! T ! ("Invalid or same permissions on channel <%s>. No changes made."), ! ChanName(chan)); } else { ChanType(chan) = type; notify_format(player, ! T("Permissions on channel <%s> changed."), ChanName(chan)); } break; } --- 1820,1832 ---- notify(player, T("Warning: channel will be disabled.")); if (type == ChanType(chan)) { notify_format(player, ! T ! ("Invalid or same permissions on channel <%s>. No changes made."), ! ChanName(chan)); } else { ChanType(chan) = type; notify_format(player, ! T("Permissions on channel <%s> changed."), ChanName(chan)); } break; } *************** *** 1838,1844 **** const char *p; char name[BUFFER_LEN]; ! strcpy(name, remove_markup(n, NULL)); if (!name || !*name) return 0; --- 1839,1845 ---- const char *p; char name[BUFFER_LEN]; ! mush_strncpy(name, remove_markup(n, NULL), BUFFER_LEN); if (!name || !*name) return 0; *************** *** 1876,1882 **** */ void do_chan_user_flags(dbref player, char *name, const char *isyn, int flag, ! int silent) { CHAN *c = NULL; CHANUSER *u; --- 1877,1883 ---- */ void do_chan_user_flags(dbref player, char *name, const char *isyn, int flag, ! int silent) { CHAN *c = NULL; CHANUSER *u; *************** *** 1894,1908 **** switch (flag) { case 0: notify(player, setting ? T("All channels have been muted.") ! : T("All channels have been unmuted.")); break; case 1: notify(player, setting ? T("You hide on all the channels you can.") ! : T("You unhide on all channels.")); break; case 2: notify(player, setting ? T("All channels have been gagged.") ! : T("All channels have been ungagged.")); break; } } else { --- 1895,1909 ---- switch (flag) { case 0: notify(player, setting ? T("All channels have been muted.") ! : T("All channels have been unmuted.")); break; case 1: notify(player, setting ? T("You hide on all the channels you can.") ! : T("You unhide on all channels.")); break; case 2: notify(player, setting ? T("All channels have been gagged.") ! : T("All channels have been ungagged.")); break; } } else { *************** *** 1923,1929 **** if (!u) { /* This should only happen if they gave us a bad name */ if (!silent) ! notify_format(player, T("You are not on channel <%s>."), ChanName(c)); return; } --- 1924,1930 ---- if (!u) { /* This should only happen if they gave us a bad name */ if (!silent) ! notify_format(player, T("You are not on channel <%s>."), ChanName(c)); return; } *************** *** 1931,1991 **** case 0: /* Mute */ if (setting) { ! CUtype(u) |= CU_QUIET; ! if (!silent) ! notify_format(player, ! T ! ("You will no longer hear connection messages on channel <%s>."), ! ChanName(c)); } else { ! CUtype(u) &= ~CU_QUIET; ! if (!silent) ! notify_format(player, ! T ! ("You will now hear connection messages on channel <%s>."), ! ChanName(c)); } break; case 1: /* Hide */ if (setting) { ! if (!Chan_Can_Hide(c, player) && !Wizard(player)) { ! if (!silent) ! notify_format(player, ! T("You are not permitted to hide on channel <%s>."), ! ChanName(c)); ! } else { ! CUtype(u) |= CU_HIDE; ! if (!silent) ! notify_format(player, ! T ! ("You no longer appear on channel <%s>'s who list."), ! ChanName(c)); ! } } else { ! CUtype(u) &= ~CU_HIDE; ! if (!silent) ! notify_format(player, ! T("You now appear on channel <%s>'s who list."), ! ChanName(c)); } break; case 2: /* Gag */ if (setting) { ! CUtype(u) |= CU_GAG; ! if (!silent) ! notify_format(player, ! T ! ("You will no longer hear messages on channel <%s>."), ! ChanName(c)); } else { ! CUtype(u) &= ~CU_GAG; ! if (!silent) ! notify_format(player, ! T("You will now hear messages on channel <%s>."), ! ChanName(c)); } break; } --- 1932,1992 ---- case 0: /* Mute */ if (setting) { ! CUtype(u) |= CU_QUIET; ! if (!silent) ! notify_format(player, ! T ! ("You will no longer hear connection messages on channel <%s>."), ! ChanName(c)); } else { ! CUtype(u) &= ~CU_QUIET; ! if (!silent) ! notify_format(player, ! T ! ("You will now hear connection messages on channel <%s>."), ! ChanName(c)); } break; case 1: /* Hide */ if (setting) { ! if (!Chan_Can_Hide(c, player) && !Wizard(player)) { ! if (!silent) ! notify_format(player, ! T("You are not permitted to hide on channel <%s>."), ! ChanName(c)); ! } else { ! CUtype(u) |= CU_HIDE; ! if (!silent) ! notify_format(player, ! T ! ("You no longer appear on channel <%s>'s who list."), ! ChanName(c)); ! } } else { ! CUtype(u) &= ~CU_HIDE; ! if (!silent) ! notify_format(player, ! T("You now appear on channel <%s>'s who list."), ! ChanName(c)); } break; case 2: /* Gag */ if (setting) { ! CUtype(u) |= CU_GAG; ! if (!silent) ! notify_format(player, ! T ! ("You will no longer hear messages on channel <%s>."), ! ChanName(c)); } else { ! CUtype(u) &= ~CU_GAG; ! if (!silent) ! notify_format(player, ! T("You will now hear messages on channel <%s>."), ! ChanName(c)); } break; } *************** *** 2023,2029 **** /* Stomp newlines and other weird whitespace */ for (scan = title; *scan; scan++) { if ((isspace((unsigned char) *scan) && (*scan != ' ')) ! || (*scan == BEEP_CHAR)) { notify(player, T("Invalid character in title.")); return; } --- 2024,2030 ---- /* Stomp newlines and other weird whitespace */ for (scan = title; *scan; scan++) { if ((isspace((unsigned char) *scan) && (*scan != ' ')) ! || (*scan == BEEP_CHAR)) { notify(player, T("Invalid character in title.")); return; } *************** *** 2037,2044 **** strcpy(CUtitle(u), title); if (!Quiet(player)) notify_format(player, T("Title %s for %schannel <%s>."), ! *title ? T("set") : T("cleared"), ! Channel_NoTitles(c) ? "(NoTitles) " : "", ChanName(c)); return; } --- 2038,2045 ---- strcpy(CUtitle(u), title); if (!Quiet(player)) notify_format(player, T("Title %s for %schannel <%s>."), ! *title ? T("set") : T("cleared"), ! Channel_NoTitles(c) ? "(NoTitles) " : "", ChanName(c)); return; } *************** *** 2058,2081 **** char numusers[BUFFER_LEN]; char cleanname[CHAN_NAME_LEN]; char blanks[CHAN_NAME_LEN]; ! int len; int numblanks; 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"); for (c = channels; c; c = c->next) { strcpy(cleanname, remove_markup(ChanName(c), NULL)); if (Chan_Can_See(c, player) && string_prefix(cleanname, partname)) { u = onchannel(player, c); if (SUPPORT_PUEBLO) ! sprintf(numusers, ! "%c%cA XCH_CMD=\"@channel/who %s\" XCH_HINT=\"See who's on this channel now\"%c%5ld%c%c/A%c", ! TAG_START, MARKUP_HTML, cleanname, TAG_END, ChanNumUsers(c), ! TAG_START, MARKUP_HTML, TAG_END); else ! sprintf(numusers, "%5ld", ChanNumUsers(c)); /* Display length is strlen(cleanname), but actual length is * strlen(ChanName(c)). There are two different cases: * 1. actual length <= 30. No problems. --- 2059,2082 ---- char numusers[BUFFER_LEN]; char cleanname[CHAN_NAME_LEN]; char blanks[CHAN_NAME_LEN]; ! size_t len; int numblanks; 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"); for (c = channels; c; c = c->next) { strcpy(cleanname, remove_markup(ChanName(c), NULL)); if (Chan_Can_See(c, player) && string_prefix(cleanname, partname)) { u = onchannel(player, c); if (SUPPORT_PUEBLO) ! snprintf(numusers, BUFFER_LEN, ! "%c%cA XCH_CMD=\"@channel/who %s\" XCH_HINT=\"See who's on this channel now\"%c%5d%c%c/A%c", ! TAG_START, MARKUP_HTML, cleanname, TAG_END, ChanNumUsers(c), ! TAG_START, MARKUP_HTML, TAG_END); else ! sprintf(numusers, "%5d", ChanNumUsers(c)); /* Display length is strlen(cleanname), but actual length is * strlen(ChanName(c)). There are two different cases: * 1. actual length <= 30. No problems. *************** *** 2086,2122 **** len = strlen(ChanName(c)); numblanks = len - strlen(cleanname); if (numblanks > 0 && numblanks < CHAN_NAME_LEN) { ! memset(blanks, ' ', CHAN_NAME_LEN - 1); ! if (len > 30) ! numblanks -= (len - 30); ! if (numblanks < 0) ! numblanks = 0; ! blanks[numblanks] = '\0'; } else { ! blanks[0] = '\0'; } notify_format(player, ! "%-30s%s %s %8ld [%c%c%c%c%c%c%c %c%c%c%c%c%c] [%-3s %c%c] %3d", ! ChanName(c), blanks, numusers, ChanNumMsgs(c), ! Channel_Disabled(c) ? 'D' : '-', ! Channel_Player(c) ? 'P' : '-', ! Channel_Object(c) ? 'O' : '-', ! Channel_Admin(c) ? 'A' : (Channel_Wizard(c) ? 'W' : '-'), ! Channel_Quiet(c) ? 'Q' : '-', ! Channel_CanHide(c) ? 'H' : '-', Channel_Open(c) ? 'o' : '-', ! /* Locks */ ! ChanJoinLock(c) != TRUE_BOOLEXP ? 'j' : '-', ! ChanSpeakLock(c) != TRUE_BOOLEXP ? 's' : '-', ! ChanModLock(c) != TRUE_BOOLEXP ? 'm' : '-', ! ChanSeeLock(c) != TRUE_BOOLEXP ? 'v' : '-', ! ChanHideLock(c) != TRUE_BOOLEXP ? 'h' : '-', ! /* Does the player own it? */ ! ChanCreator(c) == player ? '*' : '-', ! /* User status */ ! u ? (Chanuser_Gag(u) ? "Gag" : "On") : "Off", ! (u && Chanuser_Quiet(u)) ? 'Q' : ' ', ! (u && Chanuser_Hide(u)) ? 'H' : ' ', ! bufferq_lines(ChanBufferQ(c))); } } if (SUPPORT_PUEBLO) --- 2087,2123 ---- len = strlen(ChanName(c)); numblanks = len - strlen(cleanname); if (numblanks > 0 && numblanks < CHAN_NAME_LEN) { ! memset(blanks, ' ', CHAN_NAME_LEN - 1); ! if (len > 30) ! numblanks -= (len - 30); ! if (numblanks < 0) ! numblanks = 0; ! blanks[numblanks] = '\0'; } else { ! blanks[0] = '\0'; } notify_format(player, ! "%-30s%s %s %8ld [%c%c%c%c%c%c%c %c%c%c%c%c%c] [%-3s %c%c] %3d", ! ChanName(c), blanks, numusers, ChanNumMsgs(c), ! Channel_Disabled(c) ? 'D' : '-', ! Channel_Player(c) ? 'P' : '-', ! Channel_Object(c) ? 'O' : '-', ! Channel_Admin(c) ? 'A' : (Channel_Wizard(c) ? 'W' : '-'), ! Channel_Quiet(c) ? 'Q' : '-', ! Channel_CanHide(c) ? 'H' : '-', Channel_Open(c) ? 'o' : '-', ! /* Locks */ ! ChanJoinLock(c) != TRUE_BOOLEXP ? 'j' : '-', ! ChanSpeakLock(c) != TRUE_BOOLEXP ? 's' : '-', ! ChanModLock(c) != TRUE_BOOLEXP ? 'm' : '-', ! ChanSeeLock(c) != TRUE_BOOLEXP ? 'v' : '-', ! ChanHideLock(c) != TRUE_BOOLEXP ? 'h' : '-', ! /* Does the player own it? */ ! ChanCreator(c) == player ? '*' : '-', ! /* User status */ ! u ? (Chanuser_Gag(u) ? "Gag" : "On") : "Off", ! (u && Chanuser_Quiet(u)) ? 'Q' : ' ', ! (u && Chanuser_Hide(u)) ? 'H' : ' ', ! bufferq_lines(ChanBufferQ(c))); } } if (SUPPORT_PUEBLO) *************** *** 2178,2186 **** } if (nargs == 1) { if (string_prefix(called_as, "CL")) ! safe_str(privs_to_string(priv_table, ChanType(c)), buff, bp); else ! safe_str(privs_to_letters(priv_table, ChanType(c)), buff, bp); return; } thing = match_thing(executor, args[1]); --- 2179,2187 ---- } if (nargs == 1) { if (string_prefix(called_as, "CL")) ! safe_str(privs_to_string(priv_table, ChanType(c)), buff, bp); else ! safe_str(privs_to_letters(priv_table, ChanType(c)), buff, bp); return; } thing = match_thing(executor, args[1]); *************** *** 2227,2240 **** safe_str(ChanTitle(c), buff, bp); } else if (string_prefix(called_as, "CB")) { if (ChanBufferQ(c) != NULL) { ! safe_integer(BufferQSize(ChanBufferQ(c)), buff, bp); } else { ! safe_integer(0, buff, bp); } } else if (string_prefix(called_as, "CU")) { safe_integer(ChanNumUsers(c), buff, bp); } else if (string_prefix(called_as, "CM")) { ! safe_integer(ChanNumMsgs(c), buff, bp); } } } --- 2228,2241 ---- safe_str(ChanTitle(c), buff, bp); } else if (string_prefix(called_as, "CB")) { if (ChanBufferQ(c) != NULL) { ! safe_integer(BufferQSize(ChanBufferQ(c)), buff, bp); } else { ! safe_integer(0, buff, bp); } } else if (string_prefix(called_as, "CU")) { safe_integer(ChanNumUsers(c), buff, bp); } else if (string_prefix(called_as, "CM")) { ! safe_format(buff, bp, "%lu", ChanNumMsgs(c)); } } } *************** *** 2282,2290 **** u = onchannel(thing, c); if (!u) { if (can_ex || ok) ! safe_str(T("#-1 NOT ON CHANNEL"), buff, bp); else ! safe_str(T("#-1 PERMISSION DENIED"), buff, bp); return; } ok &= !Chanuser_Hide(u); --- 2283,2291 ---- u = onchannel(thing, c); if (!u) { if (can_ex || ok) ! safe_str(T("#-1 NOT ON CHANNEL"), buff, bp); else ! safe_str(T("#-1 PERMISSION DENIED"), buff, bp); return; } ok &= !Chanuser_Hide(u); *************** *** 2339,2345 **** } /* They're on the channel, but maybe we can't see them? */ if (Chanuser_Hide(u) && ! !(Priv_Who(executor) || Can_Examine(executor, thing))) { safe_str("Off", buff, bp); return; } --- 2340,2346 ---- } /* They're on the channel, but maybe we can't see them? */ if (Chanuser_Hide(u) && ! !(Priv_Who(executor) || Can_Examine(executor, thing))) { safe_str("Off", buff, bp); return; } *************** *** 2388,2394 **** victim = CUdbref(u); if (remove_user(u, chan)) notify_format(victim, T("CHAT: %s has removed all users from <%s>."), ! Name(player), ChanName(chan)); } ChanNumUsers(chan) = 0; return; --- 2389,2395 ---- victim = CUdbref(u); if (remove_user(u, chan)) notify_format(victim, T("CHAT: %s has removed all users from <%s>."), ! Name(player), ChanName(chan)); } ChanNumUsers(chan) = 0; return; *************** *** 2450,2457 **** */ chan_chown(c, victim); notify_format(player, ! T("CHAT: Channel <%s> now owned by %s."), ChanName(c), ! Name(ChanCreator(c))); return; } --- 2451,2458 ---- */ chan_chown(c, victim); notify_format(player, ! T("CHAT: Channel <%s> now owned by %s."), ChanName(c), ! Name(ChanCreator(c))); return; } *************** *** 2543,2578 **** free_boolexp(ChanJoinLock(c)); ChanJoinLock(c) = key; notify_format(player, (key == TRUE_BOOLEXP) ? ! T("CHAT: Joinlock on <%s> reset.") : ! T("CHAT: Joinlock on <%s> set."), ChanName(c)); break; case CL_SPEAK: free_boolexp(ChanSpeakLock(c)); ChanSpeakLock(c) = key; notify_format(player, (key == TRUE_BOOLEXP) ? ! T("CHAT: Speaklock on <%s> reset.") : ! T("CHAT: Speaklock on <%s> set."), ChanName(c)); break; case CL_SEE: free_boolexp(ChanSeeLock(c)); ChanSeeLock(c) = key; notify_format(player, (key == TRUE_BOOLEXP) ? ! T("CHAT: Seelock on <%s> reset.") : ! T("CHAT: Seelock on <%s> set."), ChanName(c)); break; case CL_HIDE: free_boolexp(ChanHideLock(c)); ChanHideLock(c) = key; notify_format(player, (key == TRUE_BOOLEXP) ? ! T("CHAT: Hidelock on <%s> reset.") : ! T("CHAT: Hidelock on <%s> set."), ChanName(c)); break; case CL_MOD: free_boolexp(ChanModLock(c)); ChanModLock(c) = key; notify_format(player, (key == TRUE_BOOLEXP) ? ! T("CHAT: Modlock on <%s> reset.") : ! T("CHAT: Modlock on <%s> set."), ChanName(c)); break; } return; --- 2544,2579 ---- free_boolexp(ChanJoinLock(c)); ChanJoinLock(c) = key; notify_format(player, (key == TRUE_BOOLEXP) ? ! T("CHAT: Joinlock on <%s> reset.") : ! T("CHAT: Joinlock on <%s> set."), ChanName(c)); break; case CL_SPEAK: free_boolexp(ChanSpeakLock(c)); ChanSpeakLock(c) = key; notify_format(player, (key == TRUE_BOOLEXP) ? ! T("CHAT: Speaklock on <%s> reset.") : ! T("CHAT: Speaklock on <%s> set."), ChanName(c)); break; case CL_SEE: free_boolexp(ChanSeeLock(c)); ChanSeeLock(c) = key; notify_format(player, (key == TRUE_BOOLEXP) ? ! T("CHAT: Seelock on <%s> reset.") : ! T("CHAT: Seelock on <%s> set."), ChanName(c)); break; case CL_HIDE: free_boolexp(ChanHideLock(c)); ChanHideLock(c) = key; notify_format(player, (key == TRUE_BOOLEXP) ? ! T("CHAT: Hidelock on <%s> reset.") : ! T("CHAT: Hidelock on <%s> set."), ChanName(c)); break; case CL_MOD: free_boolexp(ChanModLock(c)); ChanModLock(c) = key; notify_format(player, (key == TRUE_BOOLEXP) ? ! T("CHAT: Modlock on <%s> reset.") : ! T("CHAT: Modlock on <%s> set."), ChanName(c)); break; } return; *************** *** 2602,2613 **** notify_format(player, T("Description: %s"), ChanTitle(c)); notify_format(player, T("Owner: %s"), Name(ChanCreator(c))); notify_format(player, T("Flags: %s"), ! privs_to_string(priv_table, ChanType(c))); if (ChanBufferQ(c)) ! notify_format(player, ! T("Recall buffer: %dk, with %d lines stored."), ! BufferQSize(ChanBufferQ(c)), ! bufferq_lines(ChanBufferQ(c))); found++; } } --- 2603,2614 ---- notify_format(player, T("Description: %s"), ChanTitle(c)); notify_format(player, T("Owner: %s"), Name(ChanCreator(c))); notify_format(player, T("Flags: %s"), ! privs_to_string(priv_table, ChanType(c))); if (ChanBufferQ(c)) ! notify_format(player, ! T("Recall buffer: %dk, with %d lines stored."), ! BufferQSize(ChanBufferQ(c)), ! bufferq_lines(ChanBufferQ(c))); found++; } } *************** *** 2641,2684 **** if (string_prefix(cleanp, cleanname)) { found++; if (!(See_All(player) || Chan_Can_Modify(c, player) ! || (ChanCreator(c) == player))) { ! if (Chan_Can_See(c, player)) ! notify_format(player, T("CHAT: No permission to decompile <%s>"), ! ChanName(c)); ! continue; } notify_format(player, "@channel/add %s = %s", ChanName(c), ! privs_to_string(priv_table, ChanType(c))); notify_format(player, "@channel/chown %s = %s", ChanName(c), ! Name(ChanCreator(c))); if (ChanModLock(c) != TRUE_BOOLEXP) ! notify_format(player, "@clock/mod %s = %s", ChanName(c), ! unparse_boolexp(player, ChanModLock(c), UB_MEREF)); if (ChanHideLock(c) != TRUE_BOOLEXP) ! notify_format(player, "@clock/hide %s = %s", ChanName(c), ! unparse_boolexp(player, ChanHideLock(c), UB_MEREF)); if (ChanJoinLock(c) != TRUE_BOOLEXP) ! notify_format(player, "@clock/join %s = %s", ChanName(c), ! unparse_boolexp(player, ChanJoinLock(c), UB_MEREF)); if (ChanSpeakLock(c) != TRUE_BOOLEXP) ! notify_format(player, "@clock/speak %s = %s", ChanName(c), ! unparse_boolexp(player, ChanSpeakLock(c), UB_MEREF)); if (ChanSeeLock(c) != TRUE_BOOLEXP) ! notify_format(player, "@clock/see %s = %s", ChanName(c), ! unparse_boolexp(player, ChanSeeLock(c), UB_MEREF)); if (ChanTitle(c)) ! notify_format(player, "@channel/desc %s = %s", ChanName(c), ! ChanTitle(c)); if (ChanBufferQ(c)) ! notify_format(player, "@channel/buffer %s = %d", ChanName(c), ! bufferq_lines(ChanBufferQ(c))); if (!brief) { ! for (u = ChanUsers(c); u; u = u->next) { ! if (!Chanuser_Hide(u) || Priv_Who(player)) ! notify_format(player, "@channel/on %s = %s", ChanName(c), ! Name(CUdbref(u))); ! } } } } --- 2642,2685 ---- if (string_prefix(cleanp, cleanname)) { found++; if (!(See_All(player) || Chan_Can_Modify(c, player) ! || (ChanCreator(c) == player))) { ! if (Chan_Can_See(c, player)) ! notify_format(player, T("CHAT: No permission to decompile <%s>"), ! ChanName(c)); ! continue; } notify_format(player, "@channel/add %s = %s", ChanName(c), ! privs_to_string(priv_table, ChanType(c))); notify_format(player, "@channel/chown %s = %s", ChanName(c), ! Name(ChanCreator(c))); if (ChanModLock(c) != TRUE_BOOLEXP) ! notify_format(player, "@clock/mod %s = %s", ChanName(c), ! unparse_boolexp(player, ChanModLock(c), UB_MEREF)); if (ChanHideLock(c) != TRUE_BOOLEXP) ! notify_format(player, "@clock/hide %s = %s", ChanName(c), ! unparse_boolexp(player, ChanHideLock(c), UB_MEREF)); if (ChanJoinLock(c) != TRUE_BOOLEXP) ! notify_format(player, "@clock/join %s = %s", ChanName(c), ! unparse_boolexp(player, ChanJoinLock(c), UB_MEREF)); if (ChanSpeakLock(c) != TRUE_BOOLEXP) ! notify_format(player, "@clock/speak %s = %s", ChanName(c), ! unparse_boolexp(player, ChanSpeakLock(c), UB_MEREF)); if (ChanSeeLock(c) != TRUE_BOOLEXP) ! notify_format(player, "@clock/see %s = %s", ChanName(c), ! unparse_boolexp(player, ChanSeeLock(c), UB_MEREF)); if (ChanTitle(c)) ! notify_format(player, "@channel/desc %s = %s", ChanName(c), ! ChanTitle(c)); if (ChanBufferQ(c)) ! notify_format(player, "@channel/buffer %s = %d", ChanName(c), ! bufferq_lines(ChanBufferQ(c))); if (!brief) { ! for (u = ChanUsers(c); u; u = u->next) { ! if (!Chanuser_Hide(u) || Priv_Who(player)) ! notify_format(player, "@channel/on %s = %s", ChanName(c), ! Name(CUdbref(u))); ! } } } } *************** *** 2698,2715 **** for (u = ChanUsers(chan); u; u = u->next) { who = CUdbref(u); if ((IsThing(who) || Connected(who)) && ! (!Chanuser_Hide(u) || Priv_Who(player))) { i++; safe_itemizer(i, !(u->next), ",", T("and"), " ", tbuf1, &bp); safe_str(Name(who), tbuf1, &bp); if (IsThing(who)) ! safe_format(tbuf1, &bp, "(#%d)", who); if (Chanuser_Hide(u) && Chanuser_Gag(u)) ! safe_str(" (hidden,gagging)", tbuf1, &bp); else if (Chanuser_Hide(u)) ! safe_str(" (hidden)", tbuf1, &bp); else if (Chanuser_Gag(u)) ! safe_str(" (gagging)", tbuf1, &bp); } } *bp = '\0'; --- 2699,2716 ---- for (u = ChanUsers(chan); u; u = u->next) { who = CUdbref(u); if ((IsThing(who) || Connected(who)) && ! (!Chanuser_Hide(u) || Priv_Who(player))) { i++; safe_itemizer(i, !(u->next), ",", T("and"), " ", tbuf1, &bp); safe_str(Name(who), tbuf1, &bp); if (IsThing(who)) ! safe_format(tbuf1, &bp, "(#%d)", who); if (Chanuser_Hide(u) && Chanuser_Gag(u)) ! safe_str(" (hidden,gagging)", tbuf1, &bp); else if (Chanuser_Hide(u)) ! safe_str(" (hidden)", tbuf1, &bp); else if (Chanuser_Gag(u)) ! safe_str(" (gagging)", tbuf1, &bp); } } *bp = '\0'; *************** *** 2760,2770 **** for (u = ChanUsers(chan); u; u = u->next) { who = CUdbref(u); if ((IsThing(who) || Connected(who)) && ! (!Chanuser_Hide(u) || Priv_Who(executor))) { if (first) ! first = 0; else ! safe_chr(' ', buff, bp); safe_dbref(who, buff, bp); } } --- 2761,2771 ---- for (u = ChanUsers(chan); u; u = u->next) { who = CUdbref(u); if ((IsThing(who) || Connected(who)) && ! (!Chanuser_Hide(u) || Priv_Who(executor))) { if (first) ! first = 0; else ! safe_chr(' ', buff, bp); safe_dbref(who, buff, bp); } } *************** *** 2800,2810 **** if (!title || !*title) { ChanTitle(c)[0] = '\0'; notify_format(player, T("CHAT: Channel <%s> description cleared."), ! ChanName(c)); } else { strcpy(ChanTitle(c), title); notify_format(player, T("CHAT: Channel <%s> description set."), ! ChanName(c)); } } --- 2801,2811 ---- if (!title || !*title) { ChanTitle(c)[0] = '\0'; notify_format(player, T("CHAT: Channel <%s> description cleared."), ! ChanName(c)); } else { strcpy(ChanTitle(c), title); notify_format(player, T("CHAT: Channel <%s> description set."), ! ChanName(c)); } } *************** *** 2872,2887 **** u = onchannel(player, c); if (u) { if (!Channel_Quiet(c) && (Channel_Admin(c) || Channel_Wizard(c) ! || (!Chanuser_Hide(u) && !Dark(player)))) { ! bp = buff; ! safe_format(buff, &bp, "<%s> %s", "%s", msg); ! *bp = '\0'; ! format_channel_broadcast(c, u, player, CB_CHECKQUIET | CB_PRESENCE, ! buff, NULL); } if (ungag) ! CUtype(u) &= ~CU_GAG; } } } --- 2873,2888 ---- u = onchannel(player, c); if (u) { if (!Channel_Quiet(c) && (Channel_Admin(c) || Channel_Wizard(c) ! || (!Chanuser_Hide(u) && !Dark(player)))) { ! bp = buff; ! safe_format(buff, &bp, "<%s> %s", "%s", msg); ! *bp = '\0'; ! format_channel_broadcast(c, u, player, CB_CHECKQUIET | CB_PRESENCE, ! buff, NULL); } if (ungag) ! CUtype(u) &= ~CU_GAG; } } } *************** *** 2894,2909 **** channel_description(dbref player) { static char buf[BUFFER_LEN]; CHANLIST *c; ! *buf = '\0'; if (Chanlist(player)) { ! strcpy(buf, T("Channels:")); ! for (c = Chanlist(player); c; c = c->next) ! sprintf(buf, "%s %s", buf, ChanName(c->chan)); } else if (IsPlayer(player)) ! strcpy(buf, T("Channels: *NONE*")); return buf; } --- 2895,2915 ---- channel_description(dbref player) { static char buf[BUFFER_LEN]; + char *bp; CHANLIST *c; ! bp = buf; if (Chanlist(player)) { ! safe_str(T("Channels:"), buf, &bp); ! for (c = Chanlist(player); c; c = c->next) { ! safe_chr(' ', buf, &bp); ! safe_str(ChanName(c->chan), buf, &bp); ! } } else if (IsPlayer(player)) ! safe_str(T("Channels: *NONE*"), buf, &bp); ! ! *bp = '\0'; return buf; } *************** *** 2932,2966 **** if (GoodObject(it)) { int first = 1; if (!delim_check(buff, bp, nargs, args, 2, &sep)) ! return; can_ex = Can_Examine(executor, it); for (cl = Chanlist(it); cl; cl = cl->next) { ! if (can_ex || ((u = onchannel(it, cl->chan)) && !Chanuser_Hide(u) ! && onchannel(executor, cl->chan))) { ! if (!first) ! safe_chr(sep, buff, bp); ! safe_str(ChanName(cl->chan), buff, bp); ! first = 0; ! } } return; } else { /* args[0] didn't match. Maybe it's a delimiter? */ if (arglens[0] > 1) { ! if (it == NOTHING) ! notify(executor, T("I can't see that here.")); ! else if (it == AMBIGUOUS) ! notify(executor, T("I don't know which thing you mean.")); ! return; } else if (!delim_check(buff, bp, nargs, args, 1, &sep)) ! return; } } /* No arguments (except maybe delimiter) - return list of all channels */ for (c = channels; c; c = c->next) { if (Chan_Can_See(c, executor)) { if (c != channels) ! safe_chr(sep, buff, bp); safe_str(ChanName(c), buff, bp); } } --- 2938,2972 ---- if (GoodObject(it)) { int first = 1; if (!delim_check(buff, bp, nargs, args, 2, &sep)) ! return; can_ex = Can_Examine(executor, it); for (cl = Chanlist(it); cl; cl = cl->next) { ! if (can_ex || ((u = onchannel(it, cl->chan)) && !Chanuser_Hide(u) ! && onchannel(executor, cl->chan))) { ! if (!first) ! safe_chr(sep, buff, bp); ! safe_str(ChanName(cl->chan), buff, bp); ! first = 0; ! } } return; } else { /* args[0] didn't match. Maybe it's a delimiter? */ if (arglens[0] > 1) { ! if (it == NOTHING) ! notify(executor, T("I can't see that here.")); ! else if (it == AMBIGUOUS) ! notify(executor, T("I don't know which thing you mean.")); ! return; } else if (!delim_check(buff, bp, nargs, args, 1, &sep)) ! return; } } /* No arguments (except maybe delimiter) - return list of all channels */ for (c = channels; c; c = c->next) { if (Chan_Can_See(c, executor)) { if (c != channels) ! safe_chr(sep, buff, bp); safe_str(ChanName(c), buff, bp); } } *************** *** 3014,3021 **** if (nargs == 2) { if (FUNCTION_SIDE_EFFECTS) { if (!command_check_byname(executor, "@clock") || fun->flags & FN_NOSIDEFX) { ! safe_str(T(e_perm), buff, bp); ! return; } do_chan_lock(executor, args[0], args[1], which_lock); return; --- 3020,3027 ---- if (nargs == 2) { if (FUNCTION_SIDE_EFFECTS) { if (!command_check_byname(executor, "@clock") || fun->flags & FN_NOSIDEFX) { ! safe_str(T(e_perm), buff, bp); ! return; } do_chan_lock(executor, args[0], args[1], which_lock); return; *************** *** 3134,3160 **** start--; } while ((buf = iter_bufferq(ChanBufferQ(chan), &p, &speaker, &type, ! ×tamp)) && num_lines > 0) { if (first) first = 0; else safe_chr(sep, buff, bp); if (Nospoof(executor) && GoodObject(speaker)) { char *nsmsg = ns_esnotify(speaker, na_one, &executor, ! Paranoid(executor) ? 1 : 0); if (!showstamp) ! safe_format(buff, bp, T("%s %s"), nsmsg, buf); else { ! stamp = show_time(timestamp, 0); ! safe_format(buff, bp, T("[%s] %s %s"), stamp, nsmsg, buf); } mush_free(nsmsg, "string"); } else { if (!showstamp) ! safe_str(buf, buff, bp); else { ! stamp = show_time(timestamp, 0); ! safe_format(buff, bp, T("[%s] %s"), stamp, buf); } } num_lines--; --- 3140,3166 ---- start--; } while ((buf = iter_bufferq(ChanBufferQ(chan), &p, &speaker, &type, ! ×tamp)) && num_lines > 0) { if (first) first = 0; else safe_chr(sep, buff, bp); if (Nospoof(executor) && GoodObject(speaker)) { char *nsmsg = ns_esnotify(speaker, na_one, &executor, ! Paranoid(executor) ? 1 : 0); if (!showstamp) ! safe_format(buff, bp, T("%s %s"), nsmsg, buf); else { ! stamp = show_time(timestamp, 0); ! safe_format(buff, bp, T("[%s] %s %s"), stamp, nsmsg, buf); } mush_free(nsmsg, "string"); } else { if (!showstamp) ! safe_str(buf, buff, bp); else { ! stamp = show_time(timestamp, 0); ! safe_format(buff, bp, T("[%s] %s"), stamp, buf); } } num_lines--; *************** *** 3265,3272 **** current = CUdbref(u); nu = u->next; cont = (!GoodObject(current) || ! (nac->checkquiet && Chanuser_Quiet(u)) || ! Chanuser_Gag(u) || (IsPlayer(current) && !Connected(current))); } while (cont); nac->u = nu; return current; --- 3271,3278 ---- current = CUdbref(u); nu = u->next; cont = (!GoodObject(current) || ! (nac->checkquiet && Chanuser_Quiet(u)) || ! Chanuser_Gag(u) || (IsPlayer(current) && !Connected(current))); } while (cont); nac->u = nu; return current; *************** *** 3286,3292 **** #ifdef HAS_VSNPRINTF char tbuf1[BUFFER_LEN]; #else ! char tbuf1[BUFFER_LEN * 2]; /* Safety margin as per tprintf */ #endif struct na_cpass nac; int na_flags = NA_INTER_LOCK; --- 3292,3298 ---- #ifdef HAS_VSNPRINTF char tbuf1[BUFFER_LEN]; #else ! char tbuf1[BUFFER_LEN * 2]; /* Safety margin as per tprintf */ #endif struct na_cpass nac; int na_flags = NA_INTER_LOCK; *************** *** 3310,3319 **** if (Channel_Interact(channel)) na_flags |= (flags & CB_PRESENCE) ? NA_INTER_PRESENCE : NA_INTER_HEAR; notify_anything(player, na_channel, &nac, ns_esnotify, ! na_flags | ((flags & CB_NOSPOOF) ? 0 : NA_SPOOF), tbuf1); if (ChanBufferQ(channel)) add_to_bufferq(ChanBufferQ(channel), 0, ! (flags & CB_NOSPOOF) ? player : NOTHING, tbuf1); } --- 3316,3325 ---- if (Channel_Interact(channel)) na_flags |= (flags & CB_PRESENCE) ? NA_INTER_PRESENCE : NA_INTER_HEAR; notify_anything(player, na_channel, &nac, ns_esnotify, ! na_flags | ((flags & CB_NOSPOOF) ? 0 : NA_SPOOF), tbuf1); if (ChanBufferQ(channel)) add_to_bufferq(ChanBufferQ(channel), 0, ! (flags & CB_NOSPOOF) ? player : NOTHING, tbuf1); } *************** *** 3335,3341 **** CHANUSER *u; const char *lines; const char *startpos; ! int num_lines = 10; /* Default if none is given */ int start = -1; int all; char *p = NULL, *buf; --- 3341,3347 ---- CHANUSER *u; const char *lines; const char *startpos; ! int num_lines = 10; /* Default if none is given */ int start = -1; int all; char *p = NULL, *buf; *************** *** 3360,3366 **** if (is_integer(lines)) { num_lines = parse_integer(lines); if (num_lines == 0) ! num_lines = INT_MAX; } else { notify(player, T("How many lines did you want to recall?")); return; --- 3366,3372 ---- if (is_integer(lines)) { num_lines = parse_integer(lines); if (num_lines == 0) ! num_lines = INT_MAX; } else { notify(player, T("How many lines did you want to recall?")); return; *************** *** 3375,3382 **** if (!Chan_Can_See(chan, player)) { if (onchannel(player, chan)) notify_format(player, ! T("CHAT: You can't do that with channel <%s>."), ! ChanName(chan)); else notify(player, T("CHAT: I don't recognize that channel.")); return; --- 3381,3388 ---- if (!Chan_Can_See(chan, player)) { if (onchannel(player, chan)) notify_format(player, ! T("CHAT: You can't do that with channel <%s>."), ! ChanName(chan)); else notify(player, T("CHAT: I don't recognize that channel.")); return; *************** *** 3405,3427 **** start--; } while ((buf = iter_bufferq(ChanBufferQ(chan), &p, &speaker, &type, ! ×tamp)) && num_lines > 0) { if (Nospoof(player) && GoodObject(speaker)) { char *nsmsg = ns_esnotify(speaker, na_one, &player, ! Paranoid(player) ? 1 : 0); if (quiet) ! notify_format(player, T("%s %s"), nsmsg, buf); else { ! stamp = show_time(timestamp, 0); ! notify_format(player, T("[%s] %s %s"), stamp, nsmsg, buf); } mush_free(nsmsg, "string"); } else { if (quiet) ! notify(player, buf); else { ! stamp = show_time(timestamp, 0); ! notify_format(player, T("[%s] %s"), stamp, buf); } } num_lines--; --- 3411,3433 ---- start--; } while ((buf = iter_bufferq(ChanBufferQ(chan), &p, &speaker, &type, ! ×tamp)) && num_lines > 0) { if (Nospoof(player) && GoodObject(speaker)) { char *nsmsg = ns_esnotify(speaker, na_one, &player, ! Paranoid(player) ? 1 : 0); if (quiet) ! notify_format(player, T("%s %s"), nsmsg, buf); else { ! stamp = show_time(timestamp, 0); ! notify_format(player, T("[%s] %s %s"), stamp, nsmsg, buf); } mush_free(nsmsg, "string"); } else { if (quiet) ! notify(player, buf); else { ! stamp = show_time(timestamp, 0); ! notify_format(player, T("[%s] %s"), stamp, buf); } } num_lines--; *************** *** 3429,3437 **** notify(player, T("CHAT: End recall")); if (!all) notify_format(player, ! T ! ("CHAT: To recall the entire buffer, use @chan/recall %s=0"), ! ChanName(chan)); } /** Set the size of a channel's buffer in maximum lines. --- 3435,3443 ---- notify(player, T("CHAT: End recall")); if (!all) notify_format(player, ! T ! ("CHAT: To recall the entire buffer, use @chan/recall %s=0"), ! ChanName(chan)); } /** Set the size of a channel's buffer in maximum lines. *************** *** 3471,3497 **** free_bufferq(ChanBufferQ(chan)); ChanBufferQ(chan) = NULL; notify_format(player, ! T ! ("CHAT: Channel buffering disabled for channel <%s>."), ! ChanName(chan)); } else { notify_format(player, ! T ! ("CHAT: Channel buffering already disabled for channel <%s>."), ! ChanName(chan)); } } else { if (ChanBufferQ(chan)) { /* Resize a buffer */ ChanBufferQ(chan) = reallocate_bufferq(ChanBufferQ(chan), size); notify_format(player, ! T("CHAT: Resizing buffer of channel <%s>"), ChanName(chan)); } else { /* Start a new buffer */ ChanBufferQ(chan) = allocate_bufferq(size); notify_format(player, ! T("CHAT: Buffering enabled on channel <%s>."), ! ChanName(chan)); } } } --- 3477,3503 ---- free_bufferq(ChanBufferQ(chan)); ChanBufferQ(chan) = NULL; notify_format(player, ! T ! ("CHAT: Channel buffering disabled for channel <%s>."), ! ChanName(chan)); } else { notify_format(player, ! T ! ("CHAT: Channel buffering already disabled for channel <%s>."), ! ChanName(chan)); } } else { if (ChanBufferQ(chan)) { /* Resize a buffer */ ChanBufferQ(chan) = reallocate_bufferq(ChanBufferQ(chan), size); notify_format(player, ! T("CHAT: Resizing buffer of channel <%s>"), ChanName(chan)); } else { /* Start a new buffer */ ChanBufferQ(chan) = allocate_bufferq(size); notify_format(player, ! T("CHAT: Buffering enabled on channel <%s>."), ! ChanName(chan)); } } } *************** *** 3500,3507 **** in it. */ static void format_channel_broadcast(CHAN *chan, CHANUSER *u, ! dbref victim, int flags, ! const char *msg, const char *extra) { const char *title = NULL; if (extra && *extra) --- 3506,3513 ---- in it. */ static void format_channel_broadcast(CHAN *chan, CHANUSER *u, ! dbref victim, int flags, ! const char *msg, const char *extra) { const char *title = NULL; if (extra && *extra) Index: src/utils.c =================================================================== *** src/utils.c (.../p2) (revision 920) --- src/utils.c (.../p3) (revision 920) *************** *** 30,36 **** #endif #ifdef WIN32 #include ! #include /* For GetCurrentProcessId() */ #endif #ifdef HAVE_STDINT_H #include --- 30,36 ---- #endif #ifdef WIN32 #include ! #include /* For GetCurrentProcessId() */ #endif #ifdef HAVE_STDINT_H #include *************** *** 63,77 **** * \param check string to label allocation with. * \return allocated block of memory or NULL. */ ! Malloc_t ! mush_malloc(size_t size, const char *check) { ! Malloc_t ptr; ! add_check(check); ! ptr = malloc(size); ! if (ptr == NULL) do_log(LT_ERR, 0, 0, "mush_malloc failed to malloc %lu bytes for %s", ! (unsigned long) size, check); return ptr; } --- 63,98 ---- * \param check string to label allocation with. * \return allocated block of memory or NULL. */ ! void * ! mush_malloc(size_t bytes, const char *check) { ! void *ptr; ! ptr = malloc(bytes); ! if (!ptr) do_log(LT_ERR, 0, 0, "mush_malloc failed to malloc %lu bytes for %s", ! (unsigned long) bytes, check); ! add_check(check); ! return ptr; ! } ! ! /** A calloc wrapper that tracks type of allocation. ! * Use in preference to calloc() when possible to enable ! * memory leak checking. ! * \param count number of elements to allocate ! * \param size size of each element ! * \param check string to label allocation with ! * \return allocated zeroed out block or NULL ! */ ! void * ! mush_calloc(size_t count, size_t size, const char *check) ! { ! void *ptr; ! ! ptr = calloc(count, size); ! if (!ptr) ! do_rawlog(LT_ERR, "mush_calloc failed to allocate %lu bytes for %s", ! (unsigned long) (size * count), check); ! add_check(check); return ptr; } *************** *** 82,89 **** * \param check string to label allocation with. */ void ! mush_free(Malloc_t RESTRICT ptr, const char *RESTRICT check ! __attribute__ ((__unused__))) { del_check(check); free(ptr); --- 103,109 ---- * \param check string to label allocation with. */ void ! mush_free(void *RESTRICT ptr, const char *RESTRICT check) { del_check(check); free(ptr); *************** *** 175,188 **** */ int fetch_ufun_attrib(char *attrname, dbref executor, ufun_attrib * ufun, ! int accept_lambda) { ATTR *attrib; dbref thing; int pe_flags = PE_UDEFAULT; if (!ufun) ! return 0; /* We should never NOT receive a ufun. */ ufun->errmess = (char *) ""; /* find our object and attribute */ --- 195,208 ---- */ int fetch_ufun_attrib(char *attrname, dbref executor, ufun_attrib * ufun, ! int accept_lambda) { ATTR *attrib; dbref thing; int pe_flags = PE_UDEFAULT; if (!ufun) ! return 0; /* We should never NOT receive a ufun. */ ufun->errmess = (char *) ""; /* find our object and attribute */ *************** *** 221,227 **** pe_flags |= PE_DEBUG; /* Populate the ufun object */ ! strncpy(ufun->contents, atr_value(attrib), BUFFER_LEN); ufun->thing = thing; ufun->pe_flags = pe_flags; --- 241,247 ---- pe_flags |= PE_DEBUG; /* Populate the ufun object */ ! mush_strncpy(ufun->contents, atr_value(attrib), BUFFER_LEN); ufun->thing = thing; ufun->pe_flags = pe_flags; *************** *** 249,255 **** */ int call_ufun(ufun_attrib * ufun, char **wenv_args, int wenv_argc, char *ret, ! dbref executor, dbref enactor, PE_Info *pe_info) { char rbuff[BUFFER_LEN]; char *rp; --- 269,275 ---- */ int call_ufun(ufun_attrib * ufun, char **wenv_args, int wenv_argc, char *ret, ! dbref executor, dbref enactor, PE_Info *pe_info) { char rbuff[BUFFER_LEN]; char *rp; *************** *** 302,308 **** ap = ufun->contents; pe_ret = process_expression(ret, &rp, &ap, ufun->thing, executor, ! enactor, ufun->pe_flags, PT_DEFAULT, pe_info); *rp = '\0'; /* Restore the old wenv */ --- 322,328 ---- ap = ufun->contents; pe_ret = process_expression(ret, &rp, &ap, ufun->thing, executor, ! enactor, ufun->pe_flags, PT_DEFAULT, pe_info); *rp = '\0'; /* Restore the old wenv */ *************** *** 338,344 **** */ int call_attrib(dbref thing, const char *attrname, const char *wenv_args[], ! int wenv_argc, char *ret, dbref enactor, PE_Info *pe_info) { char atrbuf[BUFFER_LEN]; char rbuff[BUFFER_LEN]; --- 358,364 ---- */ int call_attrib(dbref thing, const char *attrname, const char *wenv_args[], ! int wenv_argc, char *ret, dbref enactor, PE_Info *pe_info) { char atrbuf[BUFFER_LEN]; char rbuff[BUFFER_LEN]; *************** *** 367,374 **** if (attrib == NULL) return 1; ! strncpy(atrbuf, atr_value(attrib), BUFFER_LEN - 1); ! atrbuf[BUFFER_LEN - 1] = '\0'; if (!*atrbuf) return 1; --- 387,394 ---- if (attrib == NULL) return 1; ! mush_strncpy(atrbuf, atr_value(attrib), BUFFER_LEN); ! if (!*atrbuf) return 1; *************** *** 414,420 **** ap = atrbuf; pe_ret = process_expression(ret, &rp, &ap, thing, thing, ! enactor, PE_DEFAULT, PT_DEFAULT, pe_info); *rp = '\0'; /* Restore the old wenv */ --- 434,440 ---- ap = atrbuf; pe_ret = process_expression(ret, &rp, &ap, thing, thing, ! enactor, PE_DEFAULT, PT_DEFAULT, pe_info); *rp = '\0'; /* Restore the old wenv */ *************** *** 451,459 **** if (IsRoom(room)) { thing = Exits(room); while (thing != NOTHING) { ! if (thing == door) ! return room; ! thing = Next(thing); } } return NOTHING; --- 471,479 ---- if (IsRoom(room)) { thing = Exits(room); while (thing != NOTHING) { ! if (thing == door) ! return room; ! thing = Next(thing); } } return NOTHING; *************** *** 476,483 **** /* have to find it */ DOLIST(prev, first) { if (Next(prev) == what) { ! Next(prev) = Next(what); ! return first; } } return first; --- 496,503 ---- /* have to find it */ DOLIST(prev, first) { if (Next(prev) == what) { ! Next(prev) = Next(what); ! return first; } } return first; *************** *** 603,609 **** close(fd); if (r <= 0) { do_rawlog(LT_ERR, ! "Couldn't read from /dev/urandom! Resorting to normal seeding method."); } else { do_rawlog(LT_ERR, "Seeded RNG from /dev/urandom"); init_by_array(buf, r / sizeof(unsigned long)); --- 623,629 ---- close(fd); if (r <= 0) { do_rawlog(LT_ERR, ! "Couldn't read from /dev/urandom! Resorting to normal seeding method."); } else { do_rawlog(LT_ERR, "Seeded RNG from /dev/urandom"); init_by_array(buf, r / sizeof(unsigned long)); *************** *** 611,617 **** } } else do_rawlog(LT_ERR, ! "Couldn't open /dev/urandom to seed random number generator. Resorting to normal seeding method."); #endif /* Default seeder. Pick a seed that's fairly random */ --- 631,637 ---- } } else do_rawlog(LT_ERR, ! "Couldn't open /dev/urandom to seed random number generator. Resorting to normal seeding method."); #endif /* Default seeder. Pick a seed that's fairly random */ *************** *** 641,652 **** /* Period parameters */ #define M 397 /**< PRNG constant */ ! #define MATRIX_A 0x9908b0dfUL /**< PRNG constant vector a */ ! #define UPPER_MASK 0x80000000UL /**< PRNG most significant w-r bits */ ! #define LOWER_MASK 0x7fffffffUL /**< PRNG least significant r bits */ ! static unsigned long mt[N]; /* the array for the state vector */ ! static int mti = N + 1; /* mti==N+1 means mt[N] is not initialized */ /** initializes mt[N] with a seed. * \param a seed value. --- 661,672 ---- /* Period parameters */ #define M 397 /**< PRNG constant */ ! #define MATRIX_A 0x9908b0dfUL /**< PRNG constant vector a */ ! #define UPPER_MASK 0x80000000UL /**< PRNG most significant w-r bits */ ! #define LOWER_MASK 0x7fffffffUL /**< PRNG least significant r bits */ ! static unsigned long mt[N]; /* the array for the state vector */ ! static int mti = N + 1; /* mti==N+1 means mt[N] is not initialized */ /** initializes mt[N] with a seed. * \param a seed value. *************** *** 680,687 **** k = (N > key_length ? N : key_length); for (; k; k--) { mt[i] = (mt[i] ^ ((mt[i - 1] ^ (mt[i - 1] >> 30)) * 1664525UL)) ! + init_key[j] + j; /* non linear */ ! mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; j++; if (i >= N) { --- 700,707 ---- k = (N > key_length ? N : key_length); for (; k; k--) { mt[i] = (mt[i] ^ ((mt[i - 1] ^ (mt[i - 1] >> 30)) * 1664525UL)) ! + init_key[j] + j; /* non linear */ ! mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; j++; if (i >= N) { *************** *** 693,700 **** } for (k = N - 1; k; k--) { mt[i] = (mt[i] ^ ((mt[i - 1] ^ (mt[i - 1] >> 30)) * 1566083941UL)) ! - i; /* non linear */ ! mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; if (i >= N) { mt[0] = mt[N - 1]; --- 713,720 ---- } for (k = N - 1; k; k--) { mt[i] = (mt[i] ^ ((mt[i - 1] ^ (mt[i - 1] >> 30)) * 1566083941UL)) ! - i; /* non linear */ ! mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; if (i >= N) { mt[0] = mt[N - 1]; *************** *** 702,708 **** } } ! mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */ } /* generates a random number on [0,0xffffffff]-interval */ --- 722,728 ---- } } ! mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */ } /* generates a random number on [0,0xffffffff]-interval */ *************** *** 713,723 **** static unsigned long mag01[2] = { 0x0UL, MATRIX_A }; /* mag01[x] = x * MATRIX_A for x=0,1 */ ! if (mti >= N) { /* generate N words at one time */ int kk; ! if (mti == N + 1) /* if init_genrand() has not been called, */ ! init_genrand(5489UL); /* a default initial seed is used */ for (kk = 0; kk < N - M; kk++) { y = (mt[kk] & UPPER_MASK) | (mt[kk + 1] & LOWER_MASK); --- 733,743 ---- static unsigned long mag01[2] = { 0x0UL, MATRIX_A }; /* mag01[x] = x * MATRIX_A for x=0,1 */ ! if (mti >= N) { /* generate N words at one time */ int kk; ! if (mti == N + 1) /* if init_genrand() has not been called, */ ! init_genrand(5489UL); /* a default initial seed is used */ for (kk = 0; kk < N - M; kk++) { y = (mt[kk] & UPPER_MASK) | (mt[kk + 1] & LOWER_MASK); *************** *** 802,815 **** char * fullalias(dbref it) { ! static char n[BUFFER_LEN]; /* STATIC */ ATTR *a = atr_get_noparent(it, "ALIAS"); if (!a) return '\0'; ! strncpy(n, atr_value(a), BUFFER_LEN - 1); ! n[BUFFER_LEN - 1] = '\0'; return n; } --- 822,834 ---- char * fullalias(dbref it) { ! static char n[BUFFER_LEN]; /* STATIC */ ATTR *a = atr_get_noparent(it, "ALIAS"); if (!a) return '\0'; ! mush_strncpy(n, atr_value(a), BUFFER_LEN); return n; } *************** *** 822,836 **** char * shortalias(dbref it) { ! static char n[BUFFER_LEN]; /* STATIC */ char *s; s = fullalias(it); if (!(s && *s)) return '\0'; ! strncpy(n, s, BUFFER_LEN - 1); ! n[BUFFER_LEN - 1] = '\0'; if ((s = strchr(n, ';'))) *s = '\0'; --- 841,854 ---- char * shortalias(dbref it) { ! static char n[BUFFER_LEN]; /* STATIC */ char *s; s = fullalias(it); if (!(s && *s)) return '\0'; ! mush_strncpy(n, s, BUFFER_LEN); if ((s = strchr(n, ';'))) *s = '\0'; *************** *** 845,855 **** char * shortname(dbref it) { ! static char n[BUFFER_LEN]; /* STATIC */ char *s; ! strncpy(n, Name(it), BUFFER_LEN - 1); ! n[BUFFER_LEN - 1] = '\0'; if (IsExit(it)) { if ((s = strchr(n, ';'))) *s = '\0'; --- 863,873 ---- char * shortname(dbref it) { ! static char n[BUFFER_LEN]; /* STATIC */ char *s; ! mush_strncpy(n, Name(it), BUFFER_LEN); ! if (IsExit(it)) { if ((s = strchr(n, ';'))) *s = '\0'; Index: src/Makefile.in =================================================================== *** src/Makefile.in (.../p2) (revision 920) --- src/Makefile.in (.../p3) (revision 920) *************** *** 29,41 **** extmail.c filecopy.c flaglocal.c flags.c funcrypt.c function.c \ fundb.c funlist.c funlocal.c funmath.c funmisc.c funstr.c funtime.c \ funufun.c game.c help.c htab.c ident.c local.c lock.c log.c look.c \ ! malias.c markup.c match.c memcheck.c move.c mycrypt.c mymalloc.c \ ! mysocket.c myrlimit.c myssl.c notify.c parse.c pcre.c player.c \ ! plyrlist.c predicat.c privtab.c \ ptab.c rob.c services.c set.c shs.c sig.c sort.c speech.c sql.c \ strdup.c strtree.c \ ! strutil.c tables.c timer.c unparse.c utils.c version.c warnings.c \ ! wild.c wiz.c # .o versions of above - these are used in the build --- 29,41 ---- extmail.c filecopy.c flaglocal.c flags.c funcrypt.c function.c \ fundb.c funlist.c funlocal.c funmath.c funmisc.c funstr.c funtime.c \ funufun.c game.c help.c htab.c ident.c local.c lock.c log.c look.c \ ! malias.c markup.c match.c memcheck.c move.c mycrypt.c mymalloc.c \ ! mysocket.c myrlimit.c myssl.c notify.c parse.c pcre.c player.c \ ! plyrlist.c predicat.c privtab.c info_master.c \ ptab.c rob.c services.c set.c shs.c sig.c sort.c speech.c sql.c \ strdup.c strtree.c \ ! strutil.c tables.c timer.c unparse.c utils.c version.c wait.c \ ! warnings.c wild.c wiz.c # .o versions of above - these are used in the build *************** *** 45,58 **** extmail.o filecopy.o flaglocal.o flags.o funcrypt.o function.o \ fundb.o funlist.o funlocal.o funmath.o funmisc.o funstr.o funtime.o \ funufun.o game.o help.o htab.o ident.o local.o lock.o log.o look.o \ ! malias.o markup.o match.o memcheck.o move.o mycrypt.o mymalloc.o \ ! mysocket.o myrlimit.o myssl.o notify.o parse.o pcre.o player.o \ ! plyrlist.o \ ! predicat.o privtab.o \ ptab.o rob.o services.o set.o shs.o sig.o sort.o speech.o sql.o \ strdup.o strtree.o \ ! strutil.o tables.o timer.o unparse.o utils.o version.o warnings.o \ ! wild.o wiz.o # This is a dummy target, in case you type 'make' in the source # directory (likely for emacs users who M-x compile.) --- 45,57 ---- extmail.o filecopy.o flaglocal.o flags.o funcrypt.o function.o \ fundb.o funlist.o funlocal.o funmath.o funmisc.o funstr.o funtime.o \ funufun.o game.o help.o htab.o ident.o local.o lock.o log.o look.o \ ! malias.o markup.o match.o memcheck.o move.o mycrypt.o mymalloc.o \ ! mysocket.o myrlimit.o myssl.o notify.o parse.o pcre.o player.o \ ! plyrlist.o info_master.o predicat.o privtab.o \ ptab.o rob.o services.o set.o shs.o sig.o sort.o speech.o sql.o \ strdup.o strtree.o \ ! strutil.o tables.o timer.o unparse.o utils.o version.o wait.o \ ! warnings.o wild.o wiz.o # This is a dummy target, in case you type 'make' in the source # directory (likely for emacs users who M-x compile.) *************** *** 74,84 **** # We recompile mysocket.c instead of reusing mysocket.o because we # want to do some error handing differently for info_slave. ! info_slave: info_slave.c ident.o strdup.o sig.o mymalloc.o mysocket.c @echo "Making info_slave." $(CC) $(CCFLAGS) $(IDEFS) -c info_slave.c $(CC) $(LDFLAGS) $(CCFLAGS) -DINFOSLAVE -o info_slave info_slave.o \ ! ident.o strdup.o sig.o mymalloc.o mysocket.c $(LIBS) SSL_SLAVE_OBJS = strdup.o sig.o mymalloc.o mysocket.o myssl.o notify.o myrlimit.o strutil.o ident.o utils.o ssl_slave: ssl_slave.c $(SSL_SLAVE_OBJS) --- 73,84 ---- # We recompile mysocket.c instead of reusing mysocket.o because we # want to do some error handing differently for info_slave. ! info_slave: info_slave.c ident.o strdup.o sig.o wait.o mysocket.c \ ! ../hdrs/lookup.h @echo "Making info_slave." $(CC) $(CCFLAGS) $(IDEFS) -c info_slave.c $(CC) $(LDFLAGS) $(CCFLAGS) -DINFOSLAVE -o info_slave info_slave.o \ ! ident.o strdup.o sig.o wait.o mysocket.c $(LIBS) SSL_SLAVE_OBJS = strdup.o sig.o mymalloc.o mysocket.o myssl.o notify.o myrlimit.o strutil.o ident.o utils.o ssl_slave: ssl_slave.c $(SSL_SLAVE_OBJS) *************** *** 158,173 **** makedepend -fMakefile.in -w10 -- $(CFLAGS) -- $(C_FILES) $(H_FILES) @PERL@ ../utils/fixdepend.pl Makefile.in ! # Requires GNU indent! ! ! # The expand that comes with OS X barfs on non-ASCII text. We don't ! # really need it anyways since indent will do its own thing. ! # @EXPAND@ $$file > tmpfile; mv -f tmpfile $$file; ! indent: (set +e; for file in *.dst *.c ../hdrs/*.h ; do echo $$file; \ ! @INDENT@ -npro -kr -ci2 -ss -psl -ip4 -i2 -cs -l80 -lc75 \ -T accent_info -T acsflag -T aig_func -T ALIST -T ansi_string \ -T atr_err -T ATRALIAS -T ATTR -T ATTRPAGE -T BOOL -T boolexp \ -T boolexp_type -T BQUE -T branch_chain -T BUFFERQ \ --- 158,168 ---- makedepend -fMakefile.in -w10 -- $(CFLAGS) -- $(C_FILES) $(H_FILES) @PERL@ ../utils/fixdepend.pl Makefile.in ! # Requires GNU indent 1.2 or better! 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 accent_info -T acsflag -T aig_func -T ALIST -T ansi_string \ -T atr_err -T ATRALIAS -T ATTR -T ATTRPAGE -T BOOL -T boolexp \ -T boolexp_type -T BQUE -T branch_chain -T BUFFERQ \ *************** *** 202,210 **** test_compress: comp_h.c $(CC) $(CFLAGS) -o test_compress -DSTANDALONE comp_h.c ! portmsg: portmsg.c mysocket.c sig.o $(CC) $(CCFLAGS) -DINFOSLAVE -o portmsg portmsg.c mysocket.c sig.o \ ! $(LDFLAGS) $(LIBS) # Some dependencies that make depend doesn't handle well compress.o: comp_h.c comp_w.c comp_w8.c --- 197,205 ---- test_compress: comp_h.c $(CC) $(CFLAGS) -o test_compress -DSTANDALONE comp_h.c ! portmsg: portmsg.c mysocket.c sig.o wait.o $(CC) $(CCFLAGS) -DINFOSLAVE -o portmsg portmsg.c mysocket.c sig.o \ ! wait.o $(LDFLAGS) $(LIBS) # Some dependencies that make depend doesn't handle well compress.o: comp_h.c comp_w.c comp_w8.c *************** *** 224,230 **** access.o: ../hdrs/flags.h access.o: ../hdrs/ptab.h access.o: ../hdrs/chunk.h - access.o: ../hdrs/attrib.h access.o: ../confmagic.h access.o: ../hdrs/pcre.h access.o: ../hdrs/access.h --- 219,224 ---- *************** *** 245,253 **** atr_tab.o: ../hdrs/flags.h atr_tab.o: ../hdrs/ptab.h atr_tab.o: ../hdrs/chunk.h - atr_tab.o: ../hdrs/attrib.h atr_tab.o: ../confmagic.h atr_tab.o: ../hdrs/pcre.h atr_tab.o: ../hdrs/atr_tab.h atr_tab.o: ../hdrs/privtab.h atr_tab.o: ../hdrs/mymalloc.h --- 239,247 ---- atr_tab.o: ../hdrs/flags.h 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/attrib.h atr_tab.o: ../hdrs/atr_tab.h atr_tab.o: ../hdrs/privtab.h atr_tab.o: ../hdrs/mymalloc.h *************** *** 266,274 **** attrib.o: ../hdrs/flags.h attrib.o: ../hdrs/ptab.h attrib.o: ../hdrs/chunk.h - attrib.o: ../hdrs/attrib.h attrib.o: ../confmagic.h attrib.o: ../hdrs/pcre.h attrib.o: ../hdrs/match.h attrib.o: ../hdrs/parse.h attrib.o: ../hdrs/privtab.h --- 260,268 ---- attrib.o: ../hdrs/flags.h attrib.o: ../hdrs/ptab.h attrib.o: ../hdrs/chunk.h attrib.o: ../confmagic.h attrib.o: ../hdrs/pcre.h + attrib.o: ../hdrs/attrib.h attrib.o: ../hdrs/match.h attrib.o: ../hdrs/parse.h attrib.o: ../hdrs/privtab.h *************** *** 283,302 **** boolexp.o: ../options.h boolexp.o: ../hdrs/mushtype.h boolexp.o: ../hdrs/htab.h boolexp.o: ../hdrs/mushdb.h boolexp.o: ../hdrs/flags.h boolexp.o: ../hdrs/ptab.h boolexp.o: ../hdrs/match.h boolexp.o: ../hdrs/externs.h boolexp.o: ../hdrs/compile.h - boolexp.o: ../hdrs/dbdefs.h - boolexp.o: ../hdrs/chunk.h - boolexp.o: ../hdrs/attrib.h boolexp.o: ../confmagic.h boolexp.o: ../hdrs/pcre.h boolexp.o: ../hdrs/lock.h boolexp.o: ../hdrs/boolexp.h boolexp.o: ../hdrs/parse.h boolexp.o: ../hdrs/log.h boolexp.o: ../hdrs/extchat.h boolexp.o: ../hdrs/bufferq.h --- 277,296 ---- boolexp.o: ../options.h boolexp.o: ../hdrs/mushtype.h boolexp.o: ../hdrs/htab.h + boolexp.o: ../hdrs/dbdefs.h boolexp.o: ../hdrs/mushdb.h boolexp.o: ../hdrs/flags.h boolexp.o: ../hdrs/ptab.h + boolexp.o: ../hdrs/chunk.h boolexp.o: ../hdrs/match.h boolexp.o: ../hdrs/externs.h boolexp.o: ../hdrs/compile.h boolexp.o: ../confmagic.h boolexp.o: ../hdrs/pcre.h boolexp.o: ../hdrs/lock.h boolexp.o: ../hdrs/boolexp.h boolexp.o: ../hdrs/parse.h + boolexp.o: ../hdrs/attrib.h boolexp.o: ../hdrs/log.h boolexp.o: ../hdrs/extchat.h boolexp.o: ../hdrs/bufferq.h *************** *** 307,312 **** --- 301,307 ---- 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 *************** *** 314,320 **** bsd.o: ../hdrs/flags.h bsd.o: ../hdrs/ptab.h bsd.o: ../hdrs/chunk.h - bsd.o: ../hdrs/attrib.h bsd.o: ../confmagic.h bsd.o: ../hdrs/pcre.h bsd.o: ../hdrs/lock.h --- 309,314 ---- *************** *** 331,340 **** --- 325,337 ---- bsd.o: ../hdrs/patches.h bsd.o: ../hdrs/mysocket.h bsd.o: ../hdrs/ident.h + bsd.o: ../hdrs/lookup.h bsd.o: ../hdrs/strtree.h bsd.o: ../hdrs/log.h + bsd.o: ../hdrs/myssl.h bsd.o: ../hdrs/mymalloc.h bsd.o: ../hdrs/extmail.h + bsd.o: ../hdrs/attrib.h bsd.o: ../hdrs/game.h bsd.o: ../hdrs/dbio.h bufferq.o: ../hdrs/copyrite.h *************** *** 350,356 **** bufferq.o: ../hdrs/flags.h bufferq.o: ../hdrs/ptab.h bufferq.o: ../hdrs/chunk.h - bufferq.o: ../hdrs/attrib.h bufferq.o: ../confmagic.h bufferq.o: ../hdrs/pcre.h bufferq.o: ../hdrs/bufferq.h --- 347,352 ---- *************** *** 369,375 **** chunk.o: ../hdrs/flags.h chunk.o: ../hdrs/ptab.h chunk.o: ../hdrs/chunk.h - chunk.o: ../hdrs/attrib.h chunk.o: ../confmagic.h chunk.o: ../hdrs/pcre.h chunk.o: ../hdrs/command.h --- 365,370 ---- *************** *** 390,396 **** cmdlocal.o: ../hdrs/flags.h cmdlocal.o: ../hdrs/ptab.h cmdlocal.o: ../hdrs/chunk.h - cmdlocal.o: ../hdrs/attrib.h cmdlocal.o: ../confmagic.h cmdlocal.o: ../hdrs/pcre.h cmdlocal.o: ../hdrs/parse.h --- 385,390 ---- *************** *** 410,420 **** cmds.o: ../hdrs/flags.h cmds.o: ../hdrs/ptab.h cmds.o: ../hdrs/chunk.h - cmds.o: ../hdrs/attrib.h cmds.o: ../confmagic.h cmds.o: ../hdrs/pcre.h cmds.o: ../hdrs/match.h cmds.o: ../hdrs/game.h cmds.o: ../hdrs/extmail.h cmds.o: ../hdrs/malias.h cmds.o: ../hdrs/getpgsiz.h --- 404,414 ---- cmds.o: ../hdrs/flags.h cmds.o: ../hdrs/ptab.h cmds.o: ../hdrs/chunk.h cmds.o: ../confmagic.h cmds.o: ../hdrs/pcre.h cmds.o: ../hdrs/match.h cmds.o: ../hdrs/game.h + cmds.o: ../hdrs/attrib.h cmds.o: ../hdrs/extmail.h cmds.o: ../hdrs/malias.h cmds.o: ../hdrs/getpgsiz.h *************** *** 440,450 **** command.o: ../hdrs/flags.h command.o: ../hdrs/ptab.h command.o: ../hdrs/chunk.h - command.o: ../hdrs/attrib.h command.o: ../confmagic.h command.o: ../hdrs/pcre.h command.o: ../hdrs/game.h command.o: ../hdrs/match.h command.o: ../hdrs/extmail.h command.o: ../hdrs/getpgsiz.h command.o: ../hdrs/parse.h --- 434,444 ---- command.o: ../hdrs/flags.h command.o: ../hdrs/ptab.h command.o: ../hdrs/chunk.h command.o: ../confmagic.h command.o: ../hdrs/pcre.h command.o: ../hdrs/game.h command.o: ../hdrs/match.h + command.o: ../hdrs/attrib.h command.o: ../hdrs/extmail.h command.o: ../hdrs/getpgsiz.h command.o: ../hdrs/parse.h *************** *** 473,479 **** compress.o: ../hdrs/flags.h compress.o: ../hdrs/ptab.h compress.o: ../hdrs/chunk.h - compress.o: ../hdrs/attrib.h compress.o: ../confmagic.h compress.o: ../hdrs/pcre.h compress.o: ../hdrs/mymalloc.h --- 467,472 ---- *************** *** 490,496 **** conf.o: ../hdrs/flags.h conf.o: ../hdrs/ptab.h conf.o: ../hdrs/chunk.h - conf.o: ../hdrs/attrib.h conf.o: ../confmagic.h conf.o: ../hdrs/pcre.h conf.o: ../hdrs/ansi.h --- 483,488 ---- *************** *** 500,505 **** --- 492,498 ---- conf.o: ../hdrs/switches.h conf.o: ../hdrs/log.h conf.o: ../hdrs/game.h + conf.o: ../hdrs/attrib.h conf.o: ../hdrs/help.h conf.o: ../hdrs/function.h cque.o: ../hdrs/copyrite.h *************** *** 518,530 **** cque.o: ../hdrs/compile.h cque.o: ../hdrs/dbdefs.h cque.o: ../hdrs/chunk.h - cque.o: ../hdrs/attrib.h cque.o: ../confmagic.h cque.o: ../hdrs/pcre.h cque.o: ../hdrs/parse.h cque.o: ../hdrs/strtree.h cque.o: ../hdrs/mymalloc.h cque.o: ../hdrs/game.h cque.o: ../hdrs/log.h create.o: ../hdrs/copyrite.h create.o: ../config.h --- 511,523 ---- cque.o: ../hdrs/compile.h cque.o: ../hdrs/dbdefs.h cque.o: ../hdrs/chunk.h cque.o: ../confmagic.h cque.o: ../hdrs/pcre.h cque.o: ../hdrs/parse.h cque.o: ../hdrs/strtree.h cque.o: ../hdrs/mymalloc.h cque.o: ../hdrs/game.h + cque.o: ../hdrs/attrib.h cque.o: ../hdrs/log.h create.o: ../hdrs/copyrite.h create.o: ../config.h *************** *** 539,547 **** create.o: ../hdrs/flags.h create.o: ../hdrs/ptab.h create.o: ../hdrs/chunk.h - create.o: ../hdrs/attrib.h create.o: ../confmagic.h create.o: ../hdrs/pcre.h create.o: ../hdrs/match.h create.o: ../hdrs/extchat.h create.o: ../hdrs/boolexp.h --- 532,540 ---- create.o: ../hdrs/flags.h create.o: ../hdrs/ptab.h create.o: ../hdrs/chunk.h create.o: ../confmagic.h create.o: ../hdrs/pcre.h + create.o: ../hdrs/attrib.h create.o: ../hdrs/match.h create.o: ../hdrs/extchat.h create.o: ../hdrs/boolexp.h *************** *** 566,574 **** db.o: ../hdrs/flags.h db.o: ../hdrs/ptab.h db.o: ../hdrs/chunk.h - db.o: ../hdrs/attrib.h db.o: ../confmagic.h db.o: ../hdrs/pcre.h db.o: ../hdrs/mymalloc.h db.o: ../hdrs/game.h db.o: ../hdrs/lock.h --- 559,567 ---- db.o: ../hdrs/flags.h db.o: ../hdrs/ptab.h db.o: ../hdrs/chunk.h db.o: ../confmagic.h db.o: ../hdrs/pcre.h + db.o: ../hdrs/attrib.h db.o: ../hdrs/mymalloc.h db.o: ../hdrs/game.h db.o: ../hdrs/lock.h *************** *** 593,605 **** destroy.o: ../hdrs/compile.h destroy.o: ../hdrs/dbdefs.h destroy.o: ../hdrs/chunk.h - destroy.o: ../hdrs/attrib.h destroy.o: ../confmagic.h destroy.o: ../hdrs/pcre.h destroy.o: ../hdrs/log.h destroy.o: ../hdrs/game.h destroy.o: ../hdrs/extmail.h destroy.o: ../hdrs/malias.h destroy.o: ../hdrs/lock.h destroy.o: ../hdrs/boolexp.h extchat.o: ../hdrs/copyrite.h --- 586,598 ---- destroy.o: ../hdrs/compile.h destroy.o: ../hdrs/dbdefs.h destroy.o: ../hdrs/chunk.h destroy.o: ../confmagic.h destroy.o: ../hdrs/pcre.h destroy.o: ../hdrs/log.h destroy.o: ../hdrs/game.h destroy.o: ../hdrs/extmail.h destroy.o: ../hdrs/malias.h + destroy.o: ../hdrs/attrib.h destroy.o: ../hdrs/lock.h destroy.o: ../hdrs/boolexp.h extchat.o: ../hdrs/copyrite.h *************** *** 615,623 **** extchat.o: ../hdrs/flags.h extchat.o: ../hdrs/ptab.h extchat.o: ../hdrs/chunk.h - extchat.o: ../hdrs/attrib.h extchat.o: ../confmagic.h extchat.o: ../hdrs/pcre.h extchat.o: ../hdrs/match.h extchat.o: ../hdrs/extchat.h extchat.o: ../hdrs/boolexp.h --- 608,616 ---- extchat.o: ../hdrs/flags.h extchat.o: ../hdrs/ptab.h extchat.o: ../hdrs/chunk.h extchat.o: ../confmagic.h extchat.o: ../hdrs/pcre.h + extchat.o: ../hdrs/attrib.h extchat.o: ../hdrs/match.h extchat.o: ../hdrs/extchat.h extchat.o: ../hdrs/boolexp.h *************** *** 647,659 **** extmail.o: ../hdrs/flags.h extmail.o: ../hdrs/ptab.h extmail.o: ../hdrs/chunk.h - extmail.o: ../hdrs/attrib.h extmail.o: ../confmagic.h extmail.o: ../hdrs/pcre.h extmail.o: ../hdrs/match.h extmail.o: ../hdrs/extmail.h extmail.o: ../hdrs/function.h extmail.o: ../hdrs/malias.h extmail.o: ../hdrs/parse.h extmail.o: ../hdrs/mymalloc.h extmail.o: ../hdrs/ansi.h --- 640,652 ---- extmail.o: ../hdrs/flags.h extmail.o: ../hdrs/ptab.h extmail.o: ../hdrs/chunk.h extmail.o: ../confmagic.h extmail.o: ../hdrs/pcre.h extmail.o: ../hdrs/match.h extmail.o: ../hdrs/extmail.h extmail.o: ../hdrs/function.h extmail.o: ../hdrs/malias.h + extmail.o: ../hdrs/attrib.h extmail.o: ../hdrs/parse.h extmail.o: ../hdrs/mymalloc.h extmail.o: ../hdrs/ansi.h *************** *** 678,684 **** filecopy.o: ../hdrs/compile.h filecopy.o: ../hdrs/dbdefs.h filecopy.o: ../hdrs/chunk.h - filecopy.o: ../hdrs/attrib.h filecopy.o: ../confmagic.h filecopy.o: ../hdrs/pcre.h filecopy.o: ../hdrs/mymalloc.h --- 671,676 ---- *************** *** 696,702 **** flaglocal.o: ../hdrs/flags.h flaglocal.o: ../hdrs/ptab.h flaglocal.o: ../hdrs/chunk.h - flaglocal.o: ../hdrs/attrib.h flaglocal.o: ../confmagic.h flaglocal.o: ../hdrs/pcre.h flags.o: ../config.h --- 688,693 ---- *************** *** 712,722 **** flags.o: ../hdrs/flags.h flags.o: ../hdrs/ptab.h flags.o: ../hdrs/chunk.h - flags.o: ../hdrs/attrib.h flags.o: ../confmagic.h flags.o: ../hdrs/pcre.h flags.o: ../hdrs/command.h flags.o: ../hdrs/switches.h flags.o: ../hdrs/parse.h flags.o: ../hdrs/match.h flags.o: ../hdrs/privtab.h --- 703,713 ---- flags.o: ../hdrs/flags.h flags.o: ../hdrs/ptab.h flags.o: ../hdrs/chunk.h flags.o: ../confmagic.h flags.o: ../hdrs/pcre.h flags.o: ../hdrs/command.h flags.o: ../hdrs/switches.h + flags.o: ../hdrs/attrib.h flags.o: ../hdrs/parse.h flags.o: ../hdrs/match.h flags.o: ../hdrs/privtab.h *************** *** 741,747 **** funcrypt.o: ../hdrs/flags.h funcrypt.o: ../hdrs/ptab.h funcrypt.o: ../hdrs/chunk.h - funcrypt.o: ../hdrs/attrib.h funcrypt.o: ../confmagic.h funcrypt.o: ../hdrs/pcre.h funcrypt.o: ../hdrs/version.h --- 732,737 ---- *************** *** 753,761 **** funcrypt.o: ../hdrs/command.h funcrypt.o: ../hdrs/switches.h funcrypt.o: ../hdrs/game.h funcrypt.o: ../hdrs/ansi.h funcrypt.o: ../hdrs/match.h - funcrypt.o: ../hdrs/shs.h function.o: ../hdrs/copyrite.h function.o: ../config.h function.o: ../hdrs/conf.h --- 743,751 ---- funcrypt.o: ../hdrs/command.h funcrypt.o: ../hdrs/switches.h funcrypt.o: ../hdrs/game.h + funcrypt.o: ../hdrs/attrib.h funcrypt.o: ../hdrs/ansi.h funcrypt.o: ../hdrs/match.h function.o: ../hdrs/copyrite.h function.o: ../config.h function.o: ../hdrs/conf.h *************** *** 769,777 **** function.o: ../hdrs/flags.h function.o: ../hdrs/ptab.h function.o: ../hdrs/chunk.h - function.o: ../hdrs/attrib.h function.o: ../confmagic.h function.o: ../hdrs/pcre.h function.o: ../hdrs/function.h function.o: ../hdrs/match.h function.o: ../hdrs/parse.h --- 759,767 ---- function.o: ../hdrs/flags.h function.o: ../hdrs/ptab.h function.o: ../hdrs/chunk.h function.o: ../confmagic.h function.o: ../hdrs/pcre.h + function.o: ../hdrs/attrib.h function.o: ../hdrs/function.h function.o: ../hdrs/match.h function.o: ../hdrs/parse.h *************** *** 795,801 **** fundb.o: ../hdrs/flags.h fundb.o: ../hdrs/ptab.h fundb.o: ../hdrs/chunk.h - fundb.o: ../hdrs/attrib.h fundb.o: ../confmagic.h fundb.o: ../hdrs/pcre.h fundb.o: ../hdrs/match.h --- 785,790 ---- *************** *** 807,812 **** --- 796,802 ---- fundb.o: ../hdrs/lock.h fundb.o: ../hdrs/boolexp.h fundb.o: ../hdrs/log.h + fundb.o: ../hdrs/attrib.h fundb.o: ../hdrs/function.h funlist.o: ../hdrs/copyrite.h funlist.o: ../config.h *************** *** 822,828 **** funlist.o: ../hdrs/flags.h funlist.o: ../hdrs/ptab.h funlist.o: ../hdrs/chunk.h - funlist.o: ../hdrs/attrib.h funlist.o: ../confmagic.h funlist.o: ../hdrs/pcre.h funlist.o: ../hdrs/ansi.h --- 812,817 ---- *************** *** 832,837 **** --- 821,827 ---- funlist.o: ../hdrs/match.h funlist.o: ../hdrs/command.h funlist.o: ../hdrs/switches.h + funlist.o: ../hdrs/attrib.h funlist.o: ../hdrs/lock.h funlist.o: ../hdrs/boolexp.h funlist.o: ../hdrs/sort.h *************** *** 848,854 **** funlocal.o: ../hdrs/flags.h funlocal.o: ../hdrs/ptab.h funlocal.o: ../hdrs/chunk.h - funlocal.o: ../hdrs/attrib.h funlocal.o: ../confmagic.h funlocal.o: ../hdrs/pcre.h funlocal.o: ../hdrs/parse.h --- 838,843 ---- *************** *** 866,872 **** funmath.o: ../hdrs/flags.h funmath.o: ../hdrs/ptab.h funmath.o: ../hdrs/chunk.h - funmath.o: ../hdrs/attrib.h funmath.o: ../confmagic.h funmath.o: ../hdrs/pcre.h funmath.o: ../hdrs/sort.h --- 855,860 ---- *************** *** 885,891 **** funmisc.o: ../hdrs/flags.h funmisc.o: ../hdrs/ptab.h funmisc.o: ../hdrs/chunk.h - funmisc.o: ../hdrs/attrib.h funmisc.o: ../confmagic.h funmisc.o: ../hdrs/pcre.h funmisc.o: ../hdrs/version.h --- 873,878 ---- *************** *** 897,902 **** --- 884,890 ---- funmisc.o: ../hdrs/command.h funmisc.o: ../hdrs/switches.h funmisc.o: ../hdrs/game.h + funmisc.o: ../hdrs/attrib.h funmisc.o: ../hdrs/ansi.h funstr.o: ../hdrs/copyrite.h funstr.o: ../config.h *************** *** 911,917 **** funstr.o: ../hdrs/flags.h funstr.o: ../hdrs/ptab.h funstr.o: ../hdrs/chunk.h - funstr.o: ../hdrs/attrib.h funstr.o: ../confmagic.h funstr.o: ../hdrs/pcre.h funstr.o: ../hdrs/ansi.h --- 899,904 ---- *************** *** 919,924 **** --- 906,912 ---- funstr.o: ../hdrs/match.h funstr.o: ../hdrs/parse.h funstr.o: ../hdrs/pueblo.h + funstr.o: ../hdrs/attrib.h funstr.o: ../hdrs/lock.h funstr.o: ../hdrs/boolexp.h funstr.o: ../hdrs/sort.h *************** *** 935,946 **** funtime.o: ../hdrs/flags.h funtime.o: ../hdrs/ptab.h funtime.o: ../hdrs/chunk.h - funtime.o: ../hdrs/attrib.h funtime.o: ../confmagic.h funtime.o: ../hdrs/pcre.h funtime.o: ../hdrs/parse.h funtime.o: ../hdrs/log.h funtime.o: ../hdrs/match.h funufun.o: ../hdrs/copyrite.h funufun.o: ../config.h funufun.o: ../hdrs/conf.h --- 923,934 ---- funtime.o: ../hdrs/flags.h funtime.o: ../hdrs/ptab.h funtime.o: ../hdrs/chunk.h funtime.o: ../confmagic.h funtime.o: ../hdrs/pcre.h funtime.o: ../hdrs/parse.h funtime.o: ../hdrs/log.h funtime.o: ../hdrs/match.h + funtime.o: ../hdrs/attrib.h funufun.o: ../hdrs/copyrite.h funufun.o: ../config.h funufun.o: ../hdrs/conf.h *************** *** 954,965 **** funufun.o: ../hdrs/flags.h funufun.o: ../hdrs/ptab.h funufun.o: ../hdrs/chunk.h - funufun.o: ../hdrs/attrib.h funufun.o: ../confmagic.h funufun.o: ../hdrs/pcre.h funufun.o: ../hdrs/match.h funufun.o: ../hdrs/parse.h funufun.o: ../hdrs/mymalloc.h funufun.o: ../hdrs/lock.h funufun.o: ../hdrs/boolexp.h game.o: ../hdrs/copyrite.h --- 942,953 ---- funufun.o: ../hdrs/flags.h funufun.o: ../hdrs/ptab.h funufun.o: ../hdrs/chunk.h funufun.o: ../confmagic.h funufun.o: ../hdrs/pcre.h funufun.o: ../hdrs/match.h funufun.o: ../hdrs/parse.h funufun.o: ../hdrs/mymalloc.h + funufun.o: ../hdrs/attrib.h funufun.o: ../hdrs/lock.h funufun.o: ../hdrs/boolexp.h game.o: ../hdrs/copyrite.h *************** *** 975,990 **** game.o: ../hdrs/flags.h game.o: ../hdrs/ptab.h game.o: ../hdrs/chunk.h - game.o: ../hdrs/attrib.h game.o: ../confmagic.h game.o: ../hdrs/pcre.h game.o: ../hdrs/game.h game.o: ../hdrs/match.h game.o: ../hdrs/case.h game.o: ../hdrs/extmail.h game.o: ../hdrs/extchat.h game.o: ../hdrs/boolexp.h game.o: ../hdrs/bufferq.h game.o: ../hdrs/getpgsiz.h game.o: ../hdrs/parse.h game.o: ../hdrs/access.h --- 963,979 ---- game.o: ../hdrs/flags.h game.o: ../hdrs/ptab.h game.o: ../hdrs/chunk.h game.o: ../confmagic.h game.o: ../hdrs/pcre.h game.o: ../hdrs/game.h + game.o: ../hdrs/attrib.h game.o: ../hdrs/match.h game.o: ../hdrs/case.h game.o: ../hdrs/extmail.h game.o: ../hdrs/extchat.h game.o: ../hdrs/boolexp.h game.o: ../hdrs/bufferq.h + game.o: ../hdrs/myssl.h game.o: ../hdrs/getpgsiz.h game.o: ../hdrs/parse.h game.o: ../hdrs/access.h *************** *** 1011,1017 **** help.o: ../hdrs/flags.h help.o: ../hdrs/ptab.h help.o: ../hdrs/chunk.h - help.o: ../hdrs/attrib.h help.o: ../confmagic.h help.o: ../hdrs/pcre.h help.o: ../hdrs/command.h --- 1000,1005 ---- *************** *** 1035,1041 **** htab.o: ../hdrs/flags.h htab.o: ../hdrs/ptab.h htab.o: ../hdrs/chunk.h - htab.o: ../hdrs/attrib.h htab.o: ../confmagic.h htab.o: ../hdrs/pcre.h htab.o: ../hdrs/mymalloc.h --- 1023,1028 ---- *************** *** 1052,1060 **** ident.o: ../hdrs/flags.h ident.o: ../hdrs/ptab.h ident.o: ../hdrs/chunk.h - ident.o: ../hdrs/attrib.h ident.o: ../confmagic.h ident.o: ../hdrs/pcre.h ident.o: ../hdrs/ident.h ident.o: ../hdrs/mysocket.h ident.o: ../hdrs/mymalloc.h --- 1039,1047 ---- ident.o: ../hdrs/flags.h ident.o: ../hdrs/ptab.h ident.o: ../hdrs/chunk.h ident.o: ../confmagic.h ident.o: ../hdrs/pcre.h + ident.o: ../hdrs/attrib.h ident.o: ../hdrs/ident.h ident.o: ../hdrs/mysocket.h ident.o: ../hdrs/mymalloc.h *************** *** 1072,1078 **** local.o: ../hdrs/flags.h local.o: ../hdrs/ptab.h local.o: ../hdrs/chunk.h - local.o: ../hdrs/attrib.h local.o: ../confmagic.h local.o: ../hdrs/pcre.h local.o: ../hdrs/parse.h --- 1059,1064 ---- *************** *** 1091,1100 **** lock.o: ../hdrs/flags.h lock.o: ../hdrs/ptab.h lock.o: ../hdrs/chunk.h - lock.o: ../hdrs/attrib.h lock.o: ../confmagic.h lock.o: ../hdrs/pcre.h lock.o: ../hdrs/boolexp.h lock.o: ../hdrs/lock.h lock.o: ../hdrs/match.h lock.o: ../hdrs/log.h --- 1077,1086 ---- lock.o: ../hdrs/flags.h lock.o: ../hdrs/ptab.h lock.o: ../hdrs/chunk.h lock.o: ../confmagic.h lock.o: ../hdrs/pcre.h lock.o: ../hdrs/boolexp.h + lock.o: ../hdrs/attrib.h lock.o: ../hdrs/lock.h lock.o: ../hdrs/match.h lock.o: ../hdrs/log.h *************** *** 1115,1121 **** log.o: ../hdrs/flags.h log.o: ../hdrs/ptab.h log.o: ../hdrs/chunk.h - log.o: ../hdrs/attrib.h log.o: ../confmagic.h log.o: ../hdrs/pcre.h log.o: ../hdrs/bufferq.h --- 1101,1106 ---- *************** *** 1133,1143 **** look.o: ../hdrs/flags.h look.o: ../hdrs/ptab.h look.o: ../hdrs/chunk.h - look.o: ../hdrs/attrib.h look.o: ../confmagic.h look.o: ../hdrs/pcre.h look.o: ../hdrs/lock.h look.o: ../hdrs/boolexp.h look.o: ../hdrs/match.h look.o: ../hdrs/ansi.h look.o: ../hdrs/pueblo.h --- 1118,1128 ---- look.o: ../hdrs/flags.h look.o: ../hdrs/ptab.h look.o: ../hdrs/chunk.h look.o: ../confmagic.h look.o: ../hdrs/pcre.h look.o: ../hdrs/lock.h look.o: ../hdrs/boolexp.h + look.o: ../hdrs/attrib.h look.o: ../hdrs/match.h look.o: ../hdrs/ansi.h look.o: ../hdrs/pueblo.h *************** *** 1162,1168 **** malias.o: ../hdrs/flags.h malias.o: ../hdrs/ptab.h malias.o: ../hdrs/chunk.h - malias.o: ../hdrs/attrib.h malias.o: ../confmagic.h malias.o: ../hdrs/pcre.h malias.o: ../hdrs/match.h --- 1147,1152 ---- *************** *** 1190,1196 **** markup.o: ../hdrs/flags.h markup.o: ../hdrs/ptab.h markup.o: ../hdrs/chunk.h - markup.o: ../hdrs/attrib.h markup.o: ../hdrs/pcre.h markup.o: ../hdrs/ansi.h markup.o: ../hdrs/mymalloc.h --- 1174,1179 ---- *************** *** 1209,1215 **** match.o: ../hdrs/compile.h match.o: ../hdrs/dbdefs.h match.o: ../hdrs/chunk.h - match.o: ../hdrs/attrib.h match.o: ../confmagic.h match.o: ../hdrs/pcre.h match.o: ../hdrs/case.h --- 1192,1197 ---- *************** *** 1228,1234 **** memcheck.o: ../hdrs/flags.h memcheck.o: ../hdrs/ptab.h memcheck.o: ../hdrs/chunk.h - memcheck.o: ../hdrs/attrib.h memcheck.o: ../confmagic.h memcheck.o: ../hdrs/pcre.h memcheck.o: ../hdrs/mymalloc.h --- 1210,1215 ---- *************** *** 1246,1254 **** move.o: ../hdrs/flags.h move.o: ../hdrs/ptab.h move.o: ../hdrs/chunk.h - move.o: ../hdrs/attrib.h move.o: ../confmagic.h move.o: ../hdrs/pcre.h move.o: ../hdrs/match.h move.o: ../hdrs/lock.h move.o: ../hdrs/boolexp.h --- 1227,1235 ---- move.o: ../hdrs/flags.h move.o: ../hdrs/ptab.h move.o: ../hdrs/chunk.h move.o: ../confmagic.h move.o: ../hdrs/pcre.h + move.o: ../hdrs/attrib.h move.o: ../hdrs/match.h move.o: ../hdrs/lock.h move.o: ../hdrs/boolexp.h *************** *** 1264,1270 **** mycrypt.o: ../options.h mycrypt.o: ../hdrs/mushtype.h mycrypt.o: ../hdrs/htab.h - mycrypt.o: ../hdrs/shs.h mycrypt.o: ../confmagic.h mymalloc.o: ../config.h mymalloc.o: ../options.h --- 1245,1250 ---- *************** *** 1282,1288 **** mysocket.o: ../hdrs/flags.h mysocket.o: ../hdrs/ptab.h mysocket.o: ../hdrs/chunk.h - mysocket.o: ../hdrs/attrib.h mysocket.o: ../confmagic.h mysocket.o: ../hdrs/pcre.h mysocket.o: ../hdrs/mymalloc.h --- 1262,1267 ---- *************** *** 1302,1312 **** myrlimit.o: ../hdrs/flags.h myrlimit.o: ../hdrs/ptab.h myrlimit.o: ../hdrs/chunk.h - myrlimit.o: ../hdrs/attrib.h myrlimit.o: ../confmagic.h myrlimit.o: ../hdrs/pcre.h myssl.o: ../hdrs/copyrite.h myssl.o: ../config.h notify.o: ../hdrs/copyrite.h notify.o: ../config.h notify.o: ../hdrs/conf.h --- 1281,1307 ---- myrlimit.o: ../hdrs/flags.h myrlimit.o: ../hdrs/ptab.h myrlimit.o: ../hdrs/chunk.h myrlimit.o: ../confmagic.h myrlimit.o: ../hdrs/pcre.h myssl.o: ../hdrs/copyrite.h myssl.o: ../config.h + myssl.o: ../hdrs/conf.h + myssl.o: ../options.h + myssl.o: ../hdrs/mushtype.h + myssl.o: ../hdrs/htab.h + myssl.o: ../hdrs/mysocket.h + myssl.o: ../confmagic.h + myssl.o: ../hdrs/externs.h + myssl.o: ../hdrs/compile.h + myssl.o: ../hdrs/dbdefs.h + myssl.o: ../hdrs/mushdb.h + myssl.o: ../hdrs/flags.h + myssl.o: ../hdrs/ptab.h + myssl.o: ../hdrs/chunk.h + myssl.o: ../hdrs/pcre.h + myssl.o: ../hdrs/myssl.h + myssl.o: ../hdrs/log.h + myssl.o: ../hdrs/parse.h notify.o: ../hdrs/copyrite.h notify.o: ../config.h notify.o: ../hdrs/conf.h *************** *** 1320,1326 **** notify.o: ../hdrs/compile.h notify.o: ../hdrs/dbdefs.h notify.o: ../hdrs/chunk.h - notify.o: ../hdrs/attrib.h notify.o: ../confmagic.h notify.o: ../hdrs/pcre.h notify.o: ../hdrs/lock.h --- 1315,1320 ---- *************** *** 1341,1346 **** --- 1335,1341 ---- notify.o: ../hdrs/extchat.h notify.o: ../hdrs/bufferq.h notify.o: ../hdrs/extmail.h + notify.o: ../hdrs/attrib.h notify.o: ../hdrs/game.h parse.o: ../hdrs/copyrite.h parse.o: ../config.h *************** *** 1355,1361 **** parse.o: ../hdrs/flags.h parse.o: ../hdrs/ptab.h parse.o: ../hdrs/chunk.h - parse.o: ../hdrs/attrib.h parse.o: ../confmagic.h parse.o: ../hdrs/pcre.h parse.o: ../hdrs/ansi.h --- 1350,1355 ---- *************** *** 1363,1368 **** --- 1357,1363 ---- parse.o: ../hdrs/case.h parse.o: ../hdrs/match.h parse.o: ../hdrs/parse.h + parse.o: ../hdrs/attrib.h parse.o: ../hdrs/log.h parse.o: ../hdrs/mymalloc.h pcre.o: ../config.h *************** *** 1381,1389 **** player.o: ../hdrs/flags.h player.o: ../hdrs/ptab.h player.o: ../hdrs/chunk.h - player.o: ../hdrs/attrib.h player.o: ../confmagic.h player.o: ../hdrs/pcre.h player.o: ../hdrs/access.h player.o: ../hdrs/mymalloc.h player.o: ../hdrs/log.h --- 1376,1384 ---- player.o: ../hdrs/flags.h player.o: ../hdrs/ptab.h player.o: ../hdrs/chunk.h player.o: ../confmagic.h player.o: ../hdrs/pcre.h + player.o: ../hdrs/attrib.h player.o: ../hdrs/access.h player.o: ../hdrs/mymalloc.h player.o: ../hdrs/log.h *************** *** 1404,1412 **** plyrlist.o: ../hdrs/flags.h plyrlist.o: ../hdrs/ptab.h plyrlist.o: ../hdrs/chunk.h - plyrlist.o: ../hdrs/attrib.h plyrlist.o: ../confmagic.h plyrlist.o: ../hdrs/pcre.h predicat.o: ../hdrs/copyrite.h predicat.o: ../config.h predicat.o: ../hdrs/conf.h --- 1399,1407 ---- plyrlist.o: ../hdrs/flags.h plyrlist.o: ../hdrs/ptab.h plyrlist.o: ../hdrs/chunk.h plyrlist.o: ../confmagic.h plyrlist.o: ../hdrs/pcre.h + plyrlist.o: ../hdrs/attrib.h predicat.o: ../hdrs/copyrite.h predicat.o: ../config.h predicat.o: ../hdrs/conf.h *************** *** 1420,1428 **** predicat.o: ../hdrs/flags.h predicat.o: ../hdrs/ptab.h predicat.o: ../hdrs/chunk.h - predicat.o: ../hdrs/attrib.h predicat.o: ../confmagic.h predicat.o: ../hdrs/pcre.h predicat.o: ../hdrs/lock.h predicat.o: ../hdrs/boolexp.h predicat.o: ../hdrs/match.h --- 1415,1423 ---- predicat.o: ../hdrs/flags.h predicat.o: ../hdrs/ptab.h predicat.o: ../hdrs/chunk.h predicat.o: ../confmagic.h predicat.o: ../hdrs/pcre.h + predicat.o: ../hdrs/attrib.h predicat.o: ../hdrs/lock.h predicat.o: ../hdrs/boolexp.h predicat.o: ../hdrs/match.h *************** *** 1445,1452 **** privtab.o: ../hdrs/flags.h privtab.o: ../hdrs/ptab.h privtab.o: ../hdrs/chunk.h - privtab.o: ../hdrs/attrib.h privtab.o: ../hdrs/pcre.h ptab.o: ../config.h ptab.o: ../hdrs/copyrite.h ptab.o: ../hdrs/conf.h --- 1440,1467 ---- privtab.o: ../hdrs/flags.h privtab.o: ../hdrs/ptab.h privtab.o: ../hdrs/chunk.h privtab.o: ../hdrs/pcre.h + info_master.o: ../hdrs/copyrite.h + info_master.o: ../config.h + info_master.o: ../hdrs/conf.h + info_master.o: ../options.h + info_master.o: ../hdrs/mushtype.h + info_master.o: ../hdrs/htab.h + info_master.o: ../hdrs/externs.h + info_master.o: ../hdrs/compile.h + info_master.o: ../hdrs/dbdefs.h + info_master.o: ../hdrs/mushdb.h + info_master.o: ../hdrs/flags.h + 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/access.h + info_master.o: ../hdrs/mysocket.h + info_master.o: ../hdrs/ident.h + info_master.o: ../hdrs/lookup.h + info_master.o: ../hdrs/log.h + info_master.o: ../hdrs/wait.h ptab.o: ../config.h ptab.o: ../hdrs/copyrite.h ptab.o: ../hdrs/conf.h *************** *** 1460,1466 **** ptab.o: ../hdrs/flags.h ptab.o: ../hdrs/ptab.h ptab.o: ../hdrs/chunk.h - ptab.o: ../hdrs/attrib.h ptab.o: ../confmagic.h ptab.o: ../hdrs/pcre.h rob.o: ../config.h --- 1475,1480 ---- *************** *** 1476,1484 **** rob.o: ../hdrs/flags.h rob.o: ../hdrs/ptab.h rob.o: ../hdrs/chunk.h - rob.o: ../hdrs/attrib.h rob.o: ../confmagic.h rob.o: ../hdrs/pcre.h rob.o: ../hdrs/match.h rob.o: ../hdrs/parse.h rob.o: ../hdrs/log.h --- 1490,1498 ---- rob.o: ../hdrs/flags.h rob.o: ../hdrs/ptab.h rob.o: ../hdrs/chunk.h rob.o: ../confmagic.h rob.o: ../hdrs/pcre.h + rob.o: ../hdrs/attrib.h rob.o: ../hdrs/match.h rob.o: ../hdrs/parse.h rob.o: ../hdrs/log.h *************** *** 1486,1491 **** --- 1500,1507 ---- rob.o: ../hdrs/boolexp.h rob.o: ../hdrs/game.h rob.o: ../hdrs/case.h + services.o: ../hdrs/copyrite.h + services.o: ../config.h set.o: ../hdrs/copyrite.h set.o: ../config.h set.o: ../hdrs/conf.h *************** *** 1499,1508 **** set.o: ../hdrs/flags.h set.o: ../hdrs/ptab.h set.o: ../hdrs/chunk.h - set.o: ../hdrs/attrib.h set.o: ../confmagic.h set.o: ../hdrs/pcre.h set.o: ../hdrs/match.h set.o: ../hdrs/ansi.h set.o: ../hdrs/command.h set.o: ../hdrs/switches.h --- 1515,1524 ---- set.o: ../hdrs/flags.h set.o: ../hdrs/ptab.h set.o: ../hdrs/chunk.h set.o: ../confmagic.h set.o: ../hdrs/pcre.h set.o: ../hdrs/match.h + set.o: ../hdrs/attrib.h set.o: ../hdrs/ansi.h set.o: ../hdrs/command.h set.o: ../hdrs/switches.h *************** *** 1513,1520 **** set.o: ../hdrs/game.h shs.o: ../hdrs/copyrite.h shs.o: ../config.h - shs.o: ../hdrs/shs.h - shs.o: ../confmagic.h sig.o: ../config.h sig.o: ../hdrs/conf.h sig.o: ../hdrs/copyrite.h --- 1529,1534 ---- *************** *** 1528,1534 **** sig.o: ../hdrs/flags.h sig.o: ../hdrs/ptab.h sig.o: ../hdrs/chunk.h - sig.o: ../hdrs/attrib.h sig.o: ../confmagic.h sig.o: ../hdrs/pcre.h sort.o: ../hdrs/copyrite.h --- 1542,1547 ---- *************** *** 1544,1550 **** sort.o: ../hdrs/flags.h sort.o: ../hdrs/ptab.h sort.o: ../hdrs/chunk.h - sort.o: ../hdrs/attrib.h sort.o: ../confmagic.h sort.o: ../hdrs/pcre.h sort.o: ../hdrs/parse.h --- 1557,1562 ---- *************** *** 1565,1571 **** speech.o: ../hdrs/flags.h speech.o: ../hdrs/ptab.h speech.o: ../hdrs/chunk.h - speech.o: ../hdrs/attrib.h speech.o: ../confmagic.h speech.o: ../hdrs/pcre.h speech.o: ../hdrs/ansi.h --- 1577,1582 ---- *************** *** 1573,1578 **** --- 1584,1590 ---- speech.o: ../hdrs/boolexp.h speech.o: ../hdrs/log.h speech.o: ../hdrs/match.h + speech.o: ../hdrs/attrib.h speech.o: ../hdrs/parse.h speech.o: ../hdrs/game.h speech.o: ../hdrs/sort.h *************** *** 1589,1595 **** sql.o: ../hdrs/flags.h sql.o: ../hdrs/ptab.h sql.o: ../hdrs/chunk.h - sql.o: ../hdrs/attrib.h sql.o: ../confmagic.h sql.o: ../hdrs/pcre.h sql.o: ../hdrs/log.h --- 1601,1606 ---- *************** *** 1619,1625 **** strtree.o: ../hdrs/flags.h strtree.o: ../hdrs/ptab.h strtree.o: ../hdrs/chunk.h - strtree.o: ../hdrs/attrib.h strtree.o: ../confmagic.h strtree.o: ../hdrs/pcre.h strtree.o: ../hdrs/strtree.h --- 1630,1635 ---- *************** *** 1640,1646 **** strutil.o: ../hdrs/flags.h strutil.o: ../hdrs/ptab.h strutil.o: ../hdrs/chunk.h - strutil.o: ../hdrs/attrib.h strutil.o: ../hdrs/pcre.h strutil.o: ../hdrs/ansi.h strutil.o: ../hdrs/mymalloc.h --- 1650,1655 ---- *************** *** 1658,1664 **** timer.o: ../hdrs/flags.h timer.o: ../hdrs/ptab.h timer.o: ../hdrs/chunk.h - timer.o: ../hdrs/attrib.h timer.o: ../confmagic.h timer.o: ../hdrs/pcre.h timer.o: ../hdrs/lock.h --- 1667,1672 ---- *************** *** 1670,1675 **** --- 1678,1684 ---- timer.o: ../hdrs/game.h timer.o: ../hdrs/help.h timer.o: ../hdrs/parse.h + timer.o: ../hdrs/attrib.h unparse.o: ../hdrs/copyrite.h unparse.o: ../config.h unparse.o: ../hdrs/conf.h *************** *** 1683,1693 **** unparse.o: ../hdrs/flags.h unparse.o: ../hdrs/ptab.h unparse.o: ../hdrs/chunk.h - unparse.o: ../hdrs/attrib.h unparse.o: ../confmagic.h unparse.o: ../hdrs/pcre.h unparse.o: ../hdrs/lock.h unparse.o: ../hdrs/boolexp.h unparse.o: ../hdrs/ansi.h unparse.o: ../hdrs/pueblo.h unparse.o: ../hdrs/parse.h --- 1692,1702 ---- unparse.o: ../hdrs/flags.h unparse.o: ../hdrs/ptab.h unparse.o: ../hdrs/chunk.h unparse.o: ../confmagic.h unparse.o: ../hdrs/pcre.h unparse.o: ../hdrs/lock.h unparse.o: ../hdrs/boolexp.h + unparse.o: ../hdrs/attrib.h unparse.o: ../hdrs/ansi.h unparse.o: ../hdrs/pueblo.h unparse.o: ../hdrs/parse.h *************** *** 1705,1716 **** utils.o: ../hdrs/flags.h utils.o: ../hdrs/ptab.h utils.o: ../hdrs/chunk.h - utils.o: ../hdrs/attrib.h utils.o: ../confmagic.h utils.o: ../hdrs/pcre.h utils.o: ../hdrs/ansi.h utils.o: ../hdrs/mymalloc.h utils.o: ../hdrs/log.h utils.o: ../hdrs/parse.h utils.o: ../hdrs/lock.h utils.o: ../hdrs/boolexp.h --- 1714,1725 ---- utils.o: ../hdrs/flags.h utils.o: ../hdrs/ptab.h utils.o: ../hdrs/chunk.h utils.o: ../confmagic.h utils.o: ../hdrs/pcre.h utils.o: ../hdrs/ansi.h utils.o: ../hdrs/mymalloc.h utils.o: ../hdrs/log.h + utils.o: ../hdrs/attrib.h utils.o: ../hdrs/parse.h utils.o: ../hdrs/lock.h utils.o: ../hdrs/boolexp.h *************** *** 1727,1738 **** version.o: ../hdrs/flags.h version.o: ../hdrs/ptab.h version.o: ../hdrs/chunk.h - version.o: ../hdrs/attrib.h version.o: ../confmagic.h version.o: ../hdrs/pcre.h version.o: ../hdrs/version.h version.o: ../hdrs/patches.h version.o: ../hdrs/buildinf.h warnings.o: ../config.h warnings.o: ../hdrs/copyrite.h warnings.o: ../hdrs/conf.h --- 1736,1748 ---- version.o: ../hdrs/flags.h version.o: ../hdrs/ptab.h version.o: ../hdrs/chunk.h version.o: ../confmagic.h version.o: ../hdrs/pcre.h version.o: ../hdrs/version.h version.o: ../hdrs/patches.h version.o: ../hdrs/buildinf.h + wait.o: ../config.h + wait.o: ../hdrs/wait.h warnings.o: ../config.h warnings.o: ../hdrs/copyrite.h warnings.o: ../hdrs/conf.h *************** *** 1746,1757 **** warnings.o: ../hdrs/flags.h warnings.o: ../hdrs/ptab.h warnings.o: ../hdrs/chunk.h - warnings.o: ../hdrs/attrib.h warnings.o: ../confmagic.h warnings.o: ../hdrs/pcre.h warnings.o: ../hdrs/lock.h warnings.o: ../hdrs/boolexp.h warnings.o: ../hdrs/match.h wild.o: ../config.h wild.o: ../hdrs/copyrite.h wild.o: ../hdrs/conf.h --- 1756,1767 ---- warnings.o: ../hdrs/flags.h warnings.o: ../hdrs/ptab.h warnings.o: ../hdrs/chunk.h warnings.o: ../confmagic.h warnings.o: ../hdrs/pcre.h warnings.o: ../hdrs/lock.h warnings.o: ../hdrs/boolexp.h warnings.o: ../hdrs/match.h + warnings.o: ../hdrs/attrib.h wild.o: ../config.h wild.o: ../hdrs/copyrite.h wild.o: ../hdrs/conf.h *************** *** 1766,1772 **** wild.o: ../hdrs/flags.h wild.o: ../hdrs/ptab.h wild.o: ../hdrs/chunk.h - wild.o: ../hdrs/attrib.h wild.o: ../confmagic.h wild.o: ../hdrs/pcre.h wild.o: ../hdrs/ansi.h --- 1776,1781 ---- *************** *** 1785,1793 **** wiz.o: ../hdrs/flags.h wiz.o: ../hdrs/ptab.h wiz.o: ../hdrs/chunk.h - wiz.o: ../hdrs/attrib.h wiz.o: ../confmagic.h wiz.o: ../hdrs/pcre.h wiz.o: ../hdrs/match.h wiz.o: ../hdrs/access.h wiz.o: ../hdrs/parse.h --- 1794,1802 ---- wiz.o: ../hdrs/flags.h wiz.o: ../hdrs/ptab.h wiz.o: ../hdrs/chunk.h wiz.o: ../confmagic.h wiz.o: ../hdrs/pcre.h + wiz.o: ../hdrs/attrib.h wiz.o: ../hdrs/match.h wiz.o: ../hdrs/access.h wiz.o: ../hdrs/parse.h Index: src/malias.c =================================================================== *** src/malias.c (.../p2) (revision 920) --- src/malias.c (.../p3) (revision 920) *************** *** 33,39 **** * \endverbatim */ ! #define MA_INC 3 /**< How many maliases we malloc at a time */ #include "config.h" #include "copyrite.h" --- 33,39 ---- * \endverbatim */ ! #define MA_INC 3 /**< How many maliases we malloc at a time */ #include "config.h" #include "copyrite.h" *************** *** 69,75 **** int ma_size = 0; /**< Number of maliases */ ! int ma_top = 0; /**< Top of alias array */ struct mail_alias *malias; /**< Pointer to linked list of aliases */ /** Privilege table for maliases. */ --- 69,75 ---- int ma_size = 0; /**< Number of maliases */ ! int ma_top = 0; /**< Top of alias array */ struct mail_alias *malias; /**< Pointer to linked list of aliases */ /** Privilege table for maliases. */ *************** *** 147,183 **** } if (*alias != MALIAS_TOKEN) { notify_format(player, ! T("MAIL: All Mail aliases must begin with '%c'."), ! MALIAS_TOKEN); return; } good = "`$_-.'"; /* Make sure that the name contains legal characters only */ for (scan = alias + 1; scan && *scan; scan++) { ! if (isalpha((unsigned char) *scan) || isdigit((unsigned char) *scan)) continue; if (!strchr(good, *scan)) { notify(player, T("MAIL: Invalid character in mail alias.")); return; } } ! m = get_malias(GOD, alias); /* GOD can see all aliases */ ! if (m) { /* Ensures no duplicates! */ notify_format(player, T("MAIL: Mail Alias '%s' already exists."), alias); return; } if (!ma_size) { ma_size = MA_INC; ! malias = ! (struct mail_alias *) mush_malloc(sizeof(struct mail_alias) * ! ma_size, "malias_list"); } else if (ma_top >= ma_size) { ma_size += MA_INC; ! m = ! (struct mail_alias *) mush_malloc(sizeof(struct mail_alias) * ! (ma_size), "malias_list"); memcpy(m, malias, sizeof(struct mail_alias) * ma_top); ! mush_free((Malloc_t) malias, "malias_list"); malias = m; } i = 0; --- 147,179 ---- } if (*alias != MALIAS_TOKEN) { notify_format(player, ! T("MAIL: All Mail aliases must begin with '%c'."), ! MALIAS_TOKEN); return; } good = "`$_-.'"; /* Make sure that the name contains legal characters only */ for (scan = alias + 1; scan && *scan; scan++) { ! if (isalnum((unsigned char) *scan)) continue; if (!strchr(good, *scan)) { notify(player, T("MAIL: Invalid character in mail alias.")); return; } } ! m = get_malias(GOD, alias); /* GOD can see all aliases */ ! if (m) { /* Ensures no duplicates! */ notify_format(player, T("MAIL: Mail Alias '%s' already exists."), alias); return; } if (!ma_size) { ma_size = MA_INC; ! malias = mush_calloc(ma_size, sizeof(struct mail_alias), "malias_list"); } else if (ma_top >= ma_size) { ma_size += MA_INC; ! m = mush_calloc(ma_size, sizeof(struct mail_alias), "malias_list"); memcpy(m, malias, sizeof(struct mail_alias) * ma_top); ! mush_free(malias, "malias_list"); malias = m; } i = 0; *************** *** 192,204 **** tail = head; while (*tail && (*tail != ' ')) { if (*tail == '"') { ! head++; ! tail++; ! while (*tail && (*tail != '"')) ! tail++; } if (*tail) ! tail++; } tail--; if (*tail != '"') --- 188,200 ---- tail = head; while (*tail && (*tail != ' ')) { if (*tail == '"') { ! head++; ! tail++; ! while (*tail && (*tail != '"')) ! tail++; } if (*tail) ! tail++; } tail--; if (*tail != '"') *************** *** 241,247 **** return; } m = &malias[ma_top]; ! m->members = (dbref *) mush_malloc(sizeof(dbref) * i, "malias_members"); memcpy(m->members, alist, sizeof(dbref) * i); na = alias + 1; --- 237,243 ---- return; } m = &malias[ma_top]; ! m->members = mush_calloc(i, sizeof(dbref), "malias_members"); memcpy(m->members, alist, sizeof(dbref) * i); na = alias + 1; *************** *** 275,292 **** for (i = 0; i < ma_top; i++) { m = &malias[i]; if ((m->owner == player) || (m->nflags == 0) || ! ((m->nflags & ALIAS_ADMIN) && Hasprivs(player)) || ! ((m->nflags & ALIAS_MEMBERS) && ismember(m, player))) { if (!notified) { ! notify_format(player, "%-13s %-35s %s %-15s", ! T("Name"), T("Alias Description"), T("Use See"), ! T("Owner")); ! notified++; } notify_format(player, ! "%c%-12.12s %-35.35s %s %-15.15s", MALIAS_TOKEN, m->name, ! uncompress((unsigned char *) (m->desc)), get_shortprivs(m), ! Name(m->owner)); } } --- 271,288 ---- for (i = 0; i < ma_top; i++) { m = &malias[i]; if ((m->owner == player) || (m->nflags == 0) || ! ((m->nflags & ALIAS_ADMIN) && Hasprivs(player)) || ! ((m->nflags & ALIAS_MEMBERS) && ismember(m, player))) { if (!notified) { ! notify_format(player, "%-13s %-35s %s %-15s", ! T("Name"), T("Alias Description"), T("Use See"), ! T("Owner")); ! notified++; } notify_format(player, ! "%c%-12.12s %-35.35s %s %-15.15s", MALIAS_TOKEN, m->name, ! uncompress((unsigned char *) (m->desc)), get_shortprivs(m), ! Name(m->owner)); } } *************** *** 349,376 **** m = get_malias(executor, args[0]); if (m) { if (!delim_check(buff, bp, nargs, args, 2, &sep)) ! return; if ((m->owner == executor) || (m->mflags == 0) || ! (Hasprivs(executor)) || ! ((m->mflags & ALIAS_MEMBERS) && ismember(m, executor))) { ! for (i = 0; i < m->size; i++) { ! if (count++) ! safe_chr(sep, buff, bp); ! safe_dbref(m->members[i], buff, bp); ! } } else { ! safe_str(T(e_perm), buff, bp); } return; } else { /* Perhaps it's a delimiter? */ if (arglens[0] > 1) { ! /* Oops, not if it's longer than one character */ ! safe_str(T(e_match), buff, bp); ! return; } if (!delim_check(buff, bp, nargs, args, 1, &sep)) ! return; } --- 345,372 ---- m = get_malias(executor, args[0]); if (m) { if (!delim_check(buff, bp, nargs, args, 2, &sep)) ! return; if ((m->owner == executor) || (m->mflags == 0) || ! (Hasprivs(executor)) || ! ((m->mflags & ALIAS_MEMBERS) && ismember(m, executor))) { ! for (i = 0; i < m->size; i++) { ! if (count++) ! safe_chr(sep, buff, bp); ! safe_dbref(m->members[i], buff, bp); ! } } else { ! safe_str(T(e_perm), buff, bp); } return; } else { /* Perhaps it's a delimiter? */ if (arglens[0] > 1) { ! /* Oops, not if it's longer than one character */ ! safe_str(T(e_match), buff, bp); ! return; } if (!delim_check(buff, bp, nargs, args, 1, &sep)) ! return; } *************** *** 379,388 **** for (i = 0; i < ma_top; i++) { m = &malias[i]; if ((m->owner == executor) || (m->nflags == 0) || ! ((m->nflags & ALIAS_ADMIN) && Hasprivs(executor)) || ! ((m->nflags & ALIAS_MEMBERS) && ismember(m, executor))) { if (count++) ! safe_chr(sep, buff, bp); safe_chr(MALIAS_TOKEN, buff, bp); safe_str(m->name, buff, bp); } --- 375,384 ---- for (i = 0; i < ma_top; i++) { m = &malias[i]; if ((m->owner == executor) || (m->nflags == 0) || ! ((m->nflags & ALIAS_ADMIN) && Hasprivs(executor)) || ! ((m->nflags & ALIAS_MEMBERS) && ismember(m, executor))) { if (count++) ! safe_chr(sep, buff, bp); safe_chr(MALIAS_TOKEN, buff, bp); safe_str(m->name, buff, bp); } *************** *** 408,414 **** return; } else if (Wizard(player) || (player == m->owner)) { if (m->desc) ! free(m->desc); /* No need to update MEM_CHECK records here */ m->desc = compress(desc); notify(player, T("MAIL: Description changed.")); } else --- 404,410 ---- return; } else if (Wizard(player) || (player == m->owner)) { if (m->desc) ! free(m->desc); /* No need to update MEM_CHECK records here */ m->desc = compress(desc); notify(player, T("MAIL: Description changed.")); } else *************** *** 440,447 **** return; } else { if ((no = lookup_player(owner)) == NOTHING) { ! notify(player, T("MAIL: I cannot find that player.")); ! return; } m->owner = no; notify(player, T("MAIL: Owner changed for alias.")); --- 436,443 ---- return; } else { if ((no = lookup_player(owner)) == NOTHING) { ! notify(player, T("MAIL: I cannot find that player.")); ! return; } m->owner = no; notify(player, T("MAIL: Owner changed for alias.")); *************** *** 470,477 **** } if (*newname != MALIAS_TOKEN) { notify_format(player, ! T("MAIL: Bad alias. Aliases must start with '%c'."), ! MALIAS_TOKEN); return; } if (get_malias(GOD, newname) != NULL) { --- 466,473 ---- } if (*newname != MALIAS_TOKEN) { notify_format(player, ! T("MAIL: Bad alias. Aliases must start with '%c'."), ! MALIAS_TOKEN); return; } if (get_malias(GOD, newname) != NULL) { *************** *** 483,489 **** return; } ! free(m->name); /* No need to update MEM_CHECK records here. */ m->name = strdup(newname + 1); notify(player, T("MAIL: Mail Alias renamed.")); --- 479,485 ---- return; } ! free(m->name); /* No need to update MEM_CHECK records here. */ m->name = strdup(newname + 1); notify(player, T("MAIL: Mail Alias renamed.")); *************** *** 505,512 **** m = get_malias(player, alias); if (!m) { notify(player, ! T ! ("MAIL: Not a valid alias. Remember to prefix the alias name with *.")); return; } if (Wizard(player) || (m->owner == player)) { --- 501,508 ---- m = get_malias(player, alias); if (!m) { notify(player, ! T ! ("MAIL: Not a valid alias. Remember to prefix the alias name with *.")); return; } if (Wizard(player) || (m->owner == player)) { *************** *** 545,553 **** m = get_malias(player, alias); if (!m) { notify_format(player, ! T ! ("MAIL: Not a valid alias. Remember to prefix the alias name with %c."), ! MALIAS_TOKEN); return; } if (!tolist || !*tolist) { --- 541,549 ---- m = get_malias(player, alias); if (!m) { notify_format(player, ! T ! ("MAIL: Not a valid alias. Remember to prefix the alias name with %c."), ! MALIAS_TOKEN); return; } if (!tolist || !*tolist) { *************** *** 569,581 **** tail = head; while (*tail && (*tail != ' ')) { if (*tail == '"') { ! head++; ! tail++; ! while (*tail && (*tail != '"')) ! tail++; } if (*tail) ! tail++; } tail--; if (*tail != '"') --- 565,577 ---- tail = head; while (*tail && (*tail != ' ')) { if (*tail == '"') { ! head++; ! tail++; ! while (*tail && (*tail != '"')) ! tail++; } if (*tail) ! tail++; } tail--; if (*tail != '"') *************** *** 618,625 **** return; } if (m->members) ! mush_free((Malloc_t) m->members, "malias_members"); ! m->members = (dbref *) mush_malloc(sizeof(dbref) * i, "malias_members"); memcpy(m->members, alist, sizeof(dbref) * i); m->size = i; notify(player, T("MAIL: Alias list set.")); --- 614,621 ---- return; } if (m->members) ! mush_free(m->members, "malias_members"); ! m->members = mush_calloc(i, sizeof(dbref), "malias_members"); memcpy(m->members, alist, sizeof(dbref) * i); m->size = i; notify(player, T("MAIL: Alias list set.")); *************** *** 644,657 **** return; } notify(player, ! "Num Name Description Owner Count"); for (i = 0; i < ma_top; i++) { m = &malias[i]; notify_format(player, "#%-4d %c%-10.10s %-40.40s %-11.11s (%3d)", ! i, MALIAS_TOKEN, m->name, ! uncompress((unsigned char *) m->desc), ! Name(m->owner), m->size); } notify(player, T("***** End of Mail Aliases *****")); --- 640,653 ---- return; } notify(player, ! "Num Name Description Owner Count"); for (i = 0; i < ma_top; i++) { m = &malias[i]; notify_format(player, "#%-4d %c%-10.10s %-40.40s %-11.11s (%3d)", ! i, MALIAS_TOKEN, m->name, ! uncompress((unsigned char *) m->desc), ! Name(m->owner), m->size); } notify(player, T("***** End of Mail Aliases *****")); *************** *** 673,679 **** notify(player, T("MAIL: Permission denied.")); else { notify_format(player, ! T("MAIL: Number of mail aliases defined: %d"), ma_top); notify_format(player, T("MAIL: Allocated slots %d"), ma_size); } } --- 669,675 ---- notify(player, T("MAIL: Permission denied.")); else { notify_format(player, ! T("MAIL: Number of mail aliases defined: %d"), ma_top); notify_format(player, T("MAIL: Allocated slots %d"), ma_size); } } *************** *** 694,708 **** notify(player, T("MAIL: Only god can do that!")); return; } ! if (ma_size) { /* aliases defined ? */ for (i = 0; i < ma_top; i++) { m = &malias[i]; if (m->name) ! mush_free(m->name, "malias_name"); if (m->desc) ! mush_free(m->desc, "malias_desc"); if (m->members) ! mush_free((Malloc_t) m->members, "malias_members"); } mush_free((Malloc_t) malias, "malias_list"); } --- 690,704 ---- notify(player, T("MAIL: Only god can do that!")); return; } ! if (ma_size) { /* aliases defined ? */ for (i = 0; i < ma_top; i++) { m = &malias[i]; if (m->name) ! mush_free(m->name, "malias_name"); if (m->desc) ! mush_free(m->desc, "malias_desc"); if (m->members) ! mush_free((Malloc_t) m->members, "malias_members"); } mush_free((Malloc_t) malias, "malias_list"); } *************** *** 737,744 **** p = type ? &m->mflags : &m->nflags; *p = string_to_privs(malias_priv_table, privs, 0); notify_format(player, ! T("MAIL: Permission to see/use alias '%s' changed to %s"), ! alias, privs_to_string(malias_priv_table, *p)); } --- 733,740 ---- p = type ? &m->mflags : &m->nflags; *p = string_to_privs(malias_priv_table, privs, 0); notify_format(player, ! T("MAIL: Permission to see/use alias '%s' changed to %s"), ! alias, privs_to_string(malias_priv_table, *p)); } *************** *** 779,791 **** tail = head; while (*tail && (*tail != ' ')) { if (*tail == '"') { ! head++; ! tail++; ! while (*tail && (*tail != '"')) ! tail++; } if (*tail) ! tail++; } tail--; if (*tail != '"') --- 775,787 ---- tail = head; while (*tail && (*tail != ' ')) { if (*tail == '"') { ! head++; ! tail++; ! while (*tail && (*tail != '"')) ! tail++; } if (*tail) ! tail++; } tail--; if (*tail != '"') *************** *** 805,818 **** notify_format(player, T("MAIL: No such player '%s'."), head); } else { if (ismember(m, target)) { ! notify_format(player, ! T("MAIL: player '%s' exists already in alias %s."), ! head, alias); } else { ! buff = unparse_object(player, target); ! notify_format(player, T("MAIL: %s added to alias %s"), buff, alias); ! alist[i] = target; ! i++; } } /* --- 801,814 ---- notify_format(player, T("MAIL: No such player '%s'."), head); } else { if (ismember(m, target)) { ! notify_format(player, ! T("MAIL: player '%s' exists already in alias %s."), ! head, alias); } else { ! buff = unparse_object(player, target); ! notify_format(player, T("MAIL: %s added to alias %s"), buff, alias); ! alist[i] = target; ! i++; } } /* *************** *** 833,844 **** notify(player, T("MAIL: No valid recipients for alias-list!")); return; } ! members = ! (dbref *) mush_malloc(sizeof(dbref) * (i + m->size), "malias_members"); memcpy(members, m->members, sizeof(dbref) * m->size); memcpy(&members[m->size], alist, sizeof(dbref) * i); ! mush_free((Malloc_t) m->members, "malias_members"); m->members = members; m->size += i; --- 829,839 ---- notify(player, T("MAIL: No valid recipients for alias-list!")); return; } ! members = mush_calloc(i + m->size, sizeof(dbref), "malias_members"); memcpy(members, m->members, sizeof(dbref) * m->size); memcpy(&members[m->size], alist, sizeof(dbref) * i); ! mush_free(m->members, "malias_members"); m->members = members; m->size += i; *************** *** 885,897 **** tail = head; while (*tail && (*tail != ' ')) { if (*tail == '"') { ! head++; ! tail++; ! while (*tail && (*tail != '"')) ! tail++; } if (*tail) ! tail++; } tail--; if (*tail != '"') --- 880,892 ---- tail = head; while (*tail && (*tail != ' ')) { if (*tail == '"') { ! head++; ! tail++; ! while (*tail && (*tail != '"')) ! tail++; } if (*tail) ! tail++; } tail--; if (*tail != '"') *************** *** 911,922 **** notify_format(player, T("MAIL: No such player '%s'."), head); } else { if (!(i = ismember(m, target))) { ! notify_format(player, T("MAIL: player '%s' is not in alias %s."), ! head, alias); } else { ! buff = unparse_object(player, target); ! m->members[i - 1] = m->members[--m->size]; ! notify_format(player, T("MAIL: %s removed from alias %s"), buff, alias); } } /* --- 906,917 ---- notify_format(player, T("MAIL: No such player '%s'."), head); } else { if (!(i = ismember(m, target))) { ! notify_format(player, T("MAIL: player '%s' is not in alias %s."), ! head, alias); } else { ! buff = unparse_object(player, target); ! m->members[i - 1] = m->members[--m->size]; ! notify_format(player, T("MAIL: %s removed from alias %s"), buff, alias); } } /* *************** *** 984,990 **** int i; for (i = 0; i < m->size; i++) { if (player == m->members[i]) ! return (i + 1); /* To avoid entry "0" */ } return 0; } --- 979,985 ---- int i; for (i = 0; i < m->size; i++) { if (player == m->members[i]) ! return (i + 1); /* To avoid entry "0" */ } return 0; } *************** *** 1027,1038 **** for (i = 0; i < ma_top; i++) { m = &malias[i]; if ((m->owner == player) || (m->nflags == 0) || ! /* ((m->nflags & ALIAS_ADMIN) && Hasprivs(player)) || */ ! Hasprivs(player) || ! ((m->nflags & ALIAS_MEMBERS) && ismember(m, player))) { if (!strcasecmp(mal, m->name)) ! return m; } } return NULL; --- 1022,1033 ---- for (i = 0; i < ma_top; i++) { m = &malias[i]; if ((m->owner == player) || (m->nflags == 0) || ! /* ((m->nflags & ALIAS_ADMIN) && Hasprivs(player)) || */ ! Hasprivs(player) || ! ((m->nflags & ALIAS_MEMBERS) && ismember(m, player))) { if (!strcasecmp(mal, m->name)) ! return m; } } return NULL; *************** *** 1062,1070 **** ma_size = ma_top; if (ma_top > 0) ! malias = ! (struct mail_alias *) mush_malloc(sizeof(struct mail_alias) * ! ma_size, "malias_list"); else malias = NULL; --- 1057,1063 ---- ma_size = ma_top; if (ma_top > 0) ! malias = mush_calloc(ma_size, sizeof(struct mail_alias), "malias_list"); else malias = NULL; *************** *** 1081,1090 **** m->size = getref(fp); if (m->size > 0) { ! m->members = ! (dbref *) mush_malloc(m->size * sizeof(dbref), "malias_members"); for (j = 0; j < m->size; j++) { ! m->members[j] = getref(fp); } } else { m->members = NULL; --- 1074,1082 ---- m->size = getref(fp); if (m->size > 0) { ! m->members = mush_calloc(m->size, sizeof(dbref), "malias_members"); for (j = 0; j < m->size; j++) { ! m->members[j] = getref(fp); } } else { m->members = NULL; Index: src/myssl.c =================================================================== *** src/myssl.c (.../p2) (revision 920) --- src/myssl.c (.../p3) (revision 920) *************** *** 28,34 **** #define MAXHOSTNAMELEN 32 #define LC_MESSAGES 6 void shutdown_checkpoint(void); ! #else /* !WIN32 */ #ifdef I_SYS_FILE #include #endif --- 28,34 ---- #define MAXHOSTNAMELEN 32 #define LC_MESSAGES 6 void shutdown_checkpoint(void); ! #else /* !WIN32 */ #ifdef I_SYS_FILE #include #endif *************** *** 57,67 **** #ifdef I_SYS_STAT #include #endif ! #endif /* !WIN32 */ ! #include ! #ifdef I_SYS_WAIT ! #include ! #endif #include #include #include --- 57,63 ---- #ifdef I_SYS_STAT #include #endif ! #endif /* !WIN32 */ #include #include #include *************** *** 87,99 **** #include "parse.h" #include "confmagic.h" ! #define MYSSL_RB 0x1 /**< Read blocked (on read) */ ! #define MYSSL_WB 0x2 /**< Write blocked (on write) */ ! #define MYSSL_RBOW 0x4 /**< Read blocked (on write) */ ! #define MYSSL_WBOR 0x8 /**< Write blocked (on read) */ ! #define MYSSL_ACCEPT 0x10 /**< We need to call SSL_accept (again) */ ! #define MYSSL_VERIFIED 0x20 /**< This is an authenticated connection */ ! #define MYSSL_HANDSHAKE 0x40 /**< We need to call SSL_do_handshake */ #undef MYSSL_DEBUG #ifdef MYSSL_DEBUG --- 83,95 ---- #include "parse.h" #include "confmagic.h" ! #define MYSSL_RB 0x1 /**< Read blocked (on read) */ ! #define MYSSL_WB 0x2 /**< Write blocked (on write) */ ! #define MYSSL_RBOW 0x4 /**< Read blocked (on write) */ ! #define MYSSL_WBOR 0x8 /**< Write blocked (on read) */ ! #define MYSSL_ACCEPT 0x10 /**< We need to call SSL_accept (again) */ ! #define MYSSL_VERIFIED 0x20 /**< This is an authenticated connection */ ! #define MYSSL_HANDSHAKE 0x40 /**< We need to call SSL_do_handshake */ #undef MYSSL_DEBUG #ifdef MYSSL_DEBUG *************** *** 142,152 **** if (private_key_file && *private_key_file) { if (!SSL_CTX_use_certificate_chain_file(ctx, private_key_file)) { ssl_errordump ! ("Unable to load server certificate - only anonymous ciphers supported."); } if (!SSL_CTX_use_PrivateKey_file(ctx, private_key_file, SSL_FILETYPE_PEM)) { ssl_errordump ! ("Unable to load private key - only anonymous ciphers supported."); } } --- 138,148 ---- if (private_key_file && *private_key_file) { if (!SSL_CTX_use_certificate_chain_file(ctx, private_key_file)) { ssl_errordump ! ("Unable to load server certificate - only anonymous ciphers supported."); } if (!SSL_CTX_use_PrivateKey_file(ctx, private_key_file, SSL_FILETYPE_PEM)) { ssl_errordump ! ("Unable to load private key - only anonymous ciphers supported."); } } *************** *** 156,166 **** ssl_errordump("Unable to load CA certificates"); } else { if (req_client_cert) ! SSL_CTX_set_verify(ctx, ! SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, ! client_verify_callback); else ! SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, client_verify_callback); #if (OPENSSL_VERSION_NUMBER < 0x0090600fL) SSL_CTX_set_verify_depth(ctx, 1); #endif --- 152,162 ---- ssl_errordump("Unable to load CA certificates"); } else { if (req_client_cert) ! SSL_CTX_set_verify(ctx, ! SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, ! client_verify_callback); else ! SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, client_verify_callback); #if (OPENSSL_VERSION_NUMBER < 0x0090600fL) SSL_CTX_set_verify_depth(ctx, 1); #endif *************** *** 169,176 **** SSL_CTX_set_options(ctx, SSL_OP_SINGLE_DH_USE | SSL_OP_ALL); SSL_CTX_set_mode(ctx, ! SSL_MODE_ENABLE_PARTIAL_WRITE | ! SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); /* Set up DH callback */ SSL_CTX_set_tmp_dh(ctx, get_dh1024()); --- 165,172 ---- SSL_CTX_set_options(ctx, SSL_OP_SINGLE_DH_USE | SSL_OP_ALL); SSL_CTX_set_mode(ctx, ! SSL_MODE_ENABLE_PARTIAL_WRITE | ! SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); /* Set up DH callback */ SSL_CTX_set_tmp_dh(ctx, get_dh1024()); *************** *** 204,210 **** X509_NAME_oneline(X509_get_subject_name(err_cert), buf, 256); if (!preverify_ok) { do_log(LT_ERR, 0, 0, "verify error:num=%d:%s:depth=%d:%s\n", err, ! X509_verify_cert_error_string(err), depth, buf); if (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT) { X509_NAME_oneline(X509_get_issuer_name(x509_ctx->current_cert), buf, 256); do_log(LT_ERR, 0, 0, "issuer= %s\n", buf); --- 200,206 ---- X509_NAME_oneline(X509_get_subject_name(err_cert), buf, 256); if (!preverify_ok) { do_log(LT_ERR, 0, 0, "verify error:num=%d:%s:depth=%d:%s\n", err, ! X509_verify_cert_error_string(err), depth, buf); if (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT) { X509_NAME_oneline(X509_get_issuer_name(x509_ctx->current_cert), buf, 256); do_log(LT_ERR, 0, 0, "issuer= %s\n", buf); *************** *** 427,436 **** /* Successful accept - report it */ if ((peer = SSL_get_peer_certificate(ssl))) { if (SSL_get_verify_result(ssl) == X509_V_OK) { ! /* The client sent a certificate which verified OK */ ! X509_NAME_oneline(X509_get_subject_name(peer), buf, 256); ! do_log(LT_CONN, 0, 0, "SSL client certificate accepted: %s", buf); ! state |= MYSSL_VERIFIED; } } } --- 423,432 ---- /* Successful accept - report it */ if ((peer = SSL_get_peer_certificate(ssl))) { if (SSL_get_verify_result(ssl) == X509_V_OK) { ! /* The client sent a certificate which verified OK */ ! X509_NAME_oneline(X509_get_subject_name(peer), buf, 256); ! do_log(LT_CONN, 0, 0, "SSL client certificate accepted: %s", buf); ! state |= MYSSL_VERIFIED; } } } *************** *** 451,457 **** */ int ssl_read(SSL * ssl, int state, int net_read_ready, int net_write_ready, ! char *buf, int bufsize, int *bytes_read) { if ((net_read_ready && !(state & MYSSL_WBOR)) || (net_write_ready && (state & MYSSL_RBOW))) { --- 447,453 ---- */ int ssl_read(SSL * ssl, int state, int net_read_ready, int net_write_ready, ! char *buf, int bufsize, int *bytes_read) { if ((net_read_ready && !(state & MYSSL_WBOR)) || (net_write_ready && (state & MYSSL_RBOW))) { *************** *** 460,486 **** *bytes_read = SSL_read(ssl, buf, bufsize); switch (SSL_get_error(ssl, *bytes_read)) { case SSL_ERROR_NONE: ! /* Yay */ ! return state; case SSL_ERROR_ZERO_RETURN: ! /* End of data on this socket */ ! return -1; case SSL_ERROR_WANT_READ: ! /* More needs to be read from the underlying socket */ ! ssl_debugdump("SSL_read wants read"); ! state |= MYSSL_RB; ! break; case SSL_ERROR_WANT_WRITE: ! /* More needs to be written to the underlying socket. ! * This can happen during a rehandshake. ! */ ! ssl_debugdump("SSL_read wants write"); ! state |= MYSSL_RBOW; ! break; default: ! /* Should never happen */ ! ssl_errordump("Unknown ssl_read failure!"); ! return -1; } } while (SSL_pending(ssl) && !(state & MYSSL_RB)); } --- 456,482 ---- *bytes_read = SSL_read(ssl, buf, bufsize); switch (SSL_get_error(ssl, *bytes_read)) { case SSL_ERROR_NONE: ! /* Yay */ ! return state; case SSL_ERROR_ZERO_RETURN: ! /* End of data on this socket */ ! return -1; case SSL_ERROR_WANT_READ: ! /* More needs to be read from the underlying socket */ ! ssl_debugdump("SSL_read wants read"); ! state |= MYSSL_RB; ! break; case SSL_ERROR_WANT_WRITE: ! /* More needs to be written to the underlying socket. ! * This can happen during a rehandshake. ! */ ! ssl_debugdump("SSL_read wants write"); ! state |= MYSSL_RBOW; ! break; default: ! /* Should never happen */ ! ssl_errordump("Unknown ssl_read failure!"); ! return -1; } } while (SSL_pending(ssl) && !(state & MYSSL_RB)); } *************** *** 499,505 **** */ int ssl_write(SSL * ssl, int state, int net_read_ready, int net_write_ready, ! unsigned char *buf, int bufsize, int *offset) { int r; if ((net_write_ready && bufsize) || (net_read_ready && !(state & MYSSL_WBOR))) { --- 495,501 ---- */ int ssl_write(SSL * ssl, int state, int net_read_ready, int net_write_ready, ! unsigned char *buf, int bufsize, int *offset) { int r; if ((net_write_ready && bufsize) || (net_read_ready && !(state & MYSSL_WBOR))) { *************** *** 591,597 **** SSL_set_bio(ssl, bio, bio); return ssl; } ! #endif /* BROKEN */ ! #endif /* HAS_OPENSSL */ --- 587,593 ---- SSL_set_bio(ssl, bio, bio); return ssl; } ! #endif /* BROKEN */ ! #endif /* HAS_OPENSSL */ Index: src/wiz.c =================================================================== *** src/wiz.c (.../p2) (revision 920) --- src/wiz.c (.../p3) (revision 920) *************** *** 63,79 **** #endif struct search_spec { ! dbref owner; /**< Limit to this owner, if specified */ ! int type; /**< Limit to this type */ ! dbref parent; /**< Limit to children of this parent */ ! dbref zone; /**< Limit to those in this zone */ char flags[BUFFER_LEN]; /**< Limit to those with these flags */ char lflags[BUFFER_LEN]; /**< Limit to those with these flags */ char powers[BUFFER_LEN]; /**< Limit to those with these powers */ char eval[BUFFER_LEN]; /**< Limit to those where this evals true */ char name[BUFFER_LEN]; /**< Limit to those prefix-matching this name */ ! dbref low; /**< Limit to dbrefs here or higher */ ! dbref high; /**< Limit to dbrefs here or lower */ int start; /**< Limited results: start at this one. */ int count; /**< Limited results: return this many */ int end; /**< Limited results: return until this one.*/ --- 63,79 ---- #endif struct search_spec { ! dbref owner; /**< Limit to this owner, if specified */ ! int type; /**< Limit to this type */ ! dbref parent; /**< Limit to children of this parent */ ! dbref zone; /**< Limit to those in this zone */ char flags[BUFFER_LEN]; /**< Limit to those with these flags */ char lflags[BUFFER_LEN]; /**< Limit to those with these flags */ char powers[BUFFER_LEN]; /**< Limit to those with these powers */ char eval[BUFFER_LEN]; /**< Limit to those where this evals true */ char name[BUFFER_LEN]; /**< Limit to those prefix-matching this name */ ! dbref low; /**< Limit to dbrefs here or higher */ ! dbref high; /**< Limit to dbrefs here or lower */ int start; /**< Limited results: start at this one. */ int count; /**< Limited results: return this many */ int end; /**< Limited results: return until this one.*/ *************** *** 83,91 **** static int tport_control_ok(dbref player, dbref victim, dbref loc); static int mem_usage(dbref thing); static int raw_search(dbref player, const char *owner, int nargs, ! const char **args, dbref **result, PE_Info *pe_info); static int fill_search_spec(dbref player, const char *owner, int nargs, ! const char **args, struct search_spec *spec); #ifdef INFO_SLAVE void kill_info_slave(void); --- 83,91 ---- static int tport_control_ok(dbref player, dbref victim, dbref loc); static int mem_usage(dbref thing); static int raw_search(dbref player, const char *owner, int nargs, ! const char **args, dbref **result, PE_Info *pe_info); static int fill_search_spec(dbref player, const char *owner, int nargs, ! const char **args, struct search_spec *spec); #ifdef INFO_SLAVE void kill_info_slave(void); *************** *** 121,131 **** } if (player == AMBIGUOUS) { notify_format(creator, T("Failure creating '%s' (bad password)"), ! player_name); return NOTHING; } notify_format(creator, T("New player '%s' (#%d) created with password '%s'"), ! player_name, player, player_password); do_log(LT_WIZ, creator, player, T("Player creation")); return player; } --- 121,131 ---- } if (player == AMBIGUOUS) { notify_format(creator, T("Failure creating '%s' (bad password)"), ! player_name); return NOTHING; } notify_format(creator, T("New player '%s' (#%d) created with password '%s'"), ! player_name, player, player_password); do_log(LT_WIZ, creator, player, T("Player creation")); return player; } *************** *** 166,177 **** return; } /* count up all owned objects */ ! owned = -1; /* a player is never included in his own ! * quota */ for (thing = 0; thing < db_top; thing++) { if (Owner(thing) == who) if (!IsGarbage(thing)) ! ++owned; } /* the quotas of priv'ed players are unlimited and cannot be set. */ --- 166,177 ---- return; } /* count up all owned objects */ ! owned = -1; /* a player is never included in his own ! * quota */ for (thing = 0; thing < db_top; thing++) { if (Owner(thing) == who) if (!IsGarbage(thing)) ! ++owned; } /* the quotas of priv'ed players are unlimited and cannot be set. */ *************** *** 200,206 **** limit = owned + get_current_quota(who) + atoi(arg2); else limit = atoi(arg2); ! if (limit < owned) /* always have enough quota for your objects */ limit = owned; (void) atr_add(Owner(who), "RQUOTA", tprintf("%d", limit - owned), GOD, 0); --- 200,206 ---- limit = owned + get_current_quota(who) + atoi(arg2); else limit = atoi(arg2); ! if (limit < owned) /* always have enough quota for your objects */ limit = owned; (void) atr_add(Owner(who), "RQUOTA", tprintf("%d", limit - owned), GOD, 0); *************** *** 245,274 **** continue; /* count up all owned objects */ ! owned = -1; /* a player is never included in his own ! * quota */ for (thing = 0; thing < db_top; thing++) { if (Owner(thing) == who) ! if (!IsGarbage(thing)) ! ++owned; } if (NoQuota(who)) { if (!quiet) ! notify_format(player, "%s: Objects: %d Limit: UNLIMITED", ! Name(who), owned); continue; } if (!quiet) { oldlimit = get_current_quota(who); notify_format(player, "%s: Objects: %d Limit: %d", ! Name(who), owned, oldlimit); } if (limit != -1) { if (limit <= owned) ! (void) atr_add(who, "RQUOTA", "0", GOD, 0); else ! (void) atr_add(who, "RQUOTA", tprintf("%d", limit - owned), GOD, 0); } } if (limit == -1) --- 245,274 ---- continue; /* count up all owned objects */ ! owned = -1; /* a player is never included in his own ! * quota */ for (thing = 0; thing < db_top; thing++) { if (Owner(thing) == who) ! if (!IsGarbage(thing)) ! ++owned; } if (NoQuota(who)) { if (!quiet) ! notify_format(player, "%s: Objects: %d Limit: UNLIMITED", ! Name(who), owned); continue; } if (!quiet) { oldlimit = get_current_quota(who); notify_format(player, "%s: Objects: %d Limit: %d", ! Name(who), owned, oldlimit); } if (limit != -1) { if (limit <= owned) ! (void) atr_add(who, "RQUOTA", "0", GOD, 0); else ! (void) atr_add(who, "RQUOTA", tprintf("%d", limit - owned), GOD, 0); } } if (limit == -1) *************** *** 339,351 **** */ void do_teleport(dbref player, const char *arg1, const char *arg2, int silent, ! int inside) { dbref victim; dbref destination; dbref loc; const char *to; ! dbref absroom; /* "absolute room", for NO_TEL check */ /* get victim, destination */ if (*arg2 == '\0') { --- 339,351 ---- */ void do_teleport(dbref player, const char *arg1, const char *arg2, int silent, ! int inside) { dbref victim; dbref destination; dbref loc; const char *to; ! dbref absroom; /* "absolute room", for NO_TEL check */ /* get victim, destination */ if (*arg2 == '\0') { *************** *** 353,360 **** to = arg1; } else { if ((victim = ! noisy_match_result(player, arg1, NOTYPE, ! MAT_OBJECTS | MAT_ENGLISH)) == NOTHING) { return; } to = arg2; --- 353,360 ---- to = arg1; } else { if ((victim = ! noisy_match_result(player, arg1, NOTYPE, ! MAT_OBJECTS | MAT_ENGLISH)) == NOTHING) { return; } to = arg2; *************** *** 376,382 **** */ if (player == victim) { if (command_check_byname(victim, "HOME")) ! safe_tel(victim, HOME, silent); return; } else destination = Home(victim); --- 376,382 ---- */ if (player == victim) { if (command_check_byname(victim, "HOME")) ! safe_tel(victim, HOME, silent); return; } else destination = Home(victim); *************** *** 401,407 **** return; } if (recursive_member(destination, victim, 0) ! || (victim == destination)) { notify(player, T("Bad destination.")); return; } --- 401,407 ---- return; } if (recursive_member(destination, victim, 0) ! || (victim == destination)) { notify(player, T("Bad destination.")); return; } *************** *** 412,436 **** if (IsExit(victim)) { /* Teleporting an exit means moving its source */ if (!IsRoom(destination)) { ! notify(player, T("Exits can only be teleported to other rooms.")); ! return; } if (Going(destination)) { ! notify(player, ! T("You can't move an exit to someplace that's crumbling.")); ! return; } if (!GoodObject(Home(victim))) ! loc = find_entrance(victim); else ! loc = Home(victim); /* Unlike normal teleport, you must control the destination * or have the open_anywhere power */ if (!(tport_control_ok(player, victim, loc) && ! (controls(player, destination) || Open_Anywhere(player)))) { ! notify(player, T("Permission denied.")); ! return; } /* Remove it from its old room */ Exits(loc) = remove_first(Exits(loc), victim); --- 412,436 ---- if (IsExit(victim)) { /* Teleporting an exit means moving its source */ if (!IsRoom(destination)) { ! notify(player, T("Exits can only be teleported to other rooms.")); ! return; } if (Going(destination)) { ! notify(player, ! T("You can't move an exit to someplace that's crumbling.")); ! return; } if (!GoodObject(Home(victim))) ! loc = find_entrance(victim); else ! loc = Home(victim); /* Unlike normal teleport, you must control the destination * or have the open_anywhere power */ if (!(tport_control_ok(player, victim, loc) && ! (controls(player, destination) || Open_Anywhere(player)))) { ! notify(player, T("Permission denied.")); ! return; } /* Remove it from its old room */ Exits(loc) = remove_first(Exits(loc), victim); *************** *** 438,444 **** Source(victim) = destination; PUSH(victim, Exits(destination)); if (!Quiet(player) && !(Quiet(victim) && (Owner(victim) == player))) ! notify(player, T("Teleported.")); return; } loc = Location(victim); --- 438,444 ---- Source(victim) = destination; PUSH(victim, Exits(destination)); if (!Quiet(player) && !(Quiet(victim) && (Owner(victim) == player))) ! notify(player, T("Teleported.")); return; } loc = Location(victim); *************** *** 447,459 **** * using @tel/inside */ if (IsPlayer(destination) && Tel_Anywhere(player) && IsPlayer(victim) ! && !inside) { if (!silent && loc != Location(destination)) ! did_it(victim, victim, NULL, NULL, "OXTPORT", NULL, NULL, loc); safe_tel(victim, Location(destination), silent); if (!silent && loc != Location(destination)) ! did_it(victim, victim, "TPORT", NULL, "OTPORT", NULL, "ATPORT", ! Location(destination)); return; } /* check needed for NOTHING. Especially important for unlinked exits */ --- 447,459 ---- * using @tel/inside */ if (IsPlayer(destination) && Tel_Anywhere(player) && IsPlayer(victim) ! && !inside) { if (!silent && loc != Location(destination)) ! did_it(victim, victim, NULL, NULL, "OXTPORT", NULL, NULL, loc); safe_tel(victim, Location(destination), silent); if (!silent && loc != Location(destination)) ! did_it(victim, victim, "TPORT", NULL, "OTPORT", NULL, "ATPORT", ! Location(destination)); return; } /* check needed for NOTHING. Especially important for unlinked exits */ *************** *** 462,468 **** /* At this point, they're in a bad location, so let's check * if home is valid before sending them there. */ if (!GoodObject(Home(victim))) ! Home(victim) = PLAYER_START; do_move(victim, "home", MOVE_NORMAL); return; } else { --- 462,468 ---- /* At this point, they're in a bad location, so let's check * if home is valid before sending them there. */ if (!GoodObject(Home(victim))) ! Home(victim) = PLAYER_START; do_move(victim, "home", MOVE_NORMAL); return; } else { *************** *** 470,498 **** /* if player is inside himself, send him home */ if (absroom == victim) { ! notify(player, T("What are you doing inside of yourself?")); ! if (Home(victim) == absroom) ! Home(victim) = PLAYER_START; ! do_move(victim, "home", MOVE_NORMAL); ! return; } /* find the "absolute" room */ absroom = absolute_room(victim); if (absroom == NOTHING) { ! notify(victim, T("You're in the void - sending you home.")); ! if (Home(victim) == Location(victim)) ! Home(victim) = PLAYER_START; ! do_move(victim, "home", MOVE_NORMAL); ! return; } /* if there are a lot of containers, send him home */ if (absroom == AMBIGUOUS) { ! notify(victim, T("You're in too many containers.")); ! if (Home(victim) == Location(victim)) ! Home(victim) = PLAYER_START; ! do_move(victim, "home", MOVE_NORMAL); ! return; } /* note that we check the NO_TEL status of the victim rather * than the player that issued the command. This prevents someone --- 470,498 ---- /* if player is inside himself, send him home */ if (absroom == victim) { ! notify(player, T("What are you doing inside of yourself?")); ! if (Home(victim) == absroom) ! Home(victim) = PLAYER_START; ! do_move(victim, "home", MOVE_NORMAL); ! return; } /* find the "absolute" room */ absroom = absolute_room(victim); if (absroom == NOTHING) { ! notify(victim, T("You're in the void - sending you home.")); ! if (Home(victim) == Location(victim)) ! Home(victim) = PLAYER_START; ! do_move(victim, "home", MOVE_NORMAL); ! return; } /* if there are a lot of containers, send him home */ if (absroom == AMBIGUOUS) { ! notify(victim, T("You're in too many containers.")); ! if (Home(victim) == Location(victim)) ! Home(victim) = PLAYER_START; ! do_move(victim, "home", MOVE_NORMAL); ! return; } /* note that we check the NO_TEL status of the victim rather * than the player that issued the command. This prevents someone *************** *** 502,518 **** /* now check to see if the absolute room is set NO_TEL */ if (NoTel(absroom) && !controls(player, absroom) ! && !Tel_Anywhere(player)) { ! notify(player, T("Teleports are not allowed in this room.")); ! return; } /* Check leave lock on room, if necessary */ if (!controls(player, absroom) && !Tel_Anywhere(player) && ! !eval_lock(player, absroom, Leave_Lock)) { ! fail_lock(player, absroom, Leave_Lock, ! T("Teleports are not allowed in this room."), NOTHING); ! return; } /* Now check the Z_TEL status of the victim's room. --- 502,518 ---- /* now check to see if the absolute room is set NO_TEL */ if (NoTel(absroom) && !controls(player, absroom) ! && !Tel_Anywhere(player)) { ! notify(player, T("Teleports are not allowed in this room.")); ! return; } /* Check leave lock on room, if necessary */ if (!controls(player, absroom) && !Tel_Anywhere(player) && ! !eval_lock(player, absroom, Leave_Lock)) { ! fail_lock(player, absroom, Leave_Lock, ! T("Teleports are not allowed in this room."), NOTHING); ! return; } /* Now check the Z_TEL status of the victim's room. *************** *** 521,571 **** * the destination must also be a room in the same zone */ if (GoodObject(Zone(absroom)) && (ZTel(absroom) || ZTel(Zone(absroom))) ! && !controls(player, absroom) && !Tel_Anywhere(player) ! && (Zone(absroom) != Zone(destination))) { ! notify(player, ! T("You may not teleport out of the zone from this room.")); ! return; } } if (!IsExit(destination)) { if (tport_control_ok(player, victim, Location(victim)) && ! tport_dest_ok(player, victim, destination) ! && (Tel_Anything(player) || ! (Tel_Anywhere(player) && (player == victim)) || ! (destination == Owner(victim)) || ! (!Fixed(Owner(victim)) && !Fixed(player)))) { ! if (!silent && loc != destination) ! did_it(victim, victim, NULL, NULL, "OXTPORT", NULL, NULL, loc); ! safe_tel(victim, destination, silent); ! if (!silent && loc != destination) ! did_it(victim, victim, "TPORT", NULL, "OTPORT", NULL, "ATPORT", ! destination); ! if ((victim != player) && !(Puppet(victim) && ! (Owner(victim) == Owner(player)))) { ! if (!Quiet(player) && !(Quiet(victim) && (Owner(victim) == player))) ! notify(player, T("Teleported.")); ! } ! return; } /* we can't do it */ fail_lock(player, destination, Enter_Lock, T("Permission denied."), ! Location(player)); return; } else { /* attempted teleport to an exit */ if (tport_control_ok(player, victim, Location(victim)) ! && (Tel_Anything(player) || ! (Tel_Anywhere(player) && (player == victim)) || ! (!Fixed(Owner(victim)) && !Fixed(player)))) { ! do_move(victim, to, MOVE_NORMAL); } else { ! notify(player, T("Permission denied.")); ! if (victim != player) ! notify_format(victim, ! T("%s tries to impose his will on you and fails."), ! Name(player)); } } } --- 521,571 ---- * the destination must also be a room in the same zone */ if (GoodObject(Zone(absroom)) && (ZTel(absroom) || ZTel(Zone(absroom))) ! && !controls(player, absroom) && !Tel_Anywhere(player) ! && (Zone(absroom) != Zone(destination))) { ! notify(player, ! T("You may not teleport out of the zone from this room.")); ! return; } } if (!IsExit(destination)) { if (tport_control_ok(player, victim, Location(victim)) && ! tport_dest_ok(player, victim, destination) ! && (Tel_Anything(player) || ! (Tel_Anywhere(player) && (player == victim)) || ! (destination == Owner(victim)) || ! (!Fixed(Owner(victim)) && !Fixed(player)))) { ! if (!silent && loc != destination) ! did_it(victim, victim, NULL, NULL, "OXTPORT", NULL, NULL, loc); ! safe_tel(victim, destination, silent); ! if (!silent && loc != destination) ! did_it(victim, victim, "TPORT", NULL, "OTPORT", NULL, "ATPORT", ! destination); ! if ((victim != player) && !(Puppet(victim) && ! (Owner(victim) == Owner(player)))) { ! if (!Quiet(player) && !(Quiet(victim) && (Owner(victim) == player))) ! notify(player, T("Teleported.")); ! } ! return; } /* we can't do it */ fail_lock(player, destination, Enter_Lock, T("Permission denied."), ! Location(player)); return; } else { /* attempted teleport to an exit */ if (tport_control_ok(player, victim, Location(victim)) ! && (Tel_Anything(player) || ! (Tel_Anywhere(player) && (player == victim)) || ! (!Fixed(Owner(victim)) && !Fixed(player)))) { ! do_move(victim, to, MOVE_NORMAL); } else { ! notify(player, T("Permission denied.")); ! if (victim != player) ! notify_format(victim, ! T("%s tries to impose his will on you and fails."), ! Name(player)); } } } *************** *** 593,601 **** if (Wizard(player)) { /* Log forces by wizards */ if (Owner(victim) != Owner(player)) ! do_log(LT_WIZ, player, victim, "** FORCE: %s", command); else ! do_log(LT_WIZ, player, victim, "FORCE: %s", command); } else if (Wizard(Owner(victim))) { /* Log forces of wizards */ do_log(LT_WIZ, player, victim, "** FORCE WIZ-OWNED: %s", command); --- 593,601 ---- if (Wizard(player)) { /* Log forces by wizards */ if (Owner(victim) != Owner(player)) ! do_log(LT_WIZ, player, victim, "** FORCE: %s", command); else ! do_log(LT_WIZ, player, victim, "FORCE: %s", command); } else if (Wizard(Owner(victim))) { /* Log forces of wizards */ do_log(LT_WIZ, player, victim, "** FORCE WIZ-OWNED: %s", command); *************** *** 631,642 **** s = command + 1; while (*s && !isspace((unsigned char) *s)) { if (!isdigit((unsigned char) *s)) ! return 0; /* #1a is no good */ s++; } if (!*s) ! return 0; /* dbref with no action is no good */ ! *s = '='; /* Replace the first space with = so we have #3= */ return 1; } --- 631,642 ---- s = command + 1; while (*s && !isspace((unsigned char) *s)) { if (!isdigit((unsigned char) *s)) ! return 0; /* #1a is no good */ s++; } if (!*s) ! return 0; /* dbref with no action is no good */ ! *s = '='; /* Replace the first space with = so we have #3= */ ret