From: Ari Johnson Date: Mon, 14 Dec 2015 15:00:19 +0000 (-0500) Subject: Fix dist/Configure process X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=02323320b931b7dd78d227f27a2ec287b4142d74;p=cobramush.git Fix dist/Configure process --- diff --git a/MANIFEST.new b/MANIFEST.new index eaeb317..e15f8cf 100644 --- a/MANIFEST.new +++ b/MANIFEST.new @@ -55,7 +55,6 @@ README README.SQL README.SSL UPGRADING -config_h.SH confmagic.h options.h.dist hdrs/access.h @@ -241,3 +240,4 @@ win32/patches.h win32/pennmush.dsp win32/pennmush.dsw Configure Portability tool +config_h.SH Produces config.h diff --git a/Makefile.SH b/Makefile.SH index 43d92a9..3ed3fa4 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -47,9 +47,9 @@ $spitshell >Makefile <&4 -?X: -?X: Files spelled uppercased and beginning with PACK are produced by the -?X: shell archive builder and may be removed by the user. Usually, they are -?X: not listed in the MANIFEST file, but you never know... -?X: - awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | split -l 50 - rm -f missing - tmppwd=`pwd` - for filelist in x??; do - (cd $rsrc; ls `cat $tmppwd/$filelist` >/dev/null 2>>$tmppwd/missing) - done - if test -s missing; then - cat missing >&4 - cat >&4 <<'EOM' - -THIS PACKAGE SEEMS TO BE INCOMPLETE. - -You have the option of continuing the configuration process, despite the -distinct possibility that your kit is damaged, by typing 'y'es. If you -do, don't blame me if something goes wrong. I advise you to type 'n'o -and contact the author (). - -EOM -?X: Can't use $echo at this early stage - echo $n "Continue? [n] $c" >&4 - read ans - case "$ans" in - y*) - echo "Continuing..." >&4 - rm -f missing - ;; - *) -?X: -?X: Use kill and not exit, so that the trap gets executed to clean up -?X: - echo "ABORTING..." >&4 - kill $$ - ;; - esac - else - echo "Looks good..." - fi -else - echo "There is no MANIFEST file. I hope your kit is complete !" -fi -rm -f missing x?? - -@end diff --git a/U/End.U b/U/End.U deleted file mode 100644 index 002c1d5..0000000 --- a/U/End.U +++ /dev/null @@ -1,28 +0,0 @@ -?RCS: $Id: End.U 1.2 Tue, 30 Sep 2003 18:01:23 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: End.U,v $ -?RCS: Revision 3.0 1993/08/18 12:04:51 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?X: -?X: This unit serves as the goal which forces make to choose all the units that -?X: ask questions. The $W on the ?MAKE: line is the list of all symbols wanted. -?X: To force any unit to be included, copy this unit to your private U directory -?X: and add the name of the unit desired to the ?MAKE: dependency line. -?X: -?MAKE:End: $W d_tcl MailList -?MAKE: -pick add $@ %< -?LINT:use $W d_tcl MailList -: end of configuration questions -echo " " -echo "End of configuration questions." -echo " " - diff --git a/U/Findhdr.U b/U/Findhdr.U deleted file mode 100644 index 11e9578..0000000 --- a/U/Findhdr.U +++ /dev/null @@ -1,124 +0,0 @@ -?RCS: $Id: Findhdr.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: Original Author: Thomas Neumann -?RCS: -?RCS: $Log: Findhdr.U,v $ -?RCS: Revision 1.2 1997/11/25 18:41:56 popiel -?RCS: From dist -?RCS: -?RCS: Revision 3.0.1.2 1994/10/29 15:53:08 ram -?RCS: patch36: added ?F: line for metalint file checking -?RCS: -?RCS: Revision 3.0.1.1 1994/05/06 14:03:56 ram -?RCS: patch23: cppminus must be after other cppflags, not before -?RCS: -?RCS: Revision 3.0 1993/08/18 12:04:54 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?X: -?X: This unit produces a findhdr script which is used to locate the header -?X: files in $usrinc or other stranger places using cpp capabilities. The -?X: script is given an include file base name, like 'stdio.h' or 'sys/file.h' -?X: and it returns the full path of the include file and a zero status or an -?X: empty string with an error status if the file could not be located. -?X: -?MAKE:Findhdr: grep test tr rm +usrinc awk cat startsh \ - cppstdin cppminus +cppflags -?MAKE: -pick add $@ %< -?LINT:define fieldn -?S:fieldn: -?S: This variable is used internally by Configure. It contains the position -?S: of the included file name in cpp output. That is to say, when cpp -?S: pre-processes a #include line, it replaces it by a # line which -?S: contains the original position in the input file and the full name of -?S: included file, between "quotes". -?S:. -?V:fieldn -?F:./findhdr !fieldn -?T:cline pos wanted name awkprg -: determine filename position in cpp output -echo " " -echo "Computing filename position in cpp output for #include directives..." >&4 -echo '#include ' > foo.c -$cat >fieldn </dev/null | \ -$grep '^[ ]*#.*stdio\.h' | \ -while read cline; do - pos=1 -?X: We have to go through this nightmare of sed and eval because some -?X: folks like putting spaces in their directory names, which then get -?X: echoed into the paths to standard headers. Thanks, Microsoft! -?X: -?X: What we're doing here is escaping every single shell meta-character -?X: except for quotation marks, then evaluating that as an argument list. - qline=\`echo "\$cline" | $sed -e 's/\\([][{}#$<>;&()|^*?\\\\]\\)/\\\\\\\\\\1/g'\` - eval set \$qline - while $test "x\$1" \!= x; do - if $test -r "\$1"; then - echo "\$pos" - exit 0 - fi - shift - pos=\`expr \$pos + 1\` - done -done -EOF -chmod +x fieldn -fieldn=`./fieldn` -$rm -f foo.c fieldn -case $fieldn in -'') pos='???';; -1) pos=first;; -2) pos=second;; -3) pos=third;; -*) pos="${fieldn}th";; -esac -echo "Your cpp writes the filename in the $pos field of the line." - -?X: To locate a header file, we cannot simply check for $usrinc/file.h, since -?X: some machine have the headers in weird places and our only hope is that -?X: the C pre-processor will know how to find those headers. Thank you NexT! -: locate header file -$cat >findhdr <" > foo\$\$.c -$cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \ -$grep "^[ ]*#.*\$wanted" | \ -while read cline; do - pos=1 - qline=\`echo "\$cline" | $sed -e 's/\\([][{}#$<>;&()|^'"'"'*?\\\\]\\)/\\\\\\\\\\1/g'\` - eval set \$qline - while $test $fieldn -gt \$pos; do - shift - pos=\`expr \$pos + 1\` - done - name=\$1 - case "\$name" in - */\$wanted) echo "\$name"; exit 0;; -?X: Of course, Microsoft likes backslashes, too. @whee. - *\\\\\$wanted) echo "\$name"; exit 0;; - *) name='';; - esac; -done; -$rm -f foo\$\$.c; -case "\$name" in -'') exit 1;; -esac -EOF -chmod +x findhdr - diff --git a/U/Guess.U b/U/Guess.U deleted file mode 100644 index 849b98e..0000000 --- a/U/Guess.U +++ /dev/null @@ -1,133 +0,0 @@ -?RCS: $Id: Guess.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: Guess.U,v $ -?RCS: Revision 3.0.1.4 1994/10/29 15:53:55 ram -?RCS: patch36: added ?F: line for metalint file checking -?RCS: patch36: call ./xenix explicitely instead of relying on PATH -?RCS: -?RCS: Revision 3.0.1.3 1993/12/15 08:14:35 ram -?RCS: patch15: variable d_bsd was not always set properly -?RCS: -?RCS: Revision 3.0.1.2 1993/08/30 08:57:14 ram -?RCS: patch8: fixed comment which wrongly attributed the usrinc symbol -?RCS: patch8: no more ugly messages when no /usr/include/ctype.h -?RCS: -?RCS: Revision 3.0.1.1 1993/08/27 14:37:37 ram -?RCS: patch7: added support for OSF/1 machines -?RCS: -?RCS: Revision 3.0 1993/08/18 12:04:57 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?X: -?X: This unit hazards some guesses as to what the general nature of the system -?X: is. The information it collects here is used primarily to establish default -?X: answers to other questions. -?X: -?MAKE:Guess d_eunice d_xenix d_bsd: cat test echo n c contains rm Loc eunicefix -?MAKE: -pick add $@ %< -?S:d_eunice: -?S: This variable conditionally defines the symbols EUNICE and VAX, which -?S: alerts the C program that it must deal with ideosyncracies of VMS. -?S:. -?S:d_xenix: -?S: This variable conditionally defines the symbol XENIX, which alerts -?S: the C program that it runs under Xenix. -?S:. -?S:d_bsd: -?S: This symbol conditionally defines the symbol BSD when running on a -?S: BSD system. -?S:. -?F:./bsd ./usg ./v7 ./osf1 ./eunice ./xenix ./venix -?T:xxx -: make some quick guesses about what we are up against -echo " " -$echo $n "Hmm... $c" -echo exit 1 >bsd -echo exit 1 >usg -echo exit 1 >v7 -echo exit 1 >osf1 -echo exit 1 >eunice -echo exit 1 >xenix -echo exit 1 >venix -d_bsd="$undef" -?X: -?X: Do not use 'usrinc', or we get a circular dependency. because -?X: usrinc is defined in usrinc.U, which relies on us... -?X: -$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null -if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1 -then - echo "Looks kind of like an OSF/1 system, but we'll see..." - echo exit 0 >osf1 -elif test `echo abc | tr a-z A-Z` = Abc ; then - xxx=`./loc addbib blurfl $pth` - if $test -f $xxx; then - echo "Looks kind of like a USG system with BSD features, but we'll see..." - echo exit 0 >bsd - echo exit 0 >usg - else - if $contains SIGTSTP foo >/dev/null 2>&1 ; then - echo "Looks kind of like an extended USG system, but we'll see..." - else - echo "Looks kind of like a USG system, but we'll see..." - fi - echo exit 0 >usg - fi -elif $contains SIGTSTP foo >/dev/null 2>&1 ; then - echo "Looks kind of like a BSD system, but we'll see..." - d_bsd="$define" - echo exit 0 >bsd -else - echo "Looks kind of like a Version 7 system, but we'll see..." - echo exit 0 >v7 -fi -case "$eunicefix" in -*unixtovms*) - $cat <<'EOI' -There is, however, a strange, musty smell in the air that reminds me of -something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit. -EOI - echo exit 0 >eunice - d_eunice="$define" -: it so happens the Eunice I know will not run shell scripts in Unix format - ;; -*) - echo " " - echo "Congratulations. You aren't running Eunice." - d_eunice="$undef" - ;; -esac -if test -f /xenix; then - echo "Actually, this looks more like a XENIX system..." - echo exit 0 >xenix - d_xenix="$define" -else - echo " " - echo "It's not Xenix..." - d_xenix="$undef" -fi -chmod +x xenix -$eunicefix xenix -if test -f /venix; then - echo "Actually, this looks more like a VENIX system..." - echo exit 0 >venix -else - echo " " - if ./xenix; then - : null - else - echo "Nor is it Venix..." - fi -fi -chmod +x bsd usg v7 osf1 eunice xenix venix -$eunicefix bsd usg v7 osf1 eunice xenix venix -$rm -f foo - diff --git a/U/Head.U b/U/Head.U deleted file mode 100644 index e887142..0000000 --- a/U/Head.U +++ /dev/null @@ -1,278 +0,0 @@ -?RCS: $Id: Head.U 1.3 Mon, 10 Nov 2003 14:51:32 -0600 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: Head.U,v $ -?RCS: Revision 1.2 1997/11/25 18:08:08 popiel -?RCS: From dist. -?RCS: -?RCS: Revision 3.0.1.9 1997/02/28 15:02:09 ram -?RCS: patch61: make sure we unset CDPATH for shells that support this -?RCS: patch61: improved Korn shell detection and handling -?RCS: -?RCS: Revision 3.0.1.8 1995/07/25 13:40:02 ram -?RCS: patch56: added SVR4-ish /opt directories to path list (ADO) -?RCS: patch56: OS/2 platforms are using another path separator -?RCS: -?RCS: Revision 3.0.1.7 1995/03/21 08:46:15 ram -?RCS: patch52: definition of paths wrongly added spurious ':' chars -?RCS: -?RCS: Revision 3.0.1.6 1994/10/29 15:54:19 ram -?RCS: patch36: make sure ENV is unset before calling /bin/ksh -?RCS: -?RCS: Revision 3.0.1.5 1994/08/29 16:03:44 ram -?RCS: patch32: now sets PATH only using existing directories -?RCS: -?RCS: Revision 3.0.1.4 1994/06/20 06:54:28 ram -?RCS: patch30: now computes its invocation name into 'me' -?RCS: patch30: symbol me is made visible to all units read-only -?RCS: -?RCS: Revision 3.0.1.3 1993/12/15 08:15:07 ram -?RCS: patch15: added /sbin:/usr/sbin:/usr/libexec in PATH for BSD/386 -?RCS: -?RCS: Revision 3.0.1.2 1993/11/10 17:32:35 ram -?RCS: patch14: ensure PATH is reset to '.' before testing for alias -?RCS: -?RCS: Revision 3.0.1.1 1993/08/27 14:38:07 ram -?RCS: patch7: not all 'test' programs support the -x option -?RCS: -?RCS: Revision 3.0 1993/08/18 12:04:58 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?X: -?X: This is the very first unit in the Configure script. It is mostly just -?X: things to keep people from getting into a tizzy right off the bat. -?X: -?MAKE:Head: -?MAKE: -pick wipe $@ %< -?V:PATH p_ me -?T:argv Id p paths OS2_SHELL -?T:inksh needksh avoidksh newsh changesh reason -#! /bin/sh -# -# If these # comments don't work, trim them. Don't worry about any other -# shell scripts, Configure will trim # comments from them for you. -# -# (If you are trying to port this package to a machine without sh, -# I would suggest you have a look at the prototypical config_h.SH file -# and edit it to reflect your system. Some packages may include samples -# of config.h for certain machines, so you might look for one of those.) -# -?X: -?X: NOTE THAT A CONFIGURE SCRIPT IS IN THE PUBLIC DOMAIN (whether or not -?X: the software which uses it is in the public domain). -?X: -# Yes, you may rip this off to use in other distribution packages. This -# script belongs to the public domain and cannot be copyrighted. -# -?X: -?X: WE ASK YOU NOT TO REMOVE OR ALTER THE FOLLOWING PARAGRAPH, PLEASE: -?X: -# (Note: this Configure script was generated automatically. Rather than -# working with this copy of Configure, you may wish to get metaconfig. -# The dist-3.0 package (which contains metaconfig) was posted in -# comp.sources.misc and is available on CPAN under authors/id/RAM so -# you may fetch it yourself from your nearest archive site.) -# -?X: -?X: NOTA BENE: -?X: If you develop you own version of metaconfig based on this work, -?X: you have to add some comments telling that the script was generated -?X: by your version, not mine: It credits your work. -?X: - -# $Id: Head.U 1.3 Mon, 10 Nov 2003 14:51:32 -0600 dunemush $ -# -# Generated on [metaconfig ] - -cat >/tmp/c1$$ </tmp/c2$$ </dev/null` - test "$me" || me=$0 - ;; -esac - -?X: -?X: To be able to run under OS/2, we must detect that early enough to use -?X: the proper path separator, stored in $p_. It is : on UNIX and \ on OS/2. -?X: However, we have to be careful not to confuse with win32 running the -?X: cygwin32 unix emulation tools. -?X: -: Proper PATH separator -p_=: -: On OS/2 this directory should exist if this is not floppy only system :-] -if test -d c:/.; then - : Check for cygwin32 emulation - case "x$OSTYPE$OS" in - x*msys*Windows*) - echo 'Running on Windows? Using the MinGW MSys tools...' - ;; - x*win32*) - echo 'Running on Windows? Assuming cygwin32 emulation tools...' - ;; - x*windows*) - echo 'Running on Windows? Assuming cygwin32 emulation tools...' - ;; - x*cygwin*) - echo 'Looks like cygwin32...' - ;; - x*) - p_=\; - PATH=`cmd /c "echo %PATH%" | tr '\\\\' / ` -?X: That's a bug in ksh5.22 - OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'` - ;; - esac -fi - -?X: -?X: There are two schools of thoughts here. Some people correctly argue that -?X: the user has a better chance than we do of setting a reasonable PATH and -?X: others argue that Configure is the best place there is to set up a suitable -?X: PATH. Well, here we try to compromize by keeping the user's PATH and -?X: appending some directories which are known to work on some machine or the -?X: other. The rationale behind this being that a novice user might not have a -?X: proper environment variable set, and some directories like /etc (where -?X: chown is located on some BSD systems) may be missing--RAM. -?X: -?X: SVR4 adds an /opt directory for optional packages. Some sites use -?X: various permutations on /opt as opposed to /usr or /usr/local.-- ADO -?X: -?X: cygwin32 strongly suggests /gnuwin32/b18/H-i386-cygwin32/bin. Talk -?X: about ugly. -?X: -?X: We only add directories that are not already in the PATH of the -?X: user and the directories must exist also. -?X: -: Proper PATH setting -paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin' -paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin" -paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin" -paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin" -paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb" -paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin" -paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib" -paths="$paths /sbin /usr/sbin /usr/libexec /gnuwin32/b18/H-i386-cygwin32/bin" - -case "x$OSTYPE$OS" in - x*msys*Windows*) - PATH='/usr/local/bin:/mingw/bin:/bin:/perl/bin' - ;; - x*) - for p in $paths - do - case "$p_$PATH$p_" in - *$p_$p$p_*) ;; - *) test -d $p && PATH=$PATH$p_$p ;; - esac - done - - PATH=.$p_$PATH - export PATH - ;; -esac - -: shall we be using ksh? -inksh='' -needksh='' -avoidksh='' -newsh=/bin/ksh -changesh='' -?X: Use (alias -x) and not (alias) since zsh and bash recognize the alias -?X: builtin but not the -x option which is typically ksh... -?X: We need to set up PATH before calling the "alias" built-in since some -?X: systems like HP-UX have a binary called /bin/alias. -if (PATH=.; alias -x) >/dev/null 2>&1; then - inksh=true -fi -?X: On HP-UX, large Configure scripts may exercise a bug in /bin/sh, use ksh -if test -f /hp-ux -a -f /bin/ksh; then - needksh='to avoid sh bug in "here document" expansion' -fi -?X: On AIX4, /bin/sh is really ksh and it causes problems, use sh -if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then - if test X`/usr/bin/uname -v` = X4; then - avoidksh="to avoid AIX 4's /bin/sh" - newsh=/usr/bin/bsh - fi -fi -?X: If we are not in ksh and need it, then feed us back to it -case "$inksh/$needksh" in -/[a-z]*) -?X: Unset ENV to avoid any ~/.kshrc that could alias cd or whatever... - unset ENV - changesh=true - reason="$needksh" - ;; -esac -?X: If we are in ksh and must avoid it, then feed us back to a new shell -case "$inksh/$avoidksh" in -true/[a-z]*) - changesh=true - reason="$avoidksh" - ;; -esac -?X: Warn them if they use ksh on other systems, which are those where -?X: we don't need ksh nor want to avoid it explicitely, yet are using it. -case "$inksh/$needksh-$avoidksh-" in -true/--) - cat <&4 -cat <loc -$startsh -case \$# in -0) exit 1;; -esac -thing=\$1 -shift -dflt=\$1 -shift -for dir in \$*; do - case "\$thing" in - .) - if test -d \$dir/\$thing; then - echo \$dir - exit 0 - fi - ;; - *) -?X: Be careful in case thing includes wildcards that might expand to multiple -?X: files. Choose the last one. This happens when searching for shared -?X: libraries with version numbers. How to choose which one we want is -?X: probably an insoluble problem, in general. -?X: Some folks leave things like libc.so.orig around w/o read -?X: permission. A -r test would handle that, but since ./loc is -?X: also used to find executables (which are installed w/o read -?X: permission on SCO ODT 3.0, we can't include the -r test. - for thisthing in \$dir/\$thing; do - : just loop through to pick last item - done - if test -f \$thisthing; then - echo \$thisthing - exit 0 - elif test -f \$dir/\$thing.exe; then - : on Eunice apparently - echo \$dir/\$thing - exit 0 - fi - ;; - esac -done -echo \$dflt -exit 1 -EOSC -chmod +x loc -$eunicefix loc -loclist=" -?awk:awk -?cat:cat -?chgrp:chgrp -?chmod:chmod -?chown:chown -?comm:comm -?cp:cp -?echo:echo -?expr:expr -?find:find -?grep:grep -?ls:ls -?make:make -?mkdir:mkdir -?mv:mv -?rm:rm -?sed:sed -?sleep:sleep -?sort:sort -?tail:tail -?touch:touch -?tr:tr -?uniq:uniq -" -trylist=" -?Mcc:Mcc -?ar:ar -?bash:bash -?bison:bison -?byacc:byacc -?compress:compress -?cpio:cpio -?cpp:cpp -?csh:csh -?date:date -?egrep:egrep -?emacs:emacs -?flex:flex -?gcc:gcc -?gzip:gzip -?inews:inews -?ksh:ksh -?less:less -?line:line -?lint:lint -?ln:ln -?lp:lp -?lpr:lpr -?mail:mail -?mailx:mailx -?more:more -?nroff:nroff -?perl:perl -?pg:pg -?pmake:pmake -?pr:pr -?rmail:rmail -?sendmail:sendmail -?shar:shar -?smail:smail -?submit:submit -?tar:tar -?tbl:tbl -?test:test -?troff:troff -?uname:uname -?uptime:uptime -?uuname:uuname -?vi:vi -?zcat:zcat -?zip:zip -" -?LINT:set Loc Mcc awk ar bash bison byacc cat chgrp chmod chown \ - comm compress cp cpio cpp csh date echo egrep emacs expr find flex \ - gcc gzip grep inews ksh less line lint ln lp lpr ls mail mailx \ - make mkdir more mv nroff perl pg pmake pr rm rmail sed sendmail \ - shar sleep smail sort submit tail tar tbl test touch tr troff \ - uname uniq uptime uuname vi zcat zip -pth=`echo $PATH | sed -e "s/$p_/ /g"` -pth="$pth /lib /usr/lib" -for file in $loclist; do -?X: -?X: Allow them to -Dmake=pmake on the command line for instance... -?X: If the file is not fully qualified, as in -Dmake=pmake, then we -?X: look the for the specified command (pmake here). If they say -?X: -Dmake=/sbin/make for instance, then we make sure the file -?X: exists, or we die... -?X: - eval xxx=\$$file - case "$xxx" in - /*|?:[\\/]*) - if test -f "$xxx"; then - : ok - else - echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 - xxx=`./loc $file $file $pth` - fi - ;; - '') xxx=`./loc $file $file $pth`;; - *) xxx=`./loc $xxx $xxx $pth`;; - esac - eval $file=$xxx - eval _$file=$xxx - case "$xxx" in - /*) - echo $file is in $xxx. - ;; -?X: Under OS/2, we have PC-like paths - ?:[\\/]*) - echo $file is in $xxx. - ;; - *) - echo "I don't know where '$file' is, and my life depends on it." >&4 - echo "Go find a public domain implementation or fix your PATH setting!" >&4 - exit 1 - ;; - esac -done -echo " " -echo "Don't worry if any of the following aren't found..." -say=offhand -for file in $trylist; do -?X: Allow them to -Dmake=pmake on the command line for instance (see above) - eval xxx=\$$file - case "$xxx" in - /*|?:[\\/]*) - if test -f "$xxx"; then - : ok - else - echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 - xxx=`./loc $file $file $pth` - fi - ;; - '') xxx=`./loc $file $file $pth`;; - *) xxx=`./loc $xxx $xxx $pth`;; - esac - eval $file=$xxx - eval _$file=$xxx - case "$xxx" in - /*) - echo $file is in $xxx. - ;; -?X: Under OS/2, we have PC-like paths - ?:[\\/]*) - echo $file is in $xxx. - ;; - *) - echo "I don't see $file out there, $say." - say=either - ;; - esac -done -case "$egrep" in -egrep) - echo "Substituting grep for egrep." - egrep=$grep - ;; -esac -@if ln -case "$ln" in -ln) - echo "Substituting cp for ln." - ln=$cp - ;; -esac -@end -case "$test" in -test) - echo "Hopefully test is built into your sh." - ;; -*) - if `sh -c "PATH= test true" >/dev/null 2>&1`; then - echo "Using the test built into your sh." -?X: -?X: We need to set both test and _test, since Oldconfig.U will use the _test -?X: value to systematically restore computed paths, which may be wrong if -?X: we choose to load an old config.sh generated on another platform. -?X: - test=test - _test=test - fi - ;; -esac -?LINT:change n c -case "$echo" in -echo) - echo "Hopefully echo is built into your sh." - ;; -?X: For those rare cases where we don't need $echo... -'') ;; -*) - echo " " -echo "Checking compatibility between $echo and builtin echo (if any)..." >&4 - $echo $n "hi there$c" >foo1 - echo $n "hi there$c" >foo2 - if cmp foo1 foo2 >/dev/null 2>&1; then - echo "They are compatible. In fact, they may be identical." - else - case "$n" in - '-n') n='' c='\c';; - *) n='-n' c='';; - esac - cat <$c" - $echo "*" - fi - $rm -f foo1 foo2 - ;; -esac - diff --git a/U/MailList.U b/U/MailList.U deleted file mode 100644 index 833aea8..0000000 --- a/U/MailList.U +++ /dev/null @@ -1,82 +0,0 @@ -?RCS: $Id: MailList.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: Original Author: Graham Stoney -?RCS: -?RCS: $Log: MailList.U,v $ -?RCS: Revision 3.0.1.1 1994/01/24 14:01:49 ram -?RCS: patch16: created -?RCS: -?RCS: -?X: -?X: This unit offers the user the option of subscribing to the mailing -?X: list. To force inclusion of this unit, you must add it's name to the -?X: dependancies on the MAKE line in your private copy of End.U. -?X: The address of the mailing list server must be set via a "list_request=..." -?X: entry in the .package file. This is usually done by running packinit and -?X: answering the proper questions. -?X: -?MAKE:MailList: cat mailer package Myread cf_name cf_email -?MAKE: -pick wipe $@ %< -?T:list_request list_sub list_unsub list_name -?X: -?X: The cf_name dependency is used through list_sub when the mailing list -?X: manager happens to be listserv, whereas cf_email is used whith majordomo -?X: or when the mailing list request address is scanned by a human. Since -?X: they do not appear within the unit itself, we need a lint hint. -?X: -?LINT:use cf_name cf_email -: offer to join the mailing list -list_request='<$list_request>' -list_sub="<$list_sub>" -list_unsub="<$list_unsub>" -list_name="<$list_name>" -$cat <&4 - $mailer $list_request </dev/null 2>&1 -To: $list_request -Subject: Subscription request by configure - -$list_sub -EOM - ;; -[uU]*) echo "Sending mail to unsubscribe you from the $list_name list..." >&4 - $mailer $list_request </dev/null 2>&1 -To: $list_request -Subject: Unsubscription request by configure - -$list_unsub -EOM - ;; -esac - diff --git a/U/Myinit.U b/U/Myinit.U deleted file mode 100644 index 1744736..0000000 --- a/U/Myinit.U +++ /dev/null @@ -1,29 +0,0 @@ -?RCS: $Id: Myinit.U 1.5 Sun, 02 Feb 2003 10:43:44 -0600 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: Myinit.U,v $ -?RCS: Revision 3.0.1.1 1994/10/31 09:47:29 ram -?RCS: patch44: leading comment states this unit comes before option processing -?RCS: -?RCS: Revision 3.0 1993/08/18 12:05:07 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?X: -?X: If you want to initialize any default values, copy this unit to your -?X: personal U directory and add the assignments to the end. This file -?X: is included after variables are initialized but before any old -?X: config.sh file is read in and before any Configure switch processing. -?X: -?MAKE:Myinit: Init -?MAKE: -pick add $@ %< -?LINT:set defvoidused libswanted -defvoidused=15 -libswanted='nsl socket m c crypt bind resolv ld dl tcl intl' - diff --git a/U/Oldconfig.U b/U/Oldconfig.U deleted file mode 100644 index 3152c7a..0000000 --- a/U/Oldconfig.U +++ /dev/null @@ -1,623 +0,0 @@ -?RCS: $Id: Oldconfig.U 1.3 Mon, 28 Jun 2004 09:20:49 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: Oldconfig.U,v $ -?RCS: Revision 1.2 1997/11/25 18:20:23 popiel -?RCS: From dist -?RCS: -?RCS: Revision 3.0.1.10 1997/02/28 15:06:39 ram -?RCS: patch61: added support for src.U -?RCS: patch61: new OSNAME define -?RCS: patch61: can now sense new OSes -?RCS: -?RCS: Revision 3.0.1.9 1995/07/25 13:40:51 ram -?RCS: patch56: now knows about OS/2 platforms -?RCS: -?RCS: Revision 3.0.1.8 1995/05/12 12:04:18 ram -?RCS: patch54: config.sh reload logic now knows about new -K switch -?RCS: patch54: cleaned up and extended osvers for DEC OSF/1 (ADO) -?RCS: patch54: added MachTen detection (ADO) -?RCS: -?RCS: Revision 3.0.1.7 1995/02/15 14:13:41 ram -?RCS: patch51: adapted osvers computation for AIX (ADO) -?RCS: -?RCS: Revision 3.0.1.6 1995/01/30 14:27:15 ram -?RCS: patch49: unit Options.U now exports file optdef.sh, not a variable -?RCS: patch49: update code for myuname changed (WED) -?RCS: -?RCS: Revision 3.0.1.5 1995/01/11 15:15:36 ram -?RCS: patch45: added quotes around the INITPROG variable (ADO) -?RCS: patch45: allows variable overriding after config file loading -?RCS: -?RCS: Revision 3.0.1.4 1994/10/29 15:57:05 ram -?RCS: patch36: added ?F: line for metalint file checking -?RCS: patch36: merged with the version used for perl5's Configure (ADO) -?RCS: -?RCS: Revision 3.0.1.3 1994/05/06 14:24:17 ram -?RCS: patch23: added support for osf1 hints -?RCS: patch23: new support for solaris and i386 systems (ADO) -?RCS: -?RCS: Revision 3.0.1.2 1994/01/24 14:05:02 ram -?RCS: patch16: added post-processing on myuname for Xenix targets -?RCS: patch16: message proposing config.sh defaults made consistent -?RCS: -?RCS: Revision 3.0.1.1 1993/09/13 15:56:32 ram -?RCS: patch10: force use of config.sh when -d option is used (WAD) -?RCS: patch10: complain about non-existent hint files (WAD) -?RCS: patch10: added Options dependency for fastread variable -?RCS: -?RCS: Revision 3.0 1993/08/18 12:05:12 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?X: -?X: This unit tries to remember what we did last time we ran Configure, mostly -?X: for the sake of setting defaults. -?X: -?MAKE:Oldconfig hint myuname osname osvers: Instruct Myread uname \ - sh awk sed test cat rm lns n c contains Loc Options Tr src -?MAKE: -pick wipe $@ %< -?S:myuname: -?S: The output of 'uname -a' if available, otherwise the hostname. On Xenix, -?S: pseudo variables assignments in the output are stripped, thank you. The -?S: whole thing is then lower-cased. -?S:. -?S:hint: -?S: Gives the type of hints used for previous answers. May be one of -?S: "default", "recommended" or "previous". -?S:. -?S:osname: -?S: This variable contains the operating system name (e.g. sunos, -?S: solaris, hpux, etc.). It can be useful later on for setting -?S: defaults. Any spaces are replaced with underscores. It is set -?S: to a null string if we can't figure it out. -?S:. -?S:osvers: -?S: This variable contains the operating system version (e.g. -?S: 4.1.3, 5.2, etc.). It is primarily used for helping select -?S: an appropriate hints file, but might be useful elsewhere for -?S: setting defaults. It is set to '' if we can't figure it out. -?S: We try to be flexible about how much of the version number -?S: to keep, e.g. if 4.1.1, 4.1.2, and 4.1.3 are essentially the -?S: same for this package, hints files might just be os_4.0 or -?S: os_4.1, etc., not keeping separate files for each little release. -?S:. -?C:OSNAME: -?C: This symbol contains the name of the operating system, as determined -?C: by Configure. You shouldn't rely on it too much; the specific -?C: feature tests from Configure are generally more reliable. -?C:. -?H:#define OSNAME "$osname" /**/ -?H:. -?F:!config.sh -?T:tmp tmp_n tmp_c tmp_sh file -?T:xxxxfile xxxfile xxfile xfile hintfile newmyuname -?T:tans _ isesix INITPROG -?LINT:change n c sh -: Try to determine whether config.sh was made on this system -case "$config_sh" in -'') -?X: indentation wrong on purpose--RAM -?X: Leave a white space between first two '(' for ksh. The sub-shell is needed -?X: on some machines to avoid the error message when uname is not found; e.g. -?X: old SUN-OS 3.2 would not execute hostname in (uname -a || hostname). Sigh! -myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1` -?X: Special mention for Xenix, whose 'uname -a' gives us output like this: -?X: sysname=XENIX -?X: nodename=whatever -?X: release=2.3.2 .. etc... -?X: Therefore, we strip all this variable assignment junk and remove all the -?X: new lines to keep the myuname variable sane... --RAM -myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ - ./tr '[A-Z]' '[a-z]' | tr '\012' ' '` -?X: Save the value we just computed to reset myuname after we get done here. -newmyuname="$myuname" -dflt=n -case "$knowitall" in -'') - if test -f ../config.sh; then - if $contains myuname= ../config.sh >/dev/null 2>&1; then - eval "`grep myuname= ../config.sh`" - fi - if test "X$myuname" = "X$newmyuname"; then - dflt=y - fi - fi - ;; -*) dflt=y;; -esac - -@if {test -d ../hints} -: Get old answers from old config file if Configure was run on the -: same system, otherwise use the hints. -hint=default -cd .. -?X: Since we are now at the root of the source tree, we must use $src -?X: to access the sources and not $rsrc. See src.U for details... -if test -f config.sh; then - echo " " - rp="I see a config.sh file. Shall I use it to set the defaults?" - . UU/myread - case "$ans" in - n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;; - *) echo "Fetching default answers from your old config.sh file..." >&4 - tmp_n="$n" - tmp_c="$c" - tmp_sh="$sh" - . ./config.sh - cp config.sh UU - n="$tmp_n" - c="$tmp_c" - : Older versions did not always set $sh. Catch re-use of such - : an old config.sh. - case "$sh" in - '') sh="$tmp_sh" ;; - esac - hint=previous - ;; - esac -fi -if test ! -f config.sh; then - $cat <&4 - dflt='' - : Half the following guesses are probably wrong... If you have better - : tests or hints, please send them to - : The metaconfig authors would also appreciate a copy... - $test -f /irix && osname=irix - $test -f /xenix && osname=sco_xenix - $test -f /dynix && osname=dynix - $test -f /dnix && osname=dnix - $test -f /lynx.os && osname=lynxos - $test -f /unicos && osname=unicos && osvers=`$uname -r` - $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r` - $test -f /bin/mips && /bin/mips && osname=mips - $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \ - $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4 - $test -d /usr/apollo/bin && osname=apollo - $test -f /etc/saf/_sactab && osname=svr4 - $test -d /usr/include/minix && osname=minix - if $test -d /MachTen; then -?X: MachTen uname -a output looks like -?X: xxx 4 0.0 Macintosh -?X: MachTen /sbin/version output looks like -?X: MachTen 4.0 Mon Aug 28 10:18:00 1995 -?X: MachTen 3.x had the 'version' command in /usr/etc/version. - osname=machten - if $test -x /sbin/version; then - osvers=`/sbin/version | $awk '{print $2}' | - $sed -e 's/[A-Za-z]$//'` - elif $test -x /usr/etc/version; then - osvers=`/usr/etc/version | $awk '{print $2}' | - $sed -e 's/[A-Za-z]$//'` - else - osvers="$2.$3" - fi - fi -?X: If we have uname, we already computed a suitable uname -a output, correctly -?X: formatted for Xenix, and it lies in $myuname. - if $test -f $uname; then - set X $myuname - shift - - case "$5" in - fps*) osname=fps ;; - mips*) - case "$4" in - umips) osname=umips ;; - *) osname=mips ;; - esac;; - [23]100) osname=mips ;; - next*) osname=next ;; - news*) osname=news ;; -?X: Interactive Unix. - i386*) - if $test -f /etc/kconfig; then - osname=isc - if test "$lns" = "ln -s"; then - osvers=4 - elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then - osvers=3 - elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then - osvers=2 - fi - fi - ;; - esac - - case "$1" in - aix) osname=aix -?X: aix 4.1 uname -a output looks like -?X: AIX foo 1 4 000123456789 -?X: where $4 is the major release number and $3 is the (minor) version. -?X: More detail on the version is available with the oslevel command. -?X: in 3.2.x, it output a string (see case statements below). In 4.1, -?X: it puts out something like 4.1.1.0 - tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1` - case "$tmp" in - 'not found') osvers="$4"."$3" ;; - '<3240'|'<>3240') osvers=3.2.0 ;; - '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;; - '=3250'|'>3250') osvers=3.2.5 ;; - *) osvers=$tmp;; - esac - ;; - *dc.osx) osname=dcosx - osvers="$3" - ;; - dnix) osname=dnix - osvers="$3" - ;; - domainos) osname=apollo - osvers="$3" - ;; - dgux) osname=dgux - osvers="$3" - ;; -?X: uname -a returns -?X: DYNIX/ptx xxx 4.0 V4.1.2 i386 - dynixptx*) osname=dynixptx - osvers="$3" - ;; - freebsd) osname=freebsd - osvers="$3" ;; - genix) osname=genix ;; - hp*) osname=hpux - case "$3" in - *.08.*) osvers=9 ;; - *.09.*) osvers=9 ;; - *.10.*) osvers=10 ;; - *) osvers="$3" ;; - esac - ;; - irix*) osname=irix - case "$3" in - 4*) osvers=4 ;; - 5*) osvers=5 ;; - 6*) osvers=6 ;; - *) osvers="$3" ;; - esac - ;; - linux) osname=linux - case "$3" in - 1*) osvers=1 ;; - *) osvers="$3" ;; - esac - ;; - netbsd*) osname=netbsd - osvers="$3" - ;; - bsd386) osname=bsd386 - osvers=`$uname -r` - ;; - next*) osname=next ;; - solaris) osname=solaris - case "$3" in - 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; - *) osvers="$3" ;; - esac - ;; - sunos) osname=sunos - case "$3" in - 5*) osname=solaris - osvers=`echo $3 | $sed 's/^5/2/g'` ;; - *) osvers="$3" ;; - esac - ;; - titanos) osname=titanos - case "$3" in - 1*) osvers=1 ;; - 2*) osvers=2 ;; - 3*) osvers=3 ;; - 4*) osvers=4 ;; - *) osvers="$3" ;; - esac - ;; - ultrix) osname=ultrix - osvers="$3" - ;; - osf1|mls+) case "$5" in - alpha) -?X: DEC OSF/1 myuname -a output looks like: osf1 xxxx t3.2 123.4 alpha -?X: where the version number can be either vn.n or tn.n. - osname=dec_osf - osvers=`echo "$3" | sed 's/^[vt]//'` - ;; - hp*) osname=hp_osf1 ;; - mips) osname=mips_osf1 ;; -?X: hp and mips were unsupported Technology Releases -- ADO, 24/10/94 - esac - ;; - uts) osname=uts - osvers="$3" - ;; - qnx) osname=qnx - osvers="$4" - ;; - mingw32*) osname=mingw32 - osvers="$3" - ;; - $2) case "$osname" in - *isc*) ;; - *freebsd*) ;; - svr*) - : svr4.x or possibly later - case "svr$3" in - ${osname}*) - osname=svr$3 - osvers=$4 - ;; - esac - case "$osname" in - svr4.0) - : Check for ESIX - if test -f /stand/boot ; then - eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot` - if test -n "$INITPROG" -a -f "$INITPROG"; then - isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'` - if test -n "$isesix"; then - osname=esix4 - fi - fi - fi - ;; - esac - ;; - *) if test -f /etc/systemid; then - osname=sco - set `echo $3 | $sed 's/\./ /g'` $4 - if $test -f sco_$1_$2_$3.sh; then - osvers=$1.$2.$3 - elif $test -f sco_$1_$2.sh; then - osvers=$1.$2 - elif $test -f sco_$1.sh; then - osvers=$1 - fi - else - case "$osname" in - '') : Still unknown. Probably a generic Sys V. - osname="sysv" - osvers="$3" - ;; - esac - fi - ;; - esac - ;; - *) case "$osname" in - '') : Still unknown. Probably a generic BSD. - osname="$1" - osvers="$3" - ;; - esac - ;; - esac - else -?X: Try to identify sony's NEWS-OS (BSD unix) - if test -f /vmunix -a -f $src/hints/news_os.sh; then - (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1 - if $contains news-os UU/kernel.what >/dev/null 2>&1; then - osname=news_os - fi - $rm -f UU/kernel.what -?X: Maybe it's an OS/2 -?X: Might also be win32 - elif test -d c:/.; then - : Check for cygwin32 emulation - case "x$OS" in - xWindows_*) - set X $myuname - osname=win32 - osvers="$3" - ;; - x*) - set X $myuname - osname=os2 - osvers="$5" - ;; - esac - fi - fi -?X: Fix up cygwin32 to win32, just because... - case "x$osname" in - xcygwin32*) - osname=win32 - ;; - esac - - : Now look for a hint file osname_osvers, unless one has been - : specified already. - case "$hintfile" in - ''|' ') - file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'` - : Also try without trailing minor version numbers. - xfile=`echo $file | $sed -e 's@_[^_]*$@@'` - xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'` - xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'` - xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'` - case "$file" in - '') dflt=none ;; - *) case "$osvers" in - '') dflt=$file - ;; - *) if $test -f $src/hints/$file.sh ; then - dflt=$file - elif $test -f $src/hints/$xfile.sh ; then - dflt=$xfile - elif $test -f $src/hints/$xxfile.sh ; then - dflt=$xxfile - elif $test -f $src/hints/$xxxfile.sh ; then - dflt=$xxxfile - elif $test -f $src/hints/$xxxxfile.sh ; then - dflt=$xxxxfile - elif $test -f "$src/hints/${osname}.sh" ; then - dflt="${osname}" - else - dflt=none - fi - ;; - esac - ;; - esac - ;; - *) - dflt=`echo $hintfile | $sed 's/\.sh$//'` - ;; - esac - - $cat <> UU/config.sh - elif $test X$tans = X -o X$tans = Xnone ; then - : nothing - else - : Give one chance to correct a possible typo. - echo "$file.sh does not exist" - dflt=$file - rp="hint to use instead?" - . UU/myread - for file in $ans; do - if $test -f "$src/hints/$file.sh"; then - . $src/hints/$file.sh - $cat $src/hints/$file.sh >> UU/config.sh - elif $test X$ans = X -o X$ans = Xnone ; then - : nothing - else - echo "$file.sh does not exist -- ignored." - fi - done - fi - done - - hint=recommended - : Remember our hint file for later. - if $test -f "$src/hints/$file.sh" ; then - hintfile="$file" - else - hintfile='' - fi -fi -cd UU -?X: From here on, we must use $rsrc instead of $src -@else -: Get old answers, if there is a config file out there -hint=default -hintfile='' -if test -f ../config.sh; then - echo " " - rp="I see a config.sh file. Shall I use it to set the defaults?" - . ./myread - case "$ans" in - n*|N*) echo "OK, I'll ignore it.";; - *) echo "Fetching default answers from your old config.sh file..." >&4 - tmp_n="$n" - tmp_c="$c" - . ../config.sh - cp ../config.sh . - n="$tmp_n" - c="$tmp_c" - hint=previous - ;; - esac -fi -@end -?X: remember, indentation is wrong--RAM -;; -*) - echo " " - echo "Fetching default answers from $config_sh..." >&4 - tmp_n="$n" - tmp_c="$c" - cd .. -?X: preserve symbolic links, if any - cp $config_sh config.sh 2>/dev/null - chmod +w config.sh - . ./config.sh - cd UU - cp ../config.sh . - n="$tmp_n" - c="$tmp_c" - hint=previous - ;; -esac -test "$override" && . ./optdef.sh -myuname="$newmyuname" - -: Restore computed paths -for file in $loclist $trylist; do - eval $file="\$_$file" -done - -@if osname || osvers -cat << EOM - -Configure uses the operating system name and version to set some defaults. -The default value is probably right if the name rings a bell. Otherwise, -since spelling matters for me, either accept the default or answer "none" -to leave it blank. - -EOM -@end -@if osname -case "$osname" in - ''|' ') - case "$hintfile" in - ''|' '|none) dflt=none ;; - *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;; - esac - ;; - *) dflt="$osname" ;; -esac -rp="Operating system name?" -. ./myread -case "$ans" in -none) osname='' ;; -*) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;; -esac -@end -@if osvers -@if osname -echo " " -@end -case "$osvers" in - ''|' ') - case "$hintfile" in - ''|' '|none) dflt=none ;; - *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'` - dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'` - case "$dflt" in - ''|' ') dflt=none ;; - esac - ;; - esac - ;; - *) dflt="$osvers" ;; -esac -rp="Operating system version?" -. ./myread -case "$ans" in -none) osvers='' ;; -*) osvers="$ans" ;; -esac - -@end diff --git a/U/ccflags.U b/U/ccflags.U deleted file mode 100644 index 66bc158..0000000 --- a/U/ccflags.U +++ /dev/null @@ -1,426 +0,0 @@ -?RCS: $Id: ccflags.U 1.6 Sat, 24 Jan 2004 13:13:31 -0600 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: ccflags.U,v $ -?RCS: Revision 3.0.1.9 1997/02/28 15:27:07 ram -?RCS: patch61: removed support for NO_PROTOTYPE detection on SCO -?RCS: patch61: new locincpth variable -?RCS: patch61: added info on the "additional ld flags" question -?RCS: -?RCS: Revision 3.0.1.8 1995/07/25 13:48:54 ram -?RCS: patch56: re-arranged compile line to include ldflags before objects -?RCS: -?RCS: Revision 3.0.1.7 1995/05/12 12:08:33 ram -?RCS: patch54: now checks for cc/ccflags/ldflags coherency -?RCS: -?RCS: Revision 3.0.1.6 1994/10/29 16:07:02 ram -?RCS: patch36: gcc versionning no longer relies on the C compiler's name -?RCS: patch36: simplified check for gcc version checking (ADO) -?RCS: -?RCS: Revision 3.0.1.5 1994/08/29 16:06:35 ram -?RCS: patch32: propagate -posix flag from ccflags to ldflags -?RCS: -?RCS: Revision 3.0.1.4 1994/05/06 14:28:45 ram -?RCS: patch23: -fpcc-struct-return only needed in gcc 1.x (ADO) -?RCS: patch23: cppflags now computed on an option-by-option basis -?RCS: patch23: magically added cc flags now only done the first time -?RCS: -?RCS: Revision 3.0.1.3 1993/09/13 15:58:29 ram -?RCS: patch10: explicitely mention -DDEBUG just in case they need it (WAD) -?RCS: patch10: removed all the "tans" variable usage (WAD) -?RCS: -?RCS: Revision 3.0.1.2 1993/08/27 14:39:38 ram -?RCS: patch7: added support for OSF/1 machines -?RCS: -?RCS: Revision 3.0.1.1 1993/08/25 14:00:24 ram -?RCS: patch6: added defaults for cppflags, ccflags and ldflags -?RCS: -?RCS: Revision 3.0 1993/08/18 12:05:31 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:ccflags ldflags lkflags cppflags optimize warnings locincpth: test cat \ - Myread Guess Options Oldconfig +gccversion mips_type +usrinc \ - package contains rm +cc cppstdin cppminus cpprun cpplast libpth \ - loclibpth hint -?MAKE: -pick add $@ %< -?S:ccflags: -?S: This variable contains any additional C compiler flags desired by -?S: the user. It is up to the Makefile to use this. -?S:. -?S:cppflags: -?S: This variable holds the flags that will be passed to the C pre- -?S: processor. It is up to the Makefile to use it. -?S:. -?S:optimize: -?S: This variable contains any optimizer/debugger flag that should be used. -?S: It is up to the Makefile to use it. -?S:. -?S:warnings: -?S: This variable contains any compiler warning flags that should be used. -?S:. -?S:ldflags: -?S: This variable contains any additional C loader flags desired by -?S: the user. It is up to the Makefile to use this. -?S:. -?S:lkflags: -?S: This variable contains any additional C partial linker flags desired by -?S: the user. It is up to the Makefile to use this. -?S:. -?S:locincpth: -?S: This variable contains a list of additional directories to be -?S: searched by the compiler. The appropriate -I directives will -?S: be added to ccflags. This is intended to simplify setting -?S: local directories from the Configure command line. -?S: It's not much, but it parallels the loclibpth stuff in libpth.U. -?S:. -?T:inctest thisincl xxx flag inclwanted ftry previous thislibdir -?D:cppflags='' -?D:ccflags='' -?D:ldflags='' -?D:optimize='' -?D:warnings='' -?INIT:: Possible local include directories to search. -?INIT:: Set locincpth to "" in a hint file to defeat local include searches. -?INIT:locincpth="/usr/local/include /opt/local/include /usr/gnu/include" -?INIT:locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include" -?INIT:locincpth="$locincpth /usr/kerberos/include" -?INIT:: -?INIT:: no include file wanted by default -?INIT:inclwanted='' -?INIT: -: determine optimize, if desired, or use for debug flag also -case "$optimize" in -' ') dflt='none';; -'') case $gccversion in - 2*) dflt='-g -O' ;; - *egcs*) dflt='-g -O' ;; - *) dflt='-g' ;; - esac ;; -*) dflt="$optimize";; -esac -$cat </dev/null 2>&1 - then - dflt="$dflt -posix" - fi - ;; - esac - ;; -esac - -?X: In USG mode, a MIPS system may need some BSD includes -case "$mips_type" in -*BSD*|'') inclwanted="$locincpth $usrinc";; -*) inclwanted="$locincpth $inclwanted $usrinc/bsd";; -esac -for thisincl in $inclwanted; do - if $test -d $thisincl; then - if $test x$thisincl != x$usrinc; then - case "$dflt" in - *$thisincl*);; - *) dflt="$dflt -I$thisincl";; - esac - fi - fi -done - -?X: Include test function (header, symbol) -inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then - xxx=true; -elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then - xxx=true; -else - xxx=false; -fi; -if $xxx; then - case "$dflt" in - *$2*);; - *) dflt="$dflt -D$2";; - esac; -fi' - -?X: -?X: OSF/1 uses __LANGUAGE_C__ instead of LANGUAGE_C -?X: -if ./osf1; then - set signal.h __LANGUAGE_C__; eval $inctest -else - set signal.h LANGUAGE_C; eval $inctest -fi - -case "$hint" in -none|recommended) dflt="$ccflags $dflt" ;; -*) dflt="$ccflags";; -esac - -case "$dflt" in -''|' ') dflt=none;; -esac -$cat <&4 - set X $cppflags - shift - cppflags='' - $cat >cpp.c <<'EOM' -#define BLURFL foo - -BLURFL xx LFRULB -EOM -?X: -?X: For each cc flag, try it out with both cppstdin and cpprun, since the -?X: first is almost surely a cc wrapper. We have to try both in case -?X: of cc flags like '-Olimit 2900' that are actually two words... -?X: - previous='' - for flag in $* - do - case "$flag" in - -*) ftry="$flag";; - *) ftry="$previous $flag";; - esac - if $cppstdin -DLFRULB=bar $ftry $cppminus cpp1.out 2>/dev/null && \ - $cpprun -DLFRULB=bar $ftry $cpplast cpp2.out 2>/dev/null && \ - $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \ - $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1 - then - cppflags="$cppflags $ftry" - previous='' - else - previous="$flag" - fi - done - set X $cppflags - shift - cppflags=${1+"$@"} - case "$cppflags" in - *-*) echo "They appear to be: $cppflags";; - esac - $rm -f cpp.c cpp?.out - ;; -esac - -: flags used in final linking phase -case "$ldflags" in -'') if ./venix; then - dflt='-i -z' - else - dflt='' - fi - case "$ccflags" in - *-posix*) dflt="$dflt -posix" ;; - esac - ;; -*) dflt="$ldflags";; -esac - -: Try to guess additional flags to pick up local libraries. -for thislibdir in $libpth; do - case " $loclibpth " in - *" $thislibdir "*) - case "$dflt " in - *"-L$thislibdir "*) ;; - *) dflt="$dflt -L$thislibdir" ;; - esac - ;; - esac -done - -case "$dflt" in -'') dflt='none' ;; -esac - -$cat <&4 -?X: Strip extra blanks in case some of the following variables are empty -set X $cc $optimize $ccflags $ldflags try.c -o try -shift -$cat >try.msg < try.c <<'EOF' -#include -main() { exit(0); } -EOF -dflt=y -?X: Use "sh -c" to avoid error messages tagged with leading "Configure:". -?X: We need to try the resulting executable, because cc might yield a 0 status -?X: even when ld failed, in which case the executable will not run properly, -?X: if its x bit is set at all... -if sh -c "$cc $optimize $ccflags try.c -o try $ldflags" >>try.msg 2>&1; then - if sh -c './try' >>try.msg 2>&1; then - dflt=n - else - echo "The program compiled OK, but exited with status $?." >>try.msg - rp="You have a problem. Shall I abort Configure" - dflt=y - fi -else - echo "I can't compile the test program." >>try.msg - rp="You have a BIG problem. Shall I abort Configure" - dflt=y -fi -case "$dflt" in -y) - $cat try.msg -?X: using -K will prevent default aborting--maybe they're cross compiling? - case "$knowitall" in - '') - echo "(The supplied flags might be incorrect with this C compiler.)" - ;; - *) dflt=n;; - esac - echo " " - . ./myread - case "$ans" in - n*|N*) ;; - *) echo "Ok. Stopping Configure." >&4 - exit 1 - ;; - esac - ;; -n) echo "OK, that should do.";; -esac -$rm -f try try.* core - diff --git a/U/cf_name.U b/U/cf_name.U deleted file mode 100644 index ffdd79c..0000000 --- a/U/cf_name.U +++ /dev/null @@ -1,72 +0,0 @@ -?RCS: $Id$ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: Original Author: Graham Stoney -?RCS: -?RCS: $Log: cf_name.U,v $ -?RCS: Revision 3.0.1.2 1994/05/06 14:29:36 ram -?RCS: patch23: fixed user name computation from /etc/passwd in bsd systems -?RCS: -?RCS: Revision 3.0.1.1 1994/01/24 14:05:11 ram -?RCS: patch16: created -?RCS: -?RCS: -?MAKE:cf_name: cf_by passcat Filexp nametype cat test -?MAKE: -pick add $@ %< -?S:cf_name: -?S: Full name of the person who ran the Configure script and answered the -?S: questions. This can be used by units that require the user's full name. -?S: This variable is for internal use only. -?S:. -?T:xxx fn NAME -: figure out their full name -case "$NAME" in -'') case "$nametype" in - other) - fn=`./filexp ~/.fullname` - xxx=usg - $test -f $fn && xxx=other - ;; - *) - xxx="$nametype" - ;; - esac - - case "$xxx" in - bsd) - cf_name=`$passcat | grep "^$cf_by:" | \ - sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \ - -e 's/,.*//'` - ;; - usg) - cf_name=`$passcat | grep "^$cf_by:" | \ - sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \ - -e 's/[^-]*-\(.*\)(.*)/\1/'` - ;; - *) - cf_name=`$cat $fn` - ;; - esac - ;; -*) - cf_name="$NAME" - ;; -esac -?X: -?X: In the original unit, Graham asked for the user name, in case the above -?X: code was unable to figure it out correctly. Since now cf_name has been -?X: made an internal variable only (i.e. it is not saved in config.sh), letting -?X: the user override the computed default each time would be a pain. -?X: Therefore, I have decided to trust the above code to get it right, and for -?X: those rare cases where it will fail, too bad :-) --RAM. -?X: -echo " " -echo "Pleased to meet you, $cf_name." - diff --git a/U/d_attribut.U b/U/d_attribut.U deleted file mode 100644 index 0c127ac..0000000 --- a/U/d_attribut.U +++ /dev/null @@ -1,64 +0,0 @@ -?RCS: $Id: d_attribut.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: Original Author: Andy Dougherty -?RCS: -?RCS: $Log: d_attribut.U,v $ -?RCS: Revision 3.0.1.3 1995/01/30 14:33:45 ram -?RCS: patch49: test C program now includes (WED) -?RCS: -?RCS: Revision 3.0.1.2 1995/01/11 15:25:47 ram -?RCS: patch45: fixed typo in the d_attribut variable (ADO) -?RCS: -?RCS: Revision 3.0.1.1 1994/10/29 16:08:55 ram -?RCS: patch36: created by ADO -?RCS: -?MAKE:d_attribut: Myread Oldconfig cat cc ccflags rm Setvar contains optimize -?MAKE: -pick add $@ %< -?S:d_attribut (d_attrib): -?S: This variable conditionally defines HASATTRIBUTE, which -?S: indicates the C compiler can check for function attributes, -?S: such as printf formats. -?S:. -?C:HASATTRIBUTE ~ %< (GNUC_ATTRIBUTE_CHECK): -?C: This symbol indicates the C compiler can check for function attributes, -?C: such as printf formats. This is normally only supported by GNU cc. -?C:. -?H:?%<:#$d_attribut HASATTRIBUTE /**/ -?H:?%<:#ifndef HASATTRIBUTE -?H:?%<:#define __attribute__(_arg_) -?H:?%<:#endif -?H:. -?W:%<:__attribute__ -?LINT:set d_attribut -?LINT:known __attribute__ -: Look for GNU-cc style attribute checking -echo " " -echo "Checking whether your compiler can handle __attribute__ ..." >&4 -$cat >attrib.c <<'EOCP' -#include -void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn)); -EOCP -if $cc $optimize $ccflags -c attrib.c >attrib.out 2>&1 ; then - if $contains 'warning' attrib.out >/dev/null 2>&1; then - echo "Your C compiler doesn't fully support __attribute__." - val="$undef" - else - echo "Your C compiler supports __attribute__." - val="$define" - fi -else - echo "Your C compiler doesn't seem to understand __attribute__ at all." - val="$undef" -fi -set d_attribut -eval $setvar -$rm -f attrib* - diff --git a/U/d_crypt.U b/U/d_crypt.U deleted file mode 100644 index cd5b936..0000000 --- a/U/d_crypt.U +++ /dev/null @@ -1,87 +0,0 @@ -?RCS: $Id: d_crypt.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: d_crypt.U,v $ -?RCS: Revision 3.0 1993/08/18 12:05:52 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:d_crypt cryptlib i_crypt: Loc test xlibpth libpth Csym Setvar Inhdr -?MAKE: -pick add $@ %< -?S:d_crypt: -?S: This variable conditionally defines the CRYPT symbol, which -?S: indicates to the C program that the crypt() routine is available -?S: to encrypt passwords and the like. -?S:. -?S:cryptlib: -?S: This variable holds -lcrypt or the path to a libcrypt.a archive if -?S: the crypt() function is not defined in the standard C library. It is -?S: up to the Makefile to use this. -?S:. -?S:i_crypt: -?S: This variable conditionally defines the I_CRYPT symbol, which -?S: indicates whether a C program should include -?S:. -?C:HAS_CRYPT (CRYPT): -?C: This symbol, if defined, indicates that the crypt routine is available -?C: to encrypt passwords and the like. -?C:. -?C:I_CRYPT: -?C: This symbol, if defined, indicates that can be included. -?C:. -?H:#$d_crypt HAS_CRYPT /**/ -?H:. -?H:#$i_crypt I_CRYPT /**/ -?H:. -?M:crypt: HAS_CRYPT -?M:/* If your system doesn't have the crypt(3) DES encryption code, -?M: * (which isn't exportable from the U.S.), then don't encrypt -?M: */ -?M:#ifndef HAS_CRYPT -?M:#define crypt(s,t) (s) -?M:#endif -?M:. -?LINT:set d_crypt i_crypt -?T:val -: see if crypt exists -echo " " -if set crypt val -f d_crypt; eval $csym; $val; then - echo 'crypt() found.' >&4 - val="$define" - cryptlib='' -else - cryptlib=`./loc Slibcrypt.a "" $xlibpth` - if $test -z "$cryptlib"; then - cryptlib=`./loc Mlibcrypt.a "" $xlibpth` - else - cryptlib=-lcrypt - fi - if $test -z "$cryptlib"; then - cryptlib=`./loc Llibcrypt.a "" $xlibpth` - else - cryptlib=-lcrypt - fi - if $test -z "$cryptlib"; then - cryptlib=`./loc libcrypt.a "" $libpth` - else - cryptlib=-lcrypt - fi - if $test -z "$cryptlib"; then - echo 'crypt() NOT found!' >&4 - val="$undef" - else - val="$define" - fi -fi -set d_crypt -eval $setvar -: see if crypt.h can be included -set crypt.h i_crypt -eval $inhdr - diff --git a/U/d_getadinf.U b/U/d_getadinf.U deleted file mode 100644 index 0786248..0000000 --- a/U/d_getadinf.U +++ /dev/null @@ -1,27 +0,0 @@ -?RCS: -?RCS: Copyright (c) 2000, Shawn Wagner -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?MAKE:d_getadinf: Inlibc -?MAKE: -pick add $@ %< -?S:d_getadinf (d_getadinf): -?S: This variable conditionally defines the HAS_GETADDRINFO symbol, which -?S: indicates to the C program that the getaddrinfo() routine is available -?S: to lookup internet addresses in one data base or another.. -?S:. -?C:HAS_GETADDRINFO (GETADDRINFO): -?C: This symbol, if defined, indicates that the getaddrinfo() routine is -?C: available to lookup internet addresses in some data base or other. -?C:. -?H:#$d_getadinf HAS_GETADDRINFO /**/ -?H:. -?LINT:set d_getadinf -: see if getaddrinfo exists -set getaddrinfo d_getadinf -eval $inlibc - diff --git a/U/d_getnminf.U b/U/d_getnminf.U deleted file mode 100644 index ff671a7..0000000 --- a/U/d_getnminf.U +++ /dev/null @@ -1,49 +0,0 @@ -?RCS: -?RCS: Copyright (c) 2000, Shawn Wagner -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?MAKE:d_getnminf: cat cc ccflags rm ldflags libs Inlibc -?MAKE: -pick add $@ %< -?S:d_getnminf (d_getnminf): -?S: This variable conditionally defines the HAS_GETNAMEINFO symbol, which -?S: indicates to the C program that the getnameinfo() routine is available -?S: to lookup host names in one data base or another.. -?S:. -?C:HAS_GETNAMEINFO (GETNAMEINFO): -?C: This symbol, if defined, indicates that the getnameinfo() routine is -?C: available to lookup host names in some data base or other. -?C:. -?H:#$d_getnminf HAS_GETNAMEINFO /**/ -?H:. -?LINT:set d_getnminf -: see if getnameinfo exists - along with constants we use -set getnameinfo d_getnminf -eval $inlibc - -if test $d_getnminf = 'define'; then - -echo " " -$cat >test_getnminf.c < -int main(int argc, char **argv) { - int i; - i = NI_MAXHOST + NI_MAXSERV + NI_NOFQDN + NI_NUMERICHOST + NI_NAMEREQD; - i += NI_NUMERICSERV + NI_DGRAM; -} -EOCP - -if $cc $ccflags $ldflags -o test_getnminf test_getnminf.c $libs >/dev/null 2>&1 ; then - d_getnminf='define' - echo "You've got getnameinfo and the netdb constants." >&4 -else - d_getnminf='undef' - echo "You've got getnameinfo but not the NI_* constants! Broken!" >&4 -fi -$rm -f test_getnminf* core - -fi diff --git a/U/d_getpagsz.U b/U/d_getpagsz.U deleted file mode 100644 index af9b702..0000000 --- a/U/d_getpagsz.U +++ /dev/null @@ -1,133 +0,0 @@ -?RCS: $Id: d_getpagsz.U 1.2 Mon, 26 Mar 2001 15:18:14 -0600 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: d_getpagsz.U,v $ -?RCS: Revision 3.0.1.1 1994/10/29 16:13:10 ram -?RCS: patch36: added ?F: line for metalint file checking -?RCS: -?RCS: Revision 3.0 1993/08/18 12:06:14 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:d_getpagsz pagesize: Oldconfig Myread Inlibc cat contains cc ccflags \ - ldflags libs rm Findhdr osname d_sysctlbyname test -?MAKE: -pick add $@ %< -?S:d_getpagsz: -?S: This variable conditionally defines HAS_GETPAGESIZE if getpagesize() -?S: is available to get the system page size. -?S:. -?S:pagesize (pagsize): -?S: This variable holds the size in bytes of a system page. -?S:. -?C:HAS_GETPAGESIZE (GETPAGESIZE): -?C: This symbol, if defined, indicates that the getpagesize system call -?C: is available to get system page size, which is the granularity of -?C: many memory management calls. -?C:. -?X: Don't name it PAGESIZE, this is sometimes used by -?C:PAGESIZE_VALUE (PAGSIZE): -?C: This symbol holds the size in bytes of a system page (obtained via -?C: the getpagesize() system call at configuration time or asked to the -?C: user if the system call is not available). -?C:. -?H:#$d_getpagsz HAS_GETPAGESIZE /**/ -?H:#define PAGESIZE_VALUE $pagesize /* System page size, in bytes */ -?H:. -?F:!page -?T:guess -?LINT:set d_getpagsz -: see if getpagesize exists -set getpagesize d_getpagsz -eval $inlibc - -@if pagesize || PAGESIZE_VALUE -: determine the system page size -echo " " -guess=' (OK to guess)' -case "$pagesize" in -'') - $cat >page.c < -extern int getpagesize(); -int main() -{ - printf("%d\n", getpagesize()); -} -EOP - echo "Computing the granularity of memory management calls..." >&4 - dflt='4096' - case "$d_getpagsz" in - "$define") - if $cc $ccflags $ldflags page.c -o page $libs >/dev/null 2>&1; then - dflt=`./page` - guess='' - else - echo "(I can't seem to compile the test program--guessing)" - fi - ;; - *) - if $cc $ccflags $ldflags page.c -o page $libs -lPW >/dev/null 2>&1; then - dflt=`./page` - guess='' - echo "(For your eyes only: I used the getpagesize() from -lPW.)" - else - if $contains PAGESIZE `./findhdr sys/param.h` >/dev/null 2>&1; then - $cat >page.c < -#include -int main() -{ - printf("%d\n", PAGESIZE); -} -EOP - if $cc $ccflags $ldflags page.c -o page $libs >/dev/null 2>&1; then - dflt=`./page` - guess='' - echo "(Using value of PAGESIZE found in .)" - else - if $test "x$d_sysctlbyname" = "x$define"; then - $cat >page.c < -#include -#include -int main() -{ - int res, pgsize - size_t len; - len = sizeof(pgsize); - res = sysctlbyname("hw.pagesize",&pgsize,&len,NULL,0); - if (res < 0) - res = sysctlbyname("hw_pagesize",&pgsize,&len,NULL,0); - printf("%d\n", res ? -1 : pgsize); -} -EOP - if $cc $ccflags $ldflags page.c -o page $libs >/dev/null 2>&1; then - dflt=`./page` - if $test $dflt -gt 0; then - guess='' - echo "(Using value from sysctlbyname)" - else - dflt='4096' - fi - fi - fi - fi - fi - fi - ;; - esac - ;; -*) dflt="$pagesize"; guess='';; -esac -rp="What is the system page size, in bytes$guess?" -. ./myread -pagesize=$ans -$rm -f page.c page - -@end diff --git a/U/d_gettext.U b/U/d_gettext.U deleted file mode 100644 index c5cd2b3..0000000 --- a/U/d_gettext.U +++ /dev/null @@ -1,41 +0,0 @@ -?RCS: $Id: d_gettext.U 1.2 Wed, 13 Sep 2000 14:49:45 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1995, Alan Schwartz -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?MAKE:d_gettext: Myread cat cc ccflags rm ldflags libs i_libintl -?MAKE: -pick add $@ %< -?S:d_gettext: -?S: Defined if gettext() is available. -?S:. -?C:HAS_GETTEXT: -?C: Defined if gettext is available(). -?C:. -?H:#$d_gettext HAS_GETTEXT /**/ -?H:. -: check for a new-style definitions -echo " " -$cat >test_gettext.c < -#endif -int main(int argc, char **argv) { - return (int) gettext (""); -} -EOCP - -if $cc $ccflags $ldflags -o test_gettext test_gettext.c $libs >/dev/null 2>&1 ; then - d_gettext='define' - echo 'Voila! You seem to have gettext for translations.' >&4 -else - d_gettext='undef' - echo "You don't seem to have gettext. Quel dommage." >&4 -fi -$rm -f test_gettext* core - diff --git a/U/d_gnulibc.U b/U/d_gnulibc.U deleted file mode 100644 index 0e4b38d..0000000 --- a/U/d_gnulibc.U +++ /dev/null @@ -1,70 +0,0 @@ -?RCS: $Id: d_gnulibc.U,v 3.0.1.1 1997/02/28 15:34:33 ram Exp $ -?RCS: -?RCS: Copyright (c) 1996, Andy Dougherty -?RCS: Copyright (c) 1996, Sven Verdoolaege -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: d_gnulibc.U,v $ -?RCS: Revision 3.0.1.1 1997/02/28 15:34:33 ram -?RCS: patch61: created -?RCS: -?MAKE:d_gnulibc: Myread Oldconfig Setvar contains rm \ - +cc +ccflags +ldflags +libs -?MAKE: -pick add $@ %< -?S:d_gnulibc: -?S: Defined if we're dealing with the GNU C Library. -?S:. -?C:HAS_GNULIBC: -?C: This symbol, if defined, indicates to the C program that -?C: the GNU C library is being used. -?C:. -?H:#$d_gnulibc HAS_GNULIBC /**/ -?H. -?LINT: set d_gnulibc -?X: gnulibc can be executed by calling this entry point. -?X: Ulrich Drepper doesn't think any other libc does that, -?X: but we check if it says 'GNU C Library' to be sure. -echo " " -echo "Checking for GNU C Library..." >&4 -cat >gnulibc.c </dev/null 2>&1 && \ - ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then - val="$define" - echo "You are using the GNU C Library" >&4 -else -cat >gnulibc.c < -int main() -{ -#ifdef __GLIBC__ - return 0; -#else - return 1; -#endif -} -EOM -if $cc $ccflags $ldflags -o gnulibc gnulibc.c $libs >/dev/null 2>&1 && \ - ./gnulibc; then - val="$define" - echo "You are using the GNU C Library" >&4 -else - val="$undef" - echo "You are not using the GNU C Library" >&4 -fi -fi -$rm -f gnulibc* -set d_gnulibc -eval $setvar - diff --git a/U/d_ipv6.U b/U/d_ipv6.U deleted file mode 100644 index cd6d914..0000000 --- a/U/d_ipv6.U +++ /dev/null @@ -1,50 +0,0 @@ -?MAKE:d_ipv6: test cc cat ccflags ldflags libs i_systypes i_syssock i_niin i_sysin -?MAKE: -pick add $@ %< -?S:d_ipv6: -?S: This variable is set if the system defines the sockaddr_in6 struct. -?S: and AF_INET6. We can't rely on just AF_INET6 being defined. -?S:. -?C:HAS_IPV6: -?C: If defined, this system has the sockaddr_in6 struct and AF_INET6. -?C: We can't rely on just AF_INET6 being defined. -?C:. -?H:#$d_ipv6 HAS_IPV6 /**/ -?H:. -?LINT:set d_ipv6 -: see if we have struct sockaddr_in6. -echo " " -$cat >d_ipv6.c < -#endif -#ifdef I_SYS_SOCK -#include -#endif -#ifdef I_NETINET_IN -#include -#else -#ifdef I_SYS_IN -#include -#endif -#endif -#include -main() -{ - struct sockaddr_in6 test; - int foo = AF_INET6; - printf("%d\n", foo); -} -EOCP -if $cc $ccflags $ldflags d_ipv6.c -o d_ipv6 $libs >/dev/null 2>&1; then - val="$define" - set d_ipv6; eval $setvar - echo "IPv6 structures found." >&4 -else - val="$undef" - set d_ipv6; eval $setvar - echo "No IPv6 structures found. No problem." >&4 -fi diff --git a/U/d_keepsig.U b/U/d_keepsig.U deleted file mode 100644 index 9d46f6a..0000000 --- a/U/d_keepsig.U +++ /dev/null @@ -1,78 +0,0 @@ -?RCS: $Id: d_keepsig.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: d_keepsig.U,v $ -?RCS: Revision 3.0.1.3 1995/01/11 15:26:25 ram -?RCS: patch45: protected "sh -c" within backquotes for Linux and SGI -?RCS: -?RCS: Revision 3.0.1.2 1994/10/29 16:13:59 ram -?RCS: patch36: call ./bsd explicitely instead of relying on PATH -?RCS: -?RCS: Revision 3.0.1.1 1993/10/16 13:48:47 ram -?RCS: patch12: comment for SIGNALS_KEPT was the other way round -?RCS: -?RCS: Revision 3.0 1993/08/18 12:06:26 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:d_keepsig: cat cc ccflags rm Guess contains echo n c Setvar d_sigaction ldflags -?MAKE: -pick add $@ %< -?S:d_keepsig: -?S: This variable contains the eventual value of the SIGNALS_KEPT symbol, -?S: which indicates to the C program if signal handlers need not reinstated -?S: after receipt of a signal. -?S:. -?C:SIGNALS_KEPT (PERSISTENT_SIGNAL): -?C: This symbol is defined if signal handlers needn't be reinstated after -?C: receipt of a signal. -?C:. -?H:#$d_keepsig SIGNALS_KEPT /**/ -?H:. -?LINT:set d_keepsig -: see if signals are kept -val="$undef" -echo " " -echo "Checking to see if signal handlers stick around..." >&4 -if test ${d_sigaction} = "$define"; then - echo "You've got sigaction, so we can force 'em to." >&4 - val="$define" -else - $cat >try.c <<'EOCP' -foo() {} - -int main() -{ - signal(2, foo); - kill(getpid(), 2); - kill(getpid(), 2); - printf("abc\n"); -} -EOCP - if $cc -o try $ccflags $ldflags try.c >/dev/null 2>&1; then - sh -c ./try >try.out 2>/dev/null - if $contains abc try.out >/dev/null 2>&1; then - echo "Yes, they do." - val="$define"; - else - echo "No, they don't." - fi - else - $echo $n "(I can't seem to compile the test program. Assuming $c" - if ./bsd; then - echo "they do.)" - val="$define" - else - echo "they don't.)" - fi - fi -fi -set d_keepsig -eval $setvar -$rm -f try* - diff --git a/U/d_memcpy.U b/U/d_memcpy.U deleted file mode 100644 index c7bee0b..0000000 --- a/U/d_memcpy.U +++ /dev/null @@ -1,63 +0,0 @@ -?RCS: $Id: d_memcpy.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: d_memcpy.U,v $ -?RCS: Revision 3.0.1.1 1993/09/13 16:02:58 ram -?RCS: patch10: removed text recommending bcopy over memcpy (WAD) -?RCS: -?RCS: Revision 3.0 1993/08/18 12:06:34 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:d_memcpy d_memmove: Inlibc -?MAKE: -pick add $@ %< -?S:d_memcpy: -?S: This variable conditionally defines the HAS_MEMCPY symbol, which -?S: indicates to the C program that the memcpy() routine is available -?S: to copy blocks of memory. -?S:. -?S:d_memmove: -?S: This variable conditionally defines the HAS_MEMMOVE symbol, which -?S: indicates to the C program that the memmove() routine is available -?S: to copy overlapping blocks of memory. -?S:. -?C:HAS_MEMCPY (MEMCPY): -?C: This symbol, if defined, indicates that the memcpy routine is available -?C: to copy blocks of memory. If not, it will be mapped to bcopy -?C: in confmagic.h -?C:. -?C:HAS_MEMMOVE (MEMMOVE): -?C: This symbol, if defined, indicates that the memmove routine is available -?C: to copy blocks of memory. If not, it will be mapped to bcopy -?C:. -?H:#$d_memcpy HAS_MEMCPY /**/ -?H:. -?H:#$d_memmove HAS_MEMMOVE /**/ -?H:. -?M:memcpy:HAS_MEMCPY -?M:#ifndef HAS_MEMCPY -?M:#ifndef memcpy -?M:#define memcpy(d,s,l) bcopy((s),(d),(l)) -?M:#endif -?M:#endif -?M:. -?M:memmove:HAS_MEMMOVE -?M:#ifndef HAS_MEMMOVE -?M:#ifndef memmove -?M:#define memmove(d,s,l) bcopy((s),(d),(l)) -?M:#endif -?M:#endif -?M:. -?LINT:set d_memcpy d_memmove -: see if memcpy exists -set memcpy d_memcpy -eval $inlibc -set memmove d_memmove -eval $inlibc - diff --git a/U/d_memmove.U b/U/d_memmove.U deleted file mode 100644 index e69de29..0000000 diff --git a/U/d_open3.U b/U/d_open3.U deleted file mode 100644 index 1e8521f..0000000 --- a/U/d_open3.U +++ /dev/null @@ -1,90 +0,0 @@ -?RCS: $Id: d_open3.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: d_open3.U,v $ -?RCS: Revision 3.0.1.2 1997/02/28 15:37:12 ram -?RCS: patch61: added ?F: metalint hint -?RCS: -?RCS: Revision 3.0.1.1 1995/07/25 13:58:26 ram -?RCS: patch56: added knowledge of the O_NONBLOCK symbol -?RCS: -?RCS: Revision 3.0 1993/08/18 12:06:44 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:d_open3: test cc cat ccflags ldflags libs h_fcntl h_sysfile rm Setvar Findhdr -?MAKE: -pick add $@ %< -?X: It would be easy to separate the h_O_stuff from this. -?X: Is there a reason to do so? -- HMS -?S:d_open3: -?S: This variable conditionally defines the HAS_OPEN3 manifest constant, -?S: which indicates to the C program that the 3 argument version of -?S: the open(2) function is available. -?S:. -?C:HAS_OPEN3 (OPEN3): -?C: This manifest constant lets the C program know that the three -?C: argument form of open(2) is available. -?C:. -?H:#$d_open3 HAS_OPEN3 /**/ -?H:. -?W:%<:O_RDONLY O_WRONLY O_RDWR O_NDELAY O_APPEND O_SYNC O_CREAT O_TRUNC -?W:%<:O_EXCL O_NONBLOCK -?F:!open3 -?LINT:set d_open3 -?LINT:change h_fcntl h_sysfile -: Locate the flags for 'open()' -echo " " -$cat >open3.c <<'EOCP' -#include -#ifdef I_FCNTL -#include -#endif -#ifdef I_SYS_FILE -#include -#endif -int main() { - if(O_RDONLY); -#ifdef O_TRUNC - exit(0); -#else - exit(1); -#endif -} -EOCP -: check sys/file.h first to get FREAD on Sun -if $test "`./findhdr sys/file.h`" && \ - $cc $ccflags $ldflags "-DI_SYS_FILE" open3.c -o open3 $libs >/dev/null 2>&1 ; then - h_sysfile=true; - echo " defines the O_* constants..." >&4 - if ./open3; then - echo "and you have the 3 argument form of open()." >&4 - val="$define" - else - echo "but not the 3 argument form of open(). Oh, well." >&4 - val="$undef" - fi -elif $test "`./findhdr fcntl.h`" && \ - $cc $ccflags $ldflags "-DI_FCNTL" open3.c -o open3 $libs >/dev/null 2>&1 ; then - h_fcntl=true; - echo " defines the O_* constants..." >&4 - if ./open3; then - echo "and you have the 3 argument form of open()." >&4 - val="$define" - else - echo "but not the 3 argument form of open(). Oh, well." >&4 - val="$undef" - fi -else - val="$undef" - echo "I can't find the O_* constant definitions! You got problems." >&4 -fi -set d_open3 -eval $setvar -$rm -f open3* - diff --git a/U/d_random.U b/U/d_random.U deleted file mode 100644 index 801ab70..0000000 --- a/U/d_random.U +++ /dev/null @@ -1,53 +0,0 @@ -?RCS: $Id: d_random.U 1.4 Fri, 15 Feb 2002 16:56:28 -0600 dunemush $ -?RCS: -?RCS: Copyright (c) 1995, Alan Schwartz -?RCS: Based on d_strchr.U -?RCS: -?MAKE:d_random d_lrand48 d_rand: Inlibc -?MAKE: -pick add $@ %< -?S:d_random: -?S: This variable conditionally defines HAS_RANDOM if random() is there -?S:. -?S:d_lrand48: -?S: This conditionally defines HAS_LRAND48 if lrand45() is there -?S:. -?S:d_rand: -?S: This conditionally defines HAS_RAND if rand() is there -?S:. -?C:HAS_RANDOM: -?C: Have we got random(), our first choice for number generation? -?C:. -?C:HAS_LRAND48: -?C: Have we got lrand48(), our second choice? -?C:. -?C:HAS_RAND: -?C: Have we got rand(), our last choice? -?C:. -?H:#$d_random HAS_RANDOM /**/ -?H:#$d_lrand48 HAS_LRAND48 /**/ -?H:#$d_rand HAS_RAND /**/ -?H:. -?M:random: HAS_RANDOM HAS_LRAND48 HAS_RAND -?M:#ifndef HAS_RANDOM -?M:#ifndef random -?M:#ifdef HAS_LRAND48 -?M:#define random lrand48 -?M:#define srandom srand48 -?M:#else -?M:#ifdef HAS_RAND -?M:#define random rand -?M:#define srandom srand -?M:#endif -?M:#endif -?M:#endif -?M:#endif -?M:. -?LINT:set d_lrand48 d_rand d_random -: random, lrand48, or rand -set random d_random -eval $inlibc -set lrand48 d_lrand48 -eval $inlibc -set rand d_rand -eval $inlibc - diff --git a/U/d_rlimit.U b/U/d_rlimit.U deleted file mode 100644 index f63f507..0000000 --- a/U/d_rlimit.U +++ /dev/null @@ -1,27 +0,0 @@ -?RCS: $Id: d_rlimit.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1995, Alan Schwartz -?RCS: -?RCS: -?X: We may need to include and FIXME -?X:INC: i_sysresrc i_systime -?MAKE:d_rlimit: Inlibc -?MAKE: -pick add $@ %< -?S:d_rlimit: -?S: This variable conditionally defines the HAS_GETRLIMIT symbol, which -?S: indicates that the getrlimit() routine exists. The getrlimit() routine -?S: supports getting resource limits, and there should be a setrlimit() too -?S: We probably need to include and . -?S:. -?C:HAS_GETRLIMIT (RLIMIT GETRLIMIT): -?C: This symbol, if defined, indicates that the getrlimit() routine is -?C: available to get resource limits. Probably means setrlimit too. -?C: Inclusion of and may be necessary. -?C:. -?H:#$d_rlimit HAS_GETRLIMIT /**/ -?H:. -?LINT:set d_rlimit -: see if getrlimit exists -set getrlimit d_rlimit -eval $inlibc - diff --git a/U/d_sigprocmask.U b/U/d_sigprocmask.U deleted file mode 100644 index 37c87ee..0000000 --- a/U/d_sigprocmask.U +++ /dev/null @@ -1,58 +0,0 @@ -?RCS: $Id: d_sigprocmask.U 1.1 Wed, 29 Nov 2000 11:35:38 -0600 dunemush $ -?RCS: -?RCS: Copyright (c) 2000 Shawn Wagner -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: -?MAKE:d_sigprocmask: Csym Setvar cat cc ccflags ldflags libs rm _o -?MAKE: -pick add $@ %< -?S:d_sigprocmask: -?S: This variable conditionally defines the HAS_SIGPROCMASK symbol, which -?S: indicates that the POSIX sigprocmask() routine is available. -?S:. -?C:HAS_SIGPROCMASK: -?C: This symbol, if defined, indicates that POSIX's sigprocmask() routine -?C: is available. -?C:. -?H:#$d_sigprocmask HAS_SIGPROCMASK /**/ -?H:. -?T:val -?LINT:set d_sigprocmask -echo " " -: see if we have sigprocmask -if set sigprocmask val -f d_sigprocmask; eval $csym; $val; then - echo 'sigprocmask() found.' >&4 - val="$define" -else - echo 'sigprocmask NOT found.' >&4 - val="$undef" -fi -?X: -?X: Solaris 2.5_x86 with SunWorks Pro C 3.0.1 doesn't have a complete -?X: sigaction structure if compiled with cc -Xc. This compile test -?X: will fail then. -?X: -$cat > set.c <<'EOP' -#include -#include -#include -main() -{ - sigset_t mask, oldmask; - sigprocmask(SIG_SETMASK, &mask, &oldmask); -} -EOP -if $cc $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1; then - : -else - echo "But you don't seem to have a working sigprocmask." >&4 - val="$undef" -fi -set d_sigprocmask; eval $setvar -$rm -f set set$_o set.c - diff --git a/U/d_stdstdio.U b/U/d_stdstdio.U deleted file mode 100644 index 4448ba3..0000000 --- a/U/d_stdstdio.U +++ /dev/null @@ -1,30 +0,0 @@ -?RCS: $Id: d_stdstdio.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: Original Author: Tye McQueen -?RCS: Actually, now this won't do anything. -?RCS: -?RCS: $Log: d_stdstdio.U,v $ -?RCS: Revision 3.0.1.1 1995/05/12 12:12:11 ram -?RCS: patch54: complete rewrite by Tye McQueen to fit modern systems -?RCS: -?RCS: Revision 3.0 1993/08/18 12:07:31 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:d_stdstdio d_stdiobase stdio_ptr stdio_cnt stdio_base \ - stdio_bufsiz: +ccflags \ - Setvar Findhdr Oldconfig -?MAKE: -pick add $@ %< -?LINT:describe d_stdstdio d_stdiobase stdio_base stdio_bufsiz \ - stdio_cnt stdio_ptr -?LINT:set d_stdstdio d_stdiobase stdio_base stdio_bufsiz \ - stdio_cnt stdio_ptr -: do nothing but prevent the standard stdstdio.U from running - diff --git a/U/d_strchr.U b/U/d_strchr.U deleted file mode 100644 index d458fd4..0000000 --- a/U/d_strchr.U +++ /dev/null @@ -1,109 +0,0 @@ -?RCS: $Id: d_strchr.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: d_strchr.U,v $ -?RCS: Revision 3.0.1.2 1993/10/16 13:49:20 ram -?RCS: patch12: added support for HAS_INDEX -?RCS: patch12: added magic for index() and rindex() -?RCS: -?RCS: Revision 3.0.1.1 1993/09/13 16:05:26 ram -?RCS: patch10: now only defines HAS_STRCHR, no macro remap of index (WAD) -?RCS: -?RCS: Revision 3.0 1993/08/18 12:07:32 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:d_strchr d_index: contains strings Setvar Myread Oldconfig Csym -?MAKE: -pick add $@ %< -?S:d_strchr: -?S: This variable conditionally defines HAS_STRCHR if strchr() and -?S: strrchr() are available for string searching. -?S:. -?S:d_index: -?S: This variable conditionally defines HAS_INDEX if index() and -?S: rindex() are available for string searching. -?S:. -?C:HAS_STRCHR: -?C: This symbol is defined to indicate that the strchr()/strrchr() -?C: functions are available for string searching. If not, try the -?C: index()/rindex() pair. -?C:. -?C:HAS_INDEX: -?C: This symbol is defined to indicate that the index()/rindex() -?C: functions are available for string searching. -?C:. -?H:#$d_strchr HAS_STRCHR /**/ -?H:#$d_index HAS_INDEX /**/ -?H:. -?M:index: HAS_INDEX -?M:#ifndef HAS_INDEX -?M:#ifndef index -?M:#define index strchr -?M:#endif -?M:#endif -?M:. -?M:strchr: HAS_STRCHR -?M:#ifndef HAS_STRCHR -?M:#ifndef strchr -?M:#define strchr index -?M:#endif -?M:#endif -?M:. -?M:rindex: HAS_INDEX -?M:#ifndef HAS_INDEX -?M:#ifndef rindex -?M:#define rindex strrchr -?M:#endif -?M:#endif -?M:. -?M:strrchr: HAS_STRCHR -?M:#ifndef HAS_STRCHR -?M:#ifndef strrchr -?M:#define strrchr rindex -?M:#endif -?M:#endif -?M:. -?T:vali -?LINT:set d_strchr d_index -: index or strchr -echo " " -if set index val -f; eval $csym; $val; then - if set strchr val -f d_strchr; eval $csym; $val; then - if $contains strchr "$strings" >/dev/null 2>&1 ; then -?X: has index, strchr, and strchr in string header - val="$define" - vali="$define" - echo "strchr() and index() found." >&4 - else -?X: has index, strchr, and no strchr in string header - val="$undef" - vali="$define" - echo "index() found." >&4 - fi - else -?X: has only index, no strchr, string header is a moot point - val="$undef" - vali="$define" - echo "index() found." >&4 - fi -else - if set strchr val -f d_strchr; eval $csym; $val; then - val="$define" - vali="$undef" - echo "strchr() found." >&4 - else - echo "No index() or strchr() found!" >&4 - val="$undef" - vali="$undef" - fi -fi -set d_strchr; eval $setvar -val="$vali" -set d_index; eval $setvar - diff --git a/U/d_strcoll.U b/U/d_strcoll.U deleted file mode 100644 index 716a575..0000000 --- a/U/d_strcoll.U +++ /dev/null @@ -1,40 +0,0 @@ -?RCS: $Id: d_strcoll.U 1.3 Tue, 30 Sep 2003 18:01:23 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: Original Author: Andy Dougherty -?RCS: -?RCS: $Log: d_strcoll.U,v $ -?RCS: Revision 3.0.1.1 1994/08/29 16:12:01 ram -?RCS: patch32: created by ADO -?RCS: -?MAKE:d_strcoll: Inlibc -?MAKE: -pick add $@ %< -?S:d_strcoll: -?S: This variable conditionally defines HAS_STRCOLL if strcoll() is -?S: available to compare strings using collating information. -?S:. -?C:HAS_STRCOLL: -?C: This symbol, if defined, indicates that the strcoll routine is -?C: available to compare strings using collating information. -?C:. -?H:#$d_strcoll HAS_STRCOLL /**/ -?H:. -?M:strcoll: HAS_STRCOLL -?M:#ifndef HAS_STRCOLL -?M:#undef strcoll -?M:#define strcoll strcmp -?M:#endif -?M:. -?W:%<:strcoll -?LINT:set d_strcoll -: see if strcoll exists -set strcoll d_strcoll -eval $inlibc - diff --git a/U/d_strxfrm.U b/U/d_strxfrm.U deleted file mode 100644 index 6d41024..0000000 --- a/U/d_strxfrm.U +++ /dev/null @@ -1,40 +0,0 @@ -?RCS: $Id: d_strxfrm.U 1.2 Tue, 20 Nov 2001 17:08:09 -0600 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: Original Author: Andy Dougherty -?RCS: -?RCS: $Log: d_strxfrm.U,v $ -?RCS: Revision 3.0.1.1 1994/08/29 16:12:01 ram -?RCS: patch32: created by ADO -?RCS: -?MAKE:d_strxfrm: Inlibc -?MAKE: -pick add $@ %< -?S:d_strxfrm: -?S: This variable conditionally defines HAS_STRXFRM if strxfrm() is -?S: available to transform strings using collating information. -?S:. -?C:HAS_STRXFRM: -?C: This symbol, if defined, indicates that the strxfrm routine is -?C: available to transform strings using collating information. -?C:. -?H:#$d_strxfrm HAS_STRXFRM /**/ -?H:. -?M:strxfrm: HAS_STRXFRM -?M:#if !defined(WIN32) && !defined(HAS_STRXFRM) -?M:#define strncoll strncmp -?M:#define strncasecoll strncasecmp -?M:#define strcasecoll strcasecmp -?M:#endif -?M:. -?LINT:set d_strxfrm -: see if strxfrm exists -set strxfrm d_strxfrm -eval $inlibc - diff --git a/U/d_sysctl.U b/U/d_sysctl.U deleted file mode 100644 index 16b2cb2..0000000 --- a/U/d_sysctl.U +++ /dev/null @@ -1,32 +0,0 @@ -?RCS: -?RCS: -?RCS: -?MAKE:d_sysctl d_sysctlbyname: Inlibc -?MAKE: -pick add $@ %< -?S:d_sysctl: -?S: This variable conditionally defines the HAS_SYSCTL symbol, which -?S: indicates that the sysctl() routine exists. -?S:. -?S:d_sysctlbyname: -?S: This variable conditionally defines the HAS_SYSCTLBYNAME symbol, which -?S: indicates that the sysctlbyname() routine exists. -?S:. -?C:HAS_SYSCTL: -?C: This symbol, if defined, indicates that the sysctl() routine is -?C: available to get some system parameters. -?C:. -?C:HAS_SYSCTLBYNAME: -?C: This symbol, if defined, indicates that the sysctlbyname() routine is -?C: available to get some system parameters. -?C:. -?H:#$d_sysctl HAS_SYSCTL /**/ -?H:#$d_sysctlbyname HAS_SYSCTLBYNAME /**/ -?H:. -?LINT:set d_sysctl d_sysctlbyname -: see if sysctl exists -set sysctl d_sysctl -eval $inlibc -: see if sysctlbyname exists -set sysctlbyname d_sysctlbyname -eval $inlibc - diff --git a/U/d_uptime.U b/U/d_uptime.U deleted file mode 100644 index 79c799a..0000000 --- a/U/d_uptime.U +++ /dev/null @@ -1,47 +0,0 @@ -?RCS: $Id: d_uptime.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: d_uptime.U,v $ -?RCS: Revision 3.0.1.2 1993/10/16 13:49:20 ram -?RCS: patch12: added support for HAS_INDEX -?RCS: patch12: added magic for index() and rindex() -?RCS: -?RCS: Revision 3.0.1.1 1993/09/13 16:05:26 ram -?RCS: patch10: now only defines HAS_STRCHR, no macro remap of index (WAD) -?RCS: -?RCS: Revision 3.0 1993/08/18 12:07:32 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:d_uptime : Setvar Oldconfig Csym uptime test -?MAKE: -pick add $@ %< -?S:d_uptime: -?S: This variable conditionally defines UPTIME_PATH if the uptime -?S: program is available. -?S:. -?C:UPTIME_PATH: -?C: This symbol gives the full path to the uptime(1) program if -?C: it exists on the system. If not, this symbol is undefined. -?C:. -?C:HAS_UPTIME: -?C: This symbol is defined if uptime(1) is available. -?C:. -?H:#$d_uptime HAS_UPTIME /**/ -?H:#define UPTIME_PATH "$uptime" -?H:. -?LINT:set d_uptime -: uptime -echo " " -if $test -x $uptime ; then - val="$define" -else - val="$undef" -fi -set d_uptime; eval $setvar - diff --git a/U/d_uwait.U b/U/d_uwait.U deleted file mode 100644 index 80c8bd3..0000000 --- a/U/d_uwait.U +++ /dev/null @@ -1,126 +0,0 @@ -?RCS: $Id: d_uwait.U 1.2 Wed, 09 Aug 2000 14:09:22 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: d_uwait.U,v $ -?RCS: Revision 3.0.1.1 1994/01/24 14:10:49 ram -?RCS: patch16: added knowledge about wait3() -?RCS: patch16: revised 'union wait' look-up algorithm -?RCS: patch16: fixed make dependency line accordingly -?RCS: -?RCS: Revision 3.0 1993/08/18 12:07:54 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:d_uwait d_uwait3: cat contains cppstdin cppminus +cppflags rm \ - Setvar Findhdr -?MAKE: -pick add $@ %< -?S:d_uwait: -?S: This symbol conditionally defines UNION_WAIT which indicates to the C -?S: program that argument for the wait() system call should be declared as -?S: 'union wait status' instead of 'int status'. -?S:. -?S:d_uwait3: -?S: This symbol conditionally defines UNION_WAIT3 which indicates to the C -?S: program that the first argument for the wait3() system call should be -?S: declared as 'union wait status' instead of 'int status'. -?S:. -?C:UNION_WAIT: -?C: This symbol if defined indicates to the C program that the argument -?C: for the wait() system call should be declared as 'union wait status' -?C: instead of 'int status'. You probably need to include -?C: in the former case (see I_SYSWAIT). -?C:. -?C:UNION_WAIT3: -?C: This symbol if defined indicates to the C program that the first argument -?C: for the wait3() system call should be declared as 'union wait status' -?C: instead of 'int status'. You probably need to include -?C: in the former case (see I_SYS_WAIT). It seems safe to assume that the -?C: same rule applies to the second parameter of wait4(). -?C:. -?H:#$d_uwait UNION_WAIT /**/ -?H:#$d_uwait3 UNION_WAIT3 /**/ -?H:. -?T:val2 flags f also -?LINT:set d_uwait d_uwait3 -: see if union wait is available -echo " " -?X: -?X: Unfortunately, we can't just grep for "union wait" because -?X: some weird systems (did I hear HP-UX?) define union wait only when _BSD -?X: is defined. The same thing happens on OSF/1, who is pushing weirdness to -?X: its limits by requiring wait() to use (int *) but wait3() to use -?X: (union wait *), unless _BSD is defined and -lbsd is used, in which case -?X: wait() also expects (union wait *). Aaargh!!--RAM -?X: -set X $cppflags -shift -flags='' -also='' -for f in $*; do - case "$f" in - *NO_PROTO*) ;; - *) flags="$flags $f";; - esac -done -xxx="`./findhdr sys/wait.h`" -case "x$xxx" in -x) xxx=/dev/null -esac -$cat "$xxx" | $cppstdin $flags $cppminus >wait.out 2>/dev/null -if $contains 'union.*wait.*{' wait.out >/dev/null 2>&1 ; then - echo "Looks like your knows about 'union wait'..." >&4 - val="$define" -@if UNION_WAIT - also='also ' - if $contains 'extern.*wait[ ]*([ ]*int' wait.out >/dev/null 2>&1 - then - echo "But wait() seems to expect an 'int' pointer (POSIX way)." >&4 - val="$undef" - also='' - elif $contains 'extern.*wait[ ]*([ ]*union' wait.out >/dev/null 2>&1 - then - echo "And indeed wait() expects an 'union wait' pointer (BSD way)." >&4 - else - echo "So we'll use that for wait()." >&4 - fi -@end -@if UNION_WAIT3 || d_uwait3 - val2="$define" -@end -@if UNION_WAIT3 - if $contains 'extern.*wait3[ ]*([ ]*int' wait.out >/dev/null 2>&1 - then - echo "However wait3() seems to expect an 'int' pointer, weird." >&4 - val2="$undef" - elif $contains 'extern.*wait3[ ]*([ ]*union' wait.out >/dev/null 2>&1 - then - echo "And wait3() ${also}expects an 'union wait' pointer, fine." >&4 - else - echo "As expected, wait3() ${also}uses an 'union wait' pointer." >&4 - fi -@end -else - echo "No trace of 'union wait' in ..." >&4 - val="$undef" -@if UNION_WAIT && UNION_WAIT3 - echo "Both wait() and wait3() will use a plain 'int' pointer then." >&4 -@elsif UNION_WAIT - echo "Your wait() should be happy with a plain 'int' pointer." >&4 -@elsif UNION_WAIT3 - echo "Your wait3() should be happy with a plain 'int' pointer." >&4 -@end -fi -set d_uwait -eval $setvar -@if UNION_WAIT3 || d_uwait3 -val="$val2"; set d_uwait3 -eval $setvar -@end -$rm -f wait.out - diff --git a/U/d_vsnprintf.U b/U/d_vsnprintf.U deleted file mode 100644 index 2f98cba..0000000 --- a/U/d_vsnprintf.U +++ /dev/null @@ -1,41 +0,0 @@ -?RCS: $Id: d_vsnprintf.U 1.2 Sat, 30 Jun 2001 08:59:12 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: d_vsnprintf.U,v $ -?RCS: Revision 3.0 1993/08/18 12:07:59 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:d_vsnprintf: Guess cat +cc +ccflags Csym Setvar -?MAKE: -pick add $@ %< -?S:d_vsnprintf: -?S: This variable conditionally defines the HAS_VSNPRINTF symbol, which -?S: indicates to the C program that the vsnprintf() routine is available -?S: to printf with a pointer to an argument list. -?S:. -?C:HAS_VSNPRINTF: -?C: This symbol, if defined, indicates that the vsnprintf routine is -?C: available to printf with a pointer to an argument list. If not, you -?C: may need to write your own, probably in terms of _doprnt(). -?C:. -?H:#$d_vsnprintf HAS_VSNPRINTF /**/ -?H:. -?LINT:set d_vsnprintf -: see if vsnprintf exists -echo " " -if set vsnprintf val -f d_vsnprintf; eval $csym; $val; then - echo 'vsnprintf() found.' >&4 - val="$define" -else - echo 'vsnprintf() NOT found.' >&4 - val="$undef" -fi -set d_vsnprintf -eval $setvar - diff --git a/U/i_libintl.U b/U/i_libintl.U deleted file mode 100644 index a9b6a98..0000000 --- a/U/i_libintl.U +++ /dev/null @@ -1,33 +0,0 @@ -?RCS: $Id: i_libintl.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: i_libintl.U,v $ -?RCS: Revision 3.0 1993/08/18 12:08:34 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?X: -?X: Look whether can be included -?X: -?MAKE:i_libintl: Inhdr -?MAKE: -pick add $@ %< -?S:i_libintl: -?S: This variable conditionally defines the I_LIBINTL symbol, -?S: and indicates whether a C program can include . -?S:. -?C:I_LIBINTL: -?C: This symbol, if defined, indicates to the C program that it can -?C: include . -?C:. -?H:#$i_libintl I_LIBINTL /**/ -?H:. -?LINT:set i_libintl -: see if libintl.h can be included -set libintl.h i_libintl -eval $inhdr diff --git a/U/i_memory.U b/U/i_memory.U deleted file mode 100644 index f1fe84e..0000000 --- a/U/i_memory.U +++ /dev/null @@ -1,68 +0,0 @@ -?RCS: $Id: i_memory.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: i_memory.U,v $ -?RCS: Revision 1.2 1997/11/25 22:07:30 popiel -?RCS: , -?RCS: -?RCS: Revision 3.0.1.3 1994/06/20 07:01:55 ram -?RCS: patch30: cosmetic changes -?RCS: -?RCS: Revision 3.0.1.2 1994/05/13 15:23:56 ram -?RCS: patch27: modified to avoid spurious Whoa warnings (ADO) -?RCS: -?RCS: Revision 3.0.1.1 1994/05/06 15:02:25 ram -?RCS: patch23: avoid conflicts with -?RCS: -?RCS: Revision 3.0 1993/08/18 12:08:22 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:i_memory: Inhdr strings cppstdin cppflags cppminus contains rm Setvar -?MAKE: -pick add $@ %< -?S:i_memory: -?S: This variable conditionally defines the I_MEMORY symbol, and indicates -?S: whether a C program should include . -?S:. -?C:I_MEMORY: -?C: This symbol, if defined, indicates to the C program that it should -?C: include . -?C:. -?H:#$i_memory I_MEMORY /**/ -?H:. -?LINT:set i_memory -?X: -?X: Unfortunately, the definitions of memory functions sometimes -?X: conflict with those in . We'll assume that if -?X: contains memcpy, then we don't need memory.h -?X: -: see if memory.h is available. -val='' -set memory.h val -eval $inhdr - -: See if it conflicts with string.h -case "$val" in -$define) - case "$strings" in - '') ;; - *) - $cppstdin $cppflags $cppminus < "$strings" > mem.h - if $contains 'memcpy' mem.h >/dev/null 2>&1; then - echo " " - echo "We won't be including ." - val="$undef" - fi - $rm -f mem.h - ;; - esac -esac -set i_memory -eval $setvar - diff --git a/U/i_netdb.U b/U/i_netdb.U deleted file mode 100644 index 41f7ef7..0000000 --- a/U/i_netdb.U +++ /dev/null @@ -1,33 +0,0 @@ -?RCS: $Id: i_netdb.U 1.1 Mon, 26 Mar 2001 15:51:56 -0600 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: i_netdb.U,v $ -?RCS: Revision 3.0 1993/08/18 12:08:34 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?X: -?X: Look whether needs to be included -?X: -?MAKE:i_netdb: Inhdr -?MAKE: -pick add $@ %< -?S:i_netdb: -?S: This variable conditionally defines the I_NETDB symbol, -?S: and indicates whether a C program can include . -?S:. -?C:I_NETDB: -?C: This symbol, if defined, indicates to the C program that it can -?C: include . -?C:. -?H:#$i_netdb I_NETDB /**/ -?H:. -?LINT:set i_netdb -: see if netdb.h can be included -set netdb.h i_netdb -eval $inhdr diff --git a/U/i_sysioctl.U b/U/i_sysioctl.U deleted file mode 100644 index 3643214..0000000 --- a/U/i_sysioctl.U +++ /dev/null @@ -1,202 +0,0 @@ -?RCS: $Id: i_sysioctl.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: i_sysioctl.U,v $ -?RCS: Revision 3.0.1.2 1994/05/06 15:04:57 ram -?RCS: patch23: added knowledge for (WED) -?RCS: patch23: optimized amount of findhdr calls -?RCS: -?RCS: Revision 3.0.1.1 1993/11/10 17:36:09 ram -?RCS: patch14: now use a compiler check for TIOCNOTTY because of HP-UX 9.x -?RCS: -?RCS: Revision 3.0 1993/08/18 12:08:32 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:i_sysioctl i_bsdioctl i_sysfilio i_syssockio d_voidtty: test contains \ - cat i_termio i_termios i_sgtty Setvar Findhdr +cc rm Inhdr -?MAKE: -pick add $@ %< -?S:i_sysioctl: -?S: This variable conditionally defines the I_SYS_IOCTL symbol, which -?S: indicates to the C program that exists and should -?S: be included. -?S:. -?S:i_sysfilio: -?S: This variable conditionally defines the I_SYS_FILIO symbol, which -?S: indicates to the C program that exists and should -?S: be included in preference to . -?S:. -?S:i_bsdioctl: -?S: This variable conditionally defines the I_SYS_BSDIOCTL symbol, which -?S: indicates to the C program that exists and should -?S: be included. -?S:. -?S:i_syssockio: -?S: This variable conditionally defines I_SYS_SOCKIO to indicate to the -?S: C program that socket ioctl codes may be found in -?S: instead of . -?S:. -?S:d_voidtty: -?S: This variable conditionally defines USE_IOCNOTTY to indicate that the -?S: ioctl() call with TIOCNOTTY should be used to void tty association. -?S: Otherwise (on USG probably), it is enough to close the standard file -?S: decriptors and do a setpgrp(). -?S:. -?C:I_SYS_IOCTL (I_SYSIOCTL): -?C: This symbol, if defined, indicates that exists and should -?C: be included. Otherwise, include or . -?C:. -?C:I_SYS_FILIO: -?C: This symbol, if defined, indicates that exists and -?C: should be included instead of . -?C:. -?C:I_SYS_BSDIOCTL (I_BSDIOCTL): -?C: This symbol, if defined, indicates that exists and should -?C: be included. Otherwise, try . This is primarly intended for -?C: definitions of sockets options, like SIOCATMARK. -?C:. -?C:I_SYS_SOCKIO (I_SYSSOCKIO): -?C: This symbol, if defined, indicates the should be included -?C: to get socket ioctl options, like SIOCATMARK. -?C:. -?C:USE_TIOCNOTTY (VOIDTTY): -?C: This symbol, if defined indicate to the C program that the ioctl() -?C: call with TIOCNOTTY should be used to void tty association. -?C: Otherwise (on USG probably), it is enough to close the standard file -?C: decriptors and do a setpgrp(). -?C:. -?H:#$i_sysioctl I_SYS_IOCTL /**/ -?H:#$i_sysfilio I_SYS_FILIO /**/ -?H:#$i_bsdioctl I_SYS_BSDIOCTL /**/ -?H:#$i_syssockio I_SYS_SOCKIO /**/ -?H:#$d_voidtty USE_TIOCNOTTY /**/ -?H:. -?T:xxx -: see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl -?LINT:set i_sysfilio -set sys/filio.h i_sysfilio -eval $inhdr -echo " " -if $test "`./findhdr sys/ioctl.h`"; then - val="$define" - echo ' found.' >&4 -else - val="$undef" - if $test $i_sysfilio = "$define"; then - echo ' NOT found.' >&4 - else - $test $i_sgtty = "$define" && xxx="sgtty.h" - $test $i_termio = "$define" && xxx="termio.h" - $test $i_termios = "$define" && xxx="termios.h" -echo "No found, assuming ioctl args are defined in <$xxx>." >&4 - fi -fi -?LINT:set i_sysioctl -set i_sysioctl -eval $setvar - -@if I_BSDIOCTL || i_bsdioctl -?X: -?X: The only machine I know where this inclusion was necessary is a -?X: BULL DPX 5000 (a French machine). -?X: -: see if socket ioctl defs are in sys/bsdioctl or sys/ioctl -echo " " -xxx="`./findhdr sys/bsdioctl.h`" -if $test "$xxx"; then - if $contains SIOCATMARK $xxx >/dev/null 2>&1; then - val="$define" - echo "You have socket ioctls defined in ." >&4 - else - val="$undef" - echo "No socket ioctls found in ." >&4 - fi -else - val="$undef" - echo " not found, but that's ok." >&4 -fi -?LINT:set i_bsdioctl -set i_bsdioctl -eval $setvar - -@end -@if I_SYSSOCKIO || i_syssockio -: see if socket ioctl defs are in sys/sockio.h -echo " " -xxx="`./findhdr sys/sockio.h`" -if $test "$xxx"; then - if $contains SIOCATMARK $xxx >/dev/null 2>&1; then - val="$define" - echo "You have socket ioctls defined in ." >&4 - else - val="$undef" - echo "No socket ioctls found in ." >&4 - fi -else - val="$undef" -@if I_BSDIOCTL - case "$i_bsdioctl" in - "$define") $cat < not found, using ioctls from . -EOM - ;; - *) $cat < not found, assuming socket ioctls are in . -EOM - ;; - esac -@else - $cat < not found, assuming socket ioctls are in . -EOM -@end -fi -?LINT:set i_syssockio -set i_syssockio -eval $setvar - -@end -@if VOIDTTY || d_voidtty -: check how to void tty association -echo " " -case "$i_sysioctl" in -"$define") xxx='sys/ioctl.h';; -?X: otherwise $xxx was set during the determination of i_sysioctl, above. -esac -?X: -?X: Can't use $contains here since HP-UX 9.x has TIOCNOTTY between a pair -?X: of #ifdef/#endif and is never actually defined. Oh well... -?X: -$cat > tcio.c < /* Just in case */ -#include <$xxx> - -int main() -{ -#ifdef TIOCNOTTY - exit(0); -#else - exit(1); -#endif -} -EOM -if ($cc -o tcio tcio.c && ./tcio) >/dev/null 2>&1; then - val="$define" - echo "TIOCNOTTY found in <$xxx>." >&4 - echo "Using ioctl() call on /dev/tty to void tty association." >&4 -else - val="$undef" - echo "Closing standard file descriptors should void tty association." >&4 -fi -?LINT:set d_voidtty -set d_voidtty -eval $setvar -$rm -f tcio tcio.? core - -@end diff --git a/U/i_termio.U b/U/i_termio.U deleted file mode 100644 index 1259aad..0000000 --- a/U/i_termio.U +++ /dev/null @@ -1,123 +0,0 @@ -?RCS: $Id: i_termio.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: i_termio.U,v $ -?RCS: Revision 3.0.1.4 1994/10/29 16:20:54 ram -?RCS: patch36: call ./usg and ./Cppsym explicitely instead of relying on PATH -?RCS: -?RCS: Revision 3.0.1.3 1994/08/29 16:26:38 ram -?RCS: patch32: don't include all threee I_* symbols in config.h -?RCS: patch32: (had forgotten to undo this part last time) -?RCS: -?RCS: Revision 3.0.1.2 1994/05/13 15:25:03 ram -?RCS: patch27: undone ADO's fix in previous patch since it was useless -?RCS: -?RCS: Revision 3.0.1.1 1994/05/06 15:05:23 ram -?RCS: patch23: now include all three defines in config.h (ADO) -?RCS: -?RCS: Revision 3.0 1993/08/18 12:08:44 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:i_termio i_sgtty i_termios: test Inlibc Cppsym Guess Setvar Findhdr -?MAKE: -pick add $@ %< -?S:i_termio: -?S: This variable conditionally defines the I_TERMIO symbol, which -?S: indicates to the C program that it should include rather -?S: than . -?S:. -?S:i_termios: -?S: This variable conditionally defines the I_TERMIOS symbol, which -?S: indicates to the C program that the POSIX file is -?S: to be included. -?S:. -?S:i_sgtty: -?S: This variable conditionally defines the I_SGTTY symbol, which -?S: indicates to the C program that it should include rather -?S: than . -?S:. -?C:I_TERMIO: -?C: This symbol, if defined, indicates that the program should include -?C: rather than . There are also differences in -?C: the ioctl() calls that depend on the value of this symbol. -?C:. -?C:I_TERMIOS: -?C: This symbol, if defined, indicates that the program should include -?C: the POSIX termios.h rather than sgtty.h or termio.h. -?C: There are also differences in the ioctl() calls that depend on the -?C: value of this symbol. -?C:. -?C:I_SGTTY: -?C: This symbol, if defined, indicates that the program should include -?C: rather than . There are also differences in -?C: the ioctl() calls that depend on the value of this symbol. -?C:. -?H:#$i_termio I_TERMIO /**/ -?H:#$i_termios I_TERMIOS /**/ -?H:#$i_sgtty I_SGTTY /**/ -?H:. -?T:val2 val3 -?LINT:set i_termio i_sgtty i_termios -: see if this is a termio system -val="$undef" -val2="$undef" -val3="$undef" -?X: Prefer POSIX-approved termios.h over all else -if $test "`./findhdr termios.h`"; then - set tcsetattr i_termios - eval $inlibc - val3="$i_termios" -fi -echo " " -case "$val3" in -"$define") echo "You have POSIX termios.h... good!" >&4;; -*) if ./Cppsym pyr; then - case "`/bin/universe`" in - ucb) if $test "`./findhdr sgtty.h`"; then - val2="$define" - echo " found." >&4 - else - echo "System is pyramid with BSD universe." - echo " not found--you could have problems." >&4 - fi;; - *) if $test "`./findhdr termio.h`"; then - val="$define" - echo " found." >&4 - else - echo "System is pyramid with USG universe." - echo " not found--you could have problems." >&4 - fi;; - esac -?X: Start with USG to avoid problems if both usg/bsd was guessed - elif ./usg; then - if $test "`./findhdr termio.h`"; then - echo " found." >&4 - val="$define" - elif $test "`./findhdr sgtty.h`"; then - echo " found." >&4 - val2="$define" - else -echo "Neither nor found--you could have problems." >&4 - fi - else - if $test "`./findhdr sgtty.h`"; then - echo " found." >&4 - val2="$define" - elif $test "`./findhdr termio.h`"; then - echo " found." >&4 - val="$define" - else -echo "Neither nor found--you could have problems." >&4 - fi - fi;; -esac -set i_termio; eval $setvar -val=$val2; set i_sgtty; eval $setvar -val=$val3; set i_termios; eval $setvar - diff --git a/U/i_varhdr.U b/U/i_varhdr.U deleted file mode 100644 index f03da79..0000000 --- a/U/i_varhdr.U +++ /dev/null @@ -1,165 +0,0 @@ -?RCS: $Id: i_varhdr.U 1.2 Tue, 30 Sep 2003 18:01:23 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: i_varhdr.U,v $ -?RCS: Revision 3.0.1.3 1997/02/28 15:54:42 ram -?RCS: patch61: varargs script now starts with leading "startsh" -?RCS: -?RCS: Revision 3.0.1.2 1994/10/29 16:21:02 ram -?RCS: patch36: added ?F: line for metalint file checking -?RCS: -?RCS: Revision 3.0.1.1 1994/05/13 15:26:05 ram -?RCS: patch27: this unit now supersedes old i_stdarg.U and i_varargs.U -?RCS: patch27: modified to avoid spurious Whoa warnings (ADO) -?RCS: -?RCS: Revision 3.0 1993/08/18 12:08:49 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:i_stdarg i_varargs i_varhdr: cat cc ccflags rm test Setvar \ - Findhdr startsh _o ldflags -?MAKE: -pick add $@ %< -?S:i_stdarg: -?S: This variable conditionally defines the I_STDARG symbol, which -?S: indicates to the C program that exists and should -?S: be included. -?S:. -?S:i_varargs: -?S: This variable conditionally defines I_VARARGS, which indicates -?S: to the C program that it should include . -?S:. -?S:i_varhdr: -?S: Contains the name of the header to be included to get va_dcl definition. -?S: Typically one of varargs.h or stdarg.h. -?S:. -?C:I_STDARG: -?C: This symbol, if defined, indicates that exists and should -?C: be included. -?C:. -?C:I_VARARGS: -?C: This symbol, if defined, indicates to the C program that it should -?C: include . -?C:. -?H:#$i_stdarg I_STDARG /**/ -?H:. -?H:#$i_varargs I_VARARGS /**/ -?H:. -?W:%<:va_dcl -?F:!varargs -?T:valstd -?LINT:set i_stdarg i_varargs -?X: -?X: Don't use setvar because the varags test below might override these. -?X: Actually, the messages here are just informative. We don't wish to set -?X: i_varargs or i_stdarg to their final value before knowing which of the -?X: two we'll include. -?X: -: see if stdarg is available -echo " " -if $test "`./findhdr stdarg.h`"; then - echo " found." >&4 - valstd="$define" -else - echo " NOT found." >&4 - valstd="$undef" -fi - -: see if varags is available -echo " " -if $test "`./findhdr varargs.h`"; then - echo " found." >&4 -else - echo " NOT found, but that's ok (I hope)." >&4 -fi - -?X: -?X: if you have stdarg.h, you need to support prototypes to actually use it; -?X: but if stdarg.h exists and the compiler doesn't support prototypes (for some -?X: bizarre reason), we'll fall back to varargs.h anyway so it's not so bad. -?X: -: set up the varargs testing programs -$cat > varargs.c < -#endif -#ifdef I_VARARGS -#include -#endif - -#ifdef I_STDARG -int f(char *p, ...) -#else -int f(va_alist) -va_dcl -#endif -{ - va_list ap; -#ifndef I_STDARG - char *p; -#endif -#ifdef I_STDARG - va_start(ap,p); -#else - va_start(ap); - p = va_arg(ap, char *); -#endif - va_end(ap); -} -EOP -$cat > varargs </dev/null 2>&1; then - echo "true" -else - echo "false" -fi -$rm -f varargs$_o -EOP -chmod +x varargs - -: now check which varargs header should be included -echo " " -i_varhdr='' -case "$valstd" in -"$define") - if `./varargs I_STDARG`; then - val='stdarg.h' - elif `./varargs I_VARARGS`; then - val='varargs.h' - fi - ;; -*) - if `./varargs I_VARARGS`; then - val='varargs.h' - fi - ;; -esac -case "$val" in -'') -echo "I could not find the definition for va_dcl... You have problems..." >&4 - val="$undef"; set i_stdarg; eval $setvar - val="$undef"; set i_varargs; eval $setvar - ;; -*) - set i_varhdr - eval $setvar - case "$i_varhdr" in - stdarg.h) - val="$define"; set i_stdarg; eval $setvar - val="$undef"; set i_varargs; eval $setvar - ;; - varargs.h) - val="$undef"; set i_stdarg; eval $setvar - val="$define"; set i_varargs; eval $setvar - ;; - esac - echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;; -esac -$rm -f varargs* - diff --git a/U/libc.U b/U/libc.U deleted file mode 100644 index e224b16..0000000 --- a/U/libc.U +++ /dev/null @@ -1,368 +0,0 @@ -?RCS: $Id: libc.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: libc.U,v $ -?RCS: Revision 3.0.1.10 1997/02/28 15:56:48 ram -?RCS: patch61: replaced .a with $_a all over the place -?RCS: patch61: added support for HPUX-10 nm output -?RCS: -?RCS: Revision 3.0.1.9 1995/07/25 14:11:56 ram -?RCS: patch56: now knows about OS/2 platforms -?RCS: -?RCS: Revision 3.0.1.8 1995/05/12 12:20:47 ram -?RCS: patch54: made sure only most recent version of shared lib is picked -?RCS: patch54: final "nm -p" check now uses xscan and xrun like everybody -?RCS: patch54: can now grok linux nm output with lead __IO (ADO) -?RCS: patch54: added support for linux ELF output, using 'W' for alias (ADO) -?RCS: -?RCS: Revision 3.0.1.7 1994/10/29 16:23:40 ram -?RCS: patch36: now looks for shared libraries before anything else (ADO) -?RCS: patch36: added new nm output format (ADO) -?RCS: -?RCS: Revision 3.0.1.6 1994/08/29 16:28:10 ram -?RCS: patch32: added I-type symbols for nm output parsing on Linux -?RCS: -?RCS: Revision 3.0.1.5 1994/06/20 07:03:24 ram -?RCS: patch30: checks are now presented by succession of if/elif -?RCS: patch30: uniformized checks for shared objects with new so symbol -?RCS: -?RCS: Revision 3.0.1.4 1994/05/06 15:06:33 ram -?RCS: patch23: added shared library knowledge (ADO and WED) -?RCS: -?RCS: Revision 3.0.1.3 1994/01/24 14:12:17 ram -?RCS: patch16: can now export nm_extract as an internal-use only variable -?RCS: -?RCS: Revision 3.0.1.2 1993/09/13 16:09:03 ram -?RCS: patch10: added special handling for Apollo systems (WAD) -?RCS: -?RCS: Revision 3.0.1.1 1993/08/27 14:40:03 ram -?RCS: patch7: added entry for /usr/shlib/libc.so (OSF/1 machines) -?RCS: -?RCS: Revision 3.0 1993/08/18 12:08:57 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:libc +nm_extract: echo n c rm test grep Getfile Myread Oldconfig Loc \ - sed libs incpath libpth runnm nm_opt nm_so_opt contains xlibpth so _a _o -?MAKE: -pick add $@ %< -?S:libc: -?S: This variable contains the location of the C library. -?S:. -?S:nm_extract: -?S: This variable holds the name of the extraction command used to process -?S: the output of nm and yield the list of defined symbols. It is used -?S: internally by Configure. -?S:. -?T:thislib try libnames xxx xscan xrun thisname com tans file -?F:!libnames -?LINT:change nm_opt -case "$runnm" in -true) -?X: indentation is wrong on purpose--RAM -: get list of predefined functions in a handy place -echo " " -case "$libc" in -'') libc=unknown - case "$libs" in - *-lc_s*) libc=`./loc libc_s$_a $libc $libpth` - esac - ;; -esac -libnames=''; -case "$libs" in -'') ;; -*) for thislib in $libs; do - case "$thislib" in - -lc|-lc_s) - : Handle C library specially below. - ;; - -l*) - thislib=`echo $thislib | $sed -e 's/^-l//'` - if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then - : - elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then - : - elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then - : - elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then - : - elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then - : - elif try=`./loc $thislib X $libpth`; $test -f "$try"; then - : - elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then - : - else - try='' - fi - libnames="$libnames $try" - ;; - *) libnames="$libnames $thislib" ;; - esac - done - ;; -esac -?X: -?X: Some systems (e.g. DG/UX) use "environmental" links, which make the test -?X: -f fail. Ditto for symbolic links. So in order to reliably check the -?X: existence of a file, we use test -r. It will still fail with DG/UX links -?X: though, but at least it will detect symbolic links. At some strategic -?X: points, we make use of (test -h), using a sub-shell in case builtin test -?X: does not implement the -h check for symbolic links. This makes it -?X: possible to preset libc in a hint file for instance and have it show up -?X: as-is in the question. -?X: -xxx=normal -case "$libc" in -unknown) -?X: -?X: The sed below transforms .so.9 .so.12 into something like .so.0009 .so.0012, -?X: then sorts on it to allow keeping .so.12 instead of .so.9 as the latest -?X: up-to-date library. The initial filename (before sed munging, saved in hold -?X: space via 'h') is appended via 'G' before sorting, then the leading munged -?X: part is removed after sorting. Nice efficient work from Tye McQueen. -?X: The initial blurfl is here to prevent the trailing pipe from producing an -?X: empty string, causing Configure to output all its set variables! -?X: - set /lib/libc.$so - for xxx in $libpth; do - $test -r $1 || set $xxx/libc.$so - $test -r $1 || \ - set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \ - tr ' ' '\012' | egrep -v '\.[A-Za-z]*$' | $sed -e ' - h - s/[0-9][0-9]*/0000&/g - s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g - G - s/\n/ /' | \ - sort | $sed -e 's/^.* //'` - eval set \$$# - done - $test -r $1 || set /usr/ccs/lib/libc.$so - $test -r $1 || set /lib/libsys_s$_a - ;; -*) -?X: ensure the test below for the (shared) C library will fail - set blurfl - ;; -esac -if $test -r "$1"; then - echo "Your (shared) C library seems to be in $1." - libc="$1" -elif $test -r /lib/libc && $test -r /lib/clib; then -?X: -?X: Apollo has its C library in /lib/clib AND /lib/libc -?X: not to mention its math library in /lib/syslib... -?X: - echo "Your C library seems to be in both /lib/clib and /lib/libc." - xxx=apollo - libc='/lib/clib /lib/libc' - if $test -r /lib/syslib; then - echo "(Your math library is in /lib/syslib.)" -?X: Put syslib in libc -- not quite right, but won't hurt - libc="$libc /lib/syslib" - fi -elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then - echo "Your C library seems to be in $libc, as you said before." -?X: For mips, and... -elif $test -r $incpath/usr/lib/libc$_a; then - libc=$incpath/usr/lib/libc$_a; - echo "Your C library seems to be in $libc. That's fine." -elif $test -r /lib/libc$_a; then - libc=/lib/libc$_a; - echo "Your C library seems to be in $libc. You're normal." -else - if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then - : - elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then - libnames="$libnames "`./loc clib blurfl/dyick $libpth` - elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then - : - elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then - : - elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then - : - else - tans=`./loc Llibc$_a blurfl/dyick $xlibpth` - fi - if $test -r "$tans"; then - echo "Your C library seems to be in $tans, of all places." - libc=$tans - else - libc='blurfl' - fi -fi -if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then - dflt="$libc" - cat < libpath - cat >&4 < libnames -set X `cat libnames` -shift -xxx=files -case $# in 1) xxx=file; esac -echo "Extracting names from the following $xxx for later perusal:" >&4 -echo " " -$sed 's/^/ /' libnames >&4 -echo " " -$echo $n "This may take a while...$c" >&4 - -?X: -?X: Linux may need the special Dynamic option to nm for shared libraries. -?X: In general, this is stored in the nm_so_opt variable. -?X: Unfortunately, that option may be fatal on non-shared libraries. -?X: -for file in $*; do - case $file in - *$so*) nm $nm_so_opt $nm_opt $file 2>/dev/null;; - *) nm $nm_opt $file 2>/dev/null;; - esac -done >libc.tmp - -$echo $n ".$c" -?X: -?X: To accelerate processing, we look at the correct 'sed' command -?X: by using a small subset of libc.tmp, i.e. fprintf function. -?X: When we know which sed command to use, do the name extraction -?X: -$grep fprintf libc.tmp > libc.ptf -?X: -?X: In order to ehance readability and save some space, we define -?X: some variables that will be "eval"ed. -?X: -xscan='eval "libc.list"; $echo $n ".$c" >&4' -xrun='eval "libc.list"; echo "done" >&4' -?X: BSD-like output, I and W types added for Linux -?X: Some versions of Linux include a leading __IO in the symbol name. -?X: HPUX10 reportedly has trailing spaces, though I'm suprised it has -?X: BSD-like output. (AD). -xxx='[ADTSIW]' -if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx *//p'";\ - eval $xscan;\ - $contains '^fprintf$' libc.list >/dev/null 2>&1; then - eval $xrun -?X: SYSV-like output -elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\ - eval $xscan;\ - $contains '^fprintf$' libc.list >/dev/null 2>&1; then - eval $xrun -elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\ - eval $xscan;\ - $contains '^fprintf$' libc.list >/dev/null 2>&1; then - eval $xrun -elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\ - eval $xscan;\ - $contains '^fprintf$' libc.list >/dev/null 2>&1; then - eval $xrun -elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\ - eval $xscan;\ - $contains '^fprintf$' libc.list >/dev/null 2>&1; then - eval $xrun -elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\ - eval $xscan;\ - $contains '^fprintf$' libc.list >/dev/null 2>&1; then - eval $xrun -elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \ - -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\ - eval $xscan;\ - $contains '^fprintf$' libc.list >/dev/null 2>&1; then - eval $xrun -elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\ - eval $xscan;\ - $contains '^fprintf$' libc.list >/dev/null 2>&1; then - eval $xrun -?X: mips nm output (sysV) -elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\ - eval $xscan;\ - $contains '^fprintf$' libc.list >/dev/null 2>&1; then - eval $xrun -elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\ - eval $xscan;\ - $contains '^fprintf$' libc.list >/dev/null 2>&1; then - eval $xrun -?X: OS/2 nm output -elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\ - eval $xscan;\ - $contains '^fprintf$' libc.list >/dev/null 2>&1; then - eval $xrun -elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\ - eval $xscan;\ - $contains '^fprintf$' libc.list >/dev/null 2>&1; then - eval $xrun -else - nm -p $* 2>/dev/null >libc.tmp - $grep fprintf libc.tmp > libc.ptf - if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\ - eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1 - then - nm_opt='-p' - eval $xrun - else - echo " " - echo "nm didn't seem to work right. Trying ar instead..." >&4 - com='' - if ar t $libc > libc.tmp; then - for thisname in $libnames; do - ar t $thisname >>libc.tmp - done - $sed -e "s/\\$_o\$//" < libc.tmp > libc.list - echo "Ok." >&4 - else - echo "ar didn't seem to work right." >&4 - echo "Maybe this is a Cray...trying bld instead..." >&4 - if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list - then - for thisname in $libnames; do - bld t $libnames | \ - $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list - ar t $thisname >>libc.tmp - done - echo "Ok." >&4 - else - echo "That didn't work either. Giving up." >&4 - exit 1 - fi - fi - fi -fi -nm_extract="$com" -if $test -f /lib/syscalls.exp; then - echo " " - echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4 - $sed -n 's/^\([^ ]*\)[ ]*syscall$/\1/p' /lib/syscalls.exp >>libc.list -fi -?X: remember, indentation is wrong on purpose--RAM -;; -esac -$rm -f libnames libpath - diff --git a/U/libs.U b/U/libs.U deleted file mode 100644 index bbcd45c..0000000 --- a/U/libs.U +++ /dev/null @@ -1,212 +0,0 @@ -?RCS: $Id: libs.U 1.1 Thu, 20 Jul 2000 17:42:54 -0500 dunemush $ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: libs.U,v $ -?RCS: Revision 3.0.1.6 1997/02/28 16:09:11 ram -?RCS: patch61: replaced .a with $_a all over the place -?RCS: -?RCS: Revision 3.0.1.5 1995/07/25 14:12:05 ram -?RCS: patch56: now knows about OS/2 platforms -?RCS: -?RCS: Revision 3.0.1.4 1994/10/29 16:24:22 ram -?RCS: patch36: removed old broken thislib/thatlib processing (ADO) -?RCS: -?RCS: Revision 3.0.1.3 1994/06/20 07:05:44 ram -?RCS: patch30: code cleanup with if/elif by ADO and RAM -?RCS: patch30: undone patch23 for libswanted default setting -?RCS: -?RCS: Revision 3.0.1.2 1994/05/06 15:08:45 ram -?RCS: patch23: now includes ordered default libswanted variable (ADO) -?RCS: patch23: major cleanup for library lookups (ADO) -?RCS: -?RCS: Revision 3.0.1.1 1993/08/25 14:02:31 ram -?RCS: patch6: added default for libs -?RCS: -?RCS: Revision 3.0 1993/08/18 12:09:03 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:libs: test cat Myread Oldconfig Loc libpth package xlibpth so _a -?MAKE: -pick add $@ %< -?S:libs: -?S: This variable holds the additional libraries we want to use. -?S: It is up to the Makefile to deal with it. -?S:. -?T:xxx thislib libswanted -?D:libs='' -?X: -?X: This order is chosen so that libraries -lndir, -ldir, -lucb, -lbsd, -?X: -lBSD, -lPW, and -lx only get used if there are unresolved -?X: routines at link time. Usually, these are backwards compatability -?X: libraries, and may not be as reliable as the standard c library. -?X: -?X: The -lsocket -linet -lnsl order has been reported to be necessary -?X: for at least one SVR4 implementation. -?X: -lc must proceed -lucb or -lbsd for most Solaris applications. -?X: -lc_s proceeds -lc so we pick up the shared library version, if -?X: it is available. -?X: -?X: The ordering of c, posix, and cposix is a guess and almost -?X: certainly wrong on about half of all systems. -?X: -?X: Set proper libswanted in your private Myinit.U if needed. -?X: -?X:: default ordered library list -?X:libswanted='net socket inet nsl nm sdbm gdbm ndbm dbm malloc dl' -?X:libswanted="$libswanted dld sun m c_s c posix cposix ndir dir ucb" -?X:libswanted="$libswanted bsd BSD PW x" -?X: -?INIT:: default library list -?INIT:libswanted='' -: Looking for optional libraries -echo " " -echo "Checking for optional libraries..." >&4 -case "$libs" in -' '|'') dflt='';; -*) dflt="$libs";; -esac -case "$libswanted" in -'') libswanted='c_s';; -esac -for thislib in $libswanted; do - -?X: -?X: Comparaisons via case statement use the string " $dflt " to ensure that -?X: each library is separated by a space. That way, by looking to something -?X: like *"-l$thislib "*, we ensure we find -lm and not -lmalloc (which was -?X: the case with the old looking pattern *-l$thislib*. -?X: - -?X: A kludge - if we find libbind, we don't want libresolv - - if $test "$thislib" = "resolv"; then - case " $dflt " in - *"-lbind "*) echo "We've already found -lbind, so we don't need -lresolv" ;; - *) - - if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then - echo "Found -l$thislib (shared)." - case " $dflt " in - *"-l$thislib "*);; - *) dflt="$dflt -l$thislib";; - esac - elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then - echo "Found -l$thislib (shared)." - case " $dflt " in - *"-l$thislib "*);; - *) dflt="$dflt -l$thislib";; - esac - elif xxx=`./loc lib$thislib$_a X $libpth`; $test -f "$xxx"; then - echo "Found -l$thislib." - case " $dflt " in - *"-l$thislib "*);; - *) dflt="$dflt -l$thislib";; - esac -?X: Don't forget about OS/2 where -lmalloc is spelled out malloc.a - elif xxx=`./loc $thislib$_a X $libpth`; $test -f "$xxx"; then - echo "Found -l$thislib." - case " $dflt " in - *"-l$thislib "*);; - *) dflt="$dflt -l$thislib";; - esac - elif xxx=`./loc lib${thislib}_s$_a X $libpth`; $test -f "$xxx"; then - echo "Found -l${thislib}_s." - case " $dflt " in - *"-l$thislib "*);; - *) dflt="$dflt -l${thislib}_s";; - esac - elif xxx=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$xxx"; then - echo "Found -l$thislib." - case " $dflt " in - *"-l$thislib "*);; - *) dflt="$dflt -l$thislib";; - esac - else - echo "No -l$thislib." - fi - - ;; - esac - else - - if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then - echo "Found -l$thislib (shared)." - case " $dflt " in - *"-l$thislib "*);; - *) dflt="$dflt -l$thislib";; - esac - elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then - echo "Found -l$thislib (shared)." - case " $dflt " in - *"-l$thislib "*);; - *) dflt="$dflt -l$thislib";; - esac - elif xxx=`./loc lib$thislib$_a X $libpth`; $test -f "$xxx"; then - echo "Found -l$thislib." - case " $dflt " in - *"-l$thislib "*);; - *) dflt="$dflt -l$thislib";; - esac -?X: Don't forget about OS/2 where -lmalloc is spelled out malloc.a - elif xxx=`./loc $thislib$_a X $libpth`; $test -f "$xxx"; then - echo "Found -l$thislib." - case " $dflt " in - *"-l$thislib "*);; - *) dflt="$dflt -l$thislib";; - esac - elif xxx=`./loc lib${thislib}_s$_a X $libpth`; $test -f "$xxx"; then - echo "Found -l${thislib}_s." - case " $dflt " in - *"-l$thislib "*);; - *) dflt="$dflt -l${thislib}_s";; - esac - elif xxx=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$xxx"; then - echo "Found -l$thislib." - case " $dflt " in - *"-l$thislib "*);; - *) dflt="$dflt -l$thislib";; - esac - else - echo "No -l$thislib." - fi - - fi -done -set X $dflt -shift -dflt="$*" -case "$libs" in -'') dflt="$dflt";; -*) dflt="$libs";; -esac -case "$dflt" in -' '|'') dflt='none';; -esac - -$cat < /etc/passwd (WED) -?RCS: -?RCS: Revision 3.0.1.1 1993/09/13 16:10:09 ram -?RCS: patch10: made questions more explicit for 'Configure -s' prompting (WAD) -?RCS: -?RCS: Revision 3.0 1993/08/18 12:09:20 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:nametype d_passnames d_berknames d_usgnames: Myread Guess Oldconfig cat test osname -?MAKE: -pick add $@ %< -?S:nametype: -?S: This variable indicates how full names are stored on this system. -?S: Values are bsd, usg, and other. -?S:. -?S:d_passnames: -?S: This variable conditionally defines the PASSNAMES symbol, -?S: which indicates to the C program that full names are stored in -?S: the /etc/passwd file. -?S:. -?S:d_berknames: -?S: This variable conditionally defines the PASSNAMES symbol, -?S: which indicates to the C program that full names are stored in -?S: the /etc/passwd file in Berkeley format. -?S:. -?S:d_usgnames: -?S: This variable conditionally defines the PASSNAMES symbol, -?S: which indicates to the C program that full names are stored in -?S: the /etc/passwd file in USG format. -?S:. -?C:PASSNAMES: -?C: This symbol, if defined, indicates that full names are stored in -?C: the /etc/passwd file. -?C:. -?C:BERKNAMES: -?C: This symbol, if defined, indicates that full names are stored in -?C: the /etc/passwd file in Berkeley format (name first thing, everything -?C: up to first comma, with & replaced by capitalized login id, yuck). -?C:. -?C:USGNAMES: -?C: This symbol, if defined, indicates that full names are stored in -?C: the /etc/passwd file in USG format (everything after - and before ( is -?C: the name). -?C:. -?H:#$d_passnames PASSNAMES /* (undef to take name from ~/.fullname) */ -?H:#$d_berknames BERKNAMES /* (that is, ":name,stuff:") */ -?H:#$d_usgnames USGNAMES /* (that is, ":stuff-name(stuff):") */ -?H:. -: find out how to find out full name -case "$d_berknames" in -"$define") - dflt=y;; -"$undef") - dflt=n;; -*) - if ./bsd; then - dflt=y - elif ./xenix; then - dflt=y - elif $test "x$osname" = "xlinux"; then - dflt=y - else - dflt=n - fi - ;; -esac -$cat <<'EOM' - -Does your /etc/passwd file keep full names in Berkeley/V7 format (name first -thing after ':' in GCOS field)? In that case, a typical entry in the password -file looks like this: - - guest:**paswword**:10:100:Mister Guest User:/usr/users:/bin/sh - ^^^^^^^^^^^^^^^^^ -EOM -rp="Berkeley/V7 format for full name in /etc/passwd?" -. ./myread -case "$ans" in -y*) d_passnames="$define" - d_berknames="$define" - d_usgnames="$undef" - nametype=bsd - ;; -*) - case "$d_usgnames" in - "$define") dflt=y;; - "$undef") dflt=n;; - *) - if ./usg; then - dflt=y - else - dflt=n - fi - ;; - esac -$cat <<'EOM' - -Does your passwd file keep full names in USG format (name sandwiched between a -'-' and a '(')? In that case, a typical entry in the password file looks like -this: - - guest:**paswword**:10:100:000-Mister Guest User(000):/usr/users:/bin/sh - ^^^^^^^^^^^^^^^^^ -EOM - rp="USG format for full name in /etc/passwd?" - . ./myread - case "$ans" in - n*) echo "Full name will be taken from ~/.fullname" - d_passnames="$undef" - d_berknames="$undef" - d_usgnames="$undef" - nametype=other - ;; - *) - d_passnames="$define" - d_berknames="$undef" - d_usgnames="$define" - nametype=usg - ;; - esac;; -esac - diff --git a/U/sockopt.U b/U/sockopt.U deleted file mode 100644 index 683987c..0000000 --- a/U/sockopt.U +++ /dev/null @@ -1,120 +0,0 @@ -?RCS: $Id$ -?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: sockopt.U,v $ -?RCS: Revision 3.0.1.1 1995/07/25 14:16:14 ram -?RCS: patch56: obsoleted KEEPALIVE in favor of CAN_KEEPALIVE for consistency -?RCS: -?RCS: Revision 3.0 1993/08/18 12:09:48 ram -?RCS: Baseline for dist 3.0 netwide release. -?RCS: -?MAKE:d_keepalive d_keepidle: cat rm contains +cc +ccflags socketlib sockethdr \ - d_oldsock libs Oldconfig Setvar Findhdr i_nitcp -?MAKE: -pick add $@ %< -?S:d_keepalive: -?S: This symbol conditionally defines CAN_KEEPALIVE which indicates to the C -?S: program that setsockopt SO_KEEPALIVE will work properly. -?S:. -?S:d_keepidle: -?S: This symbol conditionally defines CAN_KEEPIDLE which indicates to the C -?S: program that setsockopt TCP_KEEPIDLE will work properly. -?S:. -?C:CAN_KEEPALIVE: -?C: This symbol if defined indicates to the C program that the SO_KEEPALIVE -?C: option of setsockopt() will work as advertised in the manual. -?C:. -?C:CAN_KEEPIDLE: -?C: This symbol if defined indicates to the C program that the TCP_KEEPIDLE -?C: option of setsockopt() will work as advertised in the manual. -?C:. -?H:#$d_keepalive CAN_KEEPALIVE /**/ -?H:. -?H:#$d_keepidle CAN_KEEPIDLE /**/ -?H:. -?LINT:set d_keepalive d_keepidle -: see if setsockopt with SO_KEEPALIVE works as advertised -echo " " -case "$d_oldsock" in -"$undef") - echo "OK, let's see if SO_KEEPALIVE works as advertised..." >&4 - $cat > socket.c < -#include -#include -#$i_nitcp I_NETINET_TCP -#ifdef I_NETINET_TCP -#include -#endif -#include - -main() -{ - int s = socket(AF_INET, SOCK_STREAM, 0); - int val = 1; - if (s == -1) - exit(1); - if (-1 == setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val))) - exit(2); -#ifdef I_NETINET_TCP -#ifdef TCP_KEEPIDLE - val = 1; - if (-1 == setsockopt(s, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val))) - exit(3); -#else - exit(3); -#endif -#endif - exit(0); -} -EOP - if $cc $ccflags $sockethdr socket.c -o socket $libs \ - $socketlib >/dev/null 2>&1; then - ./socket >/dev/null 2>&1 - case $? in - 0) echo "Yes, it does!" - val="$define" - val2="$i_nitcp" - ;; - 1) $cat </dev/null` - if $test $dflt -gt 20; then - dflt=y - else - dflt=n - fi - ;; - esac - ;; -*) - case "$usenm" in - true) dflt=y;; - *) dflt=n;; - esac - ;; -esac -$cat < /dev/null 2>&1; then - nm_so_opt='--dynamic' - fi - ;; - esac - ;; -esac - diff --git a/hdrs/command.h b/hdrs/command.h index 643a205..03665ab 100644 --- a/hdrs/command.h +++ b/hdrs/command.h @@ -105,7 +105,7 @@ void command_name(COMMAND_INFO *cmd __attribute__ ((__unused__)), \ char *args_left[MAX_ARG] __attribute__ ((__unused__)), \ char *arg_right __attribute__ ((__unused__)), \ char *args_right[MAX_ARG] __attribute__ ((__unused__)), \ - int fromport) + int fromport __attribute__ ((__unused__))) /** Common command prototype macro */ #define COMMAND_PROTO(command_name) \ diff --git a/hdrs/cron.h b/hdrs/cron.h index 7a6b4c7..9635303 100644 --- a/hdrs/cron.h +++ b/hdrs/cron.h @@ -109,7 +109,7 @@ cronspec current_spec(void); int cmpspec(cronspec a, cronspec b); long long num_to_bits(unsigned int num); -long long parse_spec(const char *str, unsigned int maximum, NVALUE *table, NVALUE_ALIAS *alias, char *format, char **fp); +long long parse_spec(const char *str, int maximum, NVALUE *table, NVALUE_ALIAS *alias, char *format, char **fp); char *show_spec(cronspec *spec); cronjob *new_job(void); diff --git a/hdrs/game.h b/hdrs/game.h index 39e519f..6dbf852 100644 --- a/hdrs/game.h +++ b/hdrs/game.h @@ -42,7 +42,7 @@ extern void do_restart_com(dbref player, const char *arg1); /* Only QID_ACTIVE, QID_FALSE, and QID_FREEZE actually get thrown on a qid cell. * * other are just used to pass in function shit */ enum qid_flags {QID_ACTIVE, QID_KILL, QID_FREEZE, QID_CONT, QID_TIME, QID_QUERY_T, QID_FALSE}; -extern int do_signal_qid(dbref signalby, int qid, enum qid_flags qid_flags, int time); +extern int do_signal_qid(dbref signalby, unsigned qid, enum qid_flags qid_flags, int time); /* From command.c */ enum hook_type { HOOK_BEFORE, HOOK_AFTER, HOOK_IGNORE, HOOK_OVERRIDE }; diff --git a/src/attrib.c b/src/attrib.c index eb3b861..f8c814f 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -135,7 +135,7 @@ static ATTR *find_atr_in_list(ATTR * atr, char const *name); * lock_owner - lock owner **/ -int cannot_write_this_attr_internal(dbref player, ATTR *attr, dbref obj, char safe, char ns_chk, dbref lowner) { +int cannot_write_this_attr_internal(dbref player, ATTR *attr, dbref obj, char safe __attribute__ ((__unused__)), char ns_chk, dbref lowner) { dbref lock_owner; if(!GoodObject(lowner)) diff --git a/src/boolexp.c b/src/boolexp.c index d099b88..637f58e 100644 --- a/src/boolexp.c +++ b/src/boolexp.c @@ -376,7 +376,7 @@ safe_get_bytecode(boolexp b) static unsigned char * get_bytecode(boolexp b, u_int_16 * storelen) { - unsigned static char bytecode[BUFFER_LEN * 2]; + static unsigned char bytecode[BUFFER_LEN * 2]; u_int_16 len; len = chunk_fetch(b, bytecode, sizeof bytecode); diff --git a/src/bsd.c b/src/bsd.c index ec20b63..d95c835 100644 --- a/src/bsd.c +++ b/src/bsd.c @@ -4137,7 +4137,7 @@ FUNCTION(fun_lwho) DESC *d; dbref victim; int first; - int start, count; + int start = 0, count = 1; int powered = !(strchr(called_as, 'M') != NULL) && Priv_Who(executor); int xwho = *called_as == 'X'; int objid = strchr(called_as, 'D') != NULL; diff --git a/src/cque.c b/src/cque.c index 9bc9986..4f322ce 100644 --- a/src/cque.c +++ b/src/cque.c @@ -39,11 +39,11 @@ #define MAX_QID 16384 -extern dbref global_parent_depth[1]; +extern dbref global_parent_depth[2]; EVAL_CONTEXT global_eval_context; enum qid_flags qid_table[MAX_QID]; /**< List of flagged qids. */ -int qid_cnt; /**< What QID we're at */ +unsigned qid_cnt; /**< What QID we're at */ /** A queue entry. * This structure reprsents a queue entry on a linked list of queue @@ -108,12 +108,11 @@ void init_qids() { /* set whole thing to NULL */ for(i = 0; i < MAX_QID; i++) qid_table[i] = QID_FALSE; - qid_table[MAX_QID] = '\0'; qid_cnt = 0; } int create_qid() { /* find an unused QID */ - int i; + unsigned i; for(i = 0; i < MAX_QID; i++) if(qid_table[i] == QID_FALSE) @@ -217,13 +216,15 @@ free_qentry(BQUE *point) /* first free up the QID */ qid_table[point->qid] = QID_FALSE; if(point->qid == qid_cnt) { - for(a = qid_cnt; a > -1; a--) - if(qid_table[a] != QID_FALSE) - break; - if(qid_table[a] != QID_FALSE) - qid_cnt = a; - else /* nothing on the queue at all.. set us down to 0 */ - qid_cnt = 0; + a = qid_cnt; + for(;;) { + if(qid_table[a] != QID_FALSE) + break; + if(a == 0) + break; + a--; + } + qid_cnt = a; } for (a = 0; a < 10; a++) if (point->env[a]) { @@ -1252,7 +1253,7 @@ static void check_qsigs(BQUE **qchk) { * qlist - set which queue list we're on * return queue process we found */ -BQUE *find_qid(int qid, BQUE **qlist, BQUE **qprev) { +BQUE *find_qid(unsigned qid, BQUE **qlist, BQUE **qprev) { BQUE *qproc; for(*qprev = qproc = qfirst; qproc; *qprev = qproc, qproc = qproc->next) @@ -1277,7 +1278,7 @@ BQUE *find_qid(int qid, BQUE **qlist, BQUE **qprev) { return NULL; } -int do_signal_qid(dbref signalby, int qid, enum qid_flags qflags, int time) { +int do_signal_qid(dbref signalby, unsigned qid, enum qid_flags qflags, int time) { BQUE *qproc, *qprev, *qsave; /* Signal a QID with such & such signal */ @@ -1889,7 +1890,8 @@ FUNCTION(fun_ps) { } FUNCTION(fun_psinfo) { - int qid; + int tqid; + unsigned qid; BQUE *tmp; const char *type; @@ -1898,13 +1900,16 @@ FUNCTION(fun_psinfo) { return; } - qid = parse_integer(args[0]); - if (qid < 0) { + tqid = parse_integer(args[0]); + if (tqid < 0) { safe_str(T(e_uint), buff, bp); return; - } else if (qid > qid_cnt || qid_table[qid] == QID_FALSE) { - safe_str(T("#-1 INVALID QID"), buff, bp); - return; + } else { + qid = (unsigned) tqid; + if (qid > qid_cnt || qid_table[qid] == QID_FALSE) { + safe_str(T("#-1 INVALID QID"), buff, bp); + return; + } } type = "player"; diff --git a/src/create.c b/src/create.c index f2b35fc..c68452c 100644 --- a/src/create.c +++ b/src/create.c @@ -689,6 +689,7 @@ void copy_zone(dbref executor, dbref zmo) { newzone = copy_zmo(zmo, executor); /* Grab DBREF_LIST atrs and stick in da_vals */ + da_sz = 0; atr = atr_get(zmo, "DBREF_LIST"); if(atr) { da_sz = list2arr(da_buf_arr, BUFFER_LEN / 2, atr_value(atr), ' '); @@ -822,7 +823,7 @@ dbref copy_room(dbref room, dbref newowner) { return new_room; } -dbref copy_exit(dbref loc, dbref tail, dbref exit, dbref *oldrooms, dbref *newrooms, dbref new_owner, int num_rooms) { +dbref copy_exit(dbref loc, dbref tail __attribute__ ((__unused__)), dbref exit, dbref *oldrooms, dbref *newrooms, dbref new_owner, int num_rooms) { int i; dbref new_exit; diff --git a/src/cron.c b/src/cron.c index 0fe71eb..963d895 100644 --- a/src/cron.c +++ b/src/cron.c @@ -314,7 +314,7 @@ num_to_bits(unsigned int num) } long long -parse_spec(const char *str, unsigned int maximum, NVALUE *table, NVALUE_ALIAS *alias, char *format, char **fp) +parse_spec(const char *str, int maximum, NVALUE *table, NVALUE_ALIAS *alias, char *format, char **fp) { char c; int x; diff --git a/src/division.c b/src/division.c index 8c6c736..044e425 100644 --- a/src/division.c +++ b/src/division.c @@ -855,7 +855,7 @@ powergroup_empower(dbref executor, POWERGROUP * pgrp, const char *powers, /* powergroups_list() {{{3 - List powergroups able to set from 'players' point of view */ char * -powergroups_list(dbref player, char flag) +powergroups_list(dbref player __attribute__ ((__unused__)), char flag) { POWERGROUP *pgrp; char pg_name[BUFFER_LEN]; @@ -1607,7 +1607,7 @@ create_div(dbref owner, const char *name) } Parent(obj) = SDIV(owner).object; current_state.divisions++; - sprintf(buf, object_header(owner, obj)); + strncpy(buf, object_header(owner, obj), BUFFER_LEN); notify_format(owner, T("Division created: %s Parent division: %s"), buf, object_header(owner, SDIV(obj).object)); return obj; @@ -2675,7 +2675,7 @@ void do_list_powers(dbref player, const char *name) { notify_format(player, "Powers List: %s", tbuf); } -char *list_all_powers(dbref player, const char *name) { +char *list_all_powers(dbref player __attribute__ ((__unused__)), const char *name) { POWER *power; static char buff[BUFFER_LEN]; char pname[BUFFER_LEN]; diff --git a/src/extchat.c b/src/extchat.c index 069a29a..c685b9c 100644 --- a/src/extchat.c +++ b/src/extchat.c @@ -474,7 +474,7 @@ load_labeled_channel(FILE * fp, CHAN *ch, int iscobra, int dbflags) {"modify", LBL_LOCK, LBL_MODIFY}, {"see", LBL_LOCK, LBL_SEE}, {"hide", LBL_LOCK, LBL_HIDE}, - {NULL, LBL_ERROR} + {NULL, LBL_ERROR, LBL_ERROR} }, *sfptr; enum known_labels the_label, the_subfield; @@ -544,6 +544,7 @@ load_labeled_channel(FILE * fp, CHAN *ch, int iscobra, int dbflags) }; continue; subfield_checks: + the_subfield = LBL_ERROR; for( sfptr = subfield; sfptr->subfield; sfptr++) if((entry->tag == sfptr->tag) && !strcasecmp(sfptr->subfield, value) ) { the_subfield = sfptr->stag; @@ -1346,7 +1347,7 @@ do_channel(dbref player, const char *name, const char *target, const char *com) u = onchannel(victim, chan); if (!Channel_Quiet(chan) && !DarkLegal(victim)) { format_channel_broadcast(chan, u, victim, CB_CHECKQUIET | CB_PRESENCE, - T("%s %s has joined this channel."), NULL); + T("has joined this channel."), NULL); } ChanNumUsers(chan)++; } else { @@ -1372,7 +1373,7 @@ do_channel(dbref player, const char *name, const char *target, const char *com) if (!Channel_Quiet(chan) && !DarkLegal(victim)) { format_channel_broadcast(chan, NULL, victim, CB_CHECKQUIET | CB_PRESENCE, - T("%s %s has left this channel."), title); + T("has left this channel."), title); } notify_format(victim, T("CHAT: %s removes you from channel <%s>."), @@ -1444,7 +1445,7 @@ channel_join_self(dbref player, const char *name) u = onchannel(player, chan); if (!Channel_Quiet(chan) && !DarkLegal(player)) format_channel_broadcast(chan, u, player, CB_CHECKQUIET | CB_PRESENCE, - T("%s %s has joined this channel."), NULL); + T("has joined this channel."), NULL); ChanNumUsers(chan)++; } else { /* Should never happen */ @@ -1486,7 +1487,7 @@ channel_leave_self(dbref player, const char *name) if (remove_user(u, chan)) { if (!Channel_Quiet(chan) && !DarkLegal(player)) format_channel_broadcast(chan, NULL, player, CB_CHECKQUIET | CB_PRESENCE, - T("%s %s has left this channel."), title); + T("has left this channel."), title); notify_format(player, T("CHAT: You leave channel <%s>."), ChanName(chan)); } else { /* Should never happen */ @@ -3065,20 +3066,14 @@ chat_player_announce(dbref player, char *msg, int ungag) { CHAN *c; CHANUSER *u; - char buff[BUFFER_LEN], *bp; for (c = channels; c; c = c->next) { u = onchannel(player, c); if (u) { if (!Channel_Quiet(c) && (Channel_Admin(c) || Channel_Director(c) - || (!Chanuser_Hide(u) && !Dark(player)))) { - bp = buff; - - safe_format(buff, &bp, "%s %s", "%s", msg); - *bp = '\0'; + || (!Chanuser_Hide(u) && !Dark(player)))) format_channel_broadcast(c, u, player, CB_CHECKQUIET | CB_PRESENCE, - buff, NULL); - } + msg, NULL); if (ungag) CUtype(u) &= ~CU_GAG; } @@ -3706,18 +3701,22 @@ format_channel_broadcast(CHAN *chan, CHANUSER *u, dbref victim, int flags, const char *msg, const char *extra) { const char *title = NULL; + char buff[BUFFER_LEN]; + if (extra && *extra) title = extra; else if (u &&CUtitle(u)) - title = CUtitle(u); + title = CUtitle(u); if (Channel_NoNames(chan)) { if (Channel_NoTitles(chan) || !title) - channel_broadcast(chan, victim, flags, msg, ChanObjName(chan), "Someone"); + snprintf(buff, BUFFER_LEN, "%s %s %s", ChanObjName(chan), "Someone", msg); else - channel_broadcast(chan, victim, flags, msg, ChanObjName(chan), title); + snprintf(buff, BUFFER_LEN, "%s %s %s", ChanObjName(chan), title, msg); } else - channel_broadcast(chan, victim, flags, msg, ChanObjName(chan), Name(victim)); + snprintf(buff, BUFFER_LEN, "%s %s %s", ChanObjName(chan), Name(victim), msg); + + channel_broadcast(chan, victim, flags, "%s", buff); } static void diff --git a/src/funtime.c b/src/funtime.c index 67c8625..f8d3c5d 100644 --- a/src/funtime.c +++ b/src/funtime.c @@ -12,8 +12,10 @@ #include #if defined(__GNUC__) || defined(__LCC__) /* Required to get the getdate() prototype on glibc. */ +#ifndef __USE_XOPEN_EXTENDED #define __USE_XOPEN_EXTENDED #endif +#endif #include #include #include "conf.h" @@ -78,7 +80,10 @@ FUNCTION(fun_timefmt) } } } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" len = strftime(s, BUFFER_LEN, args[0], ttm); +#pragma GCC diagnostic pop if (len == 0) { /* Problem. Either the output from strftime would be over * BUFFER_LEN characters, or there wasn't any output at all. diff --git a/src/help.c b/src/help.c index 4c0bd3b..b7788be 100644 --- a/src/help.c +++ b/src/help.c @@ -579,6 +579,8 @@ list_matching_entries(char *pattern, help_file *help_dat, const char *sep) if (sep) len = strlen(sep); + else + len = 0; for (n = 0; n < help_dat->entries; n++) if (quick_wild(pattern, help_dat->indx[n].topic + offset)) { diff --git a/src/look.c b/src/look.c index 41b6795..3dae752 100644 --- a/src/look.c +++ b/src/look.c @@ -1591,6 +1591,7 @@ decompose_str(char *what) ansi_letter = 'w'; break; default: + ansi_letter = '\0'; break; /* Not a valid color. */ } /* If background color, change the letter to a capital. */ diff --git a/src/match.c b/src/match.c index 56c72b5..3ba7ef5 100644 --- a/src/match.c +++ b/src/match.c @@ -571,6 +571,7 @@ MATCH_FUNC(match_exit) return match_exit_internal(who, name, type, flags, MASTER_ROOM, match, exact_matches_to_go, matches_to_go); /* Recursively search upwards in locations parent tree */ + mret = MATCH_NONE; while(GoodObject(loc) && !IsGarbage(loc) && mret != MATCH_EXACT ) { mret = match_exit_internal(who, name, type, flags, loc, match, exact_matches_to_go, matches_to_go); diff --git a/src/player.c b/src/player.c index 112264d..2813540 100644 --- a/src/player.c +++ b/src/player.c @@ -146,27 +146,26 @@ connect_player(const char *name, const char *password, const char *host, host, ip); return NOTHING; } - if (!Site_Can_Connect(host, player) || !Site_Can_Connect(ip, player)) { - if (!Deny_Silent_Site(host, player) && !Deny_Silent_Site(ip, player)) { - do_log(LT_CONN, 0, 0, - T("Connection to %s not allowed from %s (%s)"), name, - host, ip); - strcpy(errbuf, T("Player connections not allowed.")); + if (!isgst) { + if (!Site_Can_Connect(host, player) || !Site_Can_Connect(ip, player)) { + if (!Deny_Silent_Site(host, player) && !Deny_Silent_Site(ip, player)) { + do_log(LT_CONN, 0, 0, + T("Connection to %s not allowed from %s (%s)"), name, + host, ip); + strcpy(errbuf, T("Player connections not allowed.")); + } + return NOTHING; } - return NOTHING; - } - /* validate password */ - if (!isgst) if (!password_check(player, password)) { /* Increment count of login failures */ ModTime(player)++; check_lastfailed(player, host); return NOTHING; } + } else { /* If it's a Guest player, and already connected, search the * db for another Guest player to connect them to. */ - if(isgst) { - player = create_guest(host, ip); + player = create_guest(host, ip); if (!GoodObject(player)) { do_log(LT_CONN, 0, 0, T("Can't connect to a guest (too many connected)")); strcpy(errbuf, T("Too many guests are connected now.")); diff --git a/src/sql.c b/src/sql.c index 221c712..7ee1a61 100644 --- a/src/sql.c +++ b/src/sql.c @@ -183,7 +183,7 @@ FUNCTION(fun_mapsql) char numbuff[20]; int numfields; char rbuff[BUFFER_LEN]; - int funccount; + int done; int do_fieldnames = 0; int i; MYSQL_FIELD *fields; @@ -240,6 +240,7 @@ FUNCTION(fun_mapsql) } rownum = 0; + done = 0; while ((row_p = mysql_fetch_row(qres)) != NULL) { if (rownum++ > 0 || do_fieldnames) { safe_str(osep, buff, bp); @@ -254,9 +255,9 @@ FUNCTION(fun_mapsql) /* Now call the ufun. */ if (call_ufun(&ufun, wenv, i + 1, rbuff, executor, enactor, pe_info)) goto finished; - if (safe_str(rbuff, buff, bp) && funccount == pe_info->fun_invocations) + if (safe_str(rbuff, buff, bp) && done) goto finished; - funccount = pe_info->fun_invocations; + done = 1; } finished: free_sql_query(qres); diff --git a/utils/mkcmds.pl b/utils/mkcmds.pl index 7198b24..0b0830e 100644 --- a/utils/mkcmds.pl +++ b/utils/mkcmds.pl @@ -104,7 +104,7 @@ sub make_switches { open CMDHDR, "<", "hdrs/command.h" or die "Unable to open hdrs/command.h for reading: $!\n"; - my $numbytes = 20; + my $numbytes = 22; while () { if (m/^#define\s+NUM_BYTES\s+(\d+)/o) { $numbytes = $1; @@ -117,7 +117,7 @@ sub make_switches { my @switches = scan_files_for_pattern "src/SWITCHES", qr/^(.+)/; - warn "Too many switches defined!\n" if length @switches > $MAXSWITCHES; + warn "Too many switches defined!\n" if scalar @switches > $MAXSWITCHES; open HDR, ">", $temphdr or die "Unable to open $temphdr for writing: $!\n"; diff --git a/win32/config.h b/win32/config.h index 88e8141..2453bac 100644 --- a/win32/config.h +++ b/win32/config.h @@ -705,7 +705,7 @@ * This symbol if defined indicates to the C program that the argument * for the wait() system call should be declared as 'union wait status' * instead of 'int status'. You probably need to include - * in the former case (see I_SYSWAIT). + * in the former case (see I_SYS_WAIT). */ #define UNION_WAIT / **/