home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume42
/
dist-3.0
/
patch23
next >
Wrap
Internet Message Format
|
1994-05-06
|
52KB
From: Raphael Manfredi <ram@acri.fr>
Newsgroups: comp.sources.misc
Subject: v42i074: dist-3.0 - Configure script generator and related tools, Patch23
Date: 6 May 1994 14:15:02 -0500
Organization: Advanced Computer Research Institute, Lyon, France
Sender: kent@sparky.sterling.com
Approved: kent@sparky.sterling.com
Message-ID: <2qe4vm$46s@sparky.sterling.com>
X-Md4-Signature: b46727082cbbb07b3bf59a8c47b8c0b5
Submitted-by: Raphael Manfredi <ram@acri.fr>
Posting-number: Volume 42, Issue 74
Archive-name: dist-3.0/patch23
Environment: UNIX, Perl, RCS
Patch-To: dist-3.0: Volume 39, Issue 5-32
[The latest patch for dist version 3.0 is #26.]
System: dist version 3.0
Patch #: 23
Priority: MEDIUM
Subject: new kitpost script
Subject: thanks to Andy Dougherty for his contributions
Subject: from now on, Wayne Davison's changes are flagged 'WED'
Subject: extended copyright notice to 1994
Subject: new script kitpost
Subject: created
Subject: random code cleanup to follow pat tools style
Subject: made configurable from dist profile
Subject: now understands -V and -h options
Subject: mails now flagged with a bulk precedence
Subject: added X-Mailer header and now calls mailer via open()
Subject: documented new -V and -h options
Subject: now mentions kitpost and kitsend
Subject: initials for Wayne Davison are now WED
Subject: added initials for new unit contributor Andy Dougherty
Subject: made sure error status from csh is propagated (WED)
Subject: cppminus must be after other cppflags, not before
Subject: added blank lines around 'End of Configure'
Subject: getfile could be confused by file name in "locate" requests
Subject: new 'p' directive to assume file is in people's path (WED)
Subject: added support for osf1 hints
Subject: new support for solaris and i386 systems (ADO)
Subject: avoid ALIGNBYTES, since it conflicts on NetBSD
Subject: added support for gcc version (ADO)
Subject: -fpcc-struct-return only needed in gcc 1.x (ADO)
Subject: cppflags now computed on an option-by-option basis
Subject: magically added cc flags now only done the first time
Subject: fixed user name computation from /etc/passwd in bsd systems
Subject: login name now computed the hard way
Subject: added AIX support to accept shared lib stub as termlib (WED)
Subject: now also check for htonl() macro (ADO)
Subject: avoid looping in the "see that again?" prompt (WED)
Subject: added support for seekdir, telldir and rewinddir (ADO)
Subject: ensure string is not optimized in read-only memory (ADO)
Subject: new Shmat_t symbol to declare return type of shmat()
Subject: fixed a typo (WED)
Subject: renamed strerror into Strerror to protect name space (ADO)
Subject: now explicitely ask whether vfork() should be used (ADO)
Subject: protected gidtype setting via setvar (ADO)
Subject: made Gid_t comment more explicit (ADO)
Subject: avoid conflicts with <string.h>
Subject: had forgotten cppminus in cppstdin test (ADO)
Subject: added knowledge for <sys/filio.h> (WED)
Subject: optimized amount of findhdr calls
Subject: now include all three defines in config.h (ADO)
Subject: avoid inclusion of <vfork.h> if no vfork() used (ADO)
Subject: added trailing blank line for metalint
Subject: added shared library knowledge (ADO and WED)
Subject: now uses full library path instead of -l notation
Subject: now asks for library directories to be searched (ADO)
Subject: now includes ordered default libswanted variable (ADO)
Subject: major cleanup for library lookups (ADO)
Subject: added support for multi-state regions (WED)
Subject: ensure full path value is used for rmail also
Subject: added support for MYMALLOC, mainly for perl5 (ADO)
Subject: added lint hint, assuring that nroff is used
Subject: added support for MMDF mailboxes (WED)
Subject: ensure cc flags used when looking for prototype support
Subject: signal list now formatted to avoid scroll-ups (ADO)
Subject: ensure usrinc value is preserved accross sessions (WED)
Subject: documented the new 'p' option in Getfile.U
Subject: added -L switch to override public unit repository path
Subject: two new warnings concerning last unit lines
Subject: cleaned up the 'prepend' command
Subject: now saves the last unit line value for metalint
Subject: now warns for units ending with non-blank line
Subject: warn for units where last line is not new-line terminated
Subject: two new files
Date: Fri May 06 17:28:44 MET DST 1994
From: Raphael Manfredi <ram@acri.fr>
Description:
Added new kitpost script to post kits. This is the pending of
kitsend, which mails kits produced by makekit.
Getfile.U now supports a new 'p' options (WED) and is no
longer confused by the file name given for 'locate' style
requests.
Metalint now has a new -L option. See the manual page for
more information.
Various cleanup and integration in this set of patches. Most
contributions come from Wayne Davison (WED) and Andy Dougherty
(ADO).
Here is a summary of Wayne Davison changes as I received them:
In the Filexp.U unit it attempts to save off the return value of
the /bin/csh command, but only manages to save off a "0" from when
the script is unpacked.
Added some AIX support to d_havetlib.u to have it accept a shared
library stub as the termlib.
Twiddled d_nolnbuf.U to allow you to just press return and to
not loop on the "see that again?" prompt.
There's a typo (of mine) in d_strccmp.U (strccmp ==> strcasecmp).
Added a check for <sys/filio.h> to the i_sysioctl.U unit. I
believe this file only exists on SunOS systems, and when used
in conjunction with <termios.h>, produces a runnable executable
that doesn't have lots of warnings. Note that under SunOS you
can't use <sys/ioctl.h> with <termios.h> -- it doesn't work, and
it makes a lot of noise while it compiles. Previously I had to
force SunOS systems to use sgtty.h with a hint file, but this
doesn't work under new SunOS 5.x systems. From the programmer's
perspective you want to include <sys/filio.h> if I_SYS_FILIO is
defined, even if I_SYS_IOCTL is also defined.
libc.U has been updated to search for libs that end in .so.
ditto, libs.U.
locdist.U has been updated to prompt for the multi-state region.
mboxchar.U was updated to accept a ^A as the first character in
a mailbox file and mention it as the MMDF standard.
usrinc.U was updated to not replace the user's last answer to
the /usr/include question.
Here is a summary of Andy Dougherty's changes:
alignbytes.U
changed to MEM_ALIGNBYTES to avoid name conflict on NetBSD.
cc.U
Added test to see which version of gcc is being used. (Used in
ccflags.U)
ccflags.U
Adjust ccflags based on which version of gcc is being used.
-fpcc-struct-return is no longer needed on version 2 gcc.
d_htonl.U
Added a test to see if htonl was defined as a macro (as it is on many
big-endian machines). This is redundant (but reassuring) if the
programmer uses #if defined(HAS_HTONL) || defined(htonl).
d_readdir.U
Added tests for seekdir, rewinddir, telldir for the paranoid (like
Larry?) who don't necessarily believe that just because a system has
readdir it will have the companion routines as well.
d_safebcpy.U
An ANSI compiler (like gcc) could put one of the strings in read-only
memory leading to a failed test even if bcpy were safe.
d_safemcpy.U
see d_safebcpy.U.
d_shmat.U
Check whether shmat() returns char* or void*. I've received one report
that this doesn't always work, but no suggested fixes.
d_strerror.U
Rename the strerror macro to Strerror() to avoid name-space problems.
d_vfork.U
vfork is unreliable (esp. on Solaris), according to many reports. Add
a prompt to ask if the user actually wants to use vfork.
gidtype.U
Improved description.
i_memory.U
Check for conflict with string.h declarations (sometimes see char* in
one and void* in the other header file.) Prefer string.h if it
contains the mem* declarations.
i_pwd.U
Add missing $cppminus flag.
i_termio.U
Be sure to include the undef'd ones as well. This will help users
who have to fiddle with config.h in case their system has problems.
Some systems have incomplete termios.h, or have ones that
conflict with other system headers.
i_vfork.U
Added d_vfork dependency. Only check if the user has (and is using)
vfork.
libc.U
Look for shared library versions (e.g. libdl.so.1.0) in case a
non-shared version does not exist.
libpth.U
Major changes here, mostly inspired by reported problems on Solaris.
plibpth is set to empty except on the mips. Mainly, this is to avoid
forcing things like /usr/ucblib into the search patch. Further,
offer the opportunity to remove directories from libpth. A solaris
hints file could use this to remove /usr/ucblib, if needed.
libs.U
Major changes here. Mainly, trying to pick up shared library versions
(both SysV-style _s and SunOS-style libxx.so.1.0) even if non-shared
ones are available.
mallocsrc.U
Define MYMALLOC C preprocessor symbol. Used in perl, but maybe
nowhere else. Not sure if this is useful.
sig_name.U
Format the listing of signal names so they don't all scroll off the
screen.
... End of contributions ...
I (RAM) have taken the liberty to slightly change Andy's changes
when I thought it would be needed.
I have also changed ccflags.U so that it now computes the cppflags
by testing for each cc flag and seeing whether cpp chokes on them
or not.
I also included ccflags when testing for prototype support, in
case there is a C switch to manually activate/disable it.
Other random cleanup in units. You may grep for 'patch23' in
the source code to locate all of them. A big thank you to
both Wayne and Andy for their contribution.
Fix: From rn, say "| patch -p -N -d DIR", where DIR is your dist source
directory. Outside of rn, say "cd DIR; patch -p -N <thisarticle".
If you don't have the patch program, apply the following by hand,
or get patch (version 2.0, latest patchlevel).
After patching:
*** DO NOTHING--INSTALL ALL PATCHES UP THROUGH #26 FIRST ***
If patch indicates that patchlevel is the wrong version, you may need
to apply one or more previous patches, or the patch may already
have been applied. See the patchlevel.h file to find out what has or
has not been applied. In any event, don't continue with the patch.
If you are missing previous patches they can be obtained from me:
Raphael Manfredi <ram@acri.fr>
If you send a mail message of the following form it will greatly speed
processing:
Subject: Command
@SH mailpatch PATH dist 3.0 LIST
^ note the c
where PATH is a return path FROM ME TO YOU either in Internet notation,
or in bang notation from some well-known host, and LIST is the number
of one or more patches you need, separated by spaces, commas, and/or
hyphens. Saying 35- says everything from 35 to the end.
To get some more detailed instructions, send me the following mail:
Subject: Command
@SH mailhelp PATH
Index: patchlevel.h
Prereq: 22
4c4
< #define PATCHLEVEL 22
---
> #define PATCHLEVEL 23
Index: kit/kitpost.SH
*** kit/kitpost.SH.old Fri May 6 17:28:06 1994
--- kit/kitpost.SH Fri May 6 17:28:06 1994
***************
*** 0 ****
--- 1,234 ----
+ case $CONFIG in
+ '')
+ if test -f config.sh; then TOP=.;
+ elif test -f ../config.sh; then TOP=..;
+ elif test -f ../../config.sh; then TOP=../..;
+ elif test -f ../../../config.sh; then TOP=../../..;
+ elif test -f ../../../../config.sh; then TOP=../../../..;
+ else
+ echo "Can't find config.sh."; exit 1
+ fi
+ . $TOP/config.sh
+ ;;
+ esac
+ case "$0" in
+ */*) cd `expr X$0 : 'X\(.*\)/'` ;;
+ esac
+ echo "Extracting kit/kitpost (with variable substitutions)"
+ cat >kitpost <<!GROK!THIS!
+ $startperl
+ eval "exec perl -S \$0 \$*"
+ if \$running_under_some_shell;
+
+ # $Id: kitpost.SH,v 3.0.1.1 1994/05/06 13:54:53 ram Exp $
+ #
+ # Copyright (c) 1991-1993, Raphael Manfredi
+ #
+ # You may redistribute only under the terms of the Artistic Licence,
+ # as specified in the README file that comes with the distribution.
+ # You may reuse parts of this distribution only within the terms of
+ # that same Artistic Licence; a copy of which may be found at the root
+ # of the source tree for dist 3.0.
+ #
+ # $Log: kitpost.SH,v $
+ # Revision 3.0.1.1 1994/05/06 13:54:53 ram
+ # patch23: created
+ #
+
+ \$inews='${inews-/usr/lib/news/inews}';
+ \$mailer='$mailer';
+ \$orgname='$orgname';
+ \$version = '$VERSION';
+ \$patchlevel = '$PATCHLEVEL';
+ !GROK!THIS!
+
+ cat >>kitpost <<'!NO!SUBS!'
+
+ $progname = &profile; # Read ~/.dist_profile
+ require 'getopts.pl';
+ &usage unless $#ARGV >= 0;
+ &usage unless &Getopts("hrVm:D:H:");
+
+ if ($opt_V) {
+ print STDERR "$progname $version PL$patchlevel\n";
+ exit 0;
+ } elsif ($opt_h) {
+ &usage;
+ }
+
+ $RCSEXT = ',v' unless $RCSEXT;
+ if ($inews eq 'inews') {
+ $inews = '/usr/lib/news/inews' if -f '/usr/lib/news/inews';
+ }
+
+ chdir '..' if -d '../bugs';
+
+ &readpackage;
+
+ $orgname = &tilda_expand($orgname);
+ chop($orgname = `cat $orgname`) if $orgname =~ m|^/|;
+
+ if ($opt_r) {
+ $repost = ' (REPOST)';
+ }
+
+ while ($_ = shift) {
+ if (/^(kit)?[1-9][\d\-]*$/) {
+ s/^kit//;
+ push(@argv,$_);
+ } else {
+ push(@ngroups,$_);
+ }
+ }
+ $ngroups = join(',',@ngroups) unless $#ngroups < 0;
+ $dest = $opt_m;
+ &usage unless $ngroups || $dest;
+
+ @ARGV = @argv;
+
+ if (-f "$package.kit10") {
+ @filelist = <$package.kit[0-9][0-9]>;
+ }
+ else {
+ @filelist = <$package.kit[0-9]>;
+ }
+ pop(@filelist) =~ /(\d+)$/ && ($maxnum = $1 + 0);
+
+ if ($#ARGV < 0) {
+ $argv = "1-$maxnum";
+ @ARGV = $argv;
+ }
+
+ $argv = &rangeargs(@ARGV);
+ @ARGV = split(' ', $argv);
+
+ $argv =~ s/ $//;
+
+ if ($#ARGV < 0) {
+ print STDERR "$progname: no kits specified.\n";
+ &usage;
+ } else {
+ local($s) = $#ARGV ? 's' : '';
+ print "$progname: posting $package $baserev kit$s $argv to $ngroups...\n"
+ if $ngroups;
+ print "$progname: mailing $package $baserev kit$s $argv to $dest...\n"
+ if $dest;
+ }
+
+ $desc = "$opt_D, " if $opt_D;
+
+ fork && exit;
+
+ # Compute a suitable root message ID that all parts will reference, so that
+ # threaded news readers will correctly process them.
+ # Unfortunately, this works only when all kits are sent.
+ ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
+ localtime(time);
+ $mon++;
+ $rootid = "$year$mon$mday$hour$min$sec.AA$$";
+ $first = $maxnum >= 10 ? "01" : "1";
+ $rootmsgid = "<$rootid.P$first.$maintloc>";
+
+ until ($#ARGV < 0) {
+ $kitnum = shift;
+ $kitnum = "0$kitnum" if $kitnum < 10 && $maxnum >= 10;
+ open(FILE, "$package.kit$kitnum") ||
+ die "$progname: can't open $package.kit$kitnum: $!\n";
+ if ($ngroups) {
+ open(INEWS,"|$inews -h") || die "$progname: can't fork $inews: $!\n";
+ }
+ if ($dest) {
+ $opt = '-odq' if $mailer =~ /sendmail/;
+ $dest =~ s/,/ /g;
+ ($to = $dest) =~ s/\s+/, /g;
+ open(MAILER,"|$mailer $opt $dest") ||
+ die "$progname: can't fork $mailer: $!\n";
+ }
+
+ $msg_id = "<$rootid.P$kitnum.$maintloc>";
+ $msg_id = $rootmsgid if $kitnum == 1;
+ $msg_id .= "\nReferences: $rootmsgid" if $kitnum != 1;
+
+ print INEWS "Newsgroups: $ngroups\n";
+ print MAILER "To: $to\n";
+ $head = <<EOH;
+ Subject: $package $baserev - ${desc}part$kitnum/$maxnum$repost
+ Message-ID: $msg_id
+ Organization: $orgname
+
+ Submitted-by: $maintname <$maintloc>
+ Archive-name: $package-$baserev/part$kitnum
+ Environment: UNIX
+
+ EOH
+ print INEWS $head;
+ print MAILER $head;
+
+ if ($kitnum == 1 && $opt_H) {
+ open(HEAD, $opt_H) || warn "$progname: can't open $opt_H: $!\n";
+ while (<HEAD>) {
+ print INEWS;
+ print MAILER;
+ }
+ close HEAD;
+ }
+
+ while (<FILE>) {
+ print INEWS;
+ print MAILER;
+ }
+ close FILE;
+ close INEWS;
+ die "$progname: could not post part$kitnum.\n" if $ngroups && $?;
+ close MAILER;
+ die "$progname: could not send part$kitnum.\n" if $dest && $?;
+ }
+
+ sub usage {
+ print STDERR <<EOM;
+ Usage: $progname [-hrV] [-H file] [-D desc] [-m dest1,dest2] [kits] [newsgroups]
+ -h : print this message and exit
+ -m : set-up recipients for (additional) mailing
+ -r : signals a repost
+ -D : specify description string for subject line
+ -H : specify file to be used as header for first part
+ -V : print version number and exit
+ EOM
+ exit 1;
+ }
+
+ sub rangeargs {
+ local($result) = '';
+ local($min,$max,$_);
+ while ($#_ >= 0) {
+ $_ = shift(@_);
+ while (/^\s*\d/) {
+ s/^\s*(\d+)//;
+ $min = $1;
+ if (s/^,//) {
+ $max = $min;
+ }
+ elsif (s/^-(\d*)//) {
+ $max = $1;
+ if ($max == 0 && $maxnum) {
+ $max = $maxnum;
+ }
+ s/^[^,],?//;
+ }
+ else {
+ $max = $min;
+ }
+ for ($i = $min; $i <= $max; ++$i) {
+ $result .= $i . ' ';
+ }
+ }
+ }
+ $result;
+ }
+
+ !NO!SUBS!
+ $grep -v '^;#' ../pl/package.pl >>kitpost
+ $grep -v '^;#' ../pl/tilde.pl >>kitpost
+ $grep -v '^;#' ../pl/profile.pl >>kitpost
+ chmod +x kitpost
+ $eunicefix kitpost
Index: mcon/U/i_sysioctl.U
Prereq: 3.0.1.1
*** mcon/U/i_sysioctl.U.old Fri May 6 17:28:24 1994
--- mcon/U/i_sysioctl.U Fri May 6 17:28:24 1994
***************
*** 1,4 ****
! ?RCS: $Id: i_sysioctl.U,v 3.0.1.1 1993/11/10 17:36:09 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS:
--- 1,4 ----
! ?RCS: $Id: i_sysioctl.U,v 3.0.1.2 1994/05/06 15:04:57 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS:
***************
*** 9,28 ****
?RCS: of the source tree for dist 3.0.
?RCS:
?RCS: $Log: i_sysioctl.U,v $
?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_syssockio d_voidtty: test contains cat \
! i_termio i_termios i_sgtty Setvar Findhdr +cc rm
?MAKE: -pick add $@ %<
?S:i_sysioctl:
?S: This variable conditionally defines the I_SYS_IOCTL symbol, which
?S: indicates to the C program that <sys/ioctl.h> exists and should
?S: be included.
?S:.
?S:i_bsdioctl:
?S: This variable conditionally defines the I_SYS_BSDIOCTL symbol, which
?S: indicates to the C program that <sys/bsdioctl.h> exists and should
--- 9,37 ----
?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 <sys/filio.h> (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 <sys/ioctl.h> 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 <sys/filio.h> exists and should
+ ?S: be included in preference to <sys/ioctl.h>.
+ ?S:.
?S:i_bsdioctl:
?S: This variable conditionally defines the I_SYS_BSDIOCTL symbol, which
?S: indicates to the C program that <sys/bsdioctl.h> exists and should
***************
*** 43,48 ****
--- 52,61 ----
?C: This symbol, if defined, indicates that <sys/ioctl.h> exists and should
?C: be included. Otherwise, include <sgtty.h> or <termio.h>.
?C:.
+ ?C:I_SYS_FILIO:
+ ?C: This symbol, if defined, indicates that <sys/filio.h> exists and
+ ?C: should be included instead of <sys/ioctl.h>.
+ ?C:.
?C:I_SYS_BSDIOCTL (I_BSDIOCTL):
?C: This symbol, if defined, indicates that <sys/bsdioctl.h> exists and should
?C: be included. Otherwise, try <sys/ioctl.h>. This is primarly intended for
***************
*** 59,80 ****
?C: decriptors and do a setpgrp().
?C:.
?H:#$i_sysioctl I_SYS_IOCTL /**/
?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 or sys/ioctl
echo " "
if $test `./findhdr sys/ioctl.h`; then
val="$define"
! echo "<sys/ioctl.h> found." >&4
else
val="$undef"
! $test $i_termio = "$define" && xxx="termio.h"
! $test $i_termios = "$define" && xxx="termios.h"
! $test $i_sgtty = "$define" && xxx="sgtty.h"
echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
fi
?LINT:set i_sysioctl
set i_sysioctl
--- 72,101 ----
?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 '<sys/ioctl.h> found.' >&4
else
val="$undef"
! if $test $i_sysfilio = "$define"; then
! echo '<sys/ioctl.h> 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 <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
+ fi
fi
?LINT:set i_sysioctl
set i_sysioctl
***************
*** 87,94 ****
?X:
: see if socket ioctl defs are in sys/bsdioctl or sys/ioctl
echo " "
! if $test `./findhdr sys/bsdioctl.h`; then
! if $contains SIOCATMARK `./findhdr sys/bsdioctl.h` >/dev/null 2>&1; then
val="$define"
echo "You have socket ioctls defined in <sys/bsdioctl.h>." >&4
else
--- 108,116 ----
?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 <sys/bsdioctl.h>." >&4
else
***************
*** 107,114 ****
@if I_SYSSOCKIO || i_syssockio
: see if socket ioctl defs are in sys/sockio.h
echo " "
! if $test `./findhdr sys/sockio.h`; then
! if $contains SIOCATMARK `./findhdr sys/sockio.h` >/dev/null 2>&1; then
val="$define"
echo "You have socket ioctls defined in <sys/sockio.h>." >&4
else
--- 129,137 ----
@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 <sys/sockio.h>." >&4
else
Index: mcon/U/ccflags.U
Prereq: 3.0.1.3
*** mcon/U/ccflags.U.old Fri May 6 17:28:14 1994
--- mcon/U/ccflags.U Fri May 6 17:28:15 1994
***************
*** 1,4 ****
! ?RCS: $Id: ccflags.U,v 3.0.1.3 1993/09/13 15:58:29 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS:
--- 1,4 ----
! ?RCS: $Id: ccflags.U,v 3.0.1.4 1994/05/06 14:28:45 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS:
***************
*** 9,14 ****
--- 9,19 ----
?RCS: of the source tree for dist 3.0.
?RCS:
?RCS: $Log: ccflags.U,v $
+ ?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)
***************
*** 23,29 ****
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:ccflags ldflags lkflags cppflags optimize: test cat Myread Guess \
! Oldconfig +cc mips_type +usrinc package contains
?MAKE: -pick add $@ %<
?S:ccflags:
?S: This variable contains any additional C compiler flags desired by
--- 28,35 ----
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:ccflags ldflags lkflags cppflags optimize: test cat Myread Guess \
! Oldconfig +cc +gccversion mips_type +usrinc package contains rm \
! cppstdin cppminus cpprun cpplast
?MAKE: -pick add $@ %<
?S:ccflags:
?S: This variable contains any additional C compiler flags desired by
***************
*** 45,51 ****
?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:.
! ?T:inctest thisincl xxx flag inclwanted
?D:cppflags=''
?D:ccflags=''
?D:ldflags=''
--- 51,57 ----
?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:.
! ?T:inctest thisincl xxx flag inclwanted ftry previous
?D:cppflags=''
?D:ccflags=''
?D:ldflags=''
***************
*** 54,61 ****
?INIT:
: determine optimize, if desired, or use for debug flag also
case "$optimize" in
! ' ') dflt="none";;
! '') dflt="-O";;
*) dflt="$optimize";;
esac
$cat <<EOH
--- 60,67 ----
?INIT:
: determine optimize, if desired, or use for debug flag also
case "$optimize" in
! ' ') dflt='none';;
! '') dflt='-O';;
*) dflt="$optimize";;
esac
$cat <<EOH
***************
*** 74,83 ****
'none') optimize=" ";;
esac
case "$ccflags" in
'') case "$cc" in
! *gcc*) dflt='-fpcc-struct-return';;
! *) dflt='';;
esac
case "$optimize" in
*-g*) dflt="$dflt -DDEBUG";;
--- 80,93 ----
'none') optimize=" ";;
esac
+ dflt=''
case "$ccflags" in
'') case "$cc" in
! *gcc*)
! if $test "$gccversion" = '1'; then
! dflt='-fpcc-struct-return'
! fi
! ;;
esac
case "$optimize" in
*-g*) dflt="$dflt -DDEBUG";;
***************
*** 92,98 ****
;;
esac
;;
- *) dflt="$ccflags" ;;
esac
?X: In USG mode, a MIPS system may need some BSD includes
--- 102,107 ----
***************
*** 142,147 ****
--- 151,160 ----
case "$dflt" in
'') dflt=none;;
esac
+ case "$ccflags" in
+ '') ;;
+ *) dflt="$ccflags";;
+ esac
$cat <<EOH
Your C compiler may want other flags. For this question you should include
***************
*** 165,171 ****
: the following weeds options from ccflags that are of no interest to cpp
cppflags="$ccflags"
case "$cc" in
! *gcc*) cppflags="$cppflags -D__GNUC__";;
esac
case "$mips_type" in
'');;
--- 178,188 ----
: the following weeds options from ccflags that are of no interest to cpp
cppflags="$ccflags"
case "$cc" in
! *gcc*)
! if $test "$gccversion" = "1"; then
! cppflags="$cppflags -D__GNUC__"
! fi
! ;;
esac
case "$mips_type" in
'');;
***************
*** 173,189 ****
esac
case "$cppflags" in
'');;
! *) set X $cppflags
cppflags=''
! for flag
do
! case $flag in
! -D*|-I*|-traditional|-ansi|-nostdinc) cppflags="$cppflags $flag";;
esac
done
case "$cppflags" in
! *-*) echo "(C preprocessor flags: $cppflags)";;
esac
;;
esac
--- 190,238 ----
esac
case "$cppflags" in
'');;
! *)
! echo " "
! echo "Let me guess what the preprocessor flags are..." >&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 <cpp.c \
+ >cpp1.out 2>/dev/null && \
+ $cpprun -DLFRULB=bar $ftry $cpplast <cpp.c \
+ >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
***************
*** 220,226 ****
. ./myread
case "$ans" in
none) lkflags='';;
! *) lkflags="$ans";;
esac
@end
--- 269,275 ----
. ./myread
case "$ans" in
none) lkflags='';;
! *) lkflags="$ans";;
esac
@end
Index: mcon/U/libs.U
Prereq: 3.0.1.1
*** mcon/U/libs.U.old Fri May 6 17:28:29 1994
--- mcon/U/libs.U Fri May 6 17:28:29 1994
***************
*** 1,4 ****
! ?RCS: $Id: libs.U,v 3.0.1.1 1993/08/25 14:02:31 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS:
--- 1,4 ----
! ?RCS: $Id: libs.U,v 3.0.1.2 1994/05/06 15:08:45 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS:
***************
*** 9,30 ****
?RCS: of the source tree for dist 3.0.
?RCS:
?RCS: $Log: libs.U,v $
?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 incpath package xlibpth
?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 yyy thislib thatlib libswanted
?D:libs=''
! ?INIT:: no additional library wanted by default
! ?INIT:libswanted=''
?INIT:
: Looking for optional libraries
echo " "
--- 9,48 ----
?RCS: of the source tree for dist 3.0.
?RCS:
?RCS: $Log: libs.U,v $
+ ?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
?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 yyy zzz thislib thatlib 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:
! ?X: The ordering of c_s, posix, and cposix is a guess and almost
! ?X: certainly wrong on about half of all systems.
! ?X:
! ?INIT:: default ordered library list
! ?INIT:libswanted='net socket inet nsl nm sdbm gdbm ndbm dbm malloc dl'
! ?INIT:libswanted="$libswanted dld sun m c_s posix cposix ndir dir ucb"
! ?INIT:libswanted="$libswanted bsd BSD PW x"
?INIT:
: Looking for optional libraries
echo " "
***************
*** 41,75 ****
dbm) thatlib=ndbm;;
*_s) thatlib=NONE;;
*) thatlib="${thislib}_s";;
- *) thatlib=NONE;;
esac
! yyy="$incpath/usr/ccs/lib $incpath/usr/lib $incpath/usr/ucblib"
! yyy="$yyy $incpath/usr/local/lib $incpath/lib"
! xxx=`./loc lib$thislib.a X $yyy`
if $test -f $xxx; then
echo "Found -l$thislib."
! case "$dflt" in
! *-l$thislib*|*-l$thatlib*);;
*) dflt="$dflt -l$thislib";;
esac
else
! xxx=`./loc lib$thislib.a X $libpth`
if $test -f $xxx; then
! echo "Found $xxx."
! case "$dflt" in
! *$xxx*);;
! *) dflt="$dflt $xxx";;
esac
else
! xxx=`./loc Slib$thislib.a X $xlibpth`
if $test -f $xxx; then
! echo "Found -l$thislib."
! case "$dflt" in
! *-l$thislib*|*-l$thatlib*);;
*) dflt="$dflt -l$thislib";;
esac
else
! echo "No -l$thislib."
fi
fi
fi
--- 59,126 ----
dbm) thatlib=ndbm;;
*_s) thatlib=NONE;;
*) thatlib="${thislib}_s";;
esac
! xxx=`./loc lib$thislib.a X $libpth`
! yyy=`./loc lib$thatlib.a X $libpth`
! zzz=`./loc lib$thislib.so.[0-9]'*' X $libpth`
! ?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$thatlib "*, we ensure we find -lm and not -lmalloc (which was
! ?X: the case with the old looking pattern *-l$thatlib*.
! ?X:
if $test -f $xxx; then
echo "Found -l$thislib."
! case " $dflt " in
! *"-l$thislib "*|*"-l$thatlib "*);;
! *) dflt="$dflt -l$thislib";;
! esac
! elif $test -f $yyy; then
! echo "Found -l$thatlib."
! case " $dflt " in
! *"-l$thatlib "*);;
! *) dflt="$dflt -l$thatlib";;
! esac
! elif $test -f $zzz; then
! echo "Found -l$thislib (shared only)."
! case " $dflt " in
! *"-l$thislib "*|*"-l$thatlib "*);;
*) dflt="$dflt -l$thislib";;
esac
else
! xxx=`./loc Slib$thislib.a X $xlibpth`
! yyy=`./loc Slib$thatlib.a X $xlibpth`
if $test -f $xxx; then
! echo "Found -l$thislib."
! case " $dflt " in
! *"-l$thislib "*|*"-l$thatlib "*);;
! *) dflt="$dflt -l$thislib";;
! esac
! elif $test -f $yyy; then
! echo "Found -l$thatlib."
! case " $dflt " in
! *"-l$thatlib "*);;
! *) dflt="$dflt -l$thatlib";;
esac
else
! xxx=`./loc lib$thislib.so X $libpth`
if $test -f $xxx; then
! echo "Found -l$thislib (shared only)."
! case " $dflt " in
! *"-l$thislib "*|*"-l$thatlib "*);;
*) dflt="$dflt -l$thislib";;
esac
else
! xxx=`./loc lib$thislib.so X $libpth`
! if $test -f $xxx; then
! echo "Found -l$thislib (shared only)."
! case "$dflt" in
! *-l$thislib*|*-l$thatlib*);;
! *) dflt="$dflt -l$thislib";;
! esac
! else
! echo "No -l$thislib."
! fi
fi
fi
fi
Index: mcon/man/mlint.SH
Prereq: 3.0.1.4
*** mcon/man/mlint.SH.old Fri May 6 17:28:37 1994
--- mcon/man/mlint.SH Fri May 6 17:28:37 1994
***************
*** 20,26 ****
.TH METACONFIG $manext "Version $VERSION PL$PATCHLEVEL"
''' @(#) Manual page for metalint
'''
! ''' $Id: mlint.SH,v 3.0.1.4 1994/01/24 14:20:39 ram Exp $
'''
''' Copyright (c) 1991-1993, Raphael Manfredi
'''
--- 20,26 ----
.TH METACONFIG $manext "Version $VERSION PL$PATCHLEVEL"
''' @(#) Manual page for metalint
'''
! ''' $Id: mlint.SH,v 3.0.1.5 1994/05/06 15:20:30 ram Exp $
'''
''' Copyright (c) 1991-1993, Raphael Manfredi
'''
***************
*** 31,36 ****
--- 31,40 ----
''' of the source tree for dist 3.0.
'''
''' $Log: mlint.SH,v $
+ ''' Revision 3.0.1.5 1994/05/06 15:20:30 ram
+ ''' patch23: added -L switch to override public unit repository path
+ ''' patch23: two new warnings concerning last unit lines
+ '''
''' Revision 3.0.1.4 1994/01/24 14:20:39 ram
''' patch16: can now easily suppress warning about made "special units"
'''
***************
*** 52,57 ****
--- 56,62 ----
.SH SYNOPSIS
.B metalint
[ \-\fBhklsV\fR ]
+ [ \-\fBL \fIdir\fR ]
.SH DESCRIPTION
.I Metalint
parses the units and performs some extensive consistency checks, to make sure
***************
*** 82,87 ****
--- 87,98 ----
.B \-s
Silent mode.
.TP
+ \fB\-L\fI dir\fR
+ Override default library location. Normally only useful for metaconfig
+ maintainers to locally check the units being developped instead of the
+ publicly available ones. The \fIdir\fR specified is the one containing the
+ units \fIU\fR directory.
+ .TP
.B \-V
Print version number and exit.
.SH DIAGNOSTICS
***************
*** 189,194 ****
--- 200,213 ----
"no ?MAKE: line describing dependencies."
Every unit should have a dependency line, or it will be silently ignored by
\fImetaconfig\fR.
+ .TP
+ "not ending with a blank line."
+ Since all units are gathered together to form one big script, it is recommended
+ (hence enforced by \fImetalint\fR) that every unit file end with an empty line.
+ .TP
+ "last line not ending with a new-line character."
+ This is merely intended to users whose editor does not always append a
+ new-line at the end of text files. Should not happen when you use \fIvi\fR.
.TP
"symbol '\$xxx' was not described."
The shell symbol defined by this unit was not documented. Use the \fIdescribe\fR
Index: mcon/mlint.SH
Prereq: 3.0.1.2
*** mcon/mlint.SH.old Fri May 6 17:28:38 1994
--- mcon/mlint.SH Fri May 6 17:28:38 1994
***************
*** 20,26 ****
eval "exec perl -S \$0 \$*"
if \$running_under_some_shell;
! # $Id: mlint.SH,v 3.0.1.2 1994/01/24 14:21:00 ram Exp $
#
# Copyright (c) 1991-1993, Raphael Manfredi
#
--- 20,26 ----
eval "exec perl -S \$0 \$*"
if \$running_under_some_shell;
! # $Id: mlint.SH,v 3.0.1.3 1994/05/06 15:20:42 ram Exp $
#
# Copyright (c) 1991-1993, Raphael Manfredi
#
***************
*** 33,38 ****
--- 33,41 ----
# Original Author: Harlan Stenn <harlan@mumps.pfcs.com>
#
# $Log: mlint.SH,v $
+ # Revision 3.0.1.3 1994/05/06 15:20:42 ram
+ # patch23: added -L switch to override public unit repository path
+ #
# Revision 3.0.1.2 1994/01/24 14:21:00 ram
# patch16: added ~/.dist_profile awareness
#
***************
*** 52,67 ****
!GROK!THIS!
$spitshell >>mlint <<'!NO!SUBS!'
- chop($date = `date`);
- $MC = &tilda_expand($MC); # ~name expansion
- chop($WD = `pwd`); # Working directory
- chdir $MC || die "Can't chdir to $MC: $!\n";
- chop($MC = `pwd`); # Real metalint lib path (no symbolic links)
- chdir $WD || die "Can't chdir back to $WD: $!\n";
-
&profile; # Read ~/.dist_profile
require 'getopts.pl';
! &usage unless &Getopts("hklV");
if ($opt_V) {
print STDERR "metalint $version PL$patchlevel\n";
--- 55,63 ----
!GROK!THIS!
$spitshell >>mlint <<'!NO!SUBS!'
&profile; # Read ~/.dist_profile
require 'getopts.pl';
! &usage unless &Getopts("hklVL:");
if ($opt_V) {
print STDERR "metalint $version PL$patchlevel\n";
***************
*** 70,75 ****
--- 66,79 ----
&usage;
}
+ chop($date = `date`);
+ $MC = $opt_L if $opt_L; # May override library path
+ $MC = &tilda_expand($MC); # ~name expansion
+ chop($WD = `pwd`); # Working directory
+ chdir $MC || die "Can't chdir to $MC: $!\n";
+ chop($MC = `pwd`); # Real metalint lib path (no symbolic links)
+ chdir $WD || die "Can't chdir back to $WD: $!\n";
+
&init; # Various initializations
`mkdir .MT 2>&1` unless -d '.MT'; # For private temporary files
***************
*** 109,119 ****
# Print out metalint's usage and exits
sub usage {
print STDERR <<EOM;
! Usage: metalint [-hklsV]
-h : print this help message and exits.
-k : keep temporary directory.
-l : also report problems from library units.
-s : silent mode.
-V : print version number and exits.
EOM
exit 1;
--- 113,124 ----
# Print out metalint's usage and exits
sub usage {
print STDERR <<EOM;
! Usage: metalint [-hklsV] [-L dir]
-h : print this help message and exits.
-k : keep temporary directory.
-l : also report problems from library units.
-s : silent mode.
+ -L : specify main units repository.
-V : print version number and exits.
EOM
exit 1;
Index: kit/kitsend.SH
Prereq: 3.0.1.1
*** kit/kitsend.SH.old Fri May 6 17:28:07 1994
--- kit/kitsend.SH Fri May 6 17:28:07 1994
***************
*** 20,26 ****
eval 'exec perl -S \$0 "\$@"'
if \$running_under_some_shell;
! # $Id: kitsend.SH,v 3.0.1.1 1993/08/19 06:42:15 ram Exp $
#
# Copyright (c) 1991-1993, Raphael Manfredi
#
--- 20,26 ----
eval 'exec perl -S \$0 "\$@"'
if \$running_under_some_shell;
! # $Id: kitsend.SH,v 3.0.1.2 1994/05/06 13:59:57 ram Exp $
#
# Copyright (c) 1991-1993, Raphael Manfredi
#
***************
*** 33,38 ****
--- 33,45 ----
# Original Author: Harlan Stenn <harlan@mumps.pfcs.com>
#
# $Log: kitsend.SH,v $
+ # Revision 3.0.1.2 1994/05/06 13:59:57 ram
+ # patch23: random code cleanup to follow pat tools style
+ # patch23: made configurable from dist profile
+ # patch23: now understands -V and -h options
+ # patch23: mails now flagged with a bulk precedence
+ # patch23: added X-Mailer header and now calls mailer via open()
+ #
# Revision 3.0.1.1 1993/08/19 06:42:15 ram
# patch1: leading config.sh searching was not aborting properly
#
***************
*** 42,50 ****
--- 49,71 ----
\$orgname='$orgname';
\$mailer='$mailer';
+ \$version = '$VERSION';
+ \$patchlevel = '$PATCHLEVEL';
!GROK!THIS!
cat >>kitsend <<'!NO!SUBS!'
+ $progname = &profile; # Read ~/.dist_profile
+ require 'getopts.pl';
+ &usage unless &Getopts('hV');
+
+ if ($opt_V) {
+ print STDERR "$progname $version PL$patchlevel\n";
+ exit 0;
+ } elsif ($opt_h) {
+ &usage;
+ }
+
+ $orgname = &tilda_expand($orgname);
chop($orgname = `cat $orgname`) if $orgname =~ m|^/|;
&readpackage;
***************
*** 59,65 ****
}
}
$dest = join(' ',@dest);
! die "Usage: kitsend [kits] dest\n" unless $dest;
@ARGV = @argv;
--- 80,86 ----
}
}
$dest = join(' ',@dest);
! &usage unless $dest;
@ARGV = @argv;
***************
*** 75,91 ****
$argv = "1-$maxnum";
@ARGV = $argv;
}
! $argv = do rangeargs(@ARGV);
! @ARGV = split(' ',$argv);
$argv =~ s/ $//;
if ($#ARGV < 0) {
! die "No kits specified.\n";
} elsif ($#ARGV) {
! print "Sending $package $baserev kits $argv to $dest...\n";
} else {
! print "Sending $package $baserev kit $argv to $dest...\n";
}
fork && exit;
--- 96,112 ----
$argv = "1-$maxnum";
@ARGV = $argv;
}
! $argv = &rangeargs(@ARGV);
! @ARGV = split(' ', $argv);
$argv =~ s/ $//;
if ($#ARGV < 0) {
! die "$progname: no kits specified.\n";
} elsif ($#ARGV) {
! print "$progname: sending $package $baserev kits $argv to $dest...\n";
} else {
! print "$progname: sending $package $baserev kit $argv to $dest...\n";
}
fork && exit;
***************
*** 94,118 ****
until ($#ARGV < 0) {
$kitnum = shift;
! open(XHEAD,">.xhead$$") || die "kitsend: can't create temp file: $!.\n";
! print XHEAD
! "To: $dest
Subject: $package $baserev kit #$kitnum
Organization: $orgname
[There are $maxnum kits for $package version $baserev.]
";
! $kitnum = "0$kitnum" if $kitnum < 10 && $maxnum >= 10;
! open(PATCH,"$package.kit$kitnum") ||
! die "kitsend: can't open $package.kit$kitnum: $!\n";
! while (<PATCH>) {
! print XHEAD;
}
- close XHEAD;
- system "$mailer $opt $dest <.xhead$$";
}
! unlink ".xhead$$";
sub rangeargs {
local($result) = '';
--- 115,159 ----
until ($#ARGV < 0) {
$kitnum = shift;
!
! # Provision for broken mailers...
! @dest = split(' ', $dest);
! while (@smalldest = splice(@dest, 0, 50)) {
! $to = join(', ', @smalldest); # Sensible To: for sendmail
! $smalldest = join(' ', @smalldest);
!
! open(MAILER, "|$mailer $opt $smalldest") ||
! die "$progname: can't fork $mailer: $!\n";
! print MAILER
! "To: $to
Subject: $package $baserev kit #$kitnum
+ Precedence: bulk
+ X-Mailer: dist [version $version PL$patchlevel]
Organization: $orgname
[There are $maxnum kits for $package version $baserev.]
";
! $kitnum = "0$kitnum" if $kitnum < 10 && $maxnum >= 10;
! open(FILE,"$package.kit$kitnum") ||
! die "$progname: can't open $package.kit$kitnum: $!\n";
! while (<FILE>) {
! print MAILER;
! }
! close FILE;
! close MAILER;
! warn "$progname: ERROR mailing of $package.kit$kitnum to $dest\n" if $?;
}
}
!
! sub usage {
! print STDERR <<EOM;
! Usage: $progname [-hV] [kits] dest
! -h : print this message and exit
! -V : print version number and exit
! EOM
! exit 1;
! }
sub rangeargs {
local($result) = '';
***************
*** 145,149 ****
--- 186,192 ----
!NO!SUBS!
$grep -v '^;#' ../pl/package.pl >>kitsend
+ $grep -v '^;#' ../pl/tilde.pl >>kitsend
+ $grep -v '^;#' ../pl/profile.pl >>kitsend
chmod +x kitsend
$eunicefix kitsend
Index: mcon/U/libpth.U
Prereq: 3.0
*** mcon/U/libpth.U.old Fri May 6 17:28:28 1994
--- mcon/U/libpth.U Fri May 6 17:28:28 1994
***************
*** 1,4 ****
! ?RCS: $Id: libpth.U,v 3.0 1993/08/18 12:09:02 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS:
--- 1,4 ----
! ?RCS: $Id: libpth.U,v 3.0.1.1 1994/05/06 15:07:53 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS:
***************
*** 9,21 ****
?RCS: of the source tree for dist 3.0.
?RCS:
?RCS: $Log: libpth.U,v $
?RCS: Revision 3.0 1993/08/18 12:09:02 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?X:
?X: This unit initializes the path for C library lookup.
?X:
! ?MAKE:libpth xlibpth plibpth: mips incpath
?MAKE: -pick add $@ %<
?S:libpth:
?S: This variable holds the general path used to find libraries. It is
--- 9,24 ----
?RCS: of the source tree for dist 3.0.
?RCS:
?RCS: $Log: libpth.U,v $
+ ?RCS: Revision 3.0.1.1 1994/05/06 15:07:53 ram
+ ?RCS: patch23: now asks for library directories to be searched (ADO)
+ ?RCS:
?RCS: Revision 3.0 1993/08/18 12:09:02 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?X:
?X: This unit initializes the path for C library lookup.
?X:
! ?MAKE:libpth glibpth xlibpth plibpth: mips incpath test cat Myread Oldconfig
?MAKE: -pick add $@ %<
?S:libpth:
?S: This variable holds the general path used to find libraries. It is
***************
*** 24,48 ****
?S:plibpth:
?S: Holds the private path used by Configure to find out the libraries.
?S: Its value is prepend to libpth. This variable takes care of special
! ?S: machines, like the mips.
?S:.
?INIT:: change the next line if compiling for Xenix/286 on Xenix/386
?INIT:xlibpth='/usr/lib/386 /lib/386'
?INIT:
?INIT:: general looking path for locating libraries
! ?INIT:libpth='/usr/lib/large /lib '$xlibpth' /lib/large'
! ?INIT:libpth=$libpth' /usr/lib/small /lib/small'
?INIT:
! ?LINT:describe xlibpth
?LINT:use mips
: Set private lib path
case "$plibpth" in
'') if mips; then
?X: on mips, we DO NOT want /lib, and we want $incpath/usr/lib
plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
- else
- plibpth="/usr/ccs/lib /usr/lib /usr/ucblib /usr/local/lib"
fi;;
esac
! libpth="$plibpth $libpth"
--- 27,94 ----
?S:plibpth:
?S: Holds the private path used by Configure to find out the libraries.
?S: Its value is prepend to libpth. This variable takes care of special
! ?S: machines, like the mips. Usually, it should be empty.
?S:.
+ ?T: xxx dlist
?INIT:: change the next line if compiling for Xenix/286 on Xenix/386
?INIT:xlibpth='/usr/lib/386 /lib/386'
?INIT:
?INIT:: general looking path for locating libraries
! ?INIT:glibpth="/usr/lib/large /lib /usr/lib $xlibpth /lib/large"
! ?INIT:glibpth="$libpth /usr/lib/small /lib/small"
! ?INIT:glibpth="$libpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
! ?INIT:
! ?INIT:: Private path used by Configure to find libraries. Its value
! ?INIT:: is prepended to libpth. This variable takes care of special
! ?INIT:: machines, like the mips. Usually, it should be empty.
! ?INIT:plibpth=''
?INIT:
! ?LINT:describe xlibpth glibpth
?LINT:use mips
: Set private lib path
case "$plibpth" in
'') if mips; then
?X: on mips, we DO NOT want /lib, and we want $incpath/usr/lib
plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
fi;;
esac
! case "$libpth" in
! ' ') dlist='';;
! '') dlist="$plibpth $glibpth";;
! *) dlist="$libpth";;
! esac
!
! : Now check and see which directories actually exist, avoiding duplicates
! libpth=''
! for xxx in $dlist
! do
! if $test -d $xxx; then
! case " $libpth " in
! *" $xxx "*) ;;
! *) libpth="$libpth $xxx";;
! esac
! fi
! done
! $cat <<'EOM'
!
! Some systems have incompatible or broken versions of libraries. Among
! the directories listed in the question below, please remove the one
! you know not to be holding relevant libraries. Say "none" for none.
!
! EOM
! case "$libpth" in
! '') dflt='none';;
! *)
! ?X: strip leading space
! set X $libpth
! shift
! dflt=${1+"$@"}
! ;;
! esac
! rp="Directories to use for library searches?"
! . ./myread
! case "$ans" in
! none) libpth=' ';;
! *) libpth="$ans";;
! esac
Index: mcon/U/Getfile.U
Prereq: 3.0.1.2
*** mcon/U/Getfile.U.old Fri May 6 17:28:11 1994
--- mcon/U/Getfile.U Fri May 6 17:28:11 1994
***************
*** 1,4 ****
! ?RCS: $Id: Getfile.U,v 3.0.1.2 1994/01/24 14:01:31 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS:
--- 1,4 ----
! ?RCS: $Id: Getfile.U,v 3.0.1.3 1994/05/06 14:23:36 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS:
***************
*** 9,14 ****
--- 9,18 ----
?RCS: of the source tree for dist 3.0.
?RCS:
?RCS: $Log: Getfile.U,v $
+ ?RCS: Revision 3.0.1.3 1994/05/06 14:23:36 ram
+ ?RCS: patch23: getfile could be confused by file name in "locate" requests
+ ?RCS: patch23: new 'p' directive to assume file is in people's path (WED)
+ ?RCS:
?RCS: Revision 3.0.1.2 1994/01/24 14:01:31 ram
?RCS: patch16: added metalint hint on changed 'ans' variable
?RCS:
***************
*** 51,56 ****
--- 55,63 ----
?X: . ./getfile
?X: active="$ans"
?X:
+ ?X: If the 'p' (path) letter is specified along with 'l', then an answer
+ ?X: without a leading / will be expected to be found in everyone's path.
+ ?X:
?X: If the answer to the question is 'none', then the existence checks are
?X: skipped and the empty string is returned.
?X:
***************
*** 58,64 ****
?MAKE: -pick add $@ %<
?V:ansexp:fn
?T:tilde type what orig_rp orig_dflt fullpath already redo skip none_ok \
! value exp_file
?LINT:change ans
: now set up to get a file name
cat <<'EOSC' >getfile
--- 65,71 ----
?MAKE: -pick add $@ %<
?V:ansexp:fn
?T:tilde type what orig_rp orig_dflt fullpath already redo skip none_ok \
! value exp_file nopath_ok loc_file
?LINT:change ans
: now set up to get a file name
cat <<'EOSC' >getfile
***************
*** 68,76 ****
--- 75,96 ----
skip=''
none_ok=''
exp_file=''
+ nopath_ok=''
orig_rp="$rp"
orig_dflt="$dflt"
+ ?X:
+ ?X: Catch up 'locate' requests early, so that we may strip the file name
+ ?X: before looking at the one-letter commands, in case the file name contains
+ ?X: one of them. Reported by Wayne Davison <davison@borland.com>.
+ ?X:
+ case "$fn" in
+ *:*)
+ loc_file=`expr $fn : '.*:\(.*\)'`
+ fn=`expr $fn : '\(.*\):.*'`
+ ;;
+ esac
+
case "$fn" in
*~*) tilde=true;;
esac
***************
*** 86,96 ****
case "$fn" in
*e*) exp_file=true;;
esac
case "$fn" in
*f*) type='File';;
*d*) type='Directory';;
! *l*) type='Locate'; fn=`expr $fn : '.*:\(.*\)'`;;
esac
what="$type"
--- 106,119 ----
case "$fn" in
*e*) exp_file=true;;
esac
+ case "$fn" in
+ *p*) nopath_ok=true;;
+ esac
case "$fn" in
*f*) type='File';;
*d*) type='Directory';;
! *l*) type='Locate';;
esac
what="$type"
***************
*** 192,203 ****
;;
Locate)
if test -d "$value"; then
! echo "(Looking for $fn in directory $value.)"
! value="$value/$fn"
fi
if test -f "$value"; then
type=''
fi
;;
esac
--- 215,235 ----
;;
Locate)
if test -d "$value"; then
! echo "(Looking for $loc_file in directory $value.)"
! value="$value/$loc_file"
fi
if test -f "$value"; then
type=''
fi
+ case "$nopath_ok" in
+ true) case "$value" in
+ */*) ;;
+ *) echo "Assuming $value will be in people's path."
+ type=''
+ ;;
+ esac
+ ;;
+ esac
;;
esac
*** End of Patch 23 ***
exit 0 # Just in case...