CircleMUD Server-side Compression Support These comments do not need to be removed first, patch is (or at least, is in Unix) smart enough to ignore them. See the comments in the code below to see which clients this is currently known to work with. And, obviously, this patch was made against CircleMUD 3.0 bpl16. If you don't have patch, look in ftp://ftp.circlemud.org/pub/CircleMUD/contrib/server/ for a pre-patched version. Please report problems to George Greer diff -uprN circle30bpl16/cnf/configure.in circle30bpl16-zlib/cnf/configure.in --- circle30bpl16/cnf/configure.in Sun Aug 1 17:24:06 1999 +++ circle30bpl16-zlib/cnf/configure.in Sun Oct 10 20:54:07 1999 @@ -89,6 +89,17 @@ AC_CHECK_HEADERS(signal.h sys/uio.h) AC_UNSAFE_CRYPT +dnl Test for libz +AC_CHECK_LIB(z, inflate, + AC_CHECK_HEADER(zlib.h, + Z_LIBS="-lz"; AC_DEFINE(HAVE_ZLIB))) +AC_CHECK_LIB(z, compress, , + AC_MSG_ERROR([[ +*** An incorrect version of zlib was found. Please do a 'locate' or +*** 'find' to make sure you do not have old copies of libz.a or libz.so +*** in other parts of your system. In particular, X11 may contain one. +]])) + dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T diff -uprN circle30bpl16/configure circle30bpl16-zlib/configure --- circle30bpl16/configure Sun Aug 1 17:33:11 1999 +++ circle30bpl16-zlib/configure Sun Oct 10 20:54:20 1999 @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 +# Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -333,7 +333,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" + echo "configure generated by autoconf version 2.14.1" exit 0 ;; -with-* | --with-*) @@ -493,7 +493,7 @@ done if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -537,7 +537,7 @@ do set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:540: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_MORE'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_MORE+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$MORE"; then @@ -570,7 +570,7 @@ done set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:573: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -600,7 +600,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:603: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -646,12 +646,12 @@ fi if test -z "$CC"; then case "`uname -s`" in - *win32* | *WIN32*) + *win32* | *WIN32* | *CYGWIN*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:654: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -681,8 +681,8 @@ fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:686: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -723,14 +723,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:728: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:733: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&6 echo "configure:761: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -793,7 +793,7 @@ if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} -Wall also needs -Wno-char-subscripts""... $ac_c" 1>&6 echo "configure:796: checking whether ${CC-cc} -Wall also needs -Wno-char-subscripts" >&5 -if eval "test \"`echo '$''{'ac_cv_char_warn'+set}'`\" = set"; then +if eval "test \"\${ac_cv_char_warn+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -829,7 +829,7 @@ echo "$ac_t""$ac_cv_char_warn" 1>&6 echo $ac_n "checking whether ${CC-cc} accepts -Wno-char-subscripts""... $ac_c" 1>&6 echo "configure:832: checking whether ${CC-cc} accepts -Wno-char-subscripts" >&5 -if eval "test \"`echo '$''{'ac_cv_gcc_ncs'+set}'`\" = set"; then +if eval "test \"\${ac_cv_gcc_ncs+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -877,7 +877,7 @@ fi echo $ac_n "checking for gethostbyaddr""... $ac_c" 1>&6 echo "configure:880: checking for gethostbyaddr" >&5 -if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr'+set}'`\" = set"; then +if eval "test \"\${ac_cv_func_gethostbyaddr+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyaddr=yes" else @@ -922,15 +923,15 @@ if eval "test \"`echo '$ac_cv_func_'geth else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyaddr in -lnsl""... $ac_c" 1>&6 -echo "configure:926: checking for gethostbyaddr in -lnsl" >&5 +echo "configure:927: checking for gethostbyaddr in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyaddr | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -965,12 +966,12 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:969: checking for socket" >&5 -if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then +echo "configure:970: checking for socket" >&5 +if eval "test \"\${ac_cv_func_socket+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -1011,15 +1013,15 @@ if eval "test \"`echo '$ac_cv_func_'sock else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:1015: checking for socket in -lsocket" >&5 +echo "configure:1017: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1054,12 +1056,12 @@ fi echo $ac_n "checking for malloc""... $ac_c" 1>&6 -echo "configure:1058: checking for malloc" >&5 -if eval "test \"`echo '$''{'ac_cv_func_malloc'+set}'`\" = set"; then +echo "configure:1060: checking for malloc" >&5 +if eval "test \"\${ac_cv_func_malloc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_malloc=yes" else @@ -1100,15 +1103,15 @@ if eval "test \"`echo '$ac_cv_func_'mall else echo "$ac_t""no" 1>&6 echo $ac_n "checking for malloc in -lmalloc""... $ac_c" 1>&6 -echo "configure:1104: checking for malloc in -lmalloc" >&5 +echo "configure:1107: checking for malloc in -lmalloc" >&5 ac_lib_var=`echo malloc'_'malloc | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lmalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1150,12 +1153,12 @@ fi echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:1154: checking for crypt" >&5 -if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then +echo "configure:1157: checking for crypt" >&5 +if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -1199,15 +1203,15 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1203: checking for crypt in -lcrypt" >&5 +echo "configure:1207: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1246,13 +1250,13 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1250: checking how to run the C preprocessor" >&5 +echo "configure:1254: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get @@ -1261,13 +1265,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1278,13 +1282,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1295,13 +1299,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1326,12 +1330,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1330: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then +echo "configure:1334: checking for ANSI C header files" >&5 +if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1339,7 +1343,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1356,7 +1360,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1374,7 +1378,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1395,7 +1399,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1406,7 +1410,7 @@ if (XOR (islower (i), ISLOWER (i)) || to exit (0); } EOF -if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1430,12 +1434,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1434: checking for sys/wait.h that is POSIX.1 compatible" >&5 -if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then +echo "configure:1438: checking for sys/wait.h that is POSIX.1 compatible" >&5 +if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1451,7 +1455,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -1475,17 +1479,21 @@ for ac_hdr in fcntl.h sys/fcntl.h errno. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1479: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:1483: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#endif #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1515,17 +1523,21 @@ for ac_hdr in limits.h sys/time.h sys/se do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1519: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:1527: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#endif #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1555,17 +1567,21 @@ for ac_hdr in memory.h crypt.h assert.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1559: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:1571: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#endif #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1595,17 +1611,21 @@ for ac_hdr in sys/stat.h sys/socket.h sy do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1599: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:1615: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#endif #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1635,17 +1655,21 @@ for ac_hdr in signal.h sys/uio.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1639: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:1659: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#endif #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1674,8 +1698,8 @@ done echo $ac_n "checking whether crypt needs over 10 characters""... $ac_c" 1>&6 -echo "configure:1678: checking whether crypt needs over 10 characters" >&5 -if eval "test \"`echo '$''{'ac_cv_unsafe_crypt'+set}'`\" = set"; then +echo "configure:1702: checking whether crypt needs over 10 characters" >&5 +if eval "test \"\${ac_cv_unsafe_crypt+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1690,7 +1714,7 @@ else ac_cv_unsafe_crypt=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_unsafe_crypt=yes else @@ -1739,13 +1763,145 @@ if test ${ac_cv_lib_crypt_crypt-no} = ye fi +echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 +echo "configure:1768: checking for inflate in -lz" >&5 +ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lz $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for zlib.h""... $ac_c" 1>&6 +echo "configure:1804: checking for zlib.h" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + Z_LIBS="-lz"; cat >> confdefs.h <<\EOF +#define HAVE_ZLIB 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 +echo "configure:1847: checking for compress in -lz" >&5 +ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lz $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +{ echo "configure: error: +*** An incorrect version of zlib was found. Please do a 'locate' or +*** 'find' to make sure you do not have old copies of libz.a or libz.so +*** in other parts of your system. In particular, X11 may contain one. +" 1>&2; exit 1; } +fi + + echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1744: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then +echo "configure:1900: checking for working const" >&5 +if eval "test \"\${ac_cv_c_const+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1815,111 +1971,129 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1819: checking for pid_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then +echo "configure:1975: checking for pid_t" >&5 +if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS +#include #include #include #endif +#if HAVE_SYS_BITYPES_H +#include +#endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_pid_t=yes + eval "ac_cv_type_pid_t=yes" else rm -rf conftest* - ac_cv_type_pid_t=no + eval "ac_cv_type_pid_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:1852: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then +echo "configure:2014: checking for size_t" >&5 +if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS +#include #include #include #endif +#if HAVE_SYS_BITYPES_H +#include +#endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_size_t=yes + eval "ac_cv_type_size_t=yes" else rm -rf conftest* - ac_cv_type_size_t=no + eval "ac_cv_type_size_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:1885: checking for ssize_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then +echo "configure:2053: checking for ssize_t" >&5 +if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS +#include #include #include #endif +#if HAVE_SYS_BITYPES_H +#include +#endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_ssize_t=yes + eval "ac_cv_type_ssize_t=yes" else rm -rf conftest* - ac_cv_type_ssize_t=no + eval "ac_cv_type_ssize_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 -if test $ac_cv_type_ssize_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:1918: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then +echo "configure:2092: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"\${ac_cv_header_time+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1928,7 +2102,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1964,19 +2138,19 @@ EOF fi echo $ac_n "checking for struct in_addr""... $ac_c" 1>&6 -echo "configure:1968: checking for struct in_addr" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_in_addr'+set}'`\" = set"; then +echo "configure:2142: checking for struct in_addr" >&5 +if eval "test \"\${ac_cv_struct_in_addr+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_in_addr=yes else @@ -2003,19 +2177,19 @@ if test $ac_cv_header_sys_socket_h = no; ac_cv_socklen_t = no; else echo $ac_n "checking for typedef socklen_t""... $ac_c" 1>&6 -echo "configure:2007: checking for typedef socklen_t" >&5 -if eval "test \"`echo '$''{'ac_cv_socklen_t'+set}'`\" = set"; then +echo "configure:2181: checking for typedef socklen_t" >&5 +if eval "test \"\${ac_cv_socklen_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { socklen_t sl; sl=0; ; return 0; } EOF -if { (eval echo configure:2019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_socklen_t=yes else @@ -2039,12 +2213,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2043: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then +echo "configure:2217: checking return type of signal handlers" >&5 +if eval "test \"\${ac_cv_type_signal+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2061,7 +2235,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2085,12 +2259,12 @@ LIBS="$LIBS $NETLIB" for ac_func in inet_addr inet_aton do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2089: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:2263: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2145,13 +2320,13 @@ ac_proto=NEED_`echo accept | sed 's/[^a- echo $ac_n "checking if accept is prototyped""... $ac_c" 1>&6 -echo "configure:2149: checking if accept is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2324: checking if accept is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2197,13 +2372,13 @@ ac_proto=NEED_`echo atoi | sed 's/[^a-zA echo $ac_n "checking if atoi is prototyped""... $ac_c" 1>&6 -echo "configure:2201: checking if atoi is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2376: checking if atoi is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2249,13 +2424,13 @@ ac_proto=NEED_`echo atol | sed 's/[^a-zA echo $ac_n "checking if atol is prototyped""... $ac_c" 1>&6 -echo "configure:2253: checking if atol is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2428: checking if atol is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2301,13 +2476,13 @@ ac_proto=NEED_`echo bind | sed 's/[^a-zA echo $ac_n "checking if bind is prototyped""... $ac_c" 1>&6 -echo "configure:2305: checking if bind is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2480: checking if bind is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2353,13 +2528,13 @@ ac_proto=NEED_`echo bzero | sed 's/[^a-z echo $ac_n "checking if bzero is prototyped""... $ac_c" 1>&6 -echo "configure:2357: checking if bzero is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2532: checking if bzero is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2405,13 +2580,13 @@ ac_proto=NEED_`echo chdir | sed 's/[^a-z echo $ac_n "checking if chdir is prototyped""... $ac_c" 1>&6 -echo "configure:2409: checking if chdir is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2584: checking if chdir is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2457,13 +2632,13 @@ ac_proto=NEED_`echo close | sed 's/[^a-z echo $ac_n "checking if close is prototyped""... $ac_c" 1>&6 -echo "configure:2461: checking if close is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2636: checking if close is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2509,13 +2684,13 @@ ac_proto=NEED_`echo crypt | sed 's/[^a-z echo $ac_n "checking if crypt is prototyped""... $ac_c" 1>&6 -echo "configure:2513: checking if crypt is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2688: checking if crypt is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2561,13 +2736,13 @@ ac_proto=NEED_`echo fclose | sed 's/[^a- echo $ac_n "checking if fclose is prototyped""... $ac_c" 1>&6 -echo "configure:2565: checking if fclose is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2740: checking if fclose is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2613,13 +2788,13 @@ ac_proto=NEED_`echo fcntl | sed 's/[^a-z echo $ac_n "checking if fcntl is prototyped""... $ac_c" 1>&6 -echo "configure:2617: checking if fcntl is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2792: checking if fcntl is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2665,13 +2840,13 @@ ac_proto=NEED_`echo fflush | sed 's/[^a- echo $ac_n "checking if fflush is prototyped""... $ac_c" 1>&6 -echo "configure:2669: checking if fflush is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2844: checking if fflush is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2717,13 +2892,13 @@ ac_proto=NEED_`echo fprintf | sed 's/[^a echo $ac_n "checking if fprintf is prototyped""... $ac_c" 1>&6 -echo "configure:2721: checking if fprintf is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2896: checking if fprintf is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2769,13 +2944,13 @@ ac_proto=NEED_`echo fputc | sed 's/[^a-z echo $ac_n "checking if fputc is prototyped""... $ac_c" 1>&6 -echo "configure:2773: checking if fputc is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2948: checking if fputc is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2821,13 +2996,13 @@ ac_proto=NEED_`echo fputs | sed 's/[^a-z echo $ac_n "checking if fputs is prototyped""... $ac_c" 1>&6 -echo "configure:2825: checking if fputs is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3000: checking if fputs is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2873,13 +3048,13 @@ ac_proto=NEED_`echo fread | sed 's/[^a-z echo $ac_n "checking if fread is prototyped""... $ac_c" 1>&6 -echo "configure:2877: checking if fread is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3052: checking if fread is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2925,13 +3100,13 @@ ac_proto=NEED_`echo fscanf | sed 's/[^a- echo $ac_n "checking if fscanf is prototyped""... $ac_c" 1>&6 -echo "configure:2929: checking if fscanf is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3104: checking if fscanf is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2977,13 +3152,13 @@ ac_proto=NEED_`echo fseek | sed 's/[^a-z echo $ac_n "checking if fseek is prototyped""... $ac_c" 1>&6 -echo "configure:2981: checking if fseek is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3156: checking if fseek is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3029,13 +3204,13 @@ ac_proto=NEED_`echo fwrite | sed 's/[^a- echo $ac_n "checking if fwrite is prototyped""... $ac_c" 1>&6 -echo "configure:3033: checking if fwrite is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3208: checking if fwrite is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3081,13 +3256,13 @@ ac_proto=NEED_`echo getpeername | sed 's echo $ac_n "checking if getpeername is prototyped""... $ac_c" 1>&6 -echo "configure:3085: checking if getpeername is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3260: checking if getpeername is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3133,13 +3308,13 @@ ac_proto=NEED_`echo getpid | sed 's/[^a- echo $ac_n "checking if getpid is prototyped""... $ac_c" 1>&6 -echo "configure:3137: checking if getpid is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3312: checking if getpid is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3185,13 +3360,13 @@ ac_proto=NEED_`echo getrlimit | sed 's/[ echo $ac_n "checking if getrlimit is prototyped""... $ac_c" 1>&6 -echo "configure:3189: checking if getrlimit is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3364: checking if getrlimit is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3237,13 +3412,13 @@ ac_proto=NEED_`echo getsockname | sed 's echo $ac_n "checking if getsockname is prototyped""... $ac_c" 1>&6 -echo "configure:3241: checking if getsockname is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3416: checking if getsockname is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3289,13 +3464,13 @@ ac_proto=NEED_`echo gettimeofday | sed ' echo $ac_n "checking if gettimeofday is prototyped""... $ac_c" 1>&6 -echo "configure:3293: checking if gettimeofday is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3468: checking if gettimeofday is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3341,13 +3516,13 @@ ac_proto=NEED_`echo htonl | sed 's/[^a-z echo $ac_n "checking if htonl is prototyped""... $ac_c" 1>&6 -echo "configure:3345: checking if htonl is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3520: checking if htonl is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3393,13 +3568,13 @@ ac_proto=NEED_`echo htons | sed 's/[^a-z echo $ac_n "checking if htons is prototyped""... $ac_c" 1>&6 -echo "configure:3397: checking if htons is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3572: checking if htons is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3445,13 +3620,13 @@ ac_proto=NEED_`echo inet_addr | sed 's/[ echo $ac_n "checking if inet_addr is prototyped""... $ac_c" 1>&6 -echo "configure:3449: checking if inet_addr is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3624: checking if inet_addr is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3497,13 +3672,13 @@ ac_proto=NEED_`echo inet_aton | sed 's/[ echo $ac_n "checking if inet_aton is prototyped""... $ac_c" 1>&6 -echo "configure:3501: checking if inet_aton is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3676: checking if inet_aton is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3549,13 +3724,13 @@ ac_proto=NEED_`echo inet_ntoa | sed 's/[ echo $ac_n "checking if inet_ntoa is prototyped""... $ac_c" 1>&6 -echo "configure:3553: checking if inet_ntoa is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3728: checking if inet_ntoa is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3601,13 +3776,13 @@ ac_proto=NEED_`echo listen | sed 's/[^a- echo $ac_n "checking if listen is prototyped""... $ac_c" 1>&6 -echo "configure:3605: checking if listen is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3780: checking if listen is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3653,13 +3828,13 @@ ac_proto=NEED_`echo ntohl | sed 's/[^a-z echo $ac_n "checking if ntohl is prototyped""... $ac_c" 1>&6 -echo "configure:3657: checking if ntohl is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3832: checking if ntohl is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3705,13 +3880,13 @@ ac_proto=NEED_`echo perror | sed 's/[^a- echo $ac_n "checking if perror is prototyped""... $ac_c" 1>&6 -echo "configure:3709: checking if perror is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3884: checking if perror is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3757,13 +3932,13 @@ ac_proto=NEED_`echo printf | sed 's/[^a- echo $ac_n "checking if printf is prototyped""... $ac_c" 1>&6 -echo "configure:3761: checking if printf is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3936: checking if printf is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3809,13 +3984,13 @@ ac_proto=NEED_`echo qsort | sed 's/[^a-z echo $ac_n "checking if qsort is prototyped""... $ac_c" 1>&6 -echo "configure:3813: checking if qsort is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3988: checking if qsort is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3861,13 +4036,13 @@ ac_proto=NEED_`echo read | sed 's/[^a-zA echo $ac_n "checking if read is prototyped""... $ac_c" 1>&6 -echo "configure:3865: checking if read is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4040: checking if read is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3913,13 +4088,13 @@ ac_proto=NEED_`echo remove | sed 's/[^a- echo $ac_n "checking if remove is prototyped""... $ac_c" 1>&6 -echo "configure:3917: checking if remove is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4092: checking if remove is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3965,13 +4140,13 @@ ac_proto=NEED_`echo rewind | sed 's/[^a- echo $ac_n "checking if rewind is prototyped""... $ac_c" 1>&6 -echo "configure:3969: checking if rewind is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4144: checking if rewind is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4017,13 +4192,13 @@ ac_proto=NEED_`echo select | sed 's/[^a- echo $ac_n "checking if select is prototyped""... $ac_c" 1>&6 -echo "configure:4021: checking if select is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4196: checking if select is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4069,13 +4244,13 @@ ac_proto=NEED_`echo setitimer | sed 's/[ echo $ac_n "checking if setitimer is prototyped""... $ac_c" 1>&6 -echo "configure:4073: checking if setitimer is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4248: checking if setitimer is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4121,13 +4296,13 @@ ac_proto=NEED_`echo setrlimit | sed 's/[ echo $ac_n "checking if setrlimit is prototyped""... $ac_c" 1>&6 -echo "configure:4125: checking if setrlimit is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4300: checking if setrlimit is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4173,13 +4348,13 @@ ac_proto=NEED_`echo setsockopt | sed 's/ echo $ac_n "checking if setsockopt is prototyped""... $ac_c" 1>&6 -echo "configure:4177: checking if setsockopt is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4352: checking if setsockopt is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4225,13 +4400,13 @@ ac_proto=NEED_`echo socket | sed 's/[^a- echo $ac_n "checking if socket is prototyped""... $ac_c" 1>&6 -echo "configure:4229: checking if socket is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4404: checking if socket is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4277,13 +4452,13 @@ ac_proto=NEED_`echo sprintf | sed 's/[^a echo $ac_n "checking if sprintf is prototyped""... $ac_c" 1>&6 -echo "configure:4281: checking if sprintf is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4456: checking if sprintf is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4329,13 +4504,13 @@ ac_proto=NEED_`echo sscanf | sed 's/[^a- echo $ac_n "checking if sscanf is prototyped""... $ac_c" 1>&6 -echo "configure:4333: checking if sscanf is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4508: checking if sscanf is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4381,13 +4556,13 @@ ac_proto=NEED_`echo strerror | sed 's/[^ echo $ac_n "checking if strerror is prototyped""... $ac_c" 1>&6 -echo "configure:4385: checking if strerror is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4560: checking if strerror is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4433,13 +4608,13 @@ ac_proto=NEED_`echo system | sed 's/[^a- echo $ac_n "checking if system is prototyped""... $ac_c" 1>&6 -echo "configure:4437: checking if system is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4612: checking if system is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4485,13 +4660,13 @@ ac_proto=NEED_`echo time | sed 's/[^a-zA echo $ac_n "checking if time is prototyped""... $ac_c" 1>&6 -echo "configure:4489: checking if time is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4664: checking if time is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4537,13 +4712,13 @@ ac_proto=NEED_`echo unlink | sed 's/[^a- echo $ac_n "checking if unlink is prototyped""... $ac_c" 1>&6 -echo "configure:4541: checking if unlink is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4716: checking if unlink is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4589,13 +4764,13 @@ ac_proto=NEED_`echo write | sed 's/[^a-z echo $ac_n "checking if write is prototyped""... $ac_c" 1>&6 -echo "configure:4593: checking if write is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4768: checking if write is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4726,7 +4901,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" + echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -4986,7 +5161,7 @@ exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 # echo "Configuration completed. To compile, type: cd src; make" diff -uprN circle30bpl16/src/act.informative.c circle30bpl16-zlib/src/act.informative.c --- circle30bpl16/src/act.informative.c Thu Jun 3 16:26:13 1999 +++ circle30bpl16-zlib/src/act.informative.c Sun Oct 10 20:54:13 1999 @@ -1574,6 +1574,8 @@ ACMD(do_toggle) "Auction Channel: %-3s " " Grats Channel: %-3s\r\n" + " Compression: %-3s " + " Auto-Compress: %-3s " " Color Level: %s\r\n", ONOFF(PRF_FLAGGED(ch, PRF_DISPHP)), @@ -1596,7 +1598,14 @@ ACMD(do_toggle) ONOFF(!PRF_FLAGGED(ch, PRF_NOAUCT)), ONOFF(!PRF_FLAGGED(ch, PRF_NOGRATZ)), - ctypes[COLOR_LEV(ch)]); +#if defined(HAVE_ZLIB) + ONOFF(ch->desc->deflate), + YESNO(PRF_FLAGGED(ch, PRF_AUTOZLIB)), +#else + "N/A", "N/A", +#endif + ctypes[COLOR_LEV(ch)] + ); send_to_char(buf, ch); } diff -uprN circle30bpl16/src/act.other.c circle30bpl16-zlib/src/act.other.c --- circle30bpl16/src/act.other.c Sun Jul 4 20:55:50 1999 +++ circle30bpl16-zlib/src/act.other.c Sun Oct 10 20:54:13 1999 @@ -893,7 +893,11 @@ ACMD(do_gen_tog) {"Autoexits disabled.\r\n", "Autoexits enabled.\r\n"}, {"Will no longer track through doors.\r\n", - "Will now track through doors.\r\n"} + "Will now track through doors.\r\n"}, + {"Compression disabled.\r\n", + "Compression enabled.\r\n"}, + {"Compression will not be enabled automatically.\r\n", + "Compression will be automatically enabled if your client supports it.\r\n"} }; @@ -952,6 +956,21 @@ ACMD(do_gen_tog) case SCMD_TRACK: result = (track_through_doors = !track_through_doors); break; + +#if defined(HAVE_ZLIB) + case SCMD_COMPRESS: + result = toggle_compression(ch->desc); + break; + case SCMD_AUTOZLIB: + result = PRF_TOG_CHK(ch, PRF_AUTOZLIB); + break; +#else + case SCMD_COMPRESS: + case SCMD_AUTOZLIB: + send_to_char("Compression not supported.\r\n", ch); + return; +#endif + default: log("SYSERR: Unknown subcmd %d in do_gen_toggle.", subcmd); return; diff -uprN circle30bpl16/src/comm.c circle30bpl16-zlib/src/comm.c --- circle30bpl16/src/comm.c Sun Aug 1 17:30:33 1999 +++ circle30bpl16-zlib/src/comm.c Sun Oct 10 21:00:34 1999 @@ -8,6 +8,21 @@ * CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. * ************************************************************************ */ +/* + * Compression support. Currently could be used with: + * + * MUD Client for Linux, by Erwin S. Andreasen + * http://www.andreasen.org/mcl/ + * + * mcclient, by Oliver 'Nemon@AR' Jowett + * http://homepages.ihug.co.nz/~icecube/compress/ + * + * Contact them for help with the clients. Contact greerga@circlemud.org + * for problems with the server end of the connection. If you think you + * have found a bug, please test another MUD for the same problem to see + * if it is a client or server problem. + */ + #define __COMM_C__ #include "conf.h" @@ -142,6 +157,10 @@ int open_logfile(const char *filename, F #if defined(POSIX) sigfunc *my_signal(int signo, sigfunc * func); #endif +#if defined(HAVE_ZLIB) +void *zlib_alloc(void *opaque, unsigned int items, unsigned int size); +void zlib_free(void *opaque, void *address); +#endif /* extern fcnts */ void reboot_wizlists(void); @@ -164,6 +183,28 @@ void weather_and_time(int mode); #define FD_CLR(x, y) #endif +#if defined(HAVE_ZLIB) +/* + * MUD Client for Linux and mcclient compression support. + * "The COMPRESS option (unofficial and completely arbitary) is + * option 85." -- mcclient documentation as of Dec '98. + * + * [ Compression protocol documentation below, from Compress.c ] + * + * Server sends IAC WILL COMPRESS + * We reply with IAC DO COMPRESS + * + * Later the server sends IAC SB COMPRESS WILL SE, and immediately following + * that, begins compressing + * + * Compression ends on a Z_STREAM_END, no other marker is used + */ +#define TELOPT_COMPRESS 85 +static char will_sig[] = { IAC, WILL, TELOPT_COMPRESS, 0 }; +static char do_sig[] = { IAC, DO, TELOPT_COMPRESS, 0 }; +static char on_sig[] = { IAC, SB, TELOPT_COMPRESS, WILL, SE, 0 }; +#endif + /*********************************************************************** * main game loop and related stuff * @@ -735,7 +776,7 @@ void game_loop(int mother_desc) /* Print prompts for other descriptors who had no other output */ for (d = descriptor_list; d; d = d->next) { if (!d->has_prompt) { - write_to_descriptor(d->descriptor, make_prompt(d)); + SEND_TO_Q(make_prompt(d), d); d->has_prompt = 1; } } @@ -1215,7 +1256,7 @@ int new_descriptor(int s) sockets_connected++; if (sockets_connected >= max_players) { - write_to_descriptor(desc, "Sorry, CircleMUD is full right now... please try again later!\r\n"); + SEND_TO_SOCKET("Sorry, CircleMUD is full right now... please try again later!\r\n", desc); CLOSE_SOCKET(desc); return (0); } @@ -1285,19 +1326,74 @@ int new_descriptor(int s) SEND_TO_Q(GREETINGS, newd); +#if defined(HAVE_ZLIB) + write_to_descriptor(newd->descriptor, will_sig, strlen(will_sig)); +#endif + return (0); } +int toggle_compression(struct descriptor_data *t) +{ +#if defined(HAVE_ZLIB) + int derr, turn_on = (t->deflate == NULL); + + if (turn_on && !DESC_FLAGGED(t, DESC_CANZLIB)) + return 0; + + if (turn_on) { + /* Notify client. */ + write_to_descriptor(t->descriptor, on_sig, strlen(on_sig)); + + /* Set up zlib structures. */ + CREATE(t->deflate, z_stream, 1); + t->deflate->zalloc = zlib_alloc; + t->deflate->zfree = zlib_free; + t->deflate->opaque = NULL; + t->deflate->next_in = t->small_outbuf; + t->deflate->next_out = t->small_outbuf; + t->deflate->avail_out = SMALL_BUFSIZE; + t->deflate->avail_in = 0; + + /* Initialize. */ + if ((derr = deflateInit(t->deflate, Z_DEFAULT_COMPRESSION)) != 0) + log("SYSERR: deflateEnd returned %d.", derr); + + return 1; + } + + if (!turn_on) { /* off */ + int pending = t->deflate->avail_out; + + t->deflate->next_out = t->small_outbuf; + + if ((derr = deflate(t->deflate, Z_FINISH)) != Z_STREAM_END) + log("SYSERR: deflate returned %d upon Z_FINISH. (in: %d, out: %d)", derr, t->deflate->avail_in, t->deflate->avail_out); + + pending -= t->deflate->avail_out; + if (pending) + write_to_descriptor(t->descriptor, t->small_outbuf, 6); + + if ((derr = deflateEnd(t->deflate)) != Z_OK) + log("SYSERR: deflateEnd returned %d. (in: %d, out: %d)", derr, t->deflate->avail_in, t->deflate->avail_out); + + free(t->deflate); + t->deflate = NULL; + + return 0; + } +#endif + return 0; +} /* * Send all of the output that we've accumulated for a player out to * the player's descriptor. - * FIXME - This will be rewritten before 3.1, this code is dumb. */ int process_output(struct descriptor_data *t) { char i[MAX_SOCK_BUF]; - int result; + int written = 0, offset, result; /* we may need this \r\n for later -- see below */ strcpy(i, "\r\n"); @@ -1321,9 +1417,50 @@ int process_output(struct descriptor_dat * CRLF, otherwise send the straight output sans CRLF. */ if (t->has_prompt) /* && !t->connected) */ - result = write_to_descriptor(t->descriptor, i); - else - result = write_to_descriptor(t->descriptor, i + 2); + offset = 0; + else + offset = 2; + + /* + * This huge #ifdef could be a function of its own, if desired. -gg 2/27/99 + */ +#if defined(HAVE_ZLIB) + if (t->deflate) { /* Complex case, compression, write it out. */ + /* Keep compiler happy, and MUD, just in case we don't write anything. */ + result = 1; + + /* First we set up our input data. */ + t->deflate->avail_in = strlen(i + offset); + t->deflate->next_in = i + offset; + + do { + int df, prevsize = SMALL_BUFSIZE - t->deflate->avail_out; + + /* If there is input or the output has reset from being previously full, run compression again. */ + if (t->deflate->avail_in || t->deflate->avail_out == SMALL_BUFSIZE) + if ((df = deflate(t->deflate, Z_SYNC_FLUSH)) != 0) + log("SYSERR: process_output: deflate() returned %d.", df); + + /* There should always be something new to write out. */ + result = write_to_descriptor(t->descriptor, t->small_outbuf + prevsize, SMALL_BUFSIZE - t->deflate->avail_out - prevsize); + + /* Wrap the buffer when we've run out of buffer space for the output. */ + if (t->deflate->avail_out == 0) { + t->deflate->avail_out = SMALL_BUFSIZE; + t->deflate->next_out = t->small_outbuf; + } + + /* Oops. This shouldn't happen, I hope. -gg 2/19/99 */ + if (result <= 0) + return -1; + + /* Need to loop while we still have input or when the output buffer was previously full. */ + } while (t->deflate->avail_out == SMALL_BUFSIZE || t->deflate->avail_in); + } else +#endif + result = write_to_descriptor(t->descriptor, i + offset, strlen(i + offset)); + + written = result >= 0 ? result : -result; /* handle snooping: prepend "% " and send to snooper */ if (t->snoop_by) { @@ -1331,6 +1468,7 @@ int process_output(struct descriptor_dat SEND_TO_Q(t->output, t->snoop_by); SEND_TO_Q("%%", t->snoop_by); } + /* * if we were using a large buffer, put the large buffer on the buffer pool * and switch back to the small one @@ -1341,12 +1479,27 @@ int process_output(struct descriptor_dat t->large_outbuf = NULL; t->output = t->small_outbuf; } + /* reset total bufspace back to that of a small buffer */ t->bufspace = SMALL_BUFSIZE - 1; t->bufptr = 0; *(t->output) = '\0'; - return (result); + /* Error, cut off. */ + if (result == 0) + return (-1); + + /* Normal case, wrote ok. */ + if (result > 0) + return (1); + + /* + * We blocked, restore the unwritten output. Known + * bug in that the snooping immortal will see it twice + * but details... + */ + write_to_output(i + written + offset, t); + return (0); } @@ -1452,41 +1605,47 @@ ssize_t perform_socket_write(socket_t de * write_to_descriptor takes a descriptor, and text to write to the * descriptor. It keeps calling the system-level write() until all * the text has been delivered to the OS, or until an error is - * encountered. + * encountered. 'written' is updated to add how many bytes were sent + * over the socket successfully prior to the return. It is not zero'd. * * Returns: - * 0 If all is well and good, - * -1 If an error was encountered, so that the player should be cut off + * + All is well and good. + * 0 A fatal or unexpected error was encountered. + * - The socket write would block. */ -int write_to_descriptor(socket_t desc, const char *txt) +int write_to_descriptor(socket_t desc, const char *txt, size_t total) { - size_t total; - ssize_t bytes_written; + ssize_t bytes_written, total_written = 0; - total = strlen(txt); + if (total == 0) { + log("write_to_descriptor: write nothing?!"); + return 0; + } while (total > 0) { bytes_written = perform_socket_write(desc, txt, total); if (bytes_written < 0) { /* Fatal error. Disconnect the player. */ - perror("SYSERR: Write to socket"); - return (-1); + perror("SYSERR: write_to_descriptor"); + return (0); } else if (bytes_written == 0) { /* * Temporary failure -- socket buffer full. For now we'll just * cut off the player, but eventually we'll stuff the unsent * text into a buffer and retry the write later. JE 30 June 98. + * Implemented the anti-cut-off code he wanted. GG 13 Jan 99. */ - log("WARNING: write_to_descriptor: socket write would block, about to close"); - return (-1); + log("WARNING: write_to_descriptor: socket write would block."); + return (-total_written); } else { txt += bytes_written; total -= bytes_written; + total_written += bytes_written; } } - return (0); + return (total_written); } @@ -1564,7 +1723,7 @@ int process_input(struct descriptor_data int buf_length, failed_subst; ssize_t bytes_read; size_t space_left; - char *ptr, *read_point, *write_point, *nl_pos = NULL; + char *ptr, *read_point, *write_point, *nl_pos; char tmp[MAX_INPUT_LENGTH + 8]; /* first, find the point where we left off reading data */ @@ -1587,12 +1746,35 @@ int process_input(struct descriptor_data /* at this point, we know we got some data from the read */ - *(read_point + bytes_read) = '\0'; /* terminate the string */ + read_point[bytes_read] = '\0'; /* terminate the string */ /* search for a newline in the data we just read */ - for (ptr = read_point; *ptr && !nl_pos; ptr++) - if (ISNEWL(*ptr)) - nl_pos = ptr; + for (ptr = read_point, nl_pos = NULL; *ptr && !nl_pos; ptr++) { + /* + * Search for an "Interpret As Command" marker. Note that we still + * have an ostrich attitude to all other IAC markers. At least now + * they won't show up in the users' input streams. -gg 2/28/99 + */ + if (*(unsigned char *)ptr == IAC) { +#if defined(HAVE_ZLIB) + if (!strcmp(ptr, do_sig)) + SET_BIT(DESC_FLAGS(t), DESC_CANZLIB); +#endif + + /* + * Convert the IAC string so that it is filtered out. This + * should, in theory, leave the 'U' from the compression + * handshake but in my testing it didn't show up... -gg 3/21/99 + */ + while (*ptr < 0) + *ptr++ = '\0'; + + /* If this was everything, pretend we had nothing. */ + if (ISNEWL(*ptr)) + *ptr++ = '\0'; + } else if (ISNEWL(*ptr)) + nl_pos = ptr; + } read_point += bytes_read; space_left -= bytes_read; @@ -1651,8 +1833,7 @@ int process_input(struct descriptor_data char buffer[MAX_INPUT_LENGTH + 64]; sprintf(buffer, "Line too long. Truncated to:\r\n%s\r\n", tmp); - if (write_to_descriptor(t->descriptor, buffer) < 0) - return (-1); + SEND_TO_Q(buffer, t); } if (t->snoop_by) { SEND_TO_Q("% ", t->snoop_by); @@ -1831,6 +2012,13 @@ void close_socket(struct descriptor_data if (d->showstr_count) free(d->showstr_vector); +#if defined(HAVE_ZLIB) + if (d->deflate) { + deflateEnd(d->deflate); + free(d->deflate); + } +#endif + free(d); } @@ -2379,3 +2567,20 @@ void circle_sleep(struct timeval *timeou } #endif /* CIRCLE_WINDOWS */ + +#if defined(HAVE_ZLIB) + +/* Compression stuff. */ + +void *zlib_alloc(void *opaque, unsigned int items, unsigned int size) +{ + return calloc(items, size); +} + +void zlib_free(void *opaque, void *address) +{ + free(address); +} + +#endif + diff -uprN circle30bpl16/src/comm.h circle30bpl16-zlib/src/comm.h --- circle30bpl16/src/comm.h Mon Jan 25 09:47:55 1999 +++ circle30bpl16-zlib/src/comm.h Sun Oct 10 20:54:13 1999 @@ -31,14 +31,17 @@ void act(const char *str, int hide_invis #define TO_SLEEP 128 /* to char, even if sleeping */ /* I/O functions */ -int write_to_descriptor(socket_t desc, const char *txt); +int write_to_descriptor(socket_t desc, const char *txt, size_t total); void write_to_q(const char *txt, struct txt_q *queue, int aliased); void write_to_output(const char *txt, struct descriptor_data *d); void page_string(struct descriptor_data *d, char *str, int keep_internal); void string_add(struct descriptor_data *d, char *str); void string_write(struct descriptor_data *d, char **txt, size_t len, long mailto, void *data); -#define SEND_TO_Q(messg, desc) write_to_output((messg), desc) +int toggle_compression(struct descriptor_data *d); + +#define SEND_TO_Q(messg, desc) write_to_output((messg), desc) +#define SEND_TO_SOCKET(messg, desc) write_to_descriptor((desc), (messg), strlen(messg)) #define USING_SMALL(d) ((d)->output == (d)->small_outbuf) #define USING_LARGE(d) ((d)->output == (d)->large_outbuf) diff -uprN circle30bpl16/src/conf.h.in circle30bpl16-zlib/src/conf.h.in --- circle30bpl16/src/conf.h.in Sun Aug 1 17:25:37 1999 +++ circle30bpl16-zlib/src/conf.h.in Sun Oct 10 20:54:13 1999 @@ -36,6 +36,9 @@ /* Define to `int' if doesn't define. */ #undef socklen_t +/* Define if your system has compression support in zlib. */ +#undef HAVE_ZLIB + /* Define to `int' if doesn't define. */ #undef ssize_t diff -uprN circle30bpl16/src/constants.c circle30bpl16-zlib/src/constants.c --- circle30bpl16/src/constants.c Wed Mar 17 09:38:17 1999 +++ circle30bpl16-zlib/src/constants.c Sun Oct 10 20:54:13 1999 @@ -182,6 +182,7 @@ const char *preference_bits[] = { "!GOS", "!GTZ", "RMFLG", + "ZLIB", "\n" }; diff -uprN circle30bpl16/src/interpreter.c circle30bpl16-zlib/src/interpreter.c --- circle30bpl16/src/interpreter.c Tue Jul 20 12:19:46 1999 +++ circle30bpl16-zlib/src/interpreter.c Sun Oct 10 20:54:13 1999 @@ -226,6 +226,7 @@ cpp_extern const struct command_info cmd { "assist" , POS_FIGHTING, do_assist , 1, 0 }, { "ask" , POS_RESTING , do_spec_comm, 0, SCMD_ASK }, { "auction" , POS_SLEEPING, do_gen_comm , 0, SCMD_AUCTION }, + { "autocompress", POS_DEAD , do_gen_tog , 0, SCMD_AUTOZLIB }, { "autoexit" , POS_DEAD , do_gen_tog , 0, SCMD_AUTOEXIT }, { "bounce" , POS_STANDING, do_action , 0, 0 }, @@ -255,6 +256,7 @@ cpp_extern const struct command_info cmd { "color" , POS_DEAD , do_color , 0, 0 }, { "comfort" , POS_RESTING , do_action , 0, 0 }, { "comb" , POS_RESTING , do_action , 0, 0 }, + { "compress" , POS_DEAD , do_gen_tog , 0, SCMD_COMPRESS }, { "commands" , POS_DEAD , do_commands , 0, SCMD_COMMANDS }, { "compact" , POS_DEAD , do_gen_tog , 0, SCMD_COMPACT }, { "cough" , POS_RESTING , do_action , 0, 0 }, @@ -1450,6 +1452,9 @@ void nanny(struct descriptor_data *d, ch /* check and make sure no other copies of this player are logged in */ if (perform_dupe_check(d)) return; + + if (PRF_FLAGGED(d->character, PRF_AUTOZLIB)) + toggle_compression(d); if (GET_LEVEL(d->character) >= LVL_IMMORT) SEND_TO_Q(imotd, d); diff -uprN circle30bpl16/src/interpreter.h circle30bpl16-zlib/src/interpreter.h --- circle30bpl16/src/interpreter.h Sun May 9 21:56:41 1999 +++ circle30bpl16-zlib/src/interpreter.h Sun Oct 10 20:54:13 1999 @@ -119,6 +119,8 @@ struct alias_data { #define SCMD_SLOWNS 14 #define SCMD_AUTOEXIT 15 #define SCMD_TRACK 16 +#define SCMD_COMPRESS 17 +#define SCMD_AUTOZLIB 18 /* do_wizutil */ #define SCMD_REROLL 0 diff -uprN circle30bpl16/src/structs.h circle30bpl16-zlib/src/structs.h --- circle30bpl16/src/structs.h Fri Apr 30 23:06:19 1999 +++ circle30bpl16-zlib/src/structs.h Sun Oct 10 20:54:13 1999 @@ -170,6 +170,10 @@ #define MOB_NOBLIND (1 << 17) /* Mob can't be blinded */ +/* Descriptor flags */ +#define DESC_CANZLIB (1 << 0) /* Client says compression capable. */ + + /* Preference flags: used by char_data.player_specials.pref */ #define PRF_BRIEF (1 << 0) /* Room descs won't normally be shown */ #define PRF_COMPACT (1 << 1) /* No extra CRLF pair before prompts */ @@ -193,6 +197,7 @@ #define PRF_NOGOSS (1 << 19) /* Can't hear gossip channel */ #define PRF_NOGRATZ (1 << 20) /* Can't hear grats channel */ #define PRF_ROOMFLAGS (1 << 21) /* Can see room flags (ROOM_x) */ +#define PRF_AUTOZLIB (1 << 22) /* Automatically do compression. */ /* Affect bits: used in char_data.char_specials.saved.affected_by */ @@ -969,6 +974,10 @@ struct descriptor_data { struct descriptor_data *snooping; /* Who is this char snooping */ struct descriptor_data *snoop_by; /* And who is snooping this char */ struct descriptor_data *next; /* link to next descriptor */ + int options; /* descriptor flags */ +#if defined(HAVE_ZLIB) + z_stream *deflate; /* compression engine */ +#endif }; diff -uprN circle30bpl16/src/sysdep.h circle30bpl16-zlib/src/sysdep.h --- circle30bpl16/src/sysdep.h Tue Aug 10 11:16:56 1999 +++ circle30bpl16-zlib/src/sysdep.h Sun Oct 10 20:54:13 1999 @@ -195,6 +195,9 @@ extern void abort (), exit (); #define assert(arg) #endif +#ifdef HAVE_ZLIB +# include +#endif /* Header files only used in comm.c and some of the utils */ diff -uprN circle30bpl16/src/utils.h circle30bpl16-zlib/src/utils.h --- circle30bpl16/src/utils.h Sat Mar 13 16:59:47 1999 +++ circle30bpl16-zlib/src/utils.h Sun Oct 10 20:54:13 1999 @@ -189,6 +189,7 @@ void update_pos(struct char_data *victim #define PRF_FLAGS(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.pref)) #define AFF_FLAGS(ch) ((ch)->char_specials.saved.affected_by) #define ROOM_FLAGS(loc) (world[(loc)].room_flags) +#define DESC_FLAGS(d) ((d)->options) #define SPELL_ROUTINES(spl) (spell_info[spl].routines) /* See http://www.circlemud.org/~greerga/todo.009 to eliminate MOB_ISNPC. */ @@ -204,6 +205,7 @@ void update_pos(struct char_data *victim #define OBJVAL_FLAGGED(obj, flag) (IS_SET(GET_OBJ_VAL((obj), 1), (flag))) #define OBJWEAR_FLAGGED(obj, flag) (IS_SET((obj)->obj_flags.wear_flags, (flag))) #define OBJ_FLAGGED(obj, flag) (IS_SET(GET_OBJ_EXTRA(obj), (flag))) +#define DESC_FLAGGED(d, flag) (IS_SET(DESC_FLAGS(d), (flag))) #define HAS_SPELL_ROUTINE(spl, flag) (IS_SET(SPELL_ROUTINES(spl), (flag))) /* IS_AFFECTED for backwards compatibility */