PennMUSH Community

Changeset 451

Show
Ignore:
Timestamp:
08/16/06 00:40:14 (2 years ago)
Author:
pennmush
Message:

PennMUSH 1.7.7p26 Archival

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.7.7/CHANGES.177

    r449 r451  
    1818 
    1919========================================================================== 
     20 
     21Version 1.7.7 patchlevel 26                     December 15, 2003 
     22 
     23Commands: 
     24  * Add /regexp switch to @switch and @select. Suggested by BladedThoth. [SW] 
     25  * New /spoof switch to @pemit, @remit, @lemit, @oemit, @emit, 
     26    causes the message to appear to be generated by the cause, rather 
     27    than the enactor, which makes globals like $ooc show the right 
     28    NOSPOOF information (instead of the name of the global command object). 
     29    Patch by Philip Mak. 
     30Functions: 
     31  * hostname(), ipaddr(), and cmds() take a dbref or descriptor number 
     32    of a connected player and return the hostname, ipaddr, and number 
     33    of commands executed. Suggested by Sholevi@M*U*S*H and Renee@ShoreSide, 
     34    code by Sholevi@M*U*S*H. 
     35  * Add reswitch*() functions. Suggested by BladedThoth. [SW] 
     36  * insert() can take a negative position argument to insert from 
     37    the right. Patch by Sholevi@M*U*S*H. 
     38  * New firstof() and allof() functions return the first true value 
     39    or all true values from a set of expressions. Patch by Sholevi@M*U*S*H. 
     40  * tr() works like the Unix utility, translating characters. Patch 
     41    by Walker@M*U*S*H. 
     42Attributes: 
     43  * Attributes may be set DEBUG to cause their evaluation to be 
     44    debugged selectively. Patch by Pozzo@SWForum. 
     45  * @desc can no longer be gotten remotely without privileges. 
     46    To implement this, a new attribute flag NEARBY was added, 
     47    which prevents visual attributes from being remotely accessed. 
     48    See new configuration directive 'read_remote_desc' if you prefer 
     49    the old behavior. Patch by Philip Mak. 
     50  * @desc on privileged objects can now be evaluated by mortals. 
     51    To implement this, a new attribute flag PUBLIC was added, 
     52    which overrides safer_ufun for that attribute. This flag is dangerous 
     53    and should be avoided unless you are sure you know what you're doing. 
     54    Patch by Philip Mak. 
     55Minor Changes: 
     56  * "+<channel> <text>" complains if <channel> is ambiguous, and 
     57    displays a list of matching channels. Patch by Luke@M*U*S*H. 
     58  * Code cleanup around @oemit by Philip Mak. 
     59  * If an object has an IDESCFORMAT but no IDESCRIBE, interior viewers 
     60    now see the DESCRIBE formatted by IDESCFORMAT (instead of 
     61    the DESCRIBE formatted by DESCFORMAT). Suggested by Philip Mak. 
     62  * Ported to Win32 with the Mingw development environment.  
     63    See win32/README.mingw for compile instructions. [EEH] 
     64  * null() can now take any number of arguments. Patch by Walker@M*U*S*H. 
     65  * Using @chan/quiet to control the quiet flag on a channel no longer works 
     66    (Actually, it never did). Use @chan/priv instead. [SW] 
     67  * The NO_WARN flag now prevents disconnected room warnings, too. 
     68    Suggested by several people. Patch by Philip Mak. 
     69  * @sitelock/name !name still unlocks a reserved name, but no longer  
     70    removes that name from names.cnf. Suggested by Nymeria. [SW] 
     71  * Some cleanup of fopen() calls. [SW] 
     72  * The reference to channel Creator is now Owner in @chan/decomp. 
     73    Suggested by Howie@NFTrekMUSH. [SW] 
     74  * The name of the channel being tested is passed as %0 in channel locks. 
     75    Suggested by Philip Mak. [SW] 
     76  * help for @chownall mentions the /preserve switch.  Warnings from @chown  
     77    and @chownall tell which objects they're for. Suggested by 
     78    Mordie@M*U*S*H. [SW] 
     79  * Home wrecking is allowed again. Suggested by Philip Mak. 
     80Fixes: 
     81  * Puppets in containers with @listen container=* now hear the 
     82    outside world correctly. Patch by Philip Mak. 
     83  * The email sent on player registration now double-quotes the 
     84    player name in the example connect statement. Suggested by 
     85    David Kali. 
     86  * Two rooms should never be nearby() each other. Fix by Philip Mak. 
     87  * can_look_at() now handles the look/out case, too. Fix by Philip Mak. 
     88  * Help fixes by Viila@M*U*S*H, MetBoy@M*U*S*H, Cheetah@M*U*S*H. 
     89  * @flag/alias or @flag/add without giving an alias no longer crashes  
     90    the MUSH.  Report by Wildfire. 
     91  * Correctly retrieve user full name from /etc/passwd fields under 
     92    Linux in Configure. Record it in config.sh. Reported by Vadiv@M*U*S*H. 
     93  * Debian package changes. [EEH] 
     94  * As the help promises, XCH_CMD and SEND attributes don't work 
     95    for non-Wizards. Really. 
     96 
    2097 
    2198Version 1.7.7 patchlevel 25                     October 30, 2003 
  • 1.7.7/Configure

    r443 r451  
    6262    : Check for cygwin32 emulation 
    6363    case "x$OSTYPE$OS" in 
     64    x*msys*Windows*) 
     65        echo 'Running on Windows? Using the MinGW MSys tools...' 
     66        ;; 
    6467    x*win32*) 
    6568        echo 'Running on Windows?  Assuming cygwin32 emulation tools...' 
     
    8992paths="$paths /sbin /usr/sbin /usr/libexec /gnuwin32/b18/H-i386-cygwin32/bin" 
    9093 
    91 for p in $paths 
    92 do 
    93     case "$p_$PATH$p_" in 
    94     *$p_$p$p_*) ;; 
    95     *) test -d $p && PATH=$PATH$p_$p ;; 
    96     esac 
    97 done 
    98  
    99 PATH=.$p_$PATH 
    100 export PATH 
     94case "x$OSTYPE$OS" in 
     95    x*msys*Windows*) 
     96        PATH='/usr/local/bin:/mingw/bin:/bin:/perl/bin' 
     97        ;; 
     98    x*) 
     99        for p in $paths 
     100        do 
     101            case "$p_$PATH$p_" in 
     102                *$p_$p$p_*) ;; 
     103                *) test -d $p && PATH=$PATH$p_$p ;; 
     104            esac             
     105        done 
     106 
     107        PATH=.$p_$PATH 
     108        export PATH 
     109        ;; 
     110esac 
    101111 
    102112: shall we be using ksh? 
     
    252262cdecl='' 
    253263cf_email='' 
     264cf_name='' 
    254265cf_by='' 
    255266cf_time='' 
     
    58785889esac 
    58795890 
    5880 : define an is-a-typedef? function 
    5881 typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@; 
    5882 case "$inclist" in 
    5883 "") inclist="sys/types.h";; 
    5884 esac; 
    5885 eval "varval=\$$var"; 
    5886 case "$varval" in 
    5887 "") 
    5888     $rm -f temp.c; 
    5889     for inc in $inclist; do 
    5890         echo "#include <$inc>" >>temp.c; 
    5891     done; 
    5892     $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null; 
    5893     if $contains $type temp.E >/dev/null 2>&1; then 
    5894         eval "$var=\$type"; 
    5895     else 
    5896         eval "$var=\$def"; 
    5897     fi; 
    5898     $rm -f temp.?;; 
    5899 *) eval "$var=\$varval";; 
    5900 esac' 
    5901  
    5902 : see what type pids are declared as in the kernel 
    5903 set pid_t pidtype int stdio.h sys/types.h 
    5904 eval $typedef 
    5905 dflt="$pidtype" 
    5906 echo " " 
    5907 rp="What type are process ids on this system declared as?" 
    5908 . ./myread 
    5909 pidtype="$ans" 
    5910  
    5911 : see what type is used for size_t 
    5912 set size_t sizetype 'unsigned int' stdio.h sys/types.h 
    5913 eval $typedef 
    5914 dflt="$sizetype" 
    5915 echo " " 
    5916 rp="What type is used for the length parameter for string functions?" 
    5917 . ./myread 
    5918 sizetype="$ans" 
    5919  
    5920 : see if arpa/inet.h has to be included 
    5921 set arpa/inet.h i_arpainet 
    5922 eval $inhdr 
    5923  
    5924 : see if arpa/nameser.h has to be included 
    5925 set arpa/nameser.h i_arpanameser 
    5926 eval $inhdr 
    5927  
    5928 : see if errno.h can be included 
    5929 set errno.h i_errno 
    5930 eval $inhdr 
    5931 : see if sys/errno.h can be included 
    5932 set sys/errno.h i_syserrno 
    5933 eval $inhdr 
    5934 : see if this is a sys/file.h system 
    5935 val='' 
    5936 set sys/file.h val 
    5937 eval $inhdr 
    5938  
    5939 : do we need to include sys/file.h ? 
    5940 case "$val" in 
    5941 "$define") 
    5942     echo " " 
    5943     if $h_sysfile; then 
    5944         val="$define" 
    5945         echo "We'll be including <sys/file.h>." >&4 
    5946     else 
    5947         val="$undef" 
    5948         echo "We won't be including <sys/file.h>." >&4 
    5949     fi 
    5950     ;; 
    5951 *) 
    5952     h_sysfile=false 
    5953     ;; 
    5954 esac 
    5955 set i_sysfile 
    5956 eval $setvar 
    5957  
    5958 : see if fcntl.h is there 
    5959 val='' 
    5960 set fcntl.h val 
    5961 eval $inhdr 
    5962  
    5963 : see if we can include fcntl.h 
    5964 case "$val" in 
    5965 "$define") 
    5966     echo " " 
    5967     if $h_fcntl; then 
    5968         val="$define" 
    5969         echo "We'll be including <fcntl.h>." >&4 
    5970     else 
    5971         val="$undef" 
    5972         if $h_sysfile; then 
    5973     echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4 
    5974         else 
    5975             echo "We won't be including <fcntl.h>." >&4 
    5976         fi 
    5977     fi 
    5978     ;; 
    5979 *) 
    5980     h_fcntl=false 
    5981     val="$undef" 
    5982     ;; 
    5983 esac 
    5984 set i_fcntl 
    5985 eval $setvar 
    5986  
    5987 : see if locale.h is available 
    5988 set locale.h i_locale 
    5989 eval $inhdr 
    5990  
    5991 : see if memory.h is available. 
    5992 val='' 
    5993 set memory.h val 
    5994 eval $inhdr 
    5995  
    5996 : See if it conflicts with string.h 
    5997 case "$val" in 
    5998 $define) 
    5999     case "$strings" in 
    6000     '') ;; 
    6001     *) 
    6002         $cppstdin $cppflags $cppminus < "$strings" > mem.h 
    6003         if $contains 'memcpy' mem.h >/dev/null 2>&1; then 
    6004             echo " " 
    6005             echo "We won't be including <memory.h>." 
    6006             val="$undef" 
    6007         fi 
    6008         $rm -f mem.h 
    6009         ;; 
    6010     esac 
    6011 esac 
    6012 set i_memory 
    6013 eval $setvar 
    6014  
    6015 : see if netdb.h can be included 
    6016 set netdb.h i_netdb 
    6017 eval $inhdr 
    6018 : see if setjmp.h can be included 
    6019 set setjmp.h i_setjmp 
    6020 eval $inhdr 
    6021 : see if stdarg is available 
    6022 echo " " 
    6023 if $test "`./findhdr stdarg.h`"; then 
    6024     echo "<stdarg.h> found." >&4 
    6025     valstd="$define" 
    6026 else 
    6027     echo "<stdarg.h> NOT found." >&4 
    6028     valstd="$undef" 
    6029 fi 
    6030  
    6031 : see if varags is available 
    6032 echo " " 
    6033 if $test "`./findhdr varargs.h`"; then 
    6034     echo "<varargs.h> found." >&4 
    6035 else 
    6036     echo "<varargs.h> NOT found, but that's ok (I hope)." >&4 
    6037 fi 
    6038  
    6039 : set up the varargs testing programs 
    6040 $cat > varargs.c <<EOP 
    6041 #ifdef I_STDARG 
    6042 #include <stdarg.h> 
    6043 #endif 
    6044 #ifdef I_VARARGS 
    6045 #include <varargs.h> 
    6046 #endif 
    6047  
    6048 #ifdef I_STDARG 
    6049 int f(char *p, ...) 
    6050 #else 
    6051 int f(va_alist) 
    6052 va_dcl 
    6053 #endif 
    6054 { 
    6055     va_list ap; 
    6056 #ifndef I_STDARG 
    6057     char *p; 
    6058 #endif 
    6059 #ifdef I_STDARG 
    6060     va_start(ap,p); 
    6061 #else 
    6062     va_start(ap); 
    6063     p = va_arg(ap, char *); 
    6064 #endif 
    6065     va_end(ap); 
    6066 } 
    6067 EOP 
    6068 $cat > varargs <<EOP 
    6069 $startsh 
    6070 if $cc -c $ccflags $ldflags -D\$1 varargs.c >/dev/null 2>&1; then 
    6071     echo "true" 
    6072 else 
    6073     echo "false" 
    6074 fi 
    6075 $rm -f varargs$_o 
    6076 EOP 
    6077 chmod +x varargs 
    6078  
    6079 : now check which varargs header should be included 
    6080 echo " " 
    6081 i_varhdr='' 
    6082 case "$valstd" in 
    6083 "$define") 
    6084     if `./varargs I_STDARG`; then 
    6085         val='stdarg.h' 
    6086     elif `./varargs I_VARARGS`; then 
    6087         val='varargs.h' 
    6088     fi 
    6089     ;; 
    6090 *) 
    6091     if `./varargs I_VARARGS`; then 
    6092         val='varargs.h' 
    6093     fi 
    6094     ;; 
    6095 esac 
    6096 case "$val" in 
    6097 '') 
    6098 echo "I could not find the definition for va_dcl... You have problems..." >&4 
    6099     val="$undef"; set i_stdarg; eval $setvar 
    6100     val="$undef"; set i_varargs; eval $setvar 
    6101     ;; 
    6102 *)  
    6103     set i_varhdr 
    6104     eval $setvar 
    6105     case "$i_varhdr" in 
    6106     stdarg.h) 
    6107         val="$define"; set i_stdarg; eval $setvar 
    6108         val="$undef"; set i_varargs; eval $setvar 
    6109         ;; 
    6110     varargs.h) 
    6111         val="$undef"; set i_stdarg; eval $setvar 
    6112         val="$define"; set i_varargs; eval $setvar 
    6113         ;; 
    6114     esac 
    6115     echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;; 
    6116 esac 
    6117 $rm -f varargs* 
    6118  
    6119 : see if stddef is available 
    6120 set stddef.h i_stddef 
    6121 eval $inhdr 
    6122  
    6123 : see if sys/mman.h has to be included 
    6124 set sys/mman.h i_sysmman 
    6125 eval $inhdr 
    6126  
    6127 : see if sys/page.h has to be included 
    6128 set sys/page.h i_syspage 
    6129 eval $inhdr 
    6130  
    6131 : see if this is a sys/param system 
    6132 set sys/param.h i_sysparam 
    6133 eval $inhdr 
    6134  
    6135 : see if sys/resource.h has to be included 
    6136 set sys/resource.h i_sysresrc 
    6137 eval $inhdr 
    6138  
    6139 : see if sys/select.h has to be included 
    6140 set sys/select.h i_sysselct 
    6141 eval $inhdr 
    6142  
    6143 : see if sys/stat.h is available 
    6144 set sys/stat.h i_sysstat 
    6145 eval $inhdr 
    6146  
    6147 : see if we should include time.h, sys/time.h, or both 
    6148 echo " " 
    6149 echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4 
    6150 $echo $n "I'm now running the test program...$c" 
    6151 $cat >try.c <<'EOCP' 
    6152 #include <sys/types.h> 
    6153 #ifdef I_TIME 
    6154 #include <time.h> 
    6155 #endif 
    6156 #ifdef I_SYSTIME 
    6157 #ifdef SYSTIMEKERNEL 
    6158 #define KERNEL 
    6159 #endif 
    6160 #include <sys/time.h> 
    6161 #endif 
    6162 #ifdef I_SYSSELECT 
    6163 #include <sys/select.h> 
    6164 #endif 
    6165 main() 
    6166 { 
    6167     struct tm foo; 
    6168 #ifdef S_TIMEVAL 
    6169     struct timeval bar; 
    6170 #endif 
    6171 #ifdef S_TIMEZONE 
    6172     struct timezone tzp; 
    6173 #endif 
    6174     if (foo.tm_sec == foo.tm_sec) 
    6175         exit(0); 
    6176 #ifdef S_TIMEVAL 
    6177     if (bar.tv_sec == bar.tv_sec) 
    6178         exit(0); 
    6179 #endif 
    6180     exit(1); 
    6181 } 
    6182 EOCP 
    6183 flags='' 
    6184 for s_timezone in '-DS_TIMEZONE' ''; do 
    6185 sysselect='' 
    6186 for s_timeval in '-DS_TIMEVAL' ''; do 
    6187 for i_systimek in '' '-DSYSTIMEKERNEL'; do 
    6188 for i_time in '' '-DI_TIME'; do 
    6189 for i_systime in '-DI_SYSTIME' ''; do 
    6190     case "$flags" in 
    6191     '') $echo $n ".$c" 
    6192         if $cc $ccflags \ 
    6193         $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \ 
    6194         try.c -o try >/dev/null 2>&1 ; then 
    6195             set X $i_time $i_systime $i_systimek $sysselect $s_timeval 
    6196             shift 
    6197             flags="$*" 
    6198             echo " " 
    6199             $echo $n "Succeeded with $flags$c" 
    6200         fi 
    6201         ;; 
    6202     esac 
    6203 done 
    6204 done 
    6205 done 
    6206 done 
    6207 done 
    6208 timeincl='' 
    6209 echo " " 
    6210 case "$flags" in 
    6211 *SYSTIMEKERNEL*) i_systimek="$define" 
    6212     timeincl=`./findhdr sys/time.h` 
    6213     echo "We'll include <sys/time.h> with KERNEL defined." >&4;; 
    6214 *) i_systimek="$undef";; 
    6215 esac 
    6216 case "$flags" in 
    6217 *I_TIME*) i_time="$define" 
    6218     timeincl=`./findhdr time.h`" $timeincl" 
    6219     echo "We'll include <time.h>." >&4;; 
    6220 *) i_time="$undef";; 
    6221 esac 
    6222 case "$flags" in 
    6223 *I_SYSTIME*) i_systime="$define" 
    6224     timeincl=`./findhdr sys/time.h`" $timeincl" 
    6225     echo "We'll include <sys/time.h>." >&4;; 
    6226 *) i_systime="$undef";; 
    6227 esac 
    6228 $rm -f try.c try 
    6229  
    6230 : see if sys/vlimit.h has to be included 
    6231 set sys/vlimit.h i_sysvlimit 
    6232 eval $inhdr 
    6233  
    6234 : see if this is a syswait system 
    6235 set sys/wait.h i_syswait 
    6236 eval $inhdr 
    6237  
    6238 : determine the name of a reasonable mailer 
    6239 case "$mailer" in 
    6240 '') 
    6241     if $test -f "$sendmail"; then 
    6242         dflt="$sendmail" 
    6243     elif $test -f "$smail"; then 
    6244         dflt="$smail" 
    6245     elif $test -f "$rmail"; then 
    6246         dflt="$rmail" 
    6247     elif $test -f /bin/mail; then 
    6248         dflt=/bin/mail 
    6249     else 
    6250         dflt=$mail 
    6251     fi 
    6252     ;; 
    6253 *)  dflt="$mailer";; 
    6254 esac 
    6255 $cat <<EOM 
    6256  
    6257 Later on, I'm going to offer you the chance to subscribe (or unsubscribe) 
    6258 to the $package mailing list. In order to do that, I need to figure out 
    6259 how to send mail, your name, and a few other things.  
    6260  
    6261 I need the full pathname of the program used to deliver mail on your system. 
    6262 A typical answer would be /usr/lib/sendmail or /bin/rmail, but you may choose 
    6263 any other program, as long as it can be fed from standard input and will 
    6264 honour any user-supplied headers. 
    6265  
    6266 EOM 
    6267 fn=f 
    6268 rp='Mail transport agent to be used?' 
    6269 . ./getfile 
    6270 mailer="$ans" 
    6271  
    62725891: see if we have to deal with yellow pages, now NIS. 
    62735892if $test -d /usr/etc/yp || $test -d /etc/yp; then 
     
    63655984esac 
    63665985 
    6367 : find out how to find out full name 
    6368 case "$d_berknames" in 
    6369 "$define") 
    6370     dflt=y;; 
    6371 "$undef") 
    6372     dflt=n;; 
    6373 *) 
    6374     if ./bsd; then 
    6375         dflt=y 
    6376     elif ./xenix; then 
    6377         dflt=y 
    6378     else 
    6379         dflt=n 
    6380     fi 
    6381     ;; 
    6382 esac 
    6383 $cat <<'EOM' 
    6384  
    6385 Does your /etc/passwd file keep full names in Berkeley/V7 format (name first 
    6386 thing after ':' in GCOS field)?  In that case, a typical entry in the password 
    6387 file looks like this: 
    6388  
    6389     guest:**paswword**:10:100:Mister Guest User:/usr/users:/bin/sh 
    6390                               ^^^^^^^^^^^^^^^^^ 
    6391 EOM 
    6392 rp="Berkeley/V7 format for full name in /etc/passwd?" 
    6393 . ./myread 
    6394 case "$ans" in 
    6395 y*) d_passnames="$define" 
    6396     d_berknames="$define" 
    6397     d_usgnames="$undef" 
    6398     nametype=bsd 
    6399     ;; 
    6400 *) 
    6401     case "$d_usgnames" in 
    6402     "$define") dflt=y;; 
    6403     "$undef") dflt=n;; 
    6404     *) 
    6405         if ./usg; then 
    6406             dflt=y 
    6407         else 
    6408             dflt=n 
    6409         fi 
    6410         ;; 
    6411     esac 
    6412 $cat <<'EOM' 
    6413  
    6414 Does your passwd file keep full names in USG format (name sandwiched between a 
    6415 '-' and a '(')?  In that case, a typical entry in the password file looks like 
    6416 this: 
    6417  
    6418     guest:**paswword**:10:100:000-Mister Guest User(000):/usr/users:/bin/sh 
    6419                                   ^^^^^^^^^^^^^^^^^ 
    6420 EOM 
    6421     rp="USG format for full name in /etc/passwd?" 
    6422     . ./myread 
    6423     case "$ans" in 
    6424     n*) echo "Full name will be taken from ~/.fullname" 
    6425         d_passnames="$undef" 
    6426         d_berknames="$undef" 
    6427         d_usgnames="$undef" 
    6428         nametype=other 
    6429         ;; 
    6430     *) 
    6431         d_passnames="$define" 
    6432         d_berknames="$undef" 
    6433         d_usgnames="$define" 
    6434         nametype=usg 
    6435         ;; 
    6436     esac;; 
    6437 esac 
    6438  
    6439 : figure out their full name 
    6440 case "$NAME" in 
    6441 '') case "$nametype" in 
    6442     other) 
    6443         fn=`./filexp ~/.fullname` 
    6444         xxx=usg 
    6445         $test -f $fn && xxx=other 
    6446         ;; 
    6447     *) 
    6448         xxx="$nametype" 
    6449         ;; 
    6450     esac 
    6451  
    6452     case "$xxx" in 
    6453     bsd) 
    6454         cf_name=`$passcat | grep "^$cf_by:" | \ 
    6455             sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \ 
    6456             -e 's/,.*//'` 
    6457         ;; 
    6458     usg) 
    6459         cf_name=`$passcat | grep "^$cf_by:" | \ 
    6460             sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \ 
    6461             -e 's/[^-]*-\(.*\)(.*)/\1/'` 
    6462         ;; 
    6463     *) 
    6464         cf_name=`$cat $fn` 
    6465         ;; 
    6466     esac 
    6467     ;; 
    6468 *) 
    6469     cf_name="$NAME" 
    6470     ;; 
    6471 esac 
    6472 echo " " 
    6473 echo "Pleased to meet you, $cf_name." 
    6474  
    64755986: now get the host name 
    64765987echo " " 
     
    66636174esac 
    66646175 
     6176: define an is-a-typedef? function 
     6177typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@; 
     6178case "$inclist" in 
     6179"") inclist="sys/types.h";; 
     6180esac; 
     6181eval "varval=\$$var"; 
     6182case "$varval" in 
     6183"") 
     6184    $rm -f temp.c; 
     6185    for inc in $inclist; do 
     6186        echo "#include <$inc>" >>temp.c; 
     6187    done; 
     6188    $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null; 
     6189    if $contains $type temp.E >/dev/null 2>&1; then 
     6190        eval "$var=\$type"; 
     6191    else 
     6192        eval "$var=\$def"; 
     6193    fi; 
     6194    $rm -f temp.?;; 
     6195*) eval "$var=\$varval";; 
     6196esac' 
     6197 
     6198: see what type pids are declared as in the kernel 
     6199set pid_t pidtype int stdio.h sys/types.h 
     6200eval $typedef 
     6201dflt="$pidtype" 
     6202echo " " 
     6203rp="What type are process ids on this system declared as?" 
     6204. ./myread 
     6205pidtype="$ans" 
     6206 
     6207: see what type is used for size_t 
     6208set size_t sizetype 'unsigned int' stdio.h sys/types.h 
     6209eval $typedef 
     6210dflt="$sizetype" 
     6211echo " " 
     6212rp="What type is used for the length parameter for string functions?" 
     6213. ./myread 
     6214sizetype="$ans" 
     6215 
     6216: see if arpa/inet.h has to be included 
     6217set arpa/inet.h i_arpainet 
     6218eval $inhdr 
     6219 
     6220: see if arpa/nameser.h has to be included 
     6221set arpa/nameser.h i_arpanameser 
     6222eval $inhdr 
     6223 
     6224: see if errno.h can be included 
     6225set errno.h i_errno 
     6226eval $inhdr 
     6227: see if sys/errno.h can be included 
     6228set sys/errno.h i_syserrno 
     6229eval $inhdr 
     6230: see if this is a sys/file.h system 
     6231val='' 
     6232set sys/file.h val 
     6233eval $inhdr 
     6234 
     6235: do we need to include sys/file.h ? 
     6236case "$val" in 
     6237"$define") 
     6238    echo " " 
     6239    if $h_sysfile; then 
     6240        val="$define" 
     6241        echo "We'll be including <sys/file.h>." >&4 
     6242    else 
     6243        val="$undef" 
     6244        echo "We won't be including <sys/file.h>." >&4 
     6245    fi 
     6246    ;; 
     6247*) 
     6248    h_sysfile=false 
     6249    ;; 
     6250esac 
     6251set i_sysfile 
     6252eval $setvar 
     6253 
     6254: see if fcntl.h is there 
     6255val='' 
     6256set fcntl.h val 
     6257eval $inhdr 
     6258 
     6259: see if we can include fcntl.h 
     6260case "$val" in 
     6261"$define") 
     6262    echo " " 
     6263    if $h_fcntl; then 
     6264        val="$define" 
     6265        echo "We'll be including <fcntl.h>." >&4 
     6266    else 
     6267        val="$undef" 
     6268        if $h_sysfile; then 
     6269    echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4 
     6270        else 
     6271            echo "We won't be including <fcntl.h>." >&4 
     6272        fi 
     6273    fi 
     6274    ;; 
     6275*) 
     6276    h_fcntl=false 
     6277    val="$undef" 
     6278    ;; 
     6279esac 
     6280set i_fcntl 
     6281eval $setvar 
     6282 
     6283: see if locale.h is available 
     6284set locale.h i_locale 
     6285eval $inhdr 
     6286 
     6287: see if memory.h is available. 
     6288val='' 
     6289set memory.h val 
     6290eval $inhdr 
     6291 
     6292: See if it conflicts with string.h 
     6293case "$val" in 
     6294$define) 
     6295    case "$strings" in 
     6296    '') ;; 
     6297    *) 
     6298        $cppstdin $cppflags $cppminus < "$strings" > mem.h 
     6299        if $contains 'memcpy' mem.h >/dev/null 2>&1; then 
     6300            echo " " 
     6301            echo "We won't be including <memory.h>." 
     6302            val="$undef" 
     6303        fi 
     6304        $rm -f mem.h 
     6305        ;; 
     6306    esac 
     6307esac 
     6308set i_memory 
     6309eval $setvar 
     6310 
     6311: see if netdb.h can be included 
     6312set netdb.h i_netdb 
     6313eval $inhdr 
     6314: see if setjmp.h can be included 
     6315set setjmp.h i_setjmp 
     6316eval $inhdr 
     6317: see if stdarg is available 
     6318echo " " 
     6319if $test "`./findhdr stdarg.h`"; then 
     6320    echo "<stdarg.h> found." >&4 
     6321    valstd="$define" 
     6322else 
     6323    echo "<stdarg.h> NOT found." >&4 
     6324    valstd="$undef" 
     6325fi 
     6326 
     6327: see if varags is available 
     6328echo " " 
     6329if $test "`./findhdr varargs.h`"; then 
     6330    echo "<varargs.h> found." >&4 
     6331else 
     6332    echo "<varargs.h> NOT found, but that's ok (I hope)." >&4 
     6333fi 
     6334 
     6335: set up the varargs testing programs 
     6336$cat > varargs.c <<EOP 
     6337#ifdef I_STDARG 
     6338#include <stdarg.h> 
     6339#endif 
     6340#ifdef I_VARARGS 
     6341#include <varargs.h> 
     6342#endif 
     6343 
     6344#ifdef I_STDARG 
     6345int f(char *p, ...) 
     6346#else 
     6347int f(va_alist) 
     6348va_dcl 
     6349#endif 
     6350{ 
     6351    va_list ap; 
     6352#ifndef I_STDARG 
     6353    char *p; 
     6354#endif 
     6355#ifdef I_STDARG 
     6356    va_start(ap,p); 
     6357#else 
     6358    va_start(ap); 
     6359    p = va_arg(ap, char *); 
     6360#endif 
     6361    va_end(ap); 
     6362} 
     6363EOP 
     6364$cat > varargs <<EOP 
     6365$startsh 
     6366if $cc -c $ccflags $ldflags -D\$1 varargs.c >/dev/null 2>&1; then 
     6367    echo "true" 
     6368else 
     6369    echo "false" 
     6370fi 
     6371$rm -f varargs$_o 
     6372EOP 
     6373chmod +x varargs 
     6374 
     6375: now check which varargs header should be included 
     6376echo " " 
     6377i_varhdr='' 
     6378case "$valstd" in 
     6379"$define") 
     6380    if `./varargs I_STDARG`; then 
     6381        val='stdarg.h' 
     6382    elif `./varargs I_VARARGS`; then 
     6383        val='varargs.h' 
     6384    fi 
     6385    ;; 
     6386*) 
     6387    if `./varargs I_VARARGS`; then 
     6388        val='varargs.h' 
     6389    fi 
     6390    ;; 
     6391esac 
     6392case "$val" in 
     6393'') 
     6394echo "I could not find the definition for va_dcl... You have problems..." >&4 
     6395    val="$undef"; set i_stdarg; eval $setvar 
     6396    val="$undef"; set i_varargs; eval $setvar 
     6397    ;; 
     6398*)  
     6399    set i_varhdr 
     6400    eval $setvar 
     6401    case "$i_varhdr" in 
     6402    stdarg.h) 
     6403        val="$define"; set i_stdarg; eval $setvar 
     6404        val="$undef"; set i_varargs; eval $setvar 
     6405        ;; 
     6406    varargs.h) 
     6407        val="$undef"; set i_stdarg; eval $setvar 
     6408        val="$define"; set i_varargs; eval $setvar 
     6409        ;; 
     6410    esac 
     6411    echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;; 
     6412esac 
     6413$rm -f varargs* 
     6414 
     6415: see if stddef is available 
     6416set stddef.h i_stddef 
     6417eval $inhdr 
     6418 
     6419: see if sys/mman.h has to be included 
     6420set sys/mman.h i_sysmman 
     6421eval $inhdr 
     6422 
     6423: see if sys/page.h has to be included 
     6424set sys/page.h i_syspage 
     6425eval $inhdr 
     6426 
     6427: see if this is a sys/param system 
     6428set sys/param.h i_sysparam 
     6429eval $inhdr 
     6430 
     6431: see if sys/resource.h has to be included 
     6432set sys/resource.h i_sysresrc 
     6433eval $inhdr 
     6434 
     6435: see if sys/select.h has to be included 
     6436set sys/select.h i_sysselct 
     6437eval $inhdr 
     6438 
     6439: see if sys/stat.h is available 
     6440set sys/stat.h i_sysstat 
     6441eval $inhdr 
     6442 
     6443: see if we should include time.h, sys/time.h, or both 
     6444echo " " 
     6445echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4 
     6446$echo $n "I'm now running the test program...$c" 
     6447$cat >try.c <<'EOCP' 
     6448#include <sys/types.h> 
     6449#ifdef I_TIME 
     6450#include <time.h> 
     6451#endif 
     6452#ifdef I_SYSTIME 
     6453#ifdef SYSTIMEKERNEL 
     6454#define KERNEL 
     6455#endif 
     6456#include <sys/time.h> 
     6457#endif 
     6458#ifdef I_SYSSELECT 
     6459#include <sys/select.h> 
     6460#endif 
     6461main() 
     6462{ 
     6463    struct tm foo; 
     6464#ifdef S_TIMEVAL 
     6465    struct timeval bar; 
     6466#endif 
     6467#ifdef S_TIMEZONE 
     6468    struct timezone tzp; 
     6469#endif 
     6470    if (foo.tm_sec == foo.tm_sec) 
     6471        exit(0); 
     6472#ifdef S_TIMEVAL 
     6473    if (bar.tv_sec == bar.tv_sec) 
     6474        exit(0); 
     6475#endif 
     6476    exit(1); 
     6477} 
     6478EOCP 
     6479flags='' 
     6480for s_timezone in '-DS_TIMEZONE' ''; do 
     6481sysselect='' 
     6482for s_timeval in '-DS_TIMEVAL' ''; do 
     6483for i_systimek in '' '-DSYSTIMEKERNEL'; do 
     6484for i_time in '' '-DI_TIME'; do 
     6485for i_systime in '-DI_SYSTIME' ''; do 
     6486    case "$flags" in 
     6487    '') $echo $n ".$c" 
     6488        if $cc $ccflags \ 
     6489        $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \ 
     6490        try.c -o try >/dev/null 2>&1 ; then 
     6491            set X $i_time $i_systime $i_systimek $sysselect $s_timeval 
     6492            shift 
     6493            flags="$*" 
     6494            echo " " 
     6495            $echo $n "Succeeded with $flags$c" 
     6496        fi 
     6497        ;; 
     6498    esac 
     6499done 
     6500done 
     6501done 
     6502done 
     6503done 
     6504timeincl='' 
     6505echo " " 
     6506case "$flags" in 
     6507*SYSTIMEKERNEL*) i_systimek="$define" 
     6508    timeincl=`./findhdr sys/time.h` 
     6509    echo "We'll include <sys/time.h> with KERNEL defined." >&4;; 
     6510*) i_systimek="$undef";; 
     6511esac 
     6512case "$flags" in 
     6513*I_TIME*) i_time="$define" 
     6514    timeincl=`./findhdr time.h`" $timeincl" 
     6515    echo "We'll include <time.h>." >&4;; 
     6516*) i_time="$undef";; 
     6517esac 
     6518case "$flags" in 
     6519*I_SYSTIME*) i_systime="$define" 
     6520    timeincl=`./findhdr sys/time.h`" $timeincl" 
     6521    echo "We'll include <sys/time.h>." >&4;; 
     6522*) i_systime="$undef";; 
     6523esac 
     6524$rm -f try.c try 
     6525 
     6526: see if sys/vlimit.h has to be included 
     6527set sys/vlimit.h i_sysvlimit 
     6528eval $inhdr 
     6529 
     6530: see if this is a syswait system 
     6531set sys/wait.h i_syswait 
     6532eval $inhdr 
     6533 
     6534: determine the name of a reasonable mailer 
     6535case "$mailer" in 
     6536'') 
     6537    if $test -f "$sendmail"; then 
     6538        dflt="$sendmail" 
     6539    elif $test -f "$smail"; then 
     6540        dflt="$smail" 
     6541    elif $test -f "$rmail"; then 
     6542        dflt="$rmail" 
     6543    elif $test -f /bin/mail; then 
     6544        dflt=/bin/mail 
     6545    else 
     6546        dflt=$mail 
     6547    fi 
     6548    ;; 
     6549*)  dflt="$mailer";; 
     6550esac 
     6551$cat <<EOM 
     6552 
     6553Later on, I'm going to offer you the chance to subscribe (or unsubscribe) 
     6554to the $package mailing list. In order to do that, I need to figure out 
     6555how to send mail, your name, and a few other things.  
     6556 
     6557I need the full pathname of the program used to deliver mail on your system. 
     6558A typical answer would be /usr/lib/sendmail or /bin/rmail, but you may choose 
     6559any other program, as long as it can be fed from standard input and will 
     6560honour any user-supplied headers. 
     6561 
     6562EOM 
     6563fn=f 
     6564rp='Mail transport agent to be used?' 
     6565. ./getfile 
     6566mailer="$ans" 
     6567 
     6568: find out how to find out full name 
     6569case "$d_berknames" in 
     6570"$define") 
     6571    dflt=y;; 
     6572"$undef") 
     6573    dflt=n;; 
     6574*) 
     6575    if ./bsd; then 
     6576        dflt=y 
     6577    elif ./xenix; then 
     6578        dflt=y 
     6579    elif $test "x$osname" = "xlinux"; then 
     6580        dflt=y 
     6581    else 
     6582        dflt=n 
     6583    fi 
     6584    ;; 
     6585esac 
     6586$cat <<'EOM' 
     6587 
     6588Does your /etc/passwd file keep full names in Berkeley/V7 format (name first 
     6589thing after ':' in GCOS field)?  In that case, a typical entry in the password 
     6590file looks like this: 
     6591 
     6592    guest:**paswword**:1