+++ /dev/null
-This directory created by Configure to save information that should
-persist across sessions.
-
-You may safely delete it if you wish.
: basic variables
-package=perl
-baserev=4.1
+package=perl5
+baserev=5.0
patchbranch=1
mydiff='diff -c'
maintname='Larry Wall'
+++ /dev/null
-
-
-
-
-
-
- Larry Wall
- Matthias Neeracher
- c/o 4920 El Camino Real
- Los Altos, CA 94022
-
- March 26, 1993
-
-
- Gary Little
- M/S 37-X
- Apple Computer, Inc.
- 20525 Mariani Ave.
- Cupertino, CA 95014
-
- Dear Gary,
-
- We are writing you as the product manager of Apple's
- EssentialsoToolsoObjects (E.T.O.) CD-ROM. As the authors of Perl for
- MPW, we hereby authorize Apple to distribute Perl for MPW including
- source code on E.T.O. according to the terms of the "Artistic" license
- distributed with Perl and enclosed with this letter. The Perl for MPW
- materials are hereby confirmed as being provided to Apple free of
- charge, for the purpose of being distributed on E.T.O. This
- authorization includes distribution of Perl for MPW on successive
- releases of E.T.O. and distribution of revisions to Perl for MPW that
- we provide you with or agree to.
-
- Thank you for your efforts in promoting the use of Perl amongst
- Macintosh developers.
-
- Sincerely,
-
-
- ________________________ ________________________
-
- Larry Wall Matthias Neeracher
+++ /dev/null
-$ActualRevision = "M";
-
-($junk, $ActualRevision) = '';
-
-chop($ActualRevision);
-
-($name, $ActualRevision, $junk) = split(/\s+/, $ActualRevision);
+++ /dev/null
-Article 38050 of comp.sys.amiga.programmer:
-Newsgroups: comp.sys.amiga.programmer
-Path: netlabs!news.cerf.net!usc!howland.reston.ans.net!pipex!uunet!majipoor.cygnus.com!fnf
-From: fnf@cygnus.com (Fred Fish)
-Subject: Re: FreshFish-dec93 CD; broken perl thereon
-Message-ID: <CKBuwv.7qF@cygnus.com>
-Organization: Cygnus Support, Mountain View, CA
-References: <1994Jan20.095600.8371@philips.oz.au> <D> <bruce.0r61@zuhause.mn.org>
-Date: Fri, 28 Jan 1994 06:48:29 GMT
-Lines: 129
-
-In article <bruce.0r61@zuhause.mn.org>,
-Bruce Albrecht <bruce@zuhause.MN.ORG> wrote:
->In article <1994Jan20.095600.8371@philips.oz.au> gduncan@philips.oz.au (Gary Duncan) writes:
->Me too. I don't have the December Fresh Fish, so I can't comment on it,
->but I have been wondering what it will take to do a fresh port of it anyway.
-
-The diffs that I applied to the base FSF distribution are:
-
-diff -rc perl-4.036-fsf/Configure perl-4.036-amiga/Configure
-*** perl-4.036-fsf/Configure Mon Feb 8 20:37:48 1993
---- perl-4.036-amiga/Configure Mon Sep 27 21:46:16 1993
-***************
-*** 4023,4029 ****
- eval $ans;;
- esac
- chmod +x doSH
-! ./doSH
-
- if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
- dflt=n
---- 4023,4029 ----
- eval $ans;;
- esac
- chmod +x doSH
-! sh doSH
-
- if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
- dflt=n
-diff -rc perl-4.036-fsf/Makefile.SH perl-4.036-amiga/Makefile.SH
-*** perl-4.036-fsf/Makefile.SH Mon Feb 8 20:35:21 1993
---- perl-4.036-amiga/Makefile.SH Tue Sep 28 07:16:24 1993
-***************
-*** 349,355 ****
-
- test: perl
- - cd t && chmod +x TEST */*.t
-! - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST </dev/tty
-
- clist:
- echo $(c) | tr ' ' '\012' >.clist
---- 349,355 ----
-
- test: perl
- - cd t && chmod +x TEST */*.t
-! - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST
-
- clist:
- echo $(c) | tr ' ' '\012' >.clist
-***************
-*** 373,376 ****
- ln Makefile ../Makefile
- ;;
- esac
-! rm -f makefile
---- 373,377 ----
- ln Makefile ../Makefile
- ;;
- esac
-! #rm -f makefile (AmigaDOS is case-independent)
-!
-diff -rc perl-4.036-fsf/makedepend.SH perl-4.036-amiga/makedepend.SH
-*** perl-4.036-fsf/makedepend.SH Mon Feb 8 20:36:27 1993
---- perl-4.036-amiga/makedepend.SH Mon Sep 27 22:06:33 1993
-***************
-*** 63,71 ****
- $cat /dev/null >.deptmp
- $rm -f *.c.c c/*.c.c
- if test -f Makefile; then
-! cp Makefile makefile
- fi
-! mf=makefile
- if test -f $mf; then
- defrule=`<$mf sed -n \
- -e '/^\.c\.o:.*;/{' \
---- 63,71 ----
- $cat /dev/null >.deptmp
- $rm -f *.c.c c/*.c.c
- if test -f Makefile; then
-! cp Makefile Makefile.bak
- fi
-! mf=Makefile
- if test -f $mf; then
- defrule=`<$mf sed -n \
- -e '/^\.c\.o:.*;/{' \
-diff -rc perl-4.036-fsf/perl.h perl-4.036-amiga/perl.h
-*** perl-4.036-fsf/perl.h Mon Feb 8 20:36:01 1993
---- perl-4.036-amiga/perl.h Mon Sep 27 22:06:19 1993
-***************
-*** 79,85 ****
---- 79,87 ----
- */
- #define HAS_ALARM
- #define HAS_CHOWN
-+ #ifndef amigados
- #define HAS_CHROOT
-+ #endif
- #define HAS_FORK
- #define HAS_GETLOGIN
- #define HAS_GETPPID
-***************
-*** 93,99 ****
---- 95,103 ----
- * password and group functions in general. All Unix systems do.
- */
- #define HAS_GROUP
-+ #ifndef amigados
- #define HAS_PASSWD
-+ #endif
-
- #endif /* !MSDOS */
-
-diff -rc perl-4.036-fsf/x2p/Makefile.SH perl-4.036-amiga/x2p/Makefile.SH
-*** perl-4.036-fsf/x2p/Makefile.SH Mon Feb 8 20:36:33 1993
---- perl-4.036-amiga/x2p/Makefile.SH Mon Sep 27 22:07:15 1993
-***************
-*** 157,160 ****
- ln Makefile ../Makefile
- ;;
- esac
-! rm -f makefile
---- 157,160 ----
- ln Makefile ../Makefile
- ;;
- esac
-! #rm -f makefile
-
-
-
-
-
-
+++ /dev/null
-#!/usr/bin/perl
-
-#
-# I thought that I would try out some perl 5 features for the first time.
-# So I wrote a small program, included below. It died, and the partial
-# output looks very much like what I wanted to accompish. Even if the program
-# had not died, there is still the problem that no output was given under the
-# label "sonia:".
-#
-# Since the output is close, perhaps a bug lurks within...(?) I'm using the
-# compiled binary provided in the perl5a6 tar file. I tried to write this
-# post so it could be given to perl with the -x flag. You should get the
-# output I describe here --
-# James Bence
-# jbence@math.ucla.edu
-#
-# Output:
-#
-# Pushed ege into @sonia
-# Pushed caflisch into @joshua
-# Pushed catalina into @julia
-# Pushed lunnon into @sonia
-# Pushed m270alg into @redwood
-# Pushed harten into @joshua
-# Pushed ycc into @joshua
-# Pushed m270wsc into @redwood
-#
-#
-# joshua:
-# caflisch harten ycc
-#
-# sonia:
-#
-#
-# redwood:
-# m270alg m270wsc
-#
-# julia:
-# Segmentation fault
-#
-#
-
-require 5.000;
-
-while (<DATA>) {
- ($login,$host) = split;
- push(@{$hostref{$host}},$login); # t/op/ref.t (22) suggests this is ok.
- print "Pushed $login into \@$host\n";
-}
-
-print"\n\n";
-
-while ( ($host,$ref) = each(%hostref)) {
- print "$host:\n ";
- $count = 0;
- foreach $person (@{$ref}) {
- print $person, " ";
- $count++;
- if ($count % 5 == 0) { print "\n "; }
- }
- print "\n\n";
-}
-
-__END__
-ege sonia
-caflisch joshua
-catalina julia
-lunnon sonia
-m270alg redwood
-harten joshua
-ycc joshua
-m270wsc redwood
+++ /dev/null
-@a = ( 5, 6, 7, 8);
-&foo(1, 2, @a);
-
-sub foo { my($a, $b, @c) = @_; print scalar(@c), "\n"; }
+++ /dev/null
-$B = [X, Y]; $B = 1; print $B
+++ /dev/null
-delete $ENV{TERM};
-system "env";
+++ /dev/null
-Article 18849 of comp.lang.perl:
-Path: netlabs!news.cerf.net!usc!howland.reston.ans.net!xlink.net!zib-berlin.de!zrz.TU-Berlin.DE!w204zrz!koen1830
-From: koen1830@w204zrz.zrz.tu-berlin.de (Andreas Koenig)
-Newsgroups: comp.lang.perl
-Subject: Bug in find2perl
-Date: 14 Feb 1994 09:43:16 GMT
-Organization: mal franz, mal anna
-Lines: 22
-Message-ID: <2jnh3k$hcv@brachio.zrz.TU-Berlin.DE>
-Reply-To: k@franz.ww.TU-Berlin.DE
-NNTP-Posting-Host: w204zrz.zrz.tu-berlin.de
-Cc:
-
-Hi all,
-
-I've encountered a bug in find2perl when used with the -prune Option.
-As there have been some bugreports recently, *and* also because there
-has to be fixed an incompatibility with perl5, I don't try to offer a
-fix, sorry. The bug comes and goes like this (verified for SUN and
-NeXT):
-
-%/usr/bin/find foo -print
-foo
-foo/bar
-foo/bar/baz
-%/usr/bin/find foo -prune -print
-foo
-%perl /usr/local/bin/find2perl foo -prune -print | perl
-foo
-foo/bar
-%perl5a5 /usr/local/bin/find2perl foo -prune -print | perl5a5
-Final $ should be \$ or $name at /usr/local/bin/find2perl line 553, at end of string
-syntax error at /usr/local/bin/find2perl line 553, near ""^$tmp$""
-Execution of /usr/local/bin/find2perl aborted due to compilation errors.
-
-
-
+++ /dev/null
-#!./perl
-
-format STDOUT {
- formline "@<<<<<<<<<<<<< @>>>>>>>>>>>\n", "foo", "bar";
-}
-
-write;
+++ /dev/null
-Article 20341 of comp.lang.perl:
-Path: netlabs!news.cerf.net!mvb.saic.com!MathWorks.Com!news.kei.com!hookup!swrinde!gatech!taco.cc.ncsu.edu!taco.cc.ncsu.edu!setzer
-From: setzer@math.ncsu.edu (William Setzer)
-Newsgroups: comp.lang.perl
-Subject: perl5a6 bug: sort sub @ary
-Date: 30 Mar 94 13:49:20
-Organization: The Chebychev Church of Probability
-Lines: 23
-Distribution: world
-Message-ID: <SETZER.94Mar30134920@math.math.ncsu.edu>
-NNTP-Posting-Host: math.ncsu.edu
-
-Ok, here's a weird one. Using the precompiled perl5a6 binary for the
-sun, the following dumps core:
-----
-@S = (0, 1, 2, 3);
-for ("A", "D", "b", "c") { $foo{$i++} = $_; }
-# for (sort { lc($foo{$a}) cmp lc($foo{$b}) } @S) { print $foo{$_}, "\n"; }
-for (sort Alpha @S) { print $foo{$_}, "\n"; }
-
-sub Alpha { lc($foo{$a}) cmp lc($foo{$b}); }
-----
-[Output]
-Segmentation fault (core dumped)
-----
-However, if you comment out the "sort Alpha" and uncomment the "sort
-{lc(...) cmp lc(...) }" line, everything works as expected. Also note
-that if you uncomment both "sort"s, everything also works as expected.
-Do-do-do-do [twilight zone music :-].
-
-William
-
-PS: Does anyone actually care about these bug reports? I thought I
- remember Larry saying that he preferred them in c.l.p., but it
- wouldn't be the first time my memory has fritzed.
-
-
+++ /dev/null
-@S = (0, 1, 2, 3);
-for ("A", "D", "b", "c") { $foo{$i++} = $_; }
-# for (sort { lc($foo{$a}) cmp lc($foo{$b}) } @S) { print $foo{$_}, "\n"; }
-for (sort Alpha @S) { print $foo{$_}, "\n"; }
-
-sub Alpha { lc($foo{$a}) cmp lc($foo{$b}); }
--- /dev/null
+{
+ local(%ENV);
+ $ENV{OOPS} = OOPS;
+ system 'echo NOT $OOPS';
+}
+system 'echo $OOPS';
+++ /dev/null
-#!./perl
-
-$foo = <<EOF;
-Subject: foobar
-From: baz
-EOF
-
-$* = 1;
-
-$pat = '^([*+&!]*)(Subject:)';
-#$pat =~ s/([a-zA-Z])/[\u$1\l$1]/g;
-#print $pat;
-
-$foo =~ /$pat/g;
-
-print $', "\n";
-
+++ /dev/null
-sub foo { my $i; for $i (@bar) { } }
+++ /dev/null
-$zz = { 1, 9 };
-print %$zz; # wrong; outputs 9
-
-print "\n";
-
-$zz = { "1", 9 };
-print %$zz; # ok; outputs 19
-
-print "\n";
-
-%xx = ( 1, 9 );
-print %xx; # ok; outputs 19
+++ /dev/null
-printf "%x\n", 0x40000000 | 0x00000010;
-printf "%x\n", 0x80000000 | 0x00000010;
+++ /dev/null
-$_ = "a b c" ; $a = ( @b = split ) ; print "$a\n@b\n"
+++ /dev/null
-Replied: Wed, 02 Mar 94 09:29:46 -0800
-Replied: brad_figg@rainbow.mentorg.com ("Brad Figg")
-Return-Path: brad_figg@rainbow.mentorg.com
-Return-Path: <brad_figg@rainbow.mentorg.com>
-Received: from mgc.mentorg.com by netlabs.com (4.1/SMI-4.1)
- id AA15524; Wed, 2 Mar 94 09:17:50 PST
-Received: from rainbow.mentorg.com by mgc.mentorg.com with SMTP
- (16.6/15.5+MGC-TD 2.20) id AA04359; Wed, 2 Mar 94 09:16:55 -0800
-Received: from wv.mentorg.com by rainbow.mentorg.com with SMTP
- (15.11.1.6/15.5+MGC-TD 2.08) id AA22830; Wed, 2 Mar 94 09:16:53 -0800
-Received: from em-wv02.MENTORG.COM by wv.mentorg.com (8.6.4/CF5.11R)
- id JAA18865; Wed, 2 Mar 1994 09:16:51 -0800
-Received: from cynic.MENTORG.COM by em-wv02.MENTORG.COM (4.1/CF3.4)
- id AA23300; Wed, 2 Mar 94 09:16:50 PST
-Received: by cynic.MENTORG.COM (4.1/CF3.4)
- id AA24503; Wed, 2 Mar 94 09:16:50 PST
-From: brad_figg@rainbow.mentorg.com ("Brad Figg")
-Message-Id: <9403020916.ZM24501@cynic>
-Date: Wed, 2 Mar 1994 09:16:50 -0800
-X-Mailer: Z-Mail (3.0.0 15dec93)
-To: lwall@netlabs.com
-Subject: Perl5 Alpha 6 bug (subs & formats)
-Content-Type: text/plain; charset=us-ascii
-Mime-Version: 1.0
-
-
-The following works just fine as is with Perl 4 but doesn't work with
-Perl5 Alpha 6 unless the format lines are moved outside the sub block.
-
-
-Brad
-
-p.s. I'm not currently at a point where I can make the actual offer
- but I'm just asking if you have any interest. I have access to
- 'Purify' and 'Quantify' from Pure Software. I was thinking of
- building Perl5 with these just to see what I'd get. Would you
- be interested in the results?
-
-
------------------------Error.pl---------------------------------
-######################################################################
-## Package Variables
-##
-
-package Error;
-
-push( @main'Versions, '$Id: Error.pl,v 1.3 1994/02/13 00:26:00 bradf Exp $' );
-
-$Strings[ ($None = 0) ] =
- "Everythings OK";
-$Strings[ ($BadFileOpen = 0) ] =
- "I was unable to open the file \'%s\' due to:\n$!";
-$Strings[ ($NoVersion = 0) ] =
- "Unable to read the first four bytes from the file." .
- " This probably means it is an empty file.";
-
-######################################################################
-##
-## Emsg
-##
-## Print a formatted error message to STDERR.
-##
-## Args: 2
-## 1. An error message that may contain printf formatting strings.
-## 2. A list of arguments to be used for the format string
-## expansions.
-##
-## Returns:
-##
-## if successful: none
-## if unsuccessful: none
-##
-## Calls:
-##
-## Requires:
-##
-## Notes:
-##
-
-sub Emsg
- {
- local( $String, @Args ) = @_;
- local( $Err );
-
-format EFIRSTLINE =
- *** Error: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-$_
- ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
-$_
-.
-
-format EBODY =
- ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
-$_
-.
-
-
- $~ = 'EFIRSTLINE';
- $Err = sprintf( $String, @Args );
- foreach (split( "\n", $Err )) {
- if ( $_ eq '' ) { print( "\n" ); }
- write;
- $~ = 'EBODY';
- }
- }
-[Acked]
-
+++ /dev/null
-Return-Path: Martin.Ward@durham.ac.uk
-Return-Path: <Martin.Ward@durham.ac.uk>
-Received: from scalpel.netlabs.com by netlabs.com (4.1/SMI-4.1)
- id AA01931; Thu, 20 Jan 94 03:56:39 PST
-Received: from netlabs.com (vaccine-eng1.netlabs.com) by scalpel.netlabs.com (4.1/SMI-4.1)
- id AA09639; Thu, 20 Jan 94 03:56:36 PST
-Received: from sun2.nsfnet-relay.ac.uk by netlabs.com (4.1/SMI-4.1)
- id AA01923; Thu, 20 Jan 94 03:56:01 PST
-Via: uk.ac.durham; Thu, 20 Jan 1994 11:47:16 +0000
-Received: from easby.dur.ac.uk by durham.ac.uk; Thu, 20 Jan 94 11:47:05 GMT
-Received: from ws-csm3.durham.ac.uk (ws-csm3.dur) by uk.ac.durham.easby;
- Thu, 20 Jan 94 11:46:29 GMT
-From: Martin.Ward@durham.ac.uk (Martin Ward)
-Date: Thu, 20 Jan 94 11:46:27 GMT
-Message-Id: <AA00871.9401201146.ws-csm3@uk.ac.durham>
-To: des0mpw@easby.durham.ac.uk, lwall@scalpel.netlabs.com
-Subject: Re: My last message
-
->: After saying I was stumped, I managed to track down the problem!
->: The problem was caused by a line much higher up:
->:
->: $seqpat = "$bs[s]\000e\000q\000\{\000"; # } hack
->:
->: Changing this by adding {} gives:
->:
->: $seqpat = "${bs}[s]\000e\000q\000\{\000"; # } hack
->:
->: which worked! No idea why :-)
->
->It apparently intuited $bs[s] to be an array reference.
-
-Aha! I think the interpretation is:
-"$bs[ s] .....
-^^^^^ ^^
-array ref Therefore this is an expression, so "s]" is the start of
- a pattern match/replace, so it scans for ...]....]
-
-I found the line by repeatedly chopping away everything after (and including)
-the line where perl _thought_ the error started. This gradually worked back
-through a nasty cascade of errors!
-
->: No speed improvement this time (the improvement in user time was swamped
->: by an increase in system time. This may be because it uses 5048k of
->: data/stack space, compared with 985k for perl4).
->
->That doesn't sound good. I hope it's a bug. Does it grow continuously?
->Hopefully it's just a memory leak.
-
-For perl4 the memory size (shown by top) grows by about 100-150k per 2 seconds,
-for perl5 it grows by about 1 - 1.5 Meg per 2 seconds. I don't use the script
-very often (and I have over 100 Meg of swap space) so its not a big problem.
-Still, with a 124k input file, the size for perl5 went up to 40 Meg!
-
-I have tracked down a memory leak, which is basically one line from the
-texqed script. Store this script in "tmp" and run "perl tmp /vmunix"
-(or some other large random file). Monitor the process using "top" in
-another window.
-
-Perl4 is OK but perl5 leaks like a leaky cistern.
-
-
-#!/usr/local/bin/perl
-
-# print a "." every $interval lines:
-$interval = 10;
-open (PAIRS, "$ARGV[0]");
-open (OUT, "> /dev/null");
-$bs = "\\\\" . "\000";
-for (;;) {
- $line++;
- if (($line % $interval) == 0) {
- print STDERR ".";
- }
- read(PAIRS, $_, 20);
- last if ($_ eq "");
-
- s/$bs([_^\\])\000/\\\377$1\377/g;
-
- print OUT ;
-}
-
-print STDERR "\n";
-
-
-
-I hope you find this useful!
-
-NB Changing the "s/.../.../g" to an "m/.../" (with the same pattern)
-makes the leak go away even on input files where the pattern NEVER matches!!
-
- Martin.
-
-JANET: Martin.Ward@uk.ac.durham Internet (eg US): Martin.Ward@durham.ac.uk
-or if that fails: Martin.Ward%uk.ac.durham@nsfnet-relay.ac.uk
-or even: Martin.Ward%DURHAM.AC.UK@CUNYVM.CUNY.EDU
-BITNET: Martin.Ward%durham.ac.uk@UKACRL UUCP:...!uknet!durham!Martin.Ward
-[Last acked 0.7 days ago--not acked]
-
+++ /dev/null
- $a="abc";
- substr(\$a,1,0)='a';
+++ /dev/null
-$z = \'23'
this means you can return from it.
Format value lists may be spread over multiple lines by enclosing in
- curlies.
+ a do {} block.
You may now define BEGIN and END subroutines for each package. The BEGIN
subroutine executes the moment it's parsed. The END subroutine executes
routine, which will be called if a non-existent subroutine is called in
that package.
+ There is now a pragma mechanism, using the keywords "aver" and "deny".
+ Current pragmas are "integer" and "strict". Unrecognized pragmas
+ are ignored.
+
Incompatibilities
-----------------
@ now always interpolates an array in double-quotish strings. Some programs
# $Id: Head.U,v 3.0.1.3 1993/12/15 08:15:07 ram Exp $
#
-# Generated on Sat Apr 2 17:29:14 EST 1994 [metaconfig 3.0 PL22]
+# Generated on Wed May 4 14:59:36 EDT 1994 [metaconfig 3.0 PL22]
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
cd UU && rm -f *
extensions=''
-d_bsd=''
d_eunice=''
d_xenix=''
eunicefix=''
zcat=''
hint=''
myuname=''
+osname=''
+osvers=''
Author=''
Date=''
Header=''
Source=''
State=''
afs=''
-alignbytes=''
+memalignbytes=''
bin=''
binexp=''
installbin=''
d_open3=''
d_portable=''
d_readdir=''
+d_rewinddir=''
+d_seekdir=''
+d_telldir=''
d_rename=''
d_rmdir=''
d_safebcpy=''
d_setsid=''
d_shm=''
d_shmat=''
+d_voidshmat=''
d_shmctl=''
d_shmdt=''
d_shmget=''
d_symlink=''
d_syscall=''
d_system=''
+d_time=''
+timetype=''
clocktype=''
d_times=''
d_truncate=''
d_vprintf=''
d_wait4=''
d_waitpid=''
+cccdlflags=''
+ccdlflags=''
+dldir=''
dlobj=''
dlsrc=''
+lddlflags=''
+shlibsuffix=''
usedl=''
gidtype=''
groupstype=''
i_fcntl=''
i_gdbm=''
i_grp=''
+i_memory=''
i_ndbm=''
+i_neterrno=''
i_niin=''
i_sysin=''
d_pwage=''
d_pwexpire=''
d_pwquota=''
i_pwd=''
+i_sdbm=''
i_stdarg=''
i_stddef=''
i_string=''
i_systimek=''
i_time=''
timeincl=''
+i_unistd=''
i_utime=''
i_varargs=''
i_varhdr=''
plibpth=''
xlibpth=''
libs=''
+lns=''
+lseektype=''
+d_mymalloc=''
mallocobj=''
mallocsrc=''
malloctype=''
groupcat=''
hostcat=''
passcat=''
+orderlib=''
+ranlib=''
package=''
spackage=''
installprivlib=''
privlib=''
privlibexp=''
prototype=''
+ptrsize=''
randbits=''
installscript=''
scriptdir=''
esac
: set package name
-package=perl
+package=perl5
: Eunice requires " " instead of "", can you believe it
echo " "
: no include file wanted by default
inclwanted=''
- usedl=''
+: File to use for dynamic loading
+usedl=''
+gidtype=''
groupstype=''
: change the next line if compiling for Xenix/286 on Xenix/386
xlibpth='/usr/lib/386 /lib/386'
: machines, like the mips. Usually, it should be empty.
plibpth=''
-libswanted="net socket nsl inet nm sdbm gdbm ndbm dbm malloc dl dld sun m c_s posix cposix ndir dir ucb bsd BSD PW x"
+libswanted=" net socket inet nsl nm sdbm gdbm ndbm dbm malloc dl dld sun m c_s posix cposix ndir dir ucb bsd BSD PW x "
: full support for void wanted by default
defvoidused=15
echo
expr
grep
+ln
mkdir
mv
rm
sed
sort
+touch
tr
uniq
"
: Half the following guesses are probably wrong... If you have better
: tests or hints, please send them to lwall@netlabs.com
: The metaconfig authors would also appreciate a copy...
- $test -f /irix && dflt="$dflt sgi"
- $test -f /xenix && dflt="$dflt sco_xenix"
- $test -f /dynix && dflt="$dflt dynix"
- $test -f /dnix && dflt="$dflt dnix"
- $test -f /bin/mips && /bin/mips && dflt="$dflt mips"
- $test -d /NextApps && test -f /usr/adm/software_version && dflt="$dflt next"
- $test -d /usr/include/minix && dflt="$dflt minix"
+ $test -f /irix && osname=sgi
+ $test -f /xenix && osname=sco_xenix
+ $test -f /dynix && osname=dynix
+ $test -f /dnix && osname=dnix
+ $test -f /bin/mips && /bin/mips && osname=mips
+ $test -d /NextApps && test -f /usr/adm/software_version && osname=next
+ $test -d /usr/include/minix && osname=minix
if $test -f $uname; then
set X $myuname
shift
$test -f $5.sh && dflt="$dflt $5"
case "$5" in
- fps*) dflt="$dflt fps";;
+ fps*) osname=fps ;;
mips*)
case "$4" in
- umips) dflt="$dflt umips";;
- *) dflt="$dflt mips";;
+ umips) osname=umips ;;
+ *) osname=mips ;;
esac;;
- [23]100) dflt="$dflt mips";;
- next*) dflt="$dflt next" ;;
- news*) dflt="$dflt news" ;;
+ [23]100) osname=mips ;;
+ next*) osname=next ;;
+ news*) osname=news ;;
i386*) if $test -f /etc/kconfig; then
+ osname=isc
if $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
- dflt="$dflt isc_3_2_3"
+ osvers=3.2.3
elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
- dflt="$dflt isc_3_2_2"
+ osvers=3.2.2
fi
- : i386.sh hint is wrong for Interactive.
- dflt=`echo $dflt | $sed 's/i386//'`
fi
;;
esac
case "$1" in
- aix) dflt="$dflt aix_rs" ;;
- sun[Oo][Ss]) case "$3" in
- [34]*) vers=`echo $3 | $sed 's/\./_/g'`
- dflt="$dflt sunos_$vers" ;;
- 5*) vers=`echo $3 | $sed 's/^5/2/g'`
- dflt="$dflt solaris_$vers" ;;
+ aix) osname=aix_rs ;;
+ sunos) osname=sunos
+ case "$3" in
+ [34]*) osvers=$3 ;;
+ 5*) osname=solaris
+ osvers=`echo $3 | $sed 's/^5/2/g'` ;;
esac
;;
- [sS]olaris) case "$3" in
- 5*) vers=`echo $3 | $sed 's/^5/2/g'`
- dflt="$dflt solaris_$vers" ;;
+ solaris) osname=solaris
+ case "$3" in
+ 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
esac
;;
- dnix) dflt="$dflt dnix" ;;
- dgux) dflt="$dflt dgux" ;;
- genix) dflt="$dflt genix" ;;
- hp*ux) dflt="$dflt hpux" ;;
- next) dflt="$dflt next" ;;
- irix) dflt="$dflt sgi" ;;
- ultrix) case "$3" in
- 3*) dflt="$dflt ultrix_3" ;;
- 4*) dflt="$dflt ultrix_4" ;;
+ dnix) osname=dnix ;;
+ dgux) osname=dgux ;;
+ genix) osname=genix ;;
+ hp*ux) osname=hpux ;;
+ next) osname=next ;;
+ irix) osname=sgi ;;
+ ultrix) osname=ultrix
+ case "$3" in
+ 1*) osvers=1 ;;
+ 2*) osvers=2 ;;
+ 3*) osvers=3 ;;
+ 4*) osvers=4 ;;
esac
;;
- uts) dflt="$dflt uts" ;;
- $2) case "$dflt" in
+ osf1) case "$5" in
+ alpha) osname=dec_osf
+ case "$3" in
+ [vt]1\.*) osvers=1 ;;
+ [vt]2\.*) osvers=2 ;;
+ [vt]3\.*) osvers=3 ;;
+ esac
+ ;;
+ hp*) osname=hp_osf1 ;; # TR
+ mips) osname=mips_osf1 ;; # TR
+ # TR = Technology Releases: (un^N)supported
+ esac
+ ;;
+ uts) osname=uts ;;
+ $2) case "$osname" in
*isc*) ;;
*) if test -f /etc/systemid; then
+ osname=sco
+ : Does anyone know if these next gyrations are needed
set `echo $3 | $sed 's/\./ /g'` $4
if $test -f sco_$1_$2_$3.sh; then
- dflt="$dflt sco_$1_$2_$3"
+ osvers=$1.$2.$3
elif $test -f sco_$1_$2.sh; then
- dflt="$dflt sco_$1_$2"
+ osvers=$1.$2
elif $test -f sco_$1.sh; then
- dflt="$dflt sco_$1"
+ osvers=$1
fi
fi
;;
if test -f /vmunix -a -f news_os.sh; then
(what /vmunix | tr '[A-Z]' '[a-z]') > ../UU/kernel.what 2>&1
if $contains news-os ../UU/kernel.what >/dev/null 2>&1; then
- dflt="$dflt news_os"
+ osname=news_os
fi
$rm -f ../UU/kernel.what
fi
fi
- set X `echo $dflt | tr ' ' '\012' | sort | uniq`
- shift
- dflt=''
- for file in $*; do
- if $test -f "$file.sh"; then
- dflt="$dflt $file"
- fi
- done
- set X $dflt
- shift
- dflt=${1+"$@"}
- case "$dflt" in
- '') dflt=none;;
+
+ : Now look for a hint file osname_osvers
+ file=`echo "${osname}_${osvers}" | sed -e 's@\.@_@g' -e 's@_$@@'`
+ case "$file" in
+ '') dflt=none ;;
+ *) case "$osvers" in
+ '') dflt=$file
+ ;;
+ *) if $test -f $file.sh ; then
+ dflt=$file
+ elif $test -f "${osname}.sh" ; then
+ dflt="${osname}"
+ else
+ dflt=none
+ fi
+ ;;
+ esac
+ ;;
esac
+
$cat <<EOM
You may give one or more space-separated answers, or "none" if appropriate.
EOM
rp="Which of these apply, if any?"
. ../UU/myread
- for file in $ans; do
+ tans=$ans
+ for file in $tans; do
if $test -f $file.sh; then
. ./$file.sh
$cat $file.sh >> ../UU/config.sh
- elif $test X$ans = X -o X$ans = Xnone ; then
+ elif $test X$tans = X -o X$tans = Xnone ; then
: nothing
else
- echo "$file.sh does not exist -- ignored"
+ : 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 "$file.sh"; then
+ . ./$file.sh
+ $cat $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 "$file.sh" ; then
+ hintfile="$file.sh"
+ else
+ hintfile=none
+ fi
+
cd ..
fi
cd UU
eval $file="\$_$file"
done
+cat << EOM
+Configure uses the operating system name and version to set some defaults.
+Say "none" to leave it blank.
+EOM
+
+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="$ans" ;;
+esac
+
+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'` ;;
+ esac
+ ;;
+ *) dflt="$osvers" ;;
+esac
+rp="Operating system version?"
+. ./myread
+case "$ans" in
+ none) osvers='' ;;
+ *) osvers="$ans" ;;
+esac
: who configured the system
cf_time=`$date 2>&1`
cf_by=`( (logname) 2>/dev/null || whoami) 2>&1`
echo exit 1 >eunice
echo exit 1 >xenix
echo exit 1 >venix
-d_bsd="$undef"
$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
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..."
#endif
}
EOM
- if $cc -o gccvers $ccflags gccvers.c >/dev/null 2>&1; then
+ if $cc -o gccvers gccvers.c >/dev/null 2>&1; then
gccversion=`./gccvers`
echo "You appear to have version $gccversion."
else
'none') optimize=" ";;
esac
+dflt=''
case "$ccflags" in
'') case "$cc" in
*gcc*) if $test "$gccversion" = "1"; then
dflt='-fpcc-struct-return'
fi ;;
- *) dflt='';;
esac
case "$optimize" in
*-g*) dflt="$dflt -DDEBUGGING";;
;;
esac
;;
-*) dflt="$ccflags" ;;
esac
case "$mips_type" in
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
want $package to honor its debug switch, you should include -DDEBUGGING here.
To use no flags, specify the word "none".
-Your C compiler might also need additional flags, such as -DJMPCLOBBER
-or -DCRIPPLED_CC.
+Your C compiler might also need additional flags, such as -DJMPCLOBBER,
+-DHIDEMYMALLOC or -DCRIPPLED_CC.
EOH
set X $dflt
shift
: 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 ;;
+*gcc*) case "$gccversion" in
+ 1) cppflags="$cppflags -D__GNUC__" ;;
+ esac
+ ;;
esac
case "$mips_type" in
'');;
for flag
do
case $flag in
- -D*|-I*|-traditional|-ansi|-nostdinc) cppflags="$cppflags $flag";;
+ -D*|-I*|-traditional|-ansi|-nostdinc|-posix|-Xp) cppflags="$cppflags $flag";;
esac
done
case "$cppflags" in
case "$thislib" in
dbm) thatlib=ndbm;;
*_s) thatlib=NONE;;
- *) thatlib="${thislib}_s";;
+ *) 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]'*' $libpth`
+ zzz=`./loc lib$thislib.so.[0-9]'*' X $libpth`
if $test -f $xxx; then
echo "Found -l$thislib."
case "$dflt" in
- "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *"-l$thislib "*|*-l$thislib|*"-l$thatlib "*|*-l$thatlib) ;;
*) dflt="$dflt -l$thislib";;
esac
elif $test -f $yyy; then
echo "Found -l$thatlib."
case "$dflt" in
- "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *"-l$thatlib "*|*-l$thatlib) ;;
*) dflt="$dflt -l$thatlib";;
esac
elif $test -f $zzz; then
echo "Found -$thislib."
case "$dflt" in
- "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *"-l$thislib "*|*-l$thislib) ;;
*) dflt="$dflt -l$thislib";;
esac
else
if $test -f $xxx; then
echo "Found -l$thislib."
case "$dflt" in
- "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *"-l$thislib "*|*-l$thislib|*"-l$thatlib "*|*-l$thatlib) ;;
*) dflt="$dflt -l$thislib";;
esac
elif $test -f $yyy; then
echo "Found -l$thatlib."
case "$dflt" in
- "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *"-l$thatlib "*|*-l$thatlib) ;;
*) dflt="$dflt -l$thatlib";;
esac
else
$cc $cppflags -DI_FCNTL access.c -o access >/dev/null 2>&1 ; then
h_fcntl=true;
echo "<fcntl.h> defines the *_OK access constants." >&4
+ elif $test `./findhdr unistd.h` && \
+ $cc $cppflags -DI_UNISTD access.c -o access >/dev/null 2>&1 ; then
+ echo "<unistd.h> defines the *_OK access constants." >&4
else
echo "I can't find the four *_OK access constants--I'll use mine." >&4
fi
: check for ability to cast large floats to 32-bit ints.
echo " "
echo 'Checking whether your C compiler can cast large floats to int32.' >&4
-if $test "$intsize" -ge 4; then
+if $test "$intsize" -eq 4; then
xxx=int
else
xxx=long
esac
set d_casti32
eval $setvar
-$rm -f try.*
+$rm -f try try.*
: check for ability to cast negative floats to unsigned
echo " "
echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
set getpriority d_getprior
eval $inlibc
+: define an alternate in-header-list? function
+inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
+cont=true; xxf="echo \"<\$1> found.\" >&4";
+case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
+*) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
+esac;
+case $# in 4) instead=instead;; *) instead="at last";; esac;
+while $test "$cont"; do
+ xxx=`./findhdr $1`
+ var=$2; eval "was=\$$2";
+ if $test "$xxx" && $test -r "$xxx";
+ then eval $xxf;
+ eval "case \"\$$var\" in $undef) . whoa; esac"; eval "$var=\$td";
+ cont="";
+ else eval $xxnf;
+ eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu"; fi;
+ set $yyy; shift; shift; yyy=$@;
+ case $# in 0) cont="";;
+ 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
+ xxnf="echo \"and I did not find <\$1> either.\" >&4";;
+ *) xxf="echo \"but I found <\$1\> instead.\" >&4";
+ xxnf="echo \"there is no <\$1>, ...\" >&4";;
+ esac;
+done;
+while $test "$yyy";
+do set $yyy; var=$2; eval "was=\$$2";
+ eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu";
+ set $yyy; shift; shift; yyy=$@;
+done'
+
+: see if this is a netinet/in.h or sys/in.h system
+set netinet/in.h i_niin sys/in.h i_sysin
+eval $inhdr
+
: see if htonl --and friends-- exists
set htonl d_htonl
eval $inlibc
-
+: Maybe they are macros.
+case "$d_htonl" in
+'define') ;;
+*) cat > try.c <<EOM
+#include <stdio.h>
+#include <sys/types.h>
+#$i_niin I_NETINET_IN
+#$i_sysin I_SYS_IN
+#ifdef I_NETINET_IN
+# include <netinet/in.h>
+#endif
+#ifdef I_SYS_IN
+# include <sys/in.h>
+#endif
+int main()
+{
+ int x;
+ printf("x = ", htonl(7));
+}
+EOM
+ if $cc $ccflags -c try.c >/dev/null 2>&1; then
+ d_htonl="$define"
+ echo "But it seems to be defined as a macro."
+ fi
+ $rm -f try.* try
+ ;;
+esac
: Look for isascii
echo " "
$cat >isascii.c <<'EOCP'
set d_msg
eval $setvar
+: determine which malloc to compile in
+: Old versions had dflt='y' only for bsd or v7.
+echo " "
+case "$usemymalloc" in
+'')
+ if bsd || v7; then
+ dflt='y'
+ else
+ dflt='y'
+ fi
+ ;;
+*) dflt="$usemymalloc"
+ ;;
+esac
+rp="Do you wish to attempt to use the malloc that comes with $package?"
+. ./myread
+usemymalloc="$ans"
+case "$ans" in
+y*) mallocsrc='malloc.c'
+ mallocobj='malloc.o'
+ d_mymalloc="$define"
+ ;;
+*) mallocsrc=''
+ mallocobj=''
+ d_mymalloc="$undef"
+ ;;
+esac
+
+: compute the type returned by malloc
+echo " "
+case "$malloctype" in
+'')
+ if $test `./findhdr malloc.h`; then
+ echo "#include <malloc.h>" > malloc.c
+ fi
+#include <malloc.h>
+ $cat >>malloc.c <<'END'
+void *malloc();
+END
+ if $cc $ccflags -c malloc.c >/dev/null 2>&1; then
+ malloctype='void *'
+ else
+ malloctype='char *'
+ fi
+ $rm -f malloc.[co]
+ ;;
+esac
+echo "Your system wants malloc to return '$malloctype', it would seem." >&4
+
socketlib=''
sockethdr=''
: see whether socket exists
if $test "$xxx"; then
i_pwd="$define"
echo "<pwd.h> found." >&4
- $cppstdin $cppflags < $xxx >$$.h
+ $cppstdin $cppflags $cppminus < $xxx >$$.h
if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
d_pwquota="$define"
else
echo "<pwd.h> NOT found." >&4
fi
-: see if readdir exists
+: see if readdir and friends exist
set readdir d_readdir
eval $inlibc
+set seekdir d_seekdir
+eval $inlibc
+set telldir d_telldir
+eval $inlibc
+set rewinddir d_rewinddir
+eval $inlibc
: see if rename exists
set rename d_rename
$cat >foo.c <<'EOCP'
main()
{
-char buf[128];
-register char *b;
-register int len;
-register int off;
-register int align;
+char buf[128], abc[128];
+char *b;
+int len;
+int off;
+int align;
+bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
for (align = 7; align >= 0; align--) {
for (len = 36; len; len--) {
b = buf+align;
- bcopy("abcdefghijklmnopqrstuvwxyz0123456789", b, len);
+ bcopy(abc, b, len);
for (off = 1; off <= len; off++) {
bcopy(b, b+off, len);
bcopy(b+off, b, len);
- if (bcmp(b, "abcdefghijklmnopqrstuvwxyz0123456789", len))
+ if (bcmp(b, abc, len))
exit(1);
}
}
$cat >foo.c <<'EOCP'
main()
{
-char buf[128];
-register char *b;
-register int len;
-register int off;
-register int align;
+char buf[128], abc[128];
+char *b;
+int len;
+int off;
+int align;
+
+memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
for (align = 7; align >= 0; align--) {
for (len = 36; len; len--) {
b = buf+align;
- memcpy("abcdefghijklmnopqrstuvwxyz0123456789", b, len);
+ memcpy(abc, b, len);
for (off = 1; off <= len; off++) {
memcpy(b, b+off, len);
memcpy(b+off, b, len);
- if (memcmp(b, "abcdefghijklmnopqrstuvwxyz0123456789", len))
+ if (memcmp(b, abc, len))
exit(1);
}
}
: see if shmat exists
set shmat d_shmat
eval $inlibc
-
+: see what shmat returns
+d_voidshmat="$undef"
+case "$d_shmat" in
+define)
+ $cppstdin $cppflags $cppminus < $usrinc/sys/shm.h >voidshmat.txt 2>/dev/null
+ if $contains "void.*shmat" voidshmat.txt >/dev/null 2>&1; then
+ echo "and shmat returns (void*)"
+ d_voidshmat="$define"
+ else
+ echo "and shmat returns (char*)"
+ fi
+ ;;
+esac
: see if shmdt exists
set shmdt d_shmdt
eval $inlibc
'') d_phostname="$undef";;
esac
-: backward compatibility for d_hvfork
-if test X$d_hvfork != X; then
- d_vfork="$d_hvfork"
- d_hvfork=''
-fi
: see if there is a vfork
set vfork d_vfork
eval $inlibc
-
+: But do we want to use it. vfork is reportedly unreliable in
+: perl in Solaris 2.x, and probably elsewhere.
+case "$d_vfork" in
+define)
+ dflt='n'
+ rp="Some systems have problems with vork. Do you want to use it?"
+ . ./myread
+ case "$ans" in
+ y|Y) ;;
+ *) echo "Ok, we won't use vfork."
+ d_vfork="$undef"
+ ;;
+ esac
+ ;;
+esac
: see if signal is declared as pointer to function returning int or void
echo " "
xxx=`./findhdr signal.h`
RCSfile='$RCSfile'
Revision='$Revision'
-: check for alignment requirements
-echo " "
-case "$alignbytes" in
-'') echo "Checking alignment constraints..." >&4
- $cat >try.c <<'EOCP'
-struct foobar {
- char foo;
- double bar;
-} try;
-main()
-{
- printf("%d\n", (char *)&try.bar - (char *)&try.foo);
-}
-EOCP
- if $cc $ccflags try.c -o try >/dev/null 2>&1; then
- dflt=`./try`
- else
- dflt='8'
- echo"(I can't seem to compile the test program...)"
- fi
- ;;
-*) dflt="$alignbytes"
- ;;
-esac
-rp="Doubles must be aligned on a how-many-byte boundary?"
-. ./myread
-alignbytes="$ans"
-$rm -f try.c try
-
: is AFS running?
echo " "
if test -d /afs; then
byteorder="$ans"
$rm -f try.c try
-: define an alternate in-header-list? function
-inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
-cont=true; xxf="echo \"<\$1> found.\" >&4";
-case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
-*) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
-esac;
-case $# in 4) instead=instead;; *) instead="at last";; esac;
-while $test "$cont"; do
- xxx=`./findhdr $1`
- var=$2; eval "was=\$$2";
- if $test "$xxx" && $test -r "$xxx";
- then eval $xxf;
- eval "case \"\$$var\" in $undef) . whoa; esac"; eval "$var=\$td";
- cont="";
- else eval $xxnf;
- eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu"; fi;
- set $yyy; shift; shift; yyy=$@;
- case $# in 0) cont="";;
- 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
- xxnf="echo \"and I did not find <\$1> either.\" >&4";;
- *) xxf="echo \"but I found <\$1\> instead.\" >&4";
- xxnf="echo \"there is no <\$1>, ...\" >&4";;
- esac;
-done;
-while $test "$yyy";
-do set $yyy; var=$2; eval "was=\$$2";
- eval "case \"\$$var\" in $define) . whoa; esac"; eval "$var=\$tu";
- set $yyy; shift; shift; yyy=$@;
-done'
-
: see if dlfcn is available
set dlfcn.h i_dlfcn
eval $inhdr
-
: determine which dynamic loading, if any, to compile in
echo " "
case "$usedl" in
-'')
- case "$i_dlfcn" in
- 'define') dflt='y' ;;
- *) dflt='n' ;;
- esac
- ;;
-'define') dflt='y' ;;
-'y') dflt='y'
- usedl='define' ;;
-*) dflt='n' ;;
+'') case "$i_dlfcn" in
+ define) dflt='y' ;;
+ *) dflt='n' ;;
+ esac
+ : Does a dl.c file exist for this operating system
+ $test -f ../ext/dl/dl_${osname}.c && dflt='y'
+ ;;
+define|y|true) dflt='y'
+ usedl="$define"
+ ;;
+*) dflt='n'
+ ;;
esac
rp="Do you wish to attempt to use dynamic loading?"
. ./myread
usedl="$ans"
case "$ans" in
-y*) usedl='define'; dlsrc='dl.c'; dlobj='dl.o';;
-*) usedl='undef'; dlsrc=''; dlobj='';;
+y*) usedl="$define"
+ if $test -f ../ext/dl/dl_${osname}.c ; then
+ dflt="ext/dl/dl_${osname}.c"
+ else
+ dflt='ext/dl/dl.c'
+ fi
+ echo "The following dynamic loading files are available:"
+ cd ..; ls -C ext/dl/dl*.c; cd UU
+ rp="Source file to use for dynamic loading"
+ fn="fne~"
+ . ./getfile
+ : emulate basename and dirname
+ xxx=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@' -e 's@\.c$@@'`
+ dlobj=$xxx.o
+ dlsrc=$xxx.c
+ dldir=`echo $ans | $sed 's@\(.*\)/[^/]*$@\1@'`
+ case "$dldir" in
+ '') dldir="." ;;
+ *) ;;
+ esac
+ if $test -f ../$dldir/$dlsrc; then
+ usedl="$define"
+ else
+ echo "File $dlsrc does not exist -- ignored"
+ usedl="$undef"
+ fi
+
+ cat << EOM
+
+Some systems may require passing special flags to $cc -c to
+compile modules that will be used to create a shared library.
+To use no flags, say "none".
+EOM
+ case "$cccdlflags" in
+ ''|' ') case "$osname" in
+ hpux) dflt='+z' ;;
+ next) dflt='none' ;;
+ sunos) dflt='none' ;;
+ *) dflt='none' ;;
+ esac
+ ;;
+ *) dflt="$cccdlflags" ;;
+ esac
+ rp="Any special flags to pass to $cc -c to compile shared library modules?"
+ . ./myread
+ case "$ans" in
+ none) cccdlflags='' ;;
+ *) cccdlflags="$ans" ;;
+ esac
+
+ cat << 'EOM'
+
+Some systems may require passing special flags to ld to
+create a shared library. To use no flags, say "none".
+EOM
+ case "$lddlflags" in
+ ''|' ') case "$osname" in
+ hpux) dflt='-b' ;;
+ next) dflt='none' ;;
+ sunos) dflt='none' ;;
+ *) dflt='none' ;;
+ esac
+ ;;
+ *) dflt="$lddlflags" ;;
+ esac
+ rp="Any special flags to pass to ld to create a shared library?"
+ . ./myread
+ case "$ans" in
+ none) lddlflags='' ;;
+ *) lddlflags="$ans" ;;
+ esac
+
+ cat <<EOM
+
+Some systems may require passing special flags to $cc to indicate that
+dynamic linking will be used. To use no flags, say "none".
+EOM
+ case "$ccdlflags" in
+ ''|' ')
+ case "$osname" in
+ hpux) dflt='none' ;;
+ next) dflt='none' ;;
+ sunos) dflt='none' ;;
+ *) dflt='none' ;;
+ esac
+ ;;
+ *) dflt="$ccdlflags"
+ ;;
+ esac
+ rp="Any special flags to pass to $cc to use dynamic loading?"
+ . ./myread
+ case "$ans" in
+ none) ccdlflags='' ;;
+ *) ccdlflags="$ans" ;;
+ esac
+ cat <<EOM
+
+Some systems may require using a special suffix for shared libraries.
+To create the shared library for POSIX, for example, you may need to
+actually build the file POSIX.so.
+
+EOM
+ case "$shlibsuffix" in
+ '')
+ case "$osname" in
+ hpux) dflt='.sl' ;;
+ next) dflt='.so' ;;
+ sunos) dflt='.so' ;;
+ *) dflt='.so' ;;
+ esac
+ ;;
+ *) dflt="$shlibsuffix"
+ ;;
+ esac
+ rp="What is the suffix used for shared libraries?"
+ . ./myread
+ case "$ans" in
+ none) shlibsuffix='' ;;
+ *) shlibsuffix="$ans" ;;
+ esac
+ ;;
+*) usedl="$undef"
+ : These are currently not used.
+ dlsrc=''
+ dlobj=''
+ dldir=''
+ lddlflags=''
+ ccdlflags=''
+ shlibsuffix='.o'
+ ;;
esac
+: see if we have the old dbm
+set dbm.h i_dbm
+eval $inhdr
+
+: see if ndbm.h is available
+set ndbm.h i_ndbm
+eval $inhdr
+
+: see if gdbm.h is available
+set gdbm.h i_gdbm
+eval $inhdr
+
+: see if sdbm.h is wanted
echo " "
+echo "$package includes an implementation of sdbm in ext/dbm/sdbm."
+case "$i_sdbm" in
+ ''|' ') val="$define" ;;
+ *) val="$i_sdbm" ;;
+esac
+set i_sdbm
+eval $setvar
case "$extensions" in
' '|'') echo "Looking for extensions..."
case "$find" in
*find*)
cd ..
- dflt="`$find ext -type f -name \*.xs -print`"
+ extensions=`$find ext -type f -name \*.xs -print`
+ set X $extensions
+ shift
+ extensions="$*"
cd UU
;;
- *) dflt='ext/dbm/NDBM_File.xs ext/dbm/ODBM_File.xs ext/dbm/GDBM_File.xs ext/dbm/SDBM_File.xs ext/posix/POSIX.xs'
+ *) extensions='ext/dbm/NDBM_File.xs ext/dbm/ODBM_File.xs ext/dbm/GDBM_File.xs ext/dbm/SDBM_File.xs ext/posix/POSIX.xs'
;;
esac
;;
-none) dflt='' ;;
-*) dflt="$extensions" ;;
+none) extensions='' ;;
+*) ;;
esac
+: Now see which are supported on this system.
+dflt=""
+for xxx in $extensions ; do
+ case "$xxx" in
+ *ODBM*) case "$i_dbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *NDBM*) case "$i_ndbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *GDBM*) case "$i_gdbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *SDBM*) case "$i_sdbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *) dflt="$dflt $xxx"
+ ;;
+ esac
+done
+
rp="What extensions do you wish to include?"
. ./myread
extensions="$ans"
echo " "
rp="What is the type for group ids returned by getgid()?"
. ./myread
-gidtype="$ans"
+val="$ans"
+set gidtype
+eval $setvar
: see if getgroups exists
set getgroups d_getgrps
eval $inlibc
echo " "
$cat <<EOM
What is the type of the second argument to getgroups()? Usually this
-is the same as group ids, "$gidtype", but not always.
+is the same as group ids, $gidtype, but not always.
EOM
rp="What type is the second arguement to getgroups()?"
. ./myread
- groupstype="$ans"
+ val="$ans"
;;
-*) groupstype="$gidtype";;
+*) val="$gidtype";;
esac
+set groupstype
+eval $setvar
: determine where private executables go
case "$privlib" in
'')
lib="$ans"
libexp="$ansexp"
-: determine which malloc to compile in
-: Old versions had dflt='y' only for bsd or v7.
-echo " "
-case "$usemymalloc" in
+: determine whether symbolic links are supported
+$touch blurfl
+if $ln -s blurfl sym > /dev/null 2>&1 ; then
+ lns="$ln -s"
+else
+ lns="$ln"
+fi
+rm -f blurfl sym
+: see what type lseek is declared as in the kernel
+case "$lseektype" in
'')
- if bsd || v7; then
- dflt='y'
+ if $contains 'off_t;' `./findhdr sys/types.h` >/dev/null 2>&1 ; then
+ dflt='off_t';
else
- dflt='y'
+ dflt='long';
fi
;;
-*) dflt="$usemymalloc"
+*) dflt="$lseektype"
;;
esac
-rp="Do you wish to attempt to use the malloc that comes with $package?"
-. ./myread
-usemymalloc="$ans"
-case "$ans" in
-y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
-*) mallocsrc=''; mallocobj='';;
-esac
-
-: compute the type returned by malloc
echo " "
-case "$malloctype" in
-'')
- if $test `./findhdr malloc.h`; then
- echo "#include <malloc.h>" > malloc.c
- fi
-#include <malloc.h>
- $cat >>malloc.c <<'END'
-void *malloc();
-END
- if $cc $ccflags -c malloc.c >/dev/null 2>&1; then
- malloctype='void *'
- else
- malloctype='char *'
- fi
- $rm -f malloc.[co]
- ;;
-esac
-echo "Your system wants malloc to return '$malloctype', it would seem." >&4
+rp="What type is lseek's offset on this system declared as?"
+. ./myread
+lseektype="$ans"
: determine where manual pages go
$cat <<EOM
*) manext=1;;
esac
+: check for alignment requirements
+echo " "
+case "$memalignbytes" in
+'') echo "Checking alignment constraints..." >&4
+ $cat >try.c <<'EOCP'
+struct foobar {
+ char foo;
+ double bar;
+} try;
+main()
+{
+ printf("%d\n", (char *)&try.bar - (char *)&try.foo);
+}
+EOCP
+ if $cc $ccflags try.c -o try >/dev/null 2>&1; then
+ dflt=`./try`
+ else
+ dflt='8'
+ echo"(I can't seem to compile the test program...)"
+ fi
+ ;;
+*) dflt="$memalignbytes"
+ ;;
+esac
+rp="Doubles must be aligned on a how-many-byte boundary?"
+. ./myread
+memalignbytes="$ans"
+$rm -f try.c try
+
: Cruising for prototypes
echo " "
echo "Checking out function prototypes..." >&4
eval $setvar
$rm -f prototype*
+: check for length of pointer
+echo " "
+case "$ptrsize" in
+'')
+ echo "Checking to see how big your pointers are..." >&4
+ $cat >try.c <<'EOCP'
+#include <stdio.h>
+main()
+{
+ printf("%d\n", sizeof(char *));
+}
+EOCP
+ if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
+ dflt=`./try`
+ else
+ dflt='4'
+ echo "(I can't seem to compile the test program. Guessing...)"
+ fi
+ ;;
+*)
+ dflt="$ptrsize"
+ ;;
+esac
+rp="What is the size of a pointer (in bytes)?"
+. ./myread
+ptrsize="$ans"
+$rm -f try.c try
+
: check for size of random number generator
echo " "
case "$randbits" in
randbits="$ans"
$rm -f try.c try
+: see if ar generates random libraries by itself
+echo " "
+echo "Checking how to generate random libraries on your machine..." >&4
+$cat >a.c <<EOP
+f() { exit(0); }
+EOP
+cc -c a.c >/dev/null 2>&1
+ar rc ran.a a.o >/dev/null 2>&1
+$cat >b.c <<EOP
+main() { f(); }
+EOP
+cp ran.a lib.a
+if ar ts ran.a >/dev/null 2>&1; then
+ if $cc -o b b.c lib.a >/dev/null 2>&1; then
+ echo "ar appears to generate random libraries itself."
+ orderlib=false
+ ranlib=":"
+ else
+ echo "a table of contents needs to be added with 'ar ts'."
+ orderlib=false
+ ranlib="ar ts"
+ fi
+else
+ if $test -f /usr/bin/ranlib; then
+ ranlib=/usr/bin/ranlib
+ elif $test -f /bin/ranlib; then
+ ranlib=/bin/ranlib
+ fi
+
+ if $test -n "$ranlib"; then
+ echo "your system has $ranlib; we'll use that."
+ orderlib=false
+ else
+ echo "your system doesn't seem to support random libraries"
+ echo "so we'll use lorder and tsort to order the libraries."
+ orderlib=true
+ ranlib=":"
+ fi
+fi
+$rm -f a.* b.c b.o b ran.a lib.a
+
: determine where public executables go
case "$scriptdir" in
'')
;;
esac
echo "The following signals are available:"
-echo $sig_name | tr ' ' '\012' | $sed 's/^/ SIG/'
-
+echo $sig_name |
+ $awk 'BEGIN { linelen = 0 }
+ { for (i = 1; i < NF; i++)
+ {
+ name = "SIG" $i " "
+ linelen = linelen + length(name)
+ if (linelen > 70)
+ {
+ printf "\n"
+ linelen = length(name)
+ }
+ printf "%s", name } }'
: see what type of char stdio uses.
echo " "
if $contains 'unsigned.*char.*_ptr;' `./findhdr stdio.h` >/dev/null 2>&1 ; then
stdchar="char"
fi
+: see if time exists
+echo " "
+if set time val -f d_time; eval $csym; $val; then
+ echo 'time() found.' >&4
+ val="$define"
+ case "$timetype" in
+ '')
+ if $contains 'time_t;' `./findhdr sys/types.h` >/dev/null 2>&1 ; then
+ dflt='time_t';
+ else
+ dflt='long';
+ fi
+ ;;
+ *) dflt="$timetype"
+ ;;
+ esac
+ echo " "
+ rp="What type is returned by time() on this sytem?"
+ . ./myread
+ timetype="$ans"
+else
+ echo 'time() not found, hope that will do.' >&4
+ val="$undef"
+ timetype='int';
+fi
+set d_time
+eval $setvar
+
: see what type uids are declared as in the kernel
case "$uidtype" in
'')
rp="$rp or bison -y"
fi
$cat <<EOM
-$package no longer requires a compiler compiler, so the following is
-optional.
+$package no longer requires a compiler compiler, so the following is optional.
EOM
rp="Which compiler compiler ($rp) shall I use?"
. ./myread
;;
esac
-: see if we have the old dbm
-set dbm.h i_dbm
-eval $inhdr
-
: see if this is a sys/file.h system
val=''
set sys/file.h val
set i_fcntl
eval $setvar
-: see if gdbm.h is available
-set gdbm.h i_gdbm
-eval $inhdr
-
: see if this is an grp system
set grp.h i_grp
eval $inhdr
-: see if ndbm.h is available
-set ndbm.h i_ndbm
+: see if memory.h is available.
+set memory.h i_memory
eval $inhdr
-
+: See if it conflicts with string.h
+case "$i_memory" in
+define)
+ case "$strings" in
+ '') ;;
+ *) $cppstdin $cppflags $cppminus < $strings > mem.h
+ if $contains 'memcpy' mem.h >/dev/null 2>&1; then
+ echo "We won't be including <memory.h>"
+ i_memory="$undef"
+ fi
+ rm -f mem.h
+ ;;
+ esac
+esac
: see if there are directory access routines out there
echo " "
if $test `./findhdr ndir.h` && \
fi
fi
-: see if this is a netinet/in.h or sys/in.h system
-set netinet/in.h i_niin sys/in.h i_sysin
+: see if net/errno.h is available
+set net/errno.h i_neterrno
eval $inhdr
-
+: Unfortunately, it causes problems on some systems. Arrgh.
+case '$i_neterrno' in
+'define') echo "<net/errno.h> found."
+ cat > try.c <<'EOM'
+#include <stdio.h>
+#include <errno.h>
+#include <net/errno.h>
+int func()
+{
+int x;
+x = ENOTSOCK;
+return x;
+}
+EOM
+ if $cc $ccflags -c try.c >/dev/null 2>&1; then
+ i_neterrno="$define"
+ else
+ echo "But it causes problems, so we won't include it"
+ i_neterrno="$undef"
+ fi
+ $rm -f try.* try
+ ;;
+esac
: see if stdarg is available
set stdarg.h i_stdarg
eval $inhdr
esac
$rm -f try.c try
+: see if this is a unistd.h system
+set unistd.h i_unistd
+eval $inhdr
+
: see if this is an utime system
set utime.h i_utime
eval $inhdr
$rm -f varargs*
: see if this is a vfork system
-set vfork.h i_vfork
-eval $inhdr
-
+case "$d_vfork" in
+define) set vfork.h i_vfork
+ eval $inhdr
+ ;;
+*) i_vfork="$undef";;
+esac
: end of configuration questions
echo " "
echo "End of configuration questions."
# Target system: $myuname
extensions='$extensions'
-d_bsd='$d_bsd'
d_eunice='$d_eunice'
d_xenix='$d_xenix'
eunicefix='$eunicefix'
zcat='$zcat'
hint='$hint'
myuname='$myuname'
+osname='$osname'
+osvers='$osvers'
Author='$Author'
Date='$Date'
Header='$Header'
Source='$Source'
State='$State'
afs='$afs'
-alignbytes='$alignbytes'
+memalignbytes='$memalignbytes'
bin='$bin'
binexp='$binexp'
installbin='$installbin'
d_open3='$d_open3'
d_portable='$d_portable'
d_readdir='$d_readdir'
+d_rewinddir='$d_rewinddir'
+d_seekdir='$d_seekdir'
+d_telldir='$d_telldir'
d_rename='$d_rename'
d_rmdir='$d_rmdir'
d_safebcpy='$d_safebcpy'
d_setsid='$d_setsid'
d_shm='$d_shm'
d_shmat='$d_shmat'
+d_voidshmat='$d_voidshmat'
d_shmctl='$d_shmctl'
d_shmdt='$d_shmdt'
d_shmget='$d_shmget'
d_symlink='$d_symlink'
d_syscall='$d_syscall'
d_system='$d_system'
+d_time='$d_time'
+timetype='$timetype'
clocktype='$clocktype'
d_times='$d_times'
d_truncate='$d_truncate'
d_vprintf='$d_vprintf'
d_wait4='$d_wait4'
d_waitpid='$d_waitpid'
+cccdlflags='$cccdlflags'
+ccdlflags='$ccdlflags'
+dldir='$dldir'
dlobj='$dlobj'
dlsrc='$dlsrc'
+lddlflags='$lddlflags'
+shlibsuffix='$shlibsuffix'
usedl='$usedl'
gidtype='$gidtype'
groupstype='$groupstype'
i_fcntl='$i_fcntl'
i_gdbm='$i_gdbm'
i_grp='$i_grp'
+i_memory='$i_memory'
i_ndbm='$i_ndbm'
+i_neterrno='$i_neterrno'
i_niin='$i_niin'
i_sysin='$i_sysin'
d_pwage='$d_pwage'
d_pwexpire='$d_pwexpire'
d_pwquota='$d_pwquota'
i_pwd='$i_pwd'
+i_sdbm='$i_sdbm'
i_stdarg='$i_stdarg'
i_stddef='$i_stddef'
i_string='$i_string'
i_systimek='$i_systimek'
i_time='$i_time'
timeincl='$timeincl'
+i_unistd='$i_unistd'
i_utime='$i_utime'
i_varargs='$i_varargs'
i_varhdr='$i_varhdr'
plibpth='$plibpth'
xlibpth='$xlibpth'
libs='$libs'
+lns='$lns'
+lseektype='$lseektype'
+d_mymalloc='$d_mymalloc'
mallocobj='$mallocobj'
mallocsrc='$mallocsrc'
malloctype='$malloctype'
groupcat='$groupcat'
hostcat='$hostcat'
passcat='$passcat'
+orderlib='$orderlib'
+ranlib='$ranlib'
package='$package'
spackage='$spackage'
installprivlib='$installprivlib'
privlib='$privlib'
privlibexp='$privlibexp'
prototype='$prototype'
+ptrsize='$ptrsize'
randbits='$randbits'
installscript='$installscript'
scriptdir='$scriptdir'
+++ /dev/null
-#ifdef I_PWD
-#include <pwd.h>
-#endif
-#ifdef I_GRP
-#include <grp.h>
-#endif
-#ifdef I_UTIME
-#include <utime.h>
-#endif
-#ifdef I_FCNTL
-#include <fcntl.h>
-#endif
-#ifdef I_SYS_FILE
-#include <sys/file.h>
-#endif
Artistic The "Artistic License"
+Configure Portability tool
Copying The GNU General Public License
EXTERN.h Included before foreign .h files
INTERN.h Included before domestic .h files
-Makefile.SH A script that generates Makefile
MANIFEST This list of files
-NDBM_File.c
-ODBM_File.c
-POSIX.c
+Makefile.SH A script that generates Makefile
README The Instructions
README.ncr Special instructions for NCR
README.uport Special instructions for Microports
README.xenix Special instructions for Xenix
-SDBM_File.c
XSUB.h
atarist/FILES
atarist/README.ST
atarist/usub/makefile.st
atarist/usub/usersub.c
atarist/wildmat.c
+autosplit
av.c
av.h
bar.pm
cflags.SH A script that emits C compilation flags per file
client A client to test sockets
config.H Sample config.h
-config_c++.h TEMP FILE
-config_h.SH Produces config.h
+config_h.SH Produces config.h
+configpm Produces lib/Config.pm
cop.h
cv.h
deb.c
-dl.c
+dlperl/Makefile
dlperl/dlperl.c
+dlperl/dlperl.doc
+dlperl/dlperl.man
dlperl/usersub.c
doSH Script to run all the *.SH files
doio.c I/O operations
eg/sysvipc/ipcshm Example of Sys V IPC shared memory
eg/travesty A program to print travesties of its input text
eg/unuc.pats
+eg/uudecode
eg/van/empty A program to empty the trashcan
eg/van/unvanish A program to undo what vanish does
eg/van/vanexp A program to expire vanished files
eg/van/vanish A program to put files in a trashcan
eg/who A sample who program
+emacs/cperl-mode
+emacs/emacs19
emacs/perl-mode.el Emacs major mode for perl
emacs/perldb.el Emacs debugging
emacs/perldb.pl Emacs debugging
emacs/tedstuff Some optional patches
embed_h.SH
-ext/dbm/GDBM_File.c
-ext/dbm/NDBM_File.c
-ext/dbm/ODBM_File.c
-ext/dbm/SDBM_File.c
-ext/dbm/sdbm/.pure
+ext/README
+ext/curses/Makefile
+ext/curses/bsdcurses.mus
+ext/curses/curses.mus
+ext/curses/pager
+ext/dbm/GDBM_File.xs GDBM extension
+ext/dbm/Makefile
+ext/dbm/NDBM_File.xs NDBM extension
+ext/dbm/ODBM_File.xs ODBM extension
+ext/dbm/SDBM_File.xs SDBM extension
+ext/dbm/sdbm/CHANGES
+ext/dbm/sdbm/COMPARE
+ext/dbm/sdbm/Makefile.SH
ext/dbm/sdbm/README.too
+ext/dbm/sdbm/biblio
ext/dbm/sdbm/dba.c
ext/dbm/sdbm/dbd.c
+ext/dbm/sdbm/dbe.1
ext/dbm/sdbm/dbe.c
ext/dbm/sdbm/dbm.c
ext/dbm/sdbm/dbm.h
ext/dbm/sdbm/dbu.c
+ext/dbm/sdbm/grind
ext/dbm/sdbm/hash.c
ext/dbm/sdbm/linux.patches
+ext/dbm/sdbm/makefile.sdbm
ext/dbm/sdbm/pair.c
ext/dbm/sdbm/pair.h
+ext/dbm/sdbm/readme.ms
ext/dbm/sdbm/readme.ps
+ext/dbm/sdbm/sdbm.3
ext/dbm/sdbm/sdbm.c
ext/dbm/sdbm/sdbm.h
ext/dbm/sdbm/tune.h
ext/dbm/sdbm/util.c
-ext/dl/dl.c
+ext/dbm/typemap
+ext/dl/dl_hpux.c Dynamic loading for HPUX.
+ext/dl/dl_next.c Dynamic loading for NeXT
+ext/dl/dl_sunos.c Dynamic loading for SunOS 4.1.?
+ext/dl/eg/Makefile
+ext/dl/eg/Makefile.att
ext/dl/eg/main.c
ext/dl/eg/test.c
ext/dl/eg/test1.c
+ext/man2mus
+ext/mus
+ext/posix/POSIX.xs
+ext/posix/typemap
+ext/typemap
+ext/typemap.oi
+ext/typemap.xlib
+ext/typemap.xpm
+ext/xsubpp
+ext/xvarpp
form.h Public declarations for the above
gettest A little script to test the get* routines
+global.sym
gv.c
gv.h
h2ph.SH A thing to turn C .h file into perl .ph files
hints/apollo_C6_8.sh
hints/aux.sh
hints/cray.sh
+hints/dec_osf_1.sh
+hints/dec_osf_2.sh
+hints/dec_osf_3.sh
hints/dgux.sh
hints/dnix.sh
hints/dynix.sh
hints/mpc.sh
hints/ncr_tower.sh
hints/next.sh
+hints/next_3_2.sh
hints/opus.sh
hints/osf1.sh
hints/sco_2_3_0.sh
hints/sco_3.sh
hints/sgi.sh
hints/solaris_2_0.sh
+hints/solaris_2_1.sh
+hints/solaris_2_2.sh
+hints/solaris_2_3.sh
hints/stellar.sh
hints/sunos_3_4.sh
hints/sunos_3_5.sh
hints/sunos_4_0_1.sh
hints/sunos_4_0_2.sh
+hints/sunos_4_1_2.sh
+hints/sunos_4_1_3.sh
hints/svr4.sh
hints/ti1500.sh
hints/titan.sh
hv.h
hvdbm.h
installperl Perl script to do "make install" dirty work
+interp.sym
ioctl.pl Sample ioctl.pl
keywords.h
lib/AutoLoader.pm
-lib/Config.pm
lib/English.pm
lib/Exporter.pm
lib/FOOBAR.pm
lib/FileHandle.pm
lib/Hostname.pm
+lib/NDBM_File.pm
lib/POSIX.pm
lib/SDBM_File.pm
lib/abbrev.pl An abbreviation table builder
lib/termcap.pl Perl library supporting termcap usage
lib/timelocal.pl Perl library supporting inverse of localtime, gmtime
lib/validate.pl Perl library supporting wholesale file mode validation
-main.c
makedepend.SH Precursor to makedepend
makedir.SH Precursor to makedir
makefile.lib make libperl.a
malloc.c A version of malloc you might not want
mg.c
mg.h
+miniperlmain.c Basic perl w/o dynamic loading or extensions.
msdos/Changes.dds Expanation of MS-DOS patches by Diomidis Spinellis
msdos/Makefile MS-DOS makefile
msdos/README.msdos Compiling and usage information
perly.c.diff
perly.c.yacc
perly.fixer A program to remove yacc stack limitations
-perly.h
perly.h.yacc
perly.y Yacc grammar for perl
perly.y.save
pp.c Push/Pop code
pp.h Push/Pop code defs
proto.h
+protos
regcomp.c Regular expression compiler
regcomp.h Private declarations for above
regexec.c Regular expression evaluator
scope.c
scope.h
server A server to test sockets
+sortfunc
sv.c
sv.h
t/README Instructions for regression tests
t/io/tell.t See if file seeking works
t/lib/bigint.t
t/lib/english.t
+t/lib/ndbm.t
t/lib/sdbm.t
t/op/append.t See if . works
t/op/array.t See if array operations work
t/op/vec.t See if vectors work
t/op/write.t See if write works
taint.c
-test.pl
toke.c The tokener
unixish.h
usersub.c User supplied (possibly proprietary) subroutines
util.c Utility routines
util.h Public declarations for the above
+writemain.SH Generate perlmain.c from miniperlmain.c+extensions.
x2p/EXTERN.h Same as above
x2p/INTERN.h Same as above
x2p/Makefile.SH Precursor to Makefile
x2p/util.c Utility routines
x2p/util.h Public declarations for the above
x2p/walk.c Parse tree walker
-Configure Portability tool
Artistic The "Artistic License"
+Configure Portability tool
Copying The GNU General Public License
EXTERN.h Included before foreign .h files
INTERN.h Included before domestic .h files
-Makefile.SH A script that generates Makefile
MANIFEST This list of files
-NDBM_File.c
-ODBM_File.c
-POSIX.c
+Makefile.SH A script that generates Makefile
README The Instructions
README.ncr Special instructions for NCR
README.uport Special instructions for Microports
README.xenix Special instructions for Xenix
-SDBM_File.c
XSUB.h
atarist/FILES
atarist/README.ST
atarist/usub/makefile.st
atarist/usub/usersub.c
atarist/wildmat.c
+autosplit
av.c
av.h
bar.pm
cflags.SH A script that emits C compilation flags per file
client A client to test sockets
config.H Sample config.h
-config_c++.h TEMP FILE
+config_h.SH Produces config.h
+configpm Produces lib/Config.pm
cop.h
cv.h
deb.c
-dl.c
+dlperl/Makefile
dlperl/dlperl.c
+dlperl/dlperl.doc
+dlperl/dlperl.man
dlperl/usersub.c
doSH Script to run all the *.SH files
doio.c I/O operations
eg/sysvipc/ipcshm Example of Sys V IPC shared memory
eg/travesty A program to print travesties of its input text
eg/unuc.pats
+eg/uudecode
eg/van/empty A program to empty the trashcan
eg/van/unvanish A program to undo what vanish does
eg/van/vanexp A program to expire vanished files
eg/van/vanish A program to put files in a trashcan
eg/who A sample who program
+emacs/cperl-mode
+emacs/emacs19
emacs/perl-mode.el Emacs major mode for perl
emacs/perldb.el Emacs debugging
emacs/perldb.pl Emacs debugging
emacs/tedstuff Some optional patches
embed_h.SH
-ext/dbm/GDBM_File.c
-ext/dbm/NDBM_File.c
-ext/dbm/ODBM_File.c
-ext/dbm/SDBM_File.c
-ext/dbm/sdbm/.pure
+ext/README
+ext/curses/Makefile
+ext/curses/bsdcurses.mus
+ext/curses/curses.mus
+ext/curses/pager
+ext/dbm/GDBM_File.xs GDBM extension
+ext/dbm/Makefile
+ext/dbm/NDBM_File.xs NDBM extension
+ext/dbm/ODBM_File.xs ODBM extension
+ext/dbm/SDBM_File.xs SDBM extension
+ext/dbm/sdbm/CHANGES
+ext/dbm/sdbm/COMPARE
+ext/dbm/sdbm/Makefile.SH
ext/dbm/sdbm/README.too
+ext/dbm/sdbm/biblio
ext/dbm/sdbm/dba.c
ext/dbm/sdbm/dbd.c
+ext/dbm/sdbm/dbe.1
ext/dbm/sdbm/dbe.c
ext/dbm/sdbm/dbm.c
ext/dbm/sdbm/dbm.h
ext/dbm/sdbm/dbu.c
+ext/dbm/sdbm/grind
ext/dbm/sdbm/hash.c
ext/dbm/sdbm/linux.patches
+ext/dbm/sdbm/makefile.sdbm
ext/dbm/sdbm/pair.c
ext/dbm/sdbm/pair.h
+ext/dbm/sdbm/readme.ms
ext/dbm/sdbm/readme.ps
+ext/dbm/sdbm/sdbm.3
ext/dbm/sdbm/sdbm.c
ext/dbm/sdbm/sdbm.h
ext/dbm/sdbm/tune.h
ext/dbm/sdbm/util.c
-ext/dl/dl.c
+ext/dbm/typemap
+ext/dl/dl_hpux.c Dynamic loading for HPUX.
+ext/dl/dl_next.c Dynamic loading for NeXT
+ext/dl/dl_sunos.c Dynamic loading for SunOS 4.1.?
+ext/dl/eg/Makefile
+ext/dl/eg/Makefile.att
ext/dl/eg/main.c
ext/dl/eg/test.c
ext/dl/eg/test1.c
+ext/man2mus
+ext/mus
+ext/posix/POSIX.xs
+ext/posix/typemap
+ext/typemap
+ext/typemap.oi
+ext/typemap.xlib
+ext/typemap.xpm
+ext/xsubpp
+ext/xvarpp
form.h Public declarations for the above
gettest A little script to test the get* routines
+global.sym
gv.c
gv.h
h2ph.SH A thing to turn C .h file into perl .ph files
hints/apollo_C6_8.sh
hints/aux.sh
hints/cray.sh
+hints/dec_osf_1.sh
+hints/dec_osf_2.sh
+hints/dec_osf_3.sh
hints/dgux.sh
hints/dnix.sh
hints/dynix.sh
hints/mpc.sh
hints/ncr_tower.sh
hints/next.sh
+hints/next_3_2.sh
hints/opus.sh
hints/osf1.sh
hints/sco_2_3_0.sh
hints/sco_3.sh
hints/sgi.sh
hints/solaris_2_0.sh
+hints/solaris_2_1.sh
+hints/solaris_2_2.sh
+hints/solaris_2_3.sh
hints/stellar.sh
hints/sunos_3_4.sh
hints/sunos_3_5.sh
hints/sunos_4_0_1.sh
hints/sunos_4_0_2.sh
+hints/sunos_4_1_2.sh
+hints/sunos_4_1_3.sh
hints/svr4.sh
hints/ti1500.sh
hints/titan.sh
hv.h
hvdbm.h
installperl Perl script to do "make install" dirty work
+interp.sym
ioctl.pl Sample ioctl.pl
keywords.h
lib/AutoLoader.pm
-lib/Config.pm
lib/English.pm
lib/Exporter.pm
lib/FOOBAR.pm
lib/FileHandle.pm
lib/Hostname.pm
+lib/NDBM_File.pm
lib/POSIX.pm
lib/SDBM_File.pm
lib/abbrev.pl An abbreviation table builder
lib/termcap.pl Perl library supporting termcap usage
lib/timelocal.pl Perl library supporting inverse of localtime, gmtime
lib/validate.pl Perl library supporting wholesale file mode validation
-main.c
makedepend.SH Precursor to makedepend
makedir.SH Precursor to makedir
makefile.lib make libperl.a
malloc.c A version of malloc you might not want
mg.c
mg.h
+miniperlmain.c Basic perl w/o dynamic loading or extensions.
msdos/Changes.dds Expanation of MS-DOS patches by Diomidis Spinellis
msdos/Makefile MS-DOS makefile
msdos/README.msdos Compiling and usage information
perly.c.diff
perly.c.yacc
perly.fixer A program to remove yacc stack limitations
-perly.h
perly.h.yacc
perly.y Yacc grammar for perl
perly.y.save
pp.c Push/Pop code
pp.h Push/Pop code defs
proto.h
+protos
regcomp.c Regular expression compiler
regcomp.h Private declarations for above
regexec.c Regular expression evaluator
scope.c
scope.h
server A server to test sockets
+sortfunc
sv.c
sv.h
t/README Instructions for regression tests
t/io/tell.t See if file seeking works
t/lib/bigint.t
t/lib/english.t
+t/lib/ndbm.t
t/lib/sdbm.t
t/op/append.t See if . works
t/op/array.t See if array operations work
t/op/vec.t See if vectors work
t/op/write.t See if write works
taint.c
-test.pl
toke.c The tokener
unixish.h
usersub.c User supplied (possibly proprietary) subroutines
util.c Utility routines
util.h Public declarations for the above
+writemain.SH Generate perlmain.c from miniperlmain.c+extensions.
x2p/EXTERN.h Same as above
x2p/INTERN.h Same as above
x2p/Makefile.SH Precursor to Makefile
x2p/util.c Utility routines
x2p/util.h Public declarations for the above
x2p/walk.c Parse tree walker
-Configure Portability tool
-config_h.SH Produces config.h
-# : Makefile.SH,v 15738Revision: 4.1 15738Date: 92/08/07 17:18:08 $
+# .SH,v $Revision: 4.1 $Date: 92/08/07 17:18:08 $
+# This file is derived from Makefile.SH. Any changes made here will
+# be lost the next time you run Configure.
+# Makefile is used to generate makefile. The only difference
+# is that makefile has the dependencies filled in at the end.
#
# $Log: Makefile.SH,v $
# Revision 4.1 92/08/07 17:18:08 lwall
manext = 1
LDFLAGS =
CLDFLAGS =
+
SMALL =
LARGE =
mallocsrc = malloc.c
mallocobj = malloc.o
-dlsrc = dl.c
-dlobj = dl.o
-SLN = ln -s
+dlsrc = dl_sunos.c
+dlobj = dl_sunos.o
+dldir = ext/dl
+LNS = /bin/ln -s
RMS = rm -f
+ranlib = /usr/bin/ranlib
+
+# The following are used to build and install shared libraries for
+# dynamic loading.
+LDDLFLAGS =
+CCDLFLAGS =
+CCCDLFLAGS =
+SHLIBSUFFIX = .so
libs = -ldbm -ldl -lm -lposix
shellflags =
-# To use an alternate make, set in config.sh.
+## To use an alternate make, set in config.sh.
MAKE = make
CCCMD = `sh $(shellflags) cflags $@`
util =
-sh = Makefile.SH makedepend.SH h2ph.SH
+sh = Makefile.SH cflags.SH embed_h.SH makedepend.SH makedir.SH writemain.SH
h1 = EXTERN.h INTERN.h av.h cop.h config.h embed.h form.h handy.h
h2 = hv.h op.h opcode.h perl.h regcomp.h regexp.h gv.h sv.h util.h
c2 = $(mallocsrc) mg.c perly.c pp.c regcomp.c regexec.c
c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c
-c = $(c1) $(c2) $(c3)
+c = $(c1) $(c2) $(c3) $(dlsrc) miniperlmain.c perlmain.c
s1 = av.c scope.c op.c doop.c doio.c dump.c hv.c
-s2 = $(mallocobj) mg.c perly.c pp.c regcomp.c regexec.c
+s2 = $(mallocsrc) mg.c perly.c pp.c regcomp.c regexec.c
s3 = gv.c sv.c taint.c toke.c util.c deb.c run.c perly.c
-saber = $(s1) $(s2) $(s3)
+saber = $(s1) $(s2) $(s3) $(dlsrc)
obj1 = av.o scope.o op.o doop.o doio.o dump.o hv.o
obj2 = $(mallocobj) mg.o perly.o pp.o regcomp.o regexec.o
obj3 = gv.o sv.o taint.o toke.o util.o deb.o run.o
-obj = $(obj1) $(obj2) $(obj3) $(dlobj)
+obj = $(obj1) $(obj2) $(obj3)
lintflags = -hbvxac
# grrr
SHELL = /bin/sh
-.SUFFIXES: .x
-
.c.o:
$(CCCMD) $*.c
-.x.c:
- sh writemain $*.x >$*.c
-
all: miniperl perl lib/Config.pm
#all: $(public) $(private) $(util) $(scripts)
# cd x2p; $(MAKE) all
# touch all
+# Phony target to force checking subdirectories.
+FORCE:
+
+
+$(dlsrc): $(dldir)/$(dlsrc)
+ cp $(dldir)/$(dlsrc) $(dlsrc)
+
+$(dlobj): $(dlsrc)
+ $(CCCMD) $(dlsrc)
+
+
# NDBM_File extension
+NDBM_File.o: NDBM_File.c
+ $(CCCMD) $(CCCDLFLAGS) $*.c
+
NDBM_File.c: ext/dbm/NDBM_File.xs ext/xsubpp ext/typemap
test -f miniperl || make miniperl
- ext/xsubpp ext/dbm/NDBM_File.xs >tmp
+ ./miniperl ext/xsubpp ext/dbm/NDBM_File.xs >tmp
mv tmp NDBM_File.c
-NDBM_File.o: NDBM_File.c
+lib/auto/NDBM_File/NDBM_File$(SHLIBSUFFIX): NDBM_File.o
+ test -d lib/auto/NDBM_File || mkdir lib/auto/NDBM_File
+ ld $(LDDLFLAGS) -o $@ NDBM_File.o
# ODBM_File extension
-ODBM_File.c: ext/dbm/ODBM_File.xs ext/xsubpp ext/typemap
- test -f miniperl || make miniperl
- ext/xsubpp ext/dbm/ODBM_File.xs >tmp
- mv tmp ODBM_File.c
-
ODBM_File.o: ODBM_File.c
+ $(CCCMD) $(CCCDLFLAGS) $*.c
-# GDBM_File extension
-GDBM_File.c: ext/dbm/GDBM_File.xs ext/xsubpp ext/typemap
+ODBM_File.c: ext/dbm/ODBM_File.xs ext/xsubpp ext/typemap
test -f miniperl || make miniperl
- ext/xsubpp ext/dbm/GDBM_File.xs >tmp
- mv tmp GDBM_File.c
+ ./miniperl ext/xsubpp ext/dbm/ODBM_File.xs >tmp
+ mv tmp ODBM_File.c
-GDBM_File.o: GDBM_File.c
+lib/auto/ODBM_File/ODBM_File$(SHLIBSUFFIX): ODBM_File.o
+ test -d lib/auto/ODBM_File || mkdir lib/auto/ODBM_File
+ ld $(LDDLFLAGS) -o $@ ODBM_File.o
# SDBM_File extension
+SDBM_File.o: SDBM_File.c
+ $(CCCMD) $(CCCDLFLAGS) $*.c
+
SDBM_File.c: ext/dbm/SDBM_File.xs ext/xsubpp ext/typemap
test -f miniperl || make miniperl
- ext/xsubpp ext/dbm/SDBM_File.xs >tmp
+ ./miniperl ext/xsubpp ext/dbm/SDBM_File.xs >tmp
mv tmp SDBM_File.c
-SDBM_File.o: SDBM_File.c
-
-lib/auto/SDBM_File/SDBM_File.so: SDBM_File.o ext/dbm/sdbm/libsdbm.a
- @- mkdir lib/auto/SDBM_File 2>/dev/null
- ld -o lib/auto/SDBM_File/SDBM_File.so SDBM_File.o ext/dbm/sdbm/libsdbm.a
-
-ext/dbm/sdbm/libsdbm.a: ext/dbm/sdbm/sdbm.c ext/dbm/sdbm/sdbm.h
- cd ext/dbm/sdbm; $(MAKE) sdbm
+lib/auto/SDBM_File/SDBM_File$(SHLIBSUFFIX): SDBM_File.o ext/dbm/sdbm/libsdbm.a
+ test -d lib/auto/SDBM_File || mkdir lib/auto/SDBM_File
+ ld $(LDDLFLAGS) -o $@ SDBM_File.o ext/dbm/sdbm/libsdbm.a
# POSIX extension
+POSIX.o: POSIX.c
+ $(CCCMD) $(CCCDLFLAGS) $*.c
+
POSIX.c: ext/posix/POSIX.xs ext/xsubpp ext/typemap
test -f miniperl || make miniperl
- ext/xsubpp ext/posix/POSIX.xs >tmp
+ ./miniperl ext/xsubpp ext/posix/POSIX.xs >tmp
mv tmp POSIX.c
-POSIX.o: POSIX.c
-lib/auto/POSIX/POSIX.so: POSIX.o ext/dbm/sdbm/libsdbm.a
- @- mkdir lib/auto/POSIX 2>/dev/null
- ld -o lib/auto/POSIX/POSIX.so POSIX.o ext/dbm/sdbm/libsdbm.a
-extobjs= ext/dbm/NDBM_File.xs.o ext/dbm/ODBM_File.xs.o ext/dbm/GDBM_File.xs.o ext/dbm/SDBM_File.xs.o ext/posix/POSIX.xs.o
+lib/auto/POSIX/POSIX$(SHLIBSUFFIX): POSIX.o
+ test -d lib/auto/POSIX || mkdir lib/auto/POSIX
+ ld $(LDDLFLAGS) -o $@ POSIX.o -lm
+
+# List of extensions (used by writemain) to generate perlmain.c
+ext= NDBM_File ODBM_File SDBM_File POSIX
+extsrc= NDBM_File.c ODBM_File.c SDBM_File.c POSIX.c
+# Extension dependencies.
+extdep= lib/auto/NDBM_File/NDBM_File$(SHLIBSUFFIX) lib/auto/ODBM_File/ODBM_File$(SHLIBSUFFIX) lib/auto/SDBM_File/SDBM_File$(SHLIBSUFFIX) lib/auto/POSIX/POSIX$(SHLIBSUFFIX)
+# How to include extensions in linking command
+extobj=
+
+ext/dbm/sdbm/libsdbm.a: ext/dbm/sdbm/sdbm.h ext/dbm/sdbm/sdbm.c
+ cd ext/dbm/sdbm; $(MAKE) -f Makefile libsdbm.a
+
# The $& notation tells Sequent machines that it can do a parallel make,
# and is harmless otherwise.
-miniperlmain.c: miniperlmain.x
-miniperlmain.o: miniperlmain.c
miniperl: $& miniperlmain.o perl.o $(obj)
$(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain.o perl.o $(obj) $(libs)
-perlmain.c: perlmain.x
+perlmain.c: miniperlmain.c
+ sh writemain $(ext) > perlmain.c
+
perlmain.o: perlmain.c
-perl: $& perlmain.o perl.o $(obj) NDBM_File.o ODBM_File.o POSIX.o
- $(CC) $(LARGE) $(CLDFLAGS) -o perl perlmain.o perl.o $(obj) NDBM_File.o ODBM_File.o POSIX.o $(libs)
+
+perl: $& perlmain.o perl.o $(obj) $(dlobj) $(extdep)
+ $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain.o perl.o $(obj) $(dlobj) $(extobj) $(libs)
libperl.rlb: libperl.a
- ranlib libperl.a
+ $(ranlib) libperl.a
touch libperl.rlb
libperl.a: $& perl.o $(obj)
# checks as well as the special code to validate that the script in question
# has been invoked correctly.
-suidperl: $& sperl.o main.o libperl.rlb
- $(CC) $(LARGE) $(CLDFLAGS) sperl.o main.o libperl.a $(libs) -o suidperl
+suidperl: $& sperl.o perlmain.o libperl.rlb
+ $(CC) $(LARGE) $(CLDFLAGS) sperl.o perlmain.o libperl.a $(libs) -o suidperl
-lib/Config.pm: config.sh
- ./configpm
+lib/Config.pm: config.sh miniperl
+ ./miniperl configpm
saber: $(saber)
# load $(saber)
sperl.o: perl.c perly.h patchlevel.h $(h)
$(RMS) sperl.c
- $(SLN) perl.c sperl.c
+ $(LNS) perl.c sperl.c
$(CCCMD) -DIAMSUID sperl.c
$(RMS) sperl.c
-dl.o: ext/dl/dl.c
- cp ext/dl/dl.c dl.c
- $(CC) -c dl.c
-
-
perly.h: perly.c
@ echo Dummy dependency for dumb parallel make
touch perly.h
opcode.h: opcode.pl
- - opcode.pl
+ - perl opcode.pl
embed.h: embed_h.SH global.sym interp.sym
sh embed_h.SH
./perl installperl
clean:
- rm -f *.o all perl taintperl suidperl miniperl
+ rm -f *.o all perl miniperl
+ rm -f POSIX.c ?DBM_File.c perlmain.c
+ rm -f ext/dbm/sdbm/libsdbm.a
+ cd ext/dbm/sdbm; $(MAKE) -f Makefile clean
cd x2p; $(MAKE) clean
realclean: clean
cd x2p; $(MAKE) realclean
+ cd ext/dbm/sdbm; $(MAKE) -f Makefile realclean
rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man
- rm -f perly.h t/perl Makefile config.h makedepend makedir
- rm -f makefile x2p/Makefile x2p/makefile cflags x2p/cflags
+ rm -f Makefile cflags embed_h makedepend makedir writemain
+ rm -f config.h t/perl makefile makefile.old cflags
+ rm -rf lib/auto/?DBM_File lib/auto/POSIX
+ rm -f x2p/Makefile x2p/makefile x2p/makefile.old x2p/cflags
+ rm -f lib/Config.pm
rm -f c2ph pstruct
# The following lint has practically everything turned on. Unfortunately,
- test -s perly.h || /bin/rm -f perly.h
cd x2p; $(MAKE) depend
-test: perl
+test: perl lib/Config.pm
- cd t && chmod +x TEST */*.t
- - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST </dev/tty
+ - cd t && (rm -f perl; $(LNS) ../perl perl) && ./perl TEST </dev/tty
-clist:
+clist: $(c)
echo $(c) | tr ' ' '\012' >.clist
-hlist:
+hlist: $(h)
echo $(h) | tr ' ' '\012' >.hlist
-shlist:
+shlist: $(sh)
echo $(sh) | tr ' ' '\012' >.shlist
# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
-case "$d_symlink" in
-*define*) sln='ln -s' ;;
-*) sln='ln';;
-esac
-
case "$d_dosuid" in
*define*) suidperl='suidperl' ;;
*) suidperl='';;
esac
+: Certain parts of Makefile need to be commented out if dynamic
+: loading is not used.
+case "$usedl" in
+define) comment='' ;;
+*) comment='#' ;;
+esac
+
echo "Extracting Makefile (with variable substitutions)"
: This section of the file will have variable substitutions done on it.
: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
: Protect any dollar signs and backticks that you do not want interpreted
: by putting a backslash in front. You may delete these comments.
$spitshell >Makefile <<!GROK!THIS!
-# : Makefile.SH,v 15738Revision: 4.1 15738Date: 92/08/07 17:18:08 $
+# $Makefile.SH,v $Revision: 4.1 $Date: 92/08/07 17:18:08 $
+# This file is derived from Makefile.SH. Any changes made here will
+# be lost the next time you run Configure.
+# Makefile is used to generate makefile. The only difference
+# is that makefile has the dependencies filled in at the end.
#
-# $Log: Makefile.SH,v $
+# \$Log: Makefile.SH,v \$
# Revision 4.1 92/08/07 17:18:08 lwall
# Stage 6 Snapshot
#
manext = $manext
LDFLAGS = $ldflags
CLDFLAGS = $ldflags
+
SMALL = $small
LARGE = $large $split
mallocsrc = $mallocsrc
mallocobj = $mallocobj
dlsrc = $dlsrc
dlobj = $dlobj
-SLN = $sln
+dldir = $dldir
+LNS = $lns
RMS = rm -f
+ranlib = $ranlib
+
+# The following are used to build and install shared libraries for
+# dynamic loading.
+LDDLFLAGS = $lddlflags
+CCDLFLAGS = $ccdlflags
+CCCDLFLAGS = $cccdlflags
+SHLIBSUFFIX = $shlibsuffix
libs = $libs $cryptlib
shellflags = $shellflags
-# To use an alternate make, set $altmake in config.sh.
+## To use an alternate make, set $altmake in config.sh.
MAKE = ${altmake-make}
!GROK!THIS!
-: In the following dollars and backticks do not need the extra backslash.
+## In the following dollars and backticks do not need the extra backslash.
$spitshell >>Makefile <<'!NO!SUBS!'
CCCMD = `sh $(shellflags) cflags $@`
util =
-sh = Makefile.SH makedepend.SH h2ph.SH
+sh = Makefile.SH cflags.SH embed_h.SH makedepend.SH makedir.SH writemain.SH
h1 = EXTERN.h INTERN.h av.h cop.h config.h embed.h form.h handy.h
h2 = hv.h op.h opcode.h perl.h regcomp.h regexp.h gv.h sv.h util.h
c2 = $(mallocsrc) mg.c perly.c pp.c regcomp.c regexec.c
c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c
-c = $(c1) $(c2) $(c3)
+c = $(c1) $(c2) $(c3) $(dlsrc) miniperlmain.c perlmain.c
s1 = av.c scope.c op.c doop.c doio.c dump.c hv.c
-s2 = $(mallocobj) mg.c perly.c pp.c regcomp.c regexec.c
+s2 = $(mallocsrc) mg.c perly.c pp.c regcomp.c regexec.c
s3 = gv.c sv.c taint.c toke.c util.c deb.c run.c perly.c
-saber = $(s1) $(s2) $(s3)
+saber = $(s1) $(s2) $(s3) $(dlsrc)
obj1 = av.o scope.o op.o doop.o doio.o dump.o hv.o
obj2 = $(mallocobj) mg.o perly.o pp.o regcomp.o regexec.o
obj3 = gv.o sv.o taint.o toke.o util.o deb.o run.o
-obj = $(obj1) $(obj2) $(obj3) $(dlobj)
+obj = $(obj1) $(obj2) $(obj3)
lintflags = -hbvxac
# grrr
SHELL = /bin/sh
-.SUFFIXES: .x
-
.c.o:
$(CCCMD) $*.c
-.x.c:
- sh writemain $*.x >$*.c
-
all: miniperl perl lib/Config.pm
#all: $(public) $(private) $(util) $(scripts)
# cd x2p; $(MAKE) all
# touch all
+
+# Phony target to force checking subdirectories.
+FORCE:
+
!NO!SUBS!
+
+### Some makes have problems with the following dependency
+### if $(dlsrc) or $(dlobj) is empty.
+### Therefore, comment it out if dlsrc is null.
+###
+$spitshell >>Makefile <<!GROK!THIS!
+${comment}
+${comment}\$(dlsrc): \$(dldir)/\$(dlsrc)
+${comment} cp \$(dldir)/\$(dlsrc) \$(dlsrc)
+
+${comment}\$(dlobj): \$(dlsrc)
+${comment} \$(CCCMD) \$(dlsrc)
+
+!GROK!THIS!
+
###
### Boilerplate for all the .xs files in the ext directory.
### XXX FIXME: At some point we also need to copy .pm files out of
### XXX the ext directory into lib.
-# Configure sets extensions to a string like
-# "ext/dbm/NDBM_File.xs ext/dbm/ODBM_File.xs ext/dbm/GDBM_File.xs \
-# ext/dbm/SDBM_File.xs ext/posix/POSIX.xs"
-extobjs=" "
+### XXX FIXME: At some point we need to run autosplit on the .pm
+### XXX files.
+### Configure sets extensions to a string like
+### "ext/dbm/NDBM_File.xs ext/dbm/ODBM_File.xs ext/dbm/GDBM_File.xs \
+### ext/dbm/SDBM_File.xs ext/posix/POSIX.xs"
+ext=" "
+extdep=" "
+extobj=" "
+extsrc=" "
+# extradep gives any extra dependencies of this extension.
+# extraobj gives any extra thinks to link with this extension.
for f in $extensions
do
- base=`basename $f .xs`
- dir=`dirname $f`
- extobjs="$extobjs $f.o"
+ base=`echo $f | $sed -e 's@.*/\(.*\).xs@\1@'`
+ ext="$ext $base"
+ extsrc="$extsrc $base.c"
+ case $base in
+ SDBM_File) extradep="ext/dbm/sdbm/libsdbm.a"
+ extraobj="ext/dbm/sdbm/libsdbm.a" ;;
+ POSIX) extradep=""
+ extraobj="-lm" ;;
+ *) extradep=""
+ extraobj="" ;;
+ esac
+ case "$usedl" in
+ define) extdep="$extdep lib/auto/$base/${base}\$(SHLIBSUFFIX)"
+ ;;
+ *) extdep="$extdep $base.o $extradep"
+ extobj="$extobj $base.o $extraobj" ;;
+ esac
+
$spitshell >>Makefile <<!GROK!THIS!
# $base extension
+$base.o: $base.c
+ \$(CCCMD) \$(CCCDLFLAGS) \$*.c
+
$base.c: $f ext/xsubpp ext/typemap
test -f miniperl || make miniperl
- ext/xsubpp $f >tmp
+ ./miniperl ext/xsubpp $f >tmp
mv tmp $base.c
-$base.o: $base.c
+${comment}lib/auto/$base/$base\$(SHLIBSUFFIX): $base.o $extradep
+${comment} test -d lib/auto/$base || mkdir lib/auto/$base
+${comment} ld \$(LDDLFLAGS) -o \$@ $base.o $extraobj
!GROK!THIS!
- case $base in
- SDBM_File) $spitshell >>Makefile <<'!NO!SUBS!'
+done
-lib/auto/SDBM_File/SDBM_File.so: SDBM_File.o ext/dbm/sdbm/libsdbm.a
- @- mkdir lib/auto/SDBM_File 2>/dev/null
- ld -o lib/auto/SDBM_File/SDBM_File.so SDBM_File.o ext/dbm/sdbm/libsdbm.a
+$spitshell >>Makefile <<!GROK!THIS!
-ext/dbm/sdbm/libsdbm.a: ext/dbm/sdbm/sdbm.c ext/dbm/sdbm/sdbm.h
- cd ext/dbm/sdbm; $(MAKE) sdbm
-!NO!SUBS!
- ;;
- POSIX) $spitshell >>Makefile <<'!NO!SUBS!'
-lib/auto/POSIX/POSIX.so: POSIX.o ext/dbm/sdbm/libsdbm.a
- @- mkdir lib/auto/POSIX 2>/dev/null
- ld -o lib/auto/POSIX/POSIX.so POSIX.o ext/dbm/sdbm/libsdbm.a
-!NO!SUBS!
- ;;
- esac
-done
+# List of extensions (used by writemain) to generate perlmain.c
+ext=$ext
+extsrc=$extsrc
+# Extension dependencies.
+extdep=$extdep
+# How to include extensions in linking command
+extobj=$extobj
-echo "extobjs=$extobjs" >> Makefile
+ext/dbm/sdbm/libsdbm.a: ext/dbm/sdbm/sdbm.h ext/dbm/sdbm/sdbm.c
+ cd ext/dbm/sdbm; \$(MAKE) -f Makefile libsdbm.a
+!GROK!THIS!
+
+### Now on to the rest of the Makefile.
$spitshell >>Makefile <<'!NO!SUBS!'
# The $& notation tells Sequent machines that it can do a parallel make,
# and is harmless otherwise.
-miniperlmain.c: miniperlmain.x
-miniperlmain.o: miniperlmain.c
miniperl: $& miniperlmain.o perl.o $(obj)
$(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain.o perl.o $(obj) $(libs)
-perlmain.c: perlmain.x
+perlmain.c: miniperlmain.c
+ sh writemain $(ext) > perlmain.c
+
perlmain.o: perlmain.c
-perl: $& perlmain.o perl.o $(obj) NDBM_File.o ODBM_File.o POSIX.o
- $(CC) $(LARGE) $(CLDFLAGS) -o perl perlmain.o perl.o $(obj) NDBM_File.o ODBM_File.o POSIX.o $(libs)
+
+perl: $& perlmain.o perl.o $(obj) $(dlobj) $(extdep)
+ $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain.o perl.o $(obj) $(dlobj) $(extobj) $(libs)
+
+pureperl: $& perlmain.o perl.o $(obj) $(dlobj) $(extdep)
+ purify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain.o perl.o $(obj) $(dlobj) $(extobj) $(libs)
+
+quantperl: $& perlmain.o perl.o $(obj) $(dlobj) $(extdep)
+ quantify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain.o perl.o $(obj) $(dlobj) $(extobj) $(libs)
libperl.rlb: libperl.a
- ranlib libperl.a
+ $(ranlib) libperl.a
touch libperl.rlb
libperl.a: $& perl.o $(obj)
# checks as well as the special code to validate that the script in question
# has been invoked correctly.
-suidperl: $& sperl.o main.o libperl.rlb
- $(CC) $(LARGE) $(CLDFLAGS) sperl.o main.o libperl.a $(libs) -o suidperl
+suidperl: $& sperl.o perlmain.o libperl.rlb
+ $(CC) $(LARGE) $(CLDFLAGS) sperl.o perlmain.o libperl.a $(libs) -o suidperl
-lib/Config.pm: config.sh
- ./configpm
+lib/Config.pm: config.sh miniperl
+ ./miniperl configpm
saber: $(saber)
# load $(saber)
sperl.o: perl.c perly.h patchlevel.h $(h)
$(RMS) sperl.c
- $(SLN) perl.c sperl.c
+ $(LNS) perl.c sperl.c
$(CCCMD) -DIAMSUID sperl.c
$(RMS) sperl.c
-dl.o: ext/dl/dl.c
- cp ext/dl/dl.c dl.c
- $(CC) -c dl.c
-
-!NO!SUBS!
-
-### Now on to the rest of the Makefile.
-$spitshell >>Makefile <<'!NO!SUBS!'
-
perly.h: perly.c
@ echo Dummy dependency for dumb parallel make
touch perly.h
opcode.h: opcode.pl
- - opcode.pl
+ - perl opcode.pl
embed.h: embed_h.SH global.sym interp.sym
sh embed_h.SH
./perl installperl
clean:
- rm -f *.o all perl taintperl suidperl miniperl
+ rm -f *.o all perl miniperl
+ rm -f POSIX.c ?DBM_File.c perlmain.c
+ rm -f ext/dbm/sdbm/libsdbm.a
+ cd ext/dbm/sdbm; $(MAKE) -f Makefile clean
cd x2p; $(MAKE) clean
realclean: clean
cd x2p; $(MAKE) realclean
+ cd ext/dbm/sdbm; $(MAKE) -f Makefile realclean
rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man
- rm -f perly.h t/perl Makefile config.h makedepend makedir
- rm -f makefile x2p/Makefile x2p/makefile cflags x2p/cflags
+ rm -f Makefile cflags embed_h makedepend makedir writemain
+ rm -f config.h t/perl makefile makefile.old cflags
+ rm -rf lib/auto/?DBM_File lib/auto/POSIX
+ rm -f x2p/Makefile x2p/makefile x2p/makefile.old x2p/cflags
+ rm -f lib/Config.pm
rm -f c2ph pstruct
# The following lint has practically everything turned on. Unfortunately,
- test -s perly.h || /bin/rm -f perly.h
cd x2p; $(MAKE) depend
-test: perl
+test: perl lib/Config.pm
- cd t && chmod +x TEST */*.t
- - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST </dev/tty
+ - cd t && (rm -f perl; $(LNS) ../perl perl) && ./perl TEST </dev/tty
-clist:
+clist: $(c)
echo $(c) | tr ' ' '\012' >.clist
-hlist:
+hlist: $(h)
echo $(h) | tr ' ' '\012' >.hlist
-shlist:
+shlist: $(sh)
echo $(sh) | tr ' ' '\012' >.shlist
# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
# If this runs make out of memory, delete /usr/include lines.
!NO!SUBS!
-$eunicefix Makefile4
+$eunicefix Makefile
case `pwd` in
*SH)
- $rm -f ../Makefile4
- ln Makefile4 ../Makefile4
+ $rm -f ../Makefile
+ ln Makefile ../Makefile
;;
esac
rm -f makefile
{
NDBM_File db;
- if (SvROK(ST(1)))
- db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (SvROK(ST(1))) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (NDBM_File) tmp;
+ }
else
croak("db is not a reference");
dbm_close(db);
datum key;
datum RETVAL;
- if (sv_isa(ST(1), "NDBM_File"))
- db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "NDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (NDBM_File) tmp;
+ }
else
croak("db is not of type NDBM_File");
int flags;
int RETVAL;
- if (sv_isa(ST(1), "NDBM_File"))
- db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "NDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (NDBM_File) tmp;
+ }
else
croak("db is not of type NDBM_File");
datum key;
int RETVAL;
- if (sv_isa(ST(1), "NDBM_File"))
- db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "NDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (NDBM_File) tmp;
+ }
else
croak("db is not of type NDBM_File");
NDBM_File db;
datum RETVAL;
- if (sv_isa(ST(1), "NDBM_File"))
- db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "NDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (NDBM_File) tmp;
+ }
else
croak("db is not of type NDBM_File");
datum key;
datum RETVAL;
- if (sv_isa(ST(1), "NDBM_File"))
- db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "NDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (NDBM_File) tmp;
+ }
else
croak("db is not of type NDBM_File");
NDBM_File db;
int RETVAL;
- if (sv_isa(ST(1), "NDBM_File"))
- db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "NDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (NDBM_File) tmp;
+ }
else
croak("db is not of type NDBM_File");
NDBM_File db;
int RETVAL;
- if (sv_isa(ST(1), "NDBM_File"))
- db = (NDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "NDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (NDBM_File) tmp;
+ }
else
croak("db is not of type NDBM_File");
static int dbmrefcnt;
+#ifndef DBM_REPLACE
#define DBM_REPLACE 0
+#endif
static int
XS_ODBM_File_odbm_new(ix, ax, items)
{
ODBM_File db;
- if (SvROK(ST(1)))
- db = (ODBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (SvROK(ST(1))) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (ODBM_File) tmp;
+ }
else
croak("db is not a reference");
dbmrefcnt--;
datum key;
datum RETVAL;
- if (sv_isa(ST(1), "ODBM_File"))
- db = (ODBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "ODBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (ODBM_File) tmp;
+ }
else
croak("db is not of type ODBM_File");
int flags;
int RETVAL;
- if (sv_isa(ST(1), "ODBM_File"))
- db = (ODBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "ODBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (ODBM_File) tmp;
+ }
else
croak("db is not of type ODBM_File");
datum key;
int RETVAL;
- if (sv_isa(ST(1), "ODBM_File"))
- db = (ODBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "ODBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (ODBM_File) tmp;
+ }
else
croak("db is not of type ODBM_File");
ODBM_File db;
datum RETVAL;
- if (sv_isa(ST(1), "ODBM_File"))
- db = (ODBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "ODBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (ODBM_File) tmp;
+ }
else
croak("db is not of type ODBM_File");
datum key;
datum RETVAL;
- if (sv_isa(ST(1), "ODBM_File"))
- db = (ODBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "ODBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (ODBM_File) tmp;
+ }
else
croak("db is not of type ODBM_File");
+++ /dev/null
-After all the perl kits are run you should have the following files:
-
-Filename Kit Description
--------- --- -----------
-Artistic 37 The "Artistic License"
-Configure:AA 8 Run this first
-Configure:AB 14
-Copying 33 The GNU General Public License
-EXTERN.h 44 Included before foreign .h files
-INTERN.h 44 Included before domestic .h files
-MANIFEST 31 This list of files
-Makefile.SH 15 Precursor to Makefile
-PACKINGLIST 19 Which files came from which kits
-README 1 The Instructions
-README.ncr 2 Special instructions for NCR
-README.uport 2 Special instructions for Microports
-README.xenix 2 Special instructions for Xenix
-Wishlist 44 Some things that may or may not happen
-arg.h 22 Public declarations for the above
-array.c 27 Numerically subscripted arrays
-array.h 43 Public declarations for the above
-atarist/FILES 42
-atarist/README.ST 1
-atarist/RESULTS 40
-atarist/atarist.c 36
-atarist/config.h 23
-atarist/echo.c 41
-atarist/explain 40
-atarist/makefile.sm 34
-atarist/makefile.st 34
-atarist/osbind.pl 36
-atarist/perldb.diff 37
-atarist/perlglob.c 43
-atarist/test/binhandl 44
-atarist/test/ccon 44
-atarist/test/dbm 40
-atarist/test/err 44
-atarist/test/gdbm 44
-atarist/test/gdbm.t 40
-atarist/test/glob 44
-atarist/test/osexample.pl44
-atarist/test/pi.pl 39
-atarist/test/printenv 20
-atarist/test/readme 35
-atarist/test/sig 44
-atarist/test/tbinmode 44
-atarist/usersub.c 44
-atarist/usub/README.ATARI 2
-atarist/usub/acurses.mus32
-atarist/usub/makefile.st43
-atarist/usub/usersub.c 43
-atarist/wildmat.c 34
-c2ph.SH 25 program to translate dbx stabs to perl
-c2ph.doc 33 documentation for c2ph
-cflags.SH 40 A script that emits C compilation flags per file
-client 43 A client to test sockets
-cmd.c 19 Command interpreter
-cmd.h 37 Public declarations for the above
-config.H 26 Sample config.h
-config_h.SH 22 Produces config.h
-cons.c 17 Routines to construct cmd nodes of a parse tree
-consarg.c 20 Routines to construct arg nodes of a parse tree
-doSH 43 Script to run all the *.SH files
-doarg.c 13 Scalar expression evaluation
-doio.c:AA 4 I/O operations
-doio.c:AB 25
-dolist.c 12 Array expression evaluation
-dump.c 35 Debugging output
-eg/ADB 27 An adb wrapper to put in your crash dir
-eg/README 1 Intro to example perl scripts
-eg/changes 43 A program to list recently changed files
-eg/down 44 A program to do things to subdirectories
-eg/dus 43 A program to do du -s on non-mounted dirs
-eg/findcp 42 A find wrapper that implements a -cp switch
-eg/findtar 44 A find wrapper that pumps out a tar file
-eg/g/gcp 40 A program to do a global rcp
-eg/g/gcp.man 41 Manual page for gcp
-eg/g/ged 28 A program to do a global edit
-eg/g/ghosts 43 A sample /etc/ghosts file
-eg/g/gsh 39 A program to do a global rsh
-eg/g/gsh.man 41 Manual page for gsh
-eg/muck 39 A program to find missing make dependencies
-eg/muck.man 43 Manual page for muck
-eg/myrup 43 A program to find lightly loaded machines
-eg/nih 44 Script to insert #! workaround
-eg/relink 40 A program to change symbolic links
-eg/rename 41 A program to rename files
-eg/rmfrom 44 A program to feed doomed filenames to
-eg/scan/scan_df 42 Scan for filesystem anomalies
-eg/scan/scan_last 42 Scan for login anomalies
-eg/scan/scan_messages 37 Scan for console message anomalies
-eg/scan/scan_passwd 43 Scan for passwd file anomalies
-eg/scan/scan_ps 43 Scan for process anomalies
-eg/scan/scan_sudo 42 Scan for sudo anomalies
-eg/scan/scan_suid 40 Scan for setuid anomalies
-eg/scan/scanner 41 An anomaly reporter
-eg/shmkill 43 A program to remove unused shared memory
-eg/sysvipc/README 2 Intro to Sys V IPC examples
-eg/sysvipc/ipcmsg 17 Example of SYS V IPC message queues
-eg/sysvipc/ipcsem 43 Example of Sys V IPC semaphores
-eg/sysvipc/ipcshm 42 Example of Sys V IPC shared memory
-eg/travesty 43 A program to print travesties of its input text
-eg/van/empty 43 A program to empty the trashcan
-eg/van/unvanish 42 A program to undo what vanish does
-eg/van/vanexp 44 A program to expire vanished files
-eg/van/vanish 41 A program to put files in a trashcan
-eg/who 44 A sample who program
-emacs/perl-mode.el 27 Emacs major mode for perl
-emacs/perldb.el 24 Emacs debugging
-emacs/perldb.pl 27 Emacs debugging
-emacs/tedstuff 33 Some optional patches
-eval.c:AA 7 The expression evaluator
-eval.c:AB 30
-form.c 34 Format processing
-form.h 43 Public declarations for the above
-gettest 43 A little script to test the get* routines
-h2ph.SH 36 A thing to turn C .h file into perl .ph files
-h2pl/README 2 How to turn .ph files into .pl files
-h2pl/cbreak.pl 43 cbreak routines using .ph
-h2pl/cbreak2.pl 43 cbreak routines using .pl
-h2pl/eg/sizeof.ph 44 Sample sizeof array initialization
-h2pl/eg/sys/errno.pl 41 Sample translated errno.pl
-h2pl/eg/sys/ioctl.pl 38 Sample translated ioctl.pl
-h2pl/eg/sysexits.pl 44 Sample translated sysexits.pl
-h2pl/getioctlsizes 44 Program to extract types from ioctl.h
-h2pl/mksizes 43 Program to make %sizeof array.
-h2pl/mkvars 43 Program to make .pl from .ph files
-h2pl/tcbreak 29 cbreak test routine using .ph
-h2pl/tcbreak2 22 cbreak test routine using .pl
-handy.h 38 Handy definitions
-hash.c 26 Associative arrays
-hash.h 41 Public declarations for the above
-hints/3b1.sh 44
-hints/3b1cc 41
-hints/3b2.sh 44
-hints/aix_rs.sh 44
-hints/aix_rt.sh 44
-hints/altos486.sh 44
-hints/apollo_C6_7.sh 32
-hints/apollo_C6_8.sh 43
-hints/aux.sh 44
-hints/cray.sh 44
-hints/dgux.sh 44
-hints/dnix.sh 44
-hints/dynix.sh 44
-hints/fps.sh 24
-hints/genix.sh 44
-hints/greenhills.sh 44
-hints/hp9000_300.sh 44
-hints/hp9000_400.sh 44
-hints/hp9000_700.sh 44
-hints/hp9000_800.sh 44
-hints/hpux.sh 44
-hints/i386.sh 44
-hints/isc_3_2_2.sh 44
-hints/isc_3_2_3.sh 44
-hints/mc6000.sh 44
-hints/mips.sh 44
-hints/mpc.sh 44
-hints/ncr_tower.sh 44
-hints/next.sh 44
-hints/opus.sh 44
-hints/osf1.sh 44
-hints/sco_2_3_0.sh 44
-hints/sco_2_3_1.sh 1
-hints/sco_2_3_2.sh 44
-hints/sco_2_3_3.sh 44
-hints/sco_2_3_4.sh 44
-hints/sco_3.sh 44
-hints/sgi.sh 44
-hints/solaris_2_0.sh 44
-hints/stellar.sh 44
-hints/sunos_3_4.sh 44
-hints/sunos_3_5.sh 44
-hints/sunos_4_0_1.sh 44
-hints/sunos_4_0_2.sh 44
-hints/svr4.sh 15
-hints/ti1500.sh 44
-hints/titan.sh 42
-hints/ultrix_1.sh 44
-hints/ultrix_3.sh 44
-hints/ultrix_4.sh 16
-hints/unisysdynix.sh 44
-hints/utekv.sh 43
-hints/uts.sh 44
-hints/vax.sh 33
-installperl 37 Perl script to do "make install" dirty work
-ioctl.pl 39 Sample ioctl.pl
-lib/abbrev.pl 43 An abbreviation table builder
-lib/assert.pl 42 assertion and panic with stack trace
-lib/bigfloat.pl 36 An arbitrary precision floating point package
-lib/bigint.pl 34 An arbitrary precision integer arithmetic package
-lib/bigrat.pl 31 An arbitrary precision rational arithmetic package
-lib/cacheout.pl 43 Manages output filehandles when you need too many
-lib/chat2.pl 35 Randal's famous expect-ish routines
-lib/complete.pl 40 A command completion subroutine
-lib/ctime.pl 41 A ctime workalike
-lib/dumpvar.pl 43 A variable dumper
-lib/exceptions.pl 36 catch and throw routines
-lib/fastcwd.pl 43 a faster but more dangerous getcwd
-lib/find.pl 40 A find emulator--used by find2perl
-lib/finddepth.pl 40 A depth-first find emulator--used by find2perl
-lib/flush.pl 44 Routines to do single flush
-lib/getcwd.pl 42 a getcwd() emulator
-lib/getopt.pl 42 Perl library supporting option parsing
-lib/getopts.pl 42 Perl library supporting option parsing
-lib/importenv.pl 44 Perl routine to get environment into variables
-lib/look.pl 42 A "look" equivalent
-lib/newgetopt.pl 35 A perl library supporting long option parsing
-lib/open2.pl 41
-lib/perldb.pl 23 Perl debugging routines
-lib/pwd.pl 42 Routines to keep track of PWD environment variable
-lib/shellwords.pl 43 Perl library to split into words with shell quoting
-lib/stat.pl 43 Perl library supporting stat function
-lib/syslog.pl 35 Perl library supporting syslogging
-lib/termcap.pl 39 Perl library supporting termcap usage
-lib/timelocal.pl 40 Perl library supporting inverse of localtime, gmtime
-lib/validate.pl 39 Perl library supporting wholesale file mode validation
-makedepend.SH 37 Precursor to makedepend
-makedir.SH 42 Precursor to makedir
-malloc.c 32 A version of malloc you might not want
-msdos/Changes.dds 41 Expanation of MS-DOS patches by Diomidis Spinellis
-msdos/Makefile 40 MS-DOS makefile
-msdos/README.msdos 1 Compiling and usage information
-msdos/Wishlist.dds 43 My wishlist
-msdos/chdir.c 41 A chdir that can change drives
-msdos/config.h 21 Definitions for msdos
-msdos/dir.h 42 MS-DOS header for directory access functions
-msdos/directory.c 38 MS-DOS directory access functions.
-msdos/eg/crlf.bat 43 Convert files from unix to MS-DOS line termination
-msdos/eg/drives.bat 42 List the system drives and their characteristics
-msdos/eg/lf.bat 43 Convert files from MS-DOS to Unix line termination
-msdos/glob.c 44 A command equivalent to csh glob
-msdos/msdos.c 37 MS-DOS ioctl, sleep, gete?[gu]if, spawn, aspawn
-msdos/popen.c 39 My_popen and my_pclose for MS-DOS
-msdos/usage.c 41 How to invoke perl under MS-DOS
-os2/Makefile 42 Makefile for OS/2
-os2/README.OS2 1 Notes for OS/2
-os2/a2p.cs 42 Compiler script for a2p
-os2/a2p.def 44 Linker defs for a2p
-os2/alarm.c 38 An implementation of alarm()
-os2/alarm.h 44 Header file for same
-os2/config.h 24 Configuration file for OS/2
-os2/crypt.c 35
-os2/dir.h 41 Directory header
-os2/director.c 38 Directory routines
-os2/eg/alarm.pl 44 Example of alarm code
-os2/eg/os2.pl 41 Sample script for OS/2
-os2/eg/syscalls.pl 19 Example of syscall on OS/2
-os2/glob.c 44 Globbing routines
-os2/makefile 39 Make file
-os2/mktemp.c 44 Mktemp() using TMP
-os2/os2.c 36 Unix compatibility functions
-os2/perl.bad 44 names of protect-only API calls for BIND
-os2/perl.cs 43 Compiler script for perl
-os2/perl.def 23 Linker defs for perl
-os2/perldb.dif 30 Changes to make the debugger work
-os2/perlglob.bad 44 names of protect-only API calls for BIND
-os2/perlglob.cs 44 Compiler script for perlglob
-os2/perlglob.def 44 Linker defs for perlglob
-os2/perlsh.cmd 44 Poor man's shell for os2
-os2/popen.c 26 Code for opening pipes
-os2/s2p.cmd 18 s2p as command file
-os2/selfrun.bat 44 A self running perl script for DOS
-os2/selfrun.cmd 44 Example of extproc feature
-os2/suffix.c 38 Code for creating backup filenames
-os2/tests.dif 20
-patchlevel.h 44 The current patch level of perl
-perl.c 15 main()
-perl.h 29 Global declarations
-perl.man:AA 9 The manual page(s)
-perl.man:AB 10
-perl.man:AC 6
-perl.man:AD 11
-perl.man:AE 41
-perlsh 44 A poor man's perl shell
-perly.fixer 24 A program to remove yacc stack limitations
-perly.y 30 Yacc grammar for perl
-regcomp.c 2 Regular expression compiler
-regcomp.h 35 Private declarations for above
-regexec.c 28 Regular expression evaluator
-regexp.h 39 Public declarations for the above
-server 43 A server to test sockets
-spat.h 38 Search pattern declarations
-stab.c 29 Symbol table stuff
-stab.h 25 Public declarations for the above
-str.c 18 String handling package
-str.h 36 Public declarations for the above
-t/README 1 Instructions for regression tests
-t/TEST 41 The regression tester
-t/base/cond.t 44 See if conditionals work
-t/base/if.t 44 See if if works
-t/base/lex.t 40 See if lexical items work
-t/base/pat.t 44 See if pattern matching works
-t/base/term.t 43 See if various terms work
-t/cmd/elsif.t 43 See if else-if works
-t/cmd/for.t 43 See if for loops work
-t/cmd/mod.t 43 See if statement modifiers work
-t/cmd/subval.t 13 See if subroutine values work
-t/cmd/switch.t 41 See if switch optimizations work
-t/cmd/while.t 40 See if while loops work
-t/comp/cmdopt.t 39 See if command optimization works
-t/comp/cpp.t 43 See if C preprocessor works
-t/comp/decl.t 44 See if declarations work
-t/comp/multiline.t 43 See if multiline strings work
-t/comp/package.t 43 See if packages work
-t/comp/script.t 44 See if script invokation works
-t/comp/term.t 42 See if more terms work
-t/io/argv.t 43 See if ARGV stuff works
-t/io/dup.t 43 See if >& works right
-t/io/fs.t 39 See if directory manipulations work
-t/io/inplace.t 44 See if inplace editing works
-t/io/pipe.t 43 See if secure pipes work
-t/io/print.t 44 See if print commands work
-t/io/tell.t 42 See if file seeking works
-t/lib/big.t 38 See if lib/bigint.pl works
-t/op/append.t 44 See if . works
-t/op/array.t 39 See if array operations work
-t/op/auto.t 21 See if autoincrement et all work
-t/op/chop.t 43 See if chop works
-t/op/cond.t 44 See if conditional expressions work
-t/op/dbm.t 40 See if dbm binding works
-t/op/delete.t 43 See if delete works
-t/op/do.t 42 See if subroutines work
-t/op/each.t 42 See if associative iterators work
-t/op/eval.t 42 See if eval operator works
-t/op/exec.t 43 See if exec and system work
-t/op/exp.t 43 See if math functions work
-t/op/flip.t 43 See if range operator works
-t/op/fork.t 44 See if fork works
-t/op/glob.t 44 See if <*> works
-t/op/goto.t 43 See if goto works
-t/op/groups.t 43 See if $( works
-t/op/index.t 12 See if index works
-t/op/int.t 44 See if int works
-t/op/join.t 44 See if join works
-t/op/list.t 40 See if array lists work
-t/op/local.t 43 See if local works
-t/op/magic.t 42 See if magic variables work
-t/op/mkdir.t 44 See if mkdir works
-t/op/oct.t 44 See if oct and hex work
-t/op/ord.t 44 See if ord works
-t/op/pack.t 43 See if pack and unpack work
-t/op/pat.t 38 See if esoteric patterns work
-t/op/push.t 42 See if push and pop work
-t/op/range.t 43 See if .. works
-t/op/re_tests 32 Input file for op.regexp
-t/op/read.t 44 See if read() works
-t/op/readdir.t 44 See if readdir() works
-t/op/regexp.t 43 See if regular expressions work
-t/op/repeat.t 42 See if x operator works
-t/op/s.t 38 See if substitutions work
-t/op/sleep.t 44 See if sleep works
-t/op/sort.t 42 See if sort works
-t/op/split.t 41 See if split works
-t/op/sprintf.t 44 See if sprintf works
-t/op/stat.t 37 See if stat works
-t/op/study.t 41 See if study works
-t/op/substr.t 2 See if substr works
-t/op/time.t 42 See if time functions work
-t/op/undef.t 42 See if undef works
-t/op/unshift.t 44 See if unshift works
-t/op/vec.t 43 See if vectors work
-t/op/write.t 41 See if write works
-toke.c:AA 3 The tokener
-toke.c:AB 31
-usersub.c 39 User supplied (possibly proprietary) subroutines
-usub/Makefile 44 Makefile for curseperl
-usub/README 1 Instructions for user supplied subroutines
-usub/bsdcurses.mus 32 what used to be curses.mus
-usub/curses.mus 21 Glue routines for BSD curses
-usub/man2mus 42 A manual page to .mus translator
-usub/mus 40 A .mus to .c translator
-usub/pager 39 A sample pager in curseperl
-usub/usersub.c 41 An initialization file to call curses glue routines
-util.c 16 Utility routines
-util.h 42 Public declarations for the above
-x2p/EXTERN.h 44 Same as above
-x2p/INTERN.h 44 Same as above
-x2p/Makefile.SH 23 Precursor to Makefile
-x2p/a2p.h 14 Global declarations
-x2p/a2p.man 36 Manual page for awk to perl translator
-x2p/a2p.y 17 A yacc grammer for awk
-x2p/a2py.c 28 Awk compiler, sort of
-x2p/cflags.SH 41 A script that emits C compilation flags per file
-x2p/find2perl.SH 33 A find to perl translator
-x2p/handy.h 42 Handy definitions
-x2p/hash.c 38 Associative arrays again
-x2p/hash.h 42 Public declarations for the above
-x2p/s2p.SH 31 Sed to perl translator
-x2p/s2p.man 40 Manual page for sed to perl translator
-x2p/str.c 16 String handling package
-x2p/str.h 42 Public declarations for the above
-x2p/util.c 37 Utility routines
-x2p/util.h 42 Public declarations for the above
-x2p/walk.c:AA 5 Parse tree walker
-x2p/walk.c:AB 42
#include <limits.h>
#include <locale.h>
#include <math.h>
+#ifdef I_PWD
#include <pwd.h>
+#endif
#include <setjmp.h>
#include <signal.h>
#ifdef I_STDARG
#include <sys/types.h>
#include <sys/utsname.h>
#include <sys/wait.h>
-#ifndef CR3
+#if defined(I_TERMIOS) && !defined(CR3)
#include <termios.h>
#endif
#include <time.h>
#define HAS_UNAME
#ifndef HAS_GETPGRP
-#define getpgrp(a,b) not_here("getpgrp")
+#define getpgrp() not_here("getpgrp")
#endif
#ifndef HAS_NICE
#define nice(a) not_here("nice")
#ifndef HAS_SETPGID
#define setpgid(a,b) not_here("setpgid")
#endif
-#ifndef HAS_SETPGRP
-#define setpgrp(a,b) not_here("setpgrp")
-#endif
#ifndef HAS_SETSID
#define setsid() not_here("setsid")
#endif
{
POSIX__SigSet sigset;
- if (SvROK(ST(1)))
- sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (SvROK(ST(1))) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ sigset = (POSIX__SigSet) tmp;
+ }
else
croak("sigset is not a reference");
safefree(sigset);
int sig = (int)SvIV(ST(2));
SysRet RETVAL;
- if (sv_isa(ST(1), "POSIX::SigSet"))
- sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "POSIX::SigSet")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ sigset = (POSIX__SigSet) tmp;
+ }
else
croak("sigset is not of type POSIX::SigSet");
int sig = (int)SvIV(ST(2));
SysRet RETVAL;
- if (sv_isa(ST(1), "POSIX::SigSet"))
- sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "POSIX::SigSet")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ sigset = (POSIX__SigSet) tmp;
+ }
else
croak("sigset is not of type POSIX::SigSet");
POSIX__SigSet sigset;
SysRet RETVAL;
- if (sv_isa(ST(1), "POSIX::SigSet"))
- sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "POSIX::SigSet")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ sigset = (POSIX__SigSet) tmp;
+ }
else
croak("sigset is not of type POSIX::SigSet");
POSIX__SigSet sigset;
SysRet RETVAL;
- if (sv_isa(ST(1), "POSIX::SigSet"))
- sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "POSIX::SigSet")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ sigset = (POSIX__SigSet) tmp;
+ }
else
croak("sigset is not of type POSIX::SigSet");
int sig = (int)SvIV(ST(2));
int RETVAL;
- if (sv_isa(ST(1), "POSIX::SigSet"))
- sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "POSIX::SigSet")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ sigset = (POSIX__SigSet) tmp;
+ }
else
croak("sigset is not of type POSIX::SigSet");
int RETVAL;
char *s;
RETVAL = 1;
- for (s = charstring; *s; s++)
+ for (s = charstring; *s && RETVAL; s++)
if (!isalnum(*s))
RETVAL = 0;
ST(0) = sv_newmortal();
int RETVAL;
char *s;
RETVAL = 1;
- for (s = charstring; *s; s++)
+ for (s = charstring; *s && RETVAL; s++)
if (!isalpha(*s))
RETVAL = 0;
ST(0) = sv_newmortal();
int RETVAL;
char *s;
RETVAL = 1;
- for (s = charstring; *s; s++)
+ for (s = charstring; *s && RETVAL; s++)
if (!iscntrl(*s))
RETVAL = 0;
ST(0) = sv_newmortal();
int RETVAL;
char *s;
RETVAL = 1;
- for (s = charstring; *s; s++)
+ for (s = charstring; *s && RETVAL; s++)
if (!isdigit(*s))
RETVAL = 0;
ST(0) = sv_newmortal();
int RETVAL;
char *s;
RETVAL = 1;
- for (s = charstring; *s; s++)
+ for (s = charstring; *s && RETVAL; s++)
if (!isgraph(*s))
RETVAL = 0;
ST(0) = sv_newmortal();
int RETVAL;
char *s;
RETVAL = 1;
- for (s = charstring; *s; s++)
+ for (s = charstring; *s && RETVAL; s++)
if (!islower(*s))
RETVAL = 0;
ST(0) = sv_newmortal();
int RETVAL;
char *s;
RETVAL = 1;
- for (s = charstring; *s; s++)
+ for (s = charstring; *s && RETVAL; s++)
if (!isprint(*s))
RETVAL = 0;
ST(0) = sv_newmortal();
int RETVAL;
char *s;
RETVAL = 1;
- for (s = charstring; *s; s++)
+ for (s = charstring; *s && RETVAL; s++)
if (!ispunct(*s))
RETVAL = 0;
ST(0) = sv_newmortal();
int RETVAL;
char *s;
RETVAL = 1;
- for (s = charstring; *s; s++)
+ for (s = charstring; *s && RETVAL; s++)
if (!isspace(*s))
RETVAL = 0;
ST(0) = sv_newmortal();
int RETVAL;
char *s;
RETVAL = 1;
- for (s = charstring; *s; s++)
+ for (s = charstring; *s && RETVAL; s++)
if (!isupper(*s))
RETVAL = 0;
ST(0) = sv_newmortal();
int RETVAL;
char *s;
RETVAL = 1;
- for (s = charstring; *s; s++)
+ for (s = charstring; *s && RETVAL; s++)
if (!isxdigit(*s))
RETVAL = 0;
ST(0) = sv_newmortal();
croak("Usage: POSIX::acos(x)");
}
{
- double x = SvNV(ST(1));
+ double x = (double)SvNV(ST(1));
double RETVAL;
RETVAL = acos(x);
ST(0) = sv_newmortal();
- sv_setnv(ST(0), RETVAL);
+ sv_setnv(ST(0), (double)RETVAL);
}
return ax;
}
croak("Usage: POSIX::asin(x)");
}
{
- double x = SvNV(ST(1));
+ double x = (double)SvNV(ST(1));
double RETVAL;
RETVAL = asin(x);
ST(0) = sv_newmortal();
- sv_setnv(ST(0), RETVAL);
+ sv_setnv(ST(0), (double)RETVAL);
}
return ax;
}
croak("Usage: POSIX::atan(x)");
}
{
- double x = SvNV(ST(1));
+ double x = (double)SvNV(ST(1));
double RETVAL;
RETVAL = atan(x);
ST(0) = sv_newmortal();
- sv_setnv(ST(0), RETVAL);
+ sv_setnv(ST(0), (double)RETVAL);
}
return ax;
}
croak("Usage: POSIX::ceil(x)");
}
{
- double x = SvNV(ST(1));
+ double x = (double)SvNV(ST(1));
double RETVAL;
RETVAL = ceil(x);
ST(0) = sv_newmortal();
- sv_setnv(ST(0), RETVAL);
+ sv_setnv(ST(0), (double)RETVAL);
}
return ax;
}
croak("Usage: POSIX::cosh(x)");
}
{
- double x = SvNV(ST(1));
+ double x = (double)SvNV(ST(1));
double RETVAL;
RETVAL = cosh(x);
ST(0) = sv_newmortal();
- sv_setnv(ST(0), RETVAL);
+ sv_setnv(ST(0), (double)RETVAL);
}
return ax;
}
croak("Usage: POSIX::floor(x)");
}
{
- double x = SvNV(ST(1));
+ double x = (double)SvNV(ST(1));
double RETVAL;
RETVAL = floor(x);
ST(0) = sv_newmortal();
- sv_setnv(ST(0), RETVAL);
+ sv_setnv(ST(0), (double)RETVAL);
}
return ax;
}
croak("Usage: POSIX::fmod(x,y)");
}
{
- double x = SvNV(ST(1));
- double y = SvNV(ST(2));
+ double x = (double)SvNV(ST(1));
+ double y = (double)SvNV(ST(2));
double RETVAL;
RETVAL = fmod(x, y);
ST(0) = sv_newmortal();
- sv_setnv(ST(0), RETVAL);
+ sv_setnv(ST(0), (double)RETVAL);
}
return ax;
}
croak("Usage: POSIX::frexp(x)");
}
{
- double x = SvNV(ST(1));
+ double x = (double)SvNV(ST(1));
dSP;
int expvar;
sp--;
croak("Usage: POSIX::ldexp(x,exp)");
}
{
- double x = SvNV(ST(1));
+ double x = (double)SvNV(ST(1));
int exp = (int)SvIV(ST(2));
double RETVAL;
RETVAL = ldexp(x, exp);
ST(0) = sv_newmortal();
- sv_setnv(ST(0), RETVAL);
+ sv_setnv(ST(0), (double)RETVAL);
}
return ax;
}
croak("Usage: POSIX::log10(x)");
}
{
- double x = SvNV(ST(1));
+ double x = (double)SvNV(ST(1));
double RETVAL;
RETVAL = log10(x);
ST(0) = sv_newmortal();
- sv_setnv(ST(0), RETVAL);
+ sv_setnv(ST(0), (double)RETVAL);
}
return ax;
}
croak("Usage: POSIX::modf(x)");
}
{
- double x = SvNV(ST(1));
+ double x = (double)SvNV(ST(1));
dSP;
double intvar;
sp--;
croak("Usage: POSIX::sinh(x)");
}
{
- double x = SvNV(ST(1));
+ double x = (double)SvNV(ST(1));
double RETVAL;
RETVAL = sinh(x);
ST(0) = sv_newmortal();
- sv_setnv(ST(0), RETVAL);
+ sv_setnv(ST(0), (double)RETVAL);
}
return ax;
}
croak("Usage: POSIX::tanh(x)");
}
{
- double x = SvNV(ST(1));
+ double x = (double)SvNV(ST(1));
double RETVAL;
RETVAL = tanh(x);
ST(0) = sv_newmortal();
- sv_setnv(ST(0), RETVAL);
+ sv_setnv(ST(0), (double)RETVAL);
}
return ax;
}
if (!siggv)
- gv_fetchpv("SIG", TRUE);
+ gv_fetchpv("SIG", TRUE, SVt_PVHV);
{
struct sigaction act;
act.sa_mask = *sigset;
}
else
- sigemptyset(act.sa_mask);
+ sigemptyset(& act.sa_mask);
/* Set up any desired flags. */
svp = hv_fetch(action, "FLAGS", 5, FALSE);
/* Now work around sigaction oddities */
if (action && oldaction)
- RETVAL = sigaction(sig, act, oact);
+ RETVAL = sigaction(sig, & act, & oact);
else if (action)
- RETVAL = sigaction(sig, act, (struct sigaction*)0);
+ RETVAL = sigaction(sig, & act, (struct sigaction*)0);
else if (oldaction)
- RETVAL = sigaction(sig, (struct sigaction*)0, oact);
+ RETVAL = sigaction(sig, (struct sigaction*)0, & oact);
if (oldaction) {
/* Get back the mask. */
POSIX__SigSet sigset;
SysRet RETVAL;
- if (sv_isa(ST(1), "POSIX::SigSet"))
- sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "POSIX::SigSet")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ sigset = (POSIX__SigSet) tmp;
+ }
else
croak("sigset is not of type POSIX::SigSet");
POSIX__SigSet oldsigset;
SysRet RETVAL;
- if (sv_isa(ST(2), "POSIX::SigSet"))
- sigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(2)));
+ if (sv_isa(ST(2), "POSIX::SigSet")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(2)));
+ sigset = (POSIX__SigSet) tmp;
+ }
else
croak("sigset is not of type POSIX::SigSet");
if (items < 3)
oldsigset = 0;
else {
- if (sv_isa(ST(3), "POSIX::SigSet"))
- oldsigset = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(3)));
+ if (sv_isa(ST(3), "POSIX::SigSet")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(3)));
+ oldsigset = (POSIX__SigSet) tmp;
+ }
else
croak("oldsigset is not of type POSIX::SigSet");
}
POSIX__SigSet signal_mask;
SysRet RETVAL;
- if (sv_isa(ST(1), "POSIX::SigSet"))
- signal_mask = (POSIX__SigSet)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "POSIX::SigSet")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ signal_mask = (POSIX__SigSet) tmp;
+ }
else
croak("signal_mask is not of type POSIX::SigSet");
}
{
int fd = (int)SvIV(ST(1));
- int RETVAL;
+ SysRet RETVAL;
RETVAL = close(fd);
ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ if (RETVAL != -1) {
+ if (RETVAL == 0)
+ sv_setpvn(ST(0), "0 but true", 10);
+ else
+ sv_setiv(ST(0), (I32)RETVAL);
+ }
}
return ax;
}
}
{
int fd = (int)SvIV(ST(1));
- int RETVAL;
+ SysRet RETVAL;
RETVAL = dup(fd);
ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ if (RETVAL != -1) {
+ if (RETVAL == 0)
+ sv_setpvn(ST(0), "0 but true", 10);
+ else
+ sv_setiv(ST(0), (I32)RETVAL);
+ }
}
return ax;
}
{
int fd1 = (int)SvIV(ST(1));
int fd2 = (int)SvIV(ST(2));
- int RETVAL;
+ SysRet RETVAL;
RETVAL = dup2(fd1, fd2);
ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_fstat(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 2) {
- croak("Usage: POSIX::fstat(fd, buf)");
- }
- {
- int fd = (int)SvIV(ST(1));
- struct stat * buf = (struct stat*)sv_grow(ST(2),sizeof(struct stat));
- int RETVAL;
-
- RETVAL = fstat(fd, buf);
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- SvCUR(ST(2)) = sizeof(struct stat);
- }
- return ax;
-}
-
-static int
-XS_POSIX_getpgrp(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 1) {
- croak("Usage: POSIX::getpgrp(pid)");
- }
- {
- int pid = (int)SvIV(ST(1));
- int RETVAL;
-
- RETVAL = getpgrp(pid);
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_link(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 0) {
- croak("Usage: POSIX::link()");
- }
- {
- int RETVAL;
-
- RETVAL = link();
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ if (RETVAL != -1) {
+ if (RETVAL == 0)
+ sv_setpvn(ST(0), "0 but true", 10);
+ else
+ sv_setiv(ST(0), (I32)RETVAL);
+ }
}
return ax;
}
croak("Usage: POSIX::lseek()");
}
{
- int RETVAL;
+ int;
+ Off_t;
+ int;
+ SysRet RETVAL;
RETVAL = lseek();
ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_lstat(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 0) {
- croak("Usage: POSIX::lstat()");
- }
- {
- int RETVAL;
-
- RETVAL = lstat();
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_mkdir(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 0) {
- croak("Usage: POSIX::mkdir()");
- }
- {
- int RETVAL;
-
- RETVAL = mkdir();
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ if (RETVAL != -1) {
+ if (RETVAL == 0)
+ sv_setpvn(ST(0), "0 but true", 10);
+ else
+ sv_setiv(ST(0), (I32)RETVAL);
+ }
}
return ax;
}
}
{
int incr = (int)SvIV(ST(1));
- int RETVAL;
+ SysRet RETVAL;
RETVAL = nice(incr);
ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ if (RETVAL != -1) {
+ if (RETVAL == 0)
+ sv_setpvn(ST(0), "0 but true", 10);
+ else
+ sv_setiv(ST(0), (I32)RETVAL);
+ }
}
return ax;
}
}
{
int RETVAL;
-
- RETVAL = pipe();
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ dSP;
+ int fds[2];
+ sp--;
+ if (pipe(fds) != -1) {
+ EXTEND(sp,2);
+ PUSHs(sv_2mortal(newSViv(fds[0])));
+ PUSHs(sv_2mortal(newSViv(fds[1])));
+ }
+ ax = sp - stack_base;
}
return ax;
}
croak("Usage: POSIX::read()");
}
{
- int RETVAL;
-
- RETVAL = read();
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_rename(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 0) {
- croak("Usage: POSIX::rename()");
- }
- {
- int RETVAL;
-
- RETVAL = rename();
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_rmdir(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 0) {
- croak("Usage: POSIX::rmdir()");
- }
- {
- int RETVAL;
+ SysRet RETVAL;
+ int fd;
+ char * buffer;
+ size_t nbytes;
- RETVAL = rmdir();
+ RETVAL = read(fd, buffer, nbytes);
+ croak("POSIX::read() not implemented yet\n");
ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ if (RETVAL != -1) {
+ if (RETVAL == 0)
+ sv_setpvn(ST(0), "0 but true", 10);
+ else
+ sv_setiv(ST(0), (I32)RETVAL);
+ }
}
return ax;
}
register int ax;
register int items;
{
- if (items != 0) {
- croak("Usage: POSIX::setgid()");
+ if (items != 1) {
+ croak("Usage: POSIX::setgid(gid)");
}
{
- int RETVAL;
+ Gid_t gid = (Gid_t)SvNV(ST(1));
+ SysRet RETVAL;
- RETVAL = setgid();
+ RETVAL = setgid(gid);
ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ if (RETVAL != -1) {
+ if (RETVAL == 0)
+ sv_setpvn(ST(0), "0 but true", 10);
+ else
+ sv_setiv(ST(0), (I32)RETVAL);
+ }
}
return ax;
}
croak("Usage: POSIX::setpgid(pid, pgid)");
}
{
- pid_t pid = (int)SvIV(ST(1));
- pid_t pgid = (int)SvIV(ST(2));
- int RETVAL;
+ pid_t pid = (pid_t)SvNV(ST(1));
+ pid_t pgid = (pid_t)SvNV(ST(2));
+ SysRet RETVAL;
RETVAL = setpgid(pid, pgid);
ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_setpgrp(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 2) {
- croak("Usage: POSIX::setpgrp(pid, pgrp)");
- }
- {
- int pid = (int)SvIV(ST(1));
- int pgrp = (int)SvIV(ST(2));
- int RETVAL;
-
- RETVAL = setpgrp(pid, pgrp);
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ if (RETVAL != -1) {
+ if (RETVAL == 0)
+ sv_setpvn(ST(0), "0 but true", 10);
+ else
+ sv_setiv(ST(0), (I32)RETVAL);
+ }
}
return ax;
}
RETVAL = setsid();
ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ sv_setnv(ST(0), (double)RETVAL);
}
return ax;
}
register int ax;
register int items;
{
- if (items != 0) {
- croak("Usage: POSIX::setuid()");
- }
- {
- int RETVAL;
-
- RETVAL = setuid();
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_stat(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 0) {
- croak("Usage: POSIX::stat()");
- }
- {
- int RETVAL;
-
- RETVAL = stat();
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_symlink(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 0) {
- croak("Usage: POSIX::symlink()");
- }
- {
- int RETVAL;
-
- RETVAL = symlink();
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_system(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 0) {
- croak("Usage: POSIX::system()");
+ if (items != 1) {
+ croak("Usage: POSIX::setuid(uid)");
}
{
- int RETVAL;
+ Uid_t uid = (Uid_t)SvNV(ST(1));
+ SysRet RETVAL;
- RETVAL = system();
+ RETVAL = setuid(uid);
ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ if (RETVAL != -1) {
+ if (RETVAL == 0)
+ sv_setpvn(ST(0), "0 but true", 10);
+ else
+ sv_setiv(ST(0), (I32)RETVAL);
+ }
}
return ax;
}
RETVAL = tcgetpgrp(fd);
ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ sv_setnv(ST(0), (double)RETVAL);
}
return ax;
}
}
{
int fd = (int)SvIV(ST(1));
- pid_t pgrp_id = (int)SvIV(ST(2));
- int RETVAL;
+ pid_t pgrp_id = (pid_t)SvNV(ST(2));
+ SysRet RETVAL;
RETVAL = tcsetpgrp(fd, pgrp_id);
ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_times(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 1) {
- croak("Usage: POSIX::times(tms)");
- }
- {
- struct tms * tms = (struct tms*)sv_grow(ST(1), sizeof(struct tms));
- int RETVAL;
-
- RETVAL = times(tms);
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- SvCUR(ST(1)) = sizeof(struct tms);
- }
- return ax;
-}
-
-static int
-XS_POSIX_umask(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 0) {
- croak("Usage: POSIX::umask()");
- }
- {
- int RETVAL;
-
- RETVAL = umask();
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ if (RETVAL != -1) {
+ if (RETVAL == 0)
+ sv_setpvn(ST(0), "0 but true", 10);
+ else
+ sv_setiv(ST(0), (I32)RETVAL);
+ }
}
return ax;
}
croak("Usage: POSIX::uname()");
}
{
+ int RETVAL;
dSP;
- struct utsname utsname;
+ struct utsname buf;
sp--;
- if (uname(&utsname) >= 0) {
+ if (uname(&buf) >= 0) {
EXTEND(sp, 5);
- PUSHs(sv_2mortal(newSVpv(utsname.sysname, 0)));
- PUSHs(sv_2mortal(newSVpv(utsname.nodename, 0)));
- PUSHs(sv_2mortal(newSVpv(utsname.release, 0)));
- PUSHs(sv_2mortal(newSVpv(utsname.version, 0)));
- PUSHs(sv_2mortal(newSVpv(utsname.machine, 0)));
+ PUSHs(sv_2mortal(newSVpv(buf.sysname, 0)));
+ PUSHs(sv_2mortal(newSVpv(buf.nodename, 0)));
+ PUSHs(sv_2mortal(newSVpv(buf.release, 0)));
+ PUSHs(sv_2mortal(newSVpv(buf.version, 0)));
+ PUSHs(sv_2mortal(newSVpv(buf.machine, 0)));
}
ax = sp - stack_base;
}
}
static int
-XS_POSIX_unlink(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 0) {
- croak("Usage: POSIX::unlink()");
- }
- {
- int RETVAL;
-
- RETVAL = unlink();
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_utime(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 0) {
- croak("Usage: POSIX::utime()");
- }
- {
- int RETVAL;
-
- RETVAL = utime();
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_wait(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 0) {
- croak("Usage: POSIX::wait()");
- }
- {
- int RETVAL;
-
- RETVAL = wait();
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
-XS_POSIX_waitpid(ix, ax, items)
-register int ix;
-register int ax;
-register int items;
-{
- if (items != 3) {
- croak("Usage: POSIX::waitpid(pid, statusp, options)");
- }
- {
- int pid = (int)SvIV(ST(1));
- int statusp = (int)SvIV(ST(2));
- int options = (int)SvIV(ST(3));
- int RETVAL;
-
- RETVAL = waitpid(pid, &statusp, options);
- ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
- }
- return ax;
-}
-
-static int
XS_POSIX_write(ix, ax, items)
register int ix;
register int ax;
croak("Usage: POSIX::write()");
}
{
- int RETVAL;
+ SysRet RETVAL;
+ int fd;
+ char * buffer;
+ size_t nbytes;
- RETVAL = write();
+ RETVAL = write(fd, buffer, nbytes);
+ croak("POSIX::write() not implemented yet\n");
ST(0) = sv_newmortal();
- sv_setiv(ST(0), (I32)RETVAL);
+ if (RETVAL != -1) {
+ if (RETVAL == 0)
+ sv_setpvn(ST(0), "0 but true", 10);
+ else
+ sv_setiv(ST(0), (I32)RETVAL);
+ }
}
return ax;
}
newXSUB("POSIX::close", 0, XS_POSIX_close, file);
newXSUB("POSIX::dup", 0, XS_POSIX_dup, file);
newXSUB("POSIX::dup2", 0, XS_POSIX_dup2, file);
- newXSUB("POSIX::fstat", 0, XS_POSIX_fstat, file);
- newXSUB("POSIX::getpgrp", 0, XS_POSIX_getpgrp, file);
- newXSUB("POSIX::link", 0, XS_POSIX_link, file);
newXSUB("POSIX::lseek", 0, XS_POSIX_lseek, file);
- newXSUB("POSIX::lstat", 0, XS_POSIX_lstat, file);
- newXSUB("POSIX::mkdir", 0, XS_POSIX_mkdir, file);
newXSUB("POSIX::nice", 0, XS_POSIX_nice, file);
newXSUB("POSIX::pipe", 0, XS_POSIX_pipe, file);
newXSUB("POSIX::read", 0, XS_POSIX_read, file);
- newXSUB("POSIX::rename", 0, XS_POSIX_rename, file);
- newXSUB("POSIX::rmdir", 0, XS_POSIX_rmdir, file);
newXSUB("POSIX::setgid", 0, XS_POSIX_setgid, file);
newXSUB("POSIX::setpgid", 0, XS_POSIX_setpgid, file);
- newXSUB("POSIX::setpgrp", 0, XS_POSIX_setpgrp, file);
newXSUB("POSIX::setsid", 0, XS_POSIX_setsid, file);
newXSUB("POSIX::setuid", 0, XS_POSIX_setuid, file);
- newXSUB("POSIX::stat", 0, XS_POSIX_stat, file);
- newXSUB("POSIX::symlink", 0, XS_POSIX_symlink, file);
- newXSUB("POSIX::system", 0, XS_POSIX_system, file);
newXSUB("POSIX::tcgetpgrp", 0, XS_POSIX_tcgetpgrp, file);
newXSUB("POSIX::tcsetpgrp", 0, XS_POSIX_tcsetpgrp, file);
- newXSUB("POSIX::times", 0, XS_POSIX_times, file);
- newXSUB("POSIX::umask", 0, XS_POSIX_umask, file);
newXSUB("POSIX::uname", 0, XS_POSIX_uname, file);
- newXSUB("POSIX::unlink", 0, XS_POSIX_unlink, file);
- newXSUB("POSIX::utime", 0, XS_POSIX_utime, file);
- newXSUB("POSIX::wait", 0, XS_POSIX_wait, file);
- newXSUB("POSIX::waitpid", 0, XS_POSIX_waitpid, file);
newXSUB("POSIX::write", 0, XS_POSIX_write, file);
}
+++ /dev/null
-#!/usr/local/bin/perl5
-#
-# This document is in the public domain.
-#
-# The purpose is to document by example some of the new Perl5 features.
-# It also functions as a mini test suite; you can extracted the
-# expected output using:
-# perl -ne 'm/.*prints ``(.*)..$/ && print $1,"\n";'
-# There are a couple of places that print out internal address so it's
-# not perfect yet, those should be fixed.
-#
-# Thanks to the following for their input:
-# Johan.Vromans@NL.net
-# Daniel Faken <absinthe@viva.chem.washington.edu>
-# Tom Christiansen <tchrist@wraeththu.cs.colorado.edu>
-# Dean Roehrich <roehrich@ferrari.cray.com>
-# Larry Wall <lwall@netlabs.com>
-#
-# TODO when I get perl5a6 to play with
-# *foo = \&func; # replaces only function (etc)
-# AUTOLOAD { ...; } # called if method not found
-# goto &func; # goto's a function
-# require FOOBAR; # loads FOOBAR.pm
-# @ISA
-#
-# import()/@EXPORT/etc
-
-# my
- # static scoping
- sub samp1 { print $z,"\n"; }
- sub samp2 { my($z) = "world"; &samp1; }
- $z = "hello"; &samp2; # prints ``hello''
-
-# package;
- # for catching non-local variable references
- sub samp3 {
- my $x = shift; # local() would work also
- package; # empty package
- $main::count += $x; # this is ok.
- # $y = 1; # compile time error
- }
-
-# =>
- # works like comma (,); use for key/value pairs
- # sometimes used to disambiguate the final expression in a block
- # might someday supply warnings if you get out of sync
- %foo = ( abc => foo );
- print $foo{abc},"\n"; # prints ``foo''
-
-# ::
- # works like tick (') (use of ' is deprecated in perl5)
- print $main::foo{abc},"\n"; # prints ``foo''
-
-# bless ref;
- # Bless takes a reference and returns an "object"
- $oref = bless \$scalar;
-
-# ->
- # dereferences an "object"
- $x = { def => bar }; # $x is ref to anonymous hash
- print $x->{def},"\n"; # prints ``bar''
-
- # method derefs must be bless'ed
- {
- package sample;
- sub samp4 { my($this) = shift; print $this->{def},"\n"; }
- sub samp5 { print "samp5: @_\n"; }
- $main::y = bless $main::x; # $x is ref, $y is "object"
- }
- $y->samp4(); # prints ``bar''
-
- # indirect object calls
- samp5 $y arglist; # prints ``samp5: sample=HASH(0xa85e0) arglist''
-
- # static method calls (often used for constructors, see below)
- samp5 sample arglist; # prints ``samp5: sample arglist''
-
-# function calls without &
- sub samp6 { print "look ma\n"; }
- samp6; # prints ``look ma''
-
-# ref
- # returns "object" type
- {
- package OBJ1;
- $x = bless \$y; # returns "object" $x in "class" OBJ1
- print ref $x,"\n"; # prints ``OBJ1''
- }
-
- # and non-references return undef.
- $z = 1;
- print "non-ref\n" if !defined(ref $z); # prints ``non-ref''
-
- # ref's to "builtins" return type
- print ref \$ascalar,"\n"; # prints ``SCALAR''
- print ref \@array,"\n"; # prints ``ARRAY''
- print ref \%hash,"\n"; # prints ``HASH''
- sub func { print shift,"\n"; }
- print ref \&func,"\n"; # prints ``CODE''
- print ref \\$scalar,"\n"; # prints ``REF''
-
-# tie
- # bind a variable to a package with magic functions:
- # new, fetch, store, delete, firstkey, nextkey (XXX: others???)
- # Usage: tie variable, PackageName, ARGLIST
- {
- package TIEPACK;
- sub new { print "NEW: @_\n"; my($class, $x) = @_; bless \$x }
- sub fetch { print "fetch @_\n"; my($this) = @_; ${$this} }
- sub store { print "store @_\n"; my($this, $x) = @_; ${$this} = $x }
- sub DESTROY { print "DESTROY @_\n" }
- }
- tie $h, TIEPACK, "black_tie"; # prints ``NEW: TIEPACK black_tie''
- print $h, "\n"; # prints ``fetch TIEPACK=SCALAR(0x882a0)''
- # prints ``black_tie''
- $h = 'bar'; # prints ``store TIEPACK=SCALAR(0x882a0) bar''
- untie $h; # DESTROY (XXX: broken in perl5a5???)
-
-# References and Anonymous data-structures
- $sref = \$scalar; # $$sref is scalar
- $aref = \@array; # @$aref is array
- $href = \%hash; # %$href is hash table
- $fref = \&func; # &$fref is function
- $refref = \$fref; # ref to ref to function
- &$$refref("call the function"); # prints ``call the function''
-
- %hash = ( abc => foo ); # hash (just like perl4)
- print $hash{abc},"\n"; # prints ``foo''
- $ref = { abc => bar }; # reference to anon hash
- print $ref->{abc},"\n"; # prints ``bar''
-
- @ary = ( 0, 1, 2 ); # array (just like perl4)
- print $ary[1],"\n"; # prints ``1''
- $ref = [ 3, 4, 5 ]; # reference to anon array
- print $ref->[1],"\n"; # prints ``4''
-
-# Nested data-structures
- @foo = ( 0, { name => foobar }, 2, 3 ); # $#foo == 3
- $aref = [ 0, { name => foobar }, 2, 3 ]; # ref to anon array
- $href = { # ref to hash of arrays
- John => [ Mary, Pat, Blanch ],
- Paul => [ Sally, Jill, Jane ],
- Mark => [ Ann, Bob, Dawn ],
- };
- print $href->{Paul}->[0], "\n"; # prints ``Sally''
- print $href->{Paul}[0],"\n"; # shorthand version, prints ``Sally''
-
-# Multiple Inheritence (get rich quick :-)
- {
- package OBJ2; sub abc { print "abc\n"; }
- package OBJ3; sub def { print "def\n"; }
- package OBJ4; @ISA = ("OBJ2", "OBJ3");
- $x = bless { foo => bar };
- $x->abc; # prints ``abc''
- $x->def; # prints ``def''
- }
-
-# Packages, Classes, Objects, Methods, Constructors, Destructors, etc.
- # XXX: I'll add more explinations/samples about the above here
- {
- package OBJ5;
- sub new { print "NEW: @_\n"; my($x) = "empty"; bless \$x }
- sub DESTROY { print "DESTROY\n" }
- sub output { my($this) = shift; print "value = $$this\n"; }
- }
- # Constructors are often written as static method calls:
- $x = new OBJ5; # prints ``NEW: OBJ5''
- $x->output; # prints ``value = empty''
- # The destructor is responsible for calling any base class destructors.
- undef $x;
-From: doughera@lafcol.lafayette.edu (Andy Dougherty
+From: doughera@lafcol.lafayette.edu (Andy Dougherty)
+Subject: RE: First stab at Configure Support for perl5alpha
+Date: Fri Apr 29 16:43:18 EDT 1994
+
+I have incorporated various fixes/suggestions into the Configure
+support for perl5alpha8. The main changes are the following:
+ -Better incorporation of extensions in Makefile.SH.
+ -miniperlmain.c no longer requires dynamic loading.
+ -perl can use dynamic loading if available, but extensions can
+ also be compiled in statically, if desired.
+ -perlmain.c now built from miniperlmain.c by writemain.SH,
+ which is called in the makefile. Only the requested extensions
+ are compiled in.
+ -dynamic loading broken up into dl_sunos.c, dl_next.c, dl_hpux.c.
+ Configure will look for dl_$osname.c, where osname is determined
+ at the same time as hints are suggested.
+ -Configure support added for sdbm library (ext/dbm/sdbm/libsdbm.a).
+ This still needs testing.
+ -Tests for extensions now check in %Config to see if that extension
+ is available. Note, however, the sdbm is not an *optional*
+ extension, so it will fail (and make test will complain)
+ if sdbm is not installed. Thus perl programmers can safely assume
+ that at least sdbm is available.
+ -configpm now correctly handles comments at the end of config.sh
+ (which Configure places there if a hints file tries to propagate
+ unknown variables, such as libswanted).
+ -makedepend now works in UU/ subdirectory (so it doesn't delete
+ miniperlmain.c on systems with 14-character file name limits).
+ -ext/typemap: My compiler couldn't handle some of the more complex
+ casts, so an intermediate unsigned long variable has been introduced.
+ I should probably re-do this in terms of a CRIPPLED_CC macro in
+ XSUB.h, but it's not clear to me that it's worth it.
+ -some new or updated hints files.
+ -miscellaneous bug fixes.
+
+Problems remaining:
+
+ -POSIX module is still under construction.
+ -Dynamic loading of extensions works on SunOS 4.1.3, but it
+ might need modifications to work with other systems.
+ -It is possible to do mixed dynamic/static loading, that is,
+ load commonly used modules statically and other modules
+ dynamically. Currently, this must be done by hand by setting
+ extobj in makefile and hand-editing perlmain.c.
+ The newXSUB line for the static module must be moved into
+ the #ifdef USE_DYNAMIC_LOADING section in perlmain.c, and the
+ module .o file must be added to the extobj= line in makefile.
+ -lib/[sn]dbm.t tests create a new file with a hard-wired set of
+ flags. These should be replaced with O_CREAT | O_RDWR, which
+ will be available from POSIX.pm, once it is up and running.
+ For now, you might have to change the 0x202 to 0x102 (or perhaps
+ 0x402) in lib/[sn]dbm.t for the tests to succeed.
+ -I have applied several suggested fixes for use on the DEC alpha,
+ but I haven't been able to keep up with all of them.
+ -Though CRIPPLED_CC works, it might be desireable to have Configure
+ try to figure it out.
+
+To apply: Obtain a clean copy of perl5alpha8
+ cd <your perl5alpha8 directory>
+ patch -p1 < <this patch>
+
+As before, I am willing to continue to coordinate and develop the
+Configure support.
+
+Thanks to the following for various and often quite substantial
+patches and suggestions:
+ Peter Galbavy <peter@wonderland.org>
+ Jarkko Hietaniemi <jhi@alpha.hut.fi>
+ Andreas Koenig <koen1830@w203zrz.zrz.tu-berlin.de>
+ Raphael Manfredi <ram@acri.fr>
+ David Meyer <dmm0t@rincewind.mech.virginia.edu>
+ Jeff Okamoto <okamoto@hpcc101.corp.hp.com>
+ John Stoffel <john@WPI.EDU>
+ Larry Wall (lwall@netlabs.com>
+
+ Andy Dougherty doughera@lafcol.lafayette.edu
+ Dept. of Physics Phone: (610) 250-5212
+ Lafayette College FAX: (610) 250-9263
+ Easton, PA 18042-1782
+
+=================================================================
+
+From: doughera@lafcol.lafayette.edu (Andy Dougherty)
Subject: First stab at Configure Support for perl5alpha
Date: Mon Apr 4 15:13:50 EDT 1994
{
SDBM_File db;
- if (SvROK(ST(1)))
- db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (SvROK(ST(1))) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (SDBM_File) tmp;
+ }
else
croak("db is not a reference");
sdbm_close(db);
datum key;
datum RETVAL;
- if (sv_isa(ST(1), "SDBM_File"))
- db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "SDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (SDBM_File) tmp;
+ }
else
croak("db is not of type SDBM_File");
int flags;
int RETVAL;
- if (sv_isa(ST(1), "SDBM_File"))
- db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "SDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (SDBM_File) tmp;
+ }
else
croak("db is not of type SDBM_File");
datum key;
int RETVAL;
- if (sv_isa(ST(1), "SDBM_File"))
- db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "SDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (SDBM_File) tmp;
+ }
else
croak("db is not of type SDBM_File");
SDBM_File db;
datum RETVAL;
- if (sv_isa(ST(1), "SDBM_File"))
- db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "SDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (SDBM_File) tmp;
+ }
else
croak("db is not of type SDBM_File");
datum key;
datum RETVAL;
- if (sv_isa(ST(1), "SDBM_File"))
- db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "SDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (SDBM_File) tmp;
+ }
else
croak("db is not of type SDBM_File");
SDBM_File db;
int RETVAL;
- if (sv_isa(ST(1), "SDBM_File"))
- db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "SDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (SDBM_File) tmp;
+ }
else
croak("db is not of type SDBM_File");
SDBM_File db;
int RETVAL;
- if (sv_isa(ST(1), "SDBM_File"))
- db = (SDBM_File)(unsigned long)SvNV((SV*)SvRV(ST(1)));
+ if (sv_isa(ST(1), "SDBM_File")) {
+ unsigned long tmp;
+ tmp = (unsigned long)SvNV((SV*)SvRV(ST(1)));
+ db = (SDBM_File) tmp;
+ }
else
croak("db is not of type SDBM_File");
+++ /dev/null
-Article 1475 of comp.lang.tcl:
-Path: netlabs!news!usc!cs.utexas.edu!sun-barr!ames!agate!sprite.Berkeley.EDU!ouster
-From: ouster@sprite.Berkeley.EDU (John Ousterhout)
-Newsgroups: comp.lang.tcl
-Subject: Planning for Tcl 7.0
-Message-ID: <1avu22INN5ao@agate.berkeley.edu>
-Date: 8 Oct 92 00:06:26 GMT
-Organization: U.C. Berkeley Sprite Project
-Lines: 156
-NNTP-Posting-Host: tyranny.berkeley.edu
-
-
-For the last year I've made only small changes to Tcl while focussing
-on the canvas and text widgets for Tk. I'm now making plans to catch
-up on a bunch of much-needed bug fixes and enhancements to Tcl. Some
-of the changes I'm considering are not backwards-compatible. The
-purpose of this message is to let know know what changes I'm considering
-for Tcl 7.0 and to solicit feedback. I'm particularly interested in
-comments on the changes that are incompatible: I'll probably drop
-the changes for which I get lots of negative feedback and not much
-positive feedback. If there are other changes that you think are
-important but aren't contained on this list, let me know and I may add
-them.
-
-Incompatible changes:
----------------------
-
-The changes listed below are likely to require changes to existing
-scripts and/or C code. Each change includes an explanation of why the
-change might be useful. I'd like to know whether or not you think the change
-is useful enough to justify the incompatibility.
-
-1. Eliminate the "|" option in the "open" command. Instead, add a
-"popen" command that does the same thing. Rationale: in the current
-implementation you can't open a file whose name begins with "|".
-Also, I think the "popen" command would be more logical.
-
-2. Eliminate the Tcl_WaitPids procedure and use the waitpid POSIX call
-instead. Also change the wait code to periodically poll for dead
-child processes so that zombie processes don't get left around forever.
-Rationale: the current code tends to leave zombies around in some
-situations. Switching to waitpid should solve this problem in a
-relatively portable fashion. The only incompatibility will be for
-C procedures that call Tcl_WaitPids; they'll have to switch to call
-waitpid instead. I'll provide a compatibility version of waitpid for
-use on systems that don't have it yet.
-
-3. Clean up backslash processing in several ways:
- - Change backslash-newline to eat up all the whitespace following the
- newline and replace the sequence with a single whitespace character.
- Right now it only eats up the newline character and replaces it
- with an empty string. Rationale: this would be more consistent
- with other programs that process backslash-newline sequences.
- - Eliminate the sequences \Mxx, \Cxxx, and \e.
- Rationale: these sequences are left around from ancient times.
- They're not particular compatible with any other program. I
- should have removed them in Tcl 6.0 but didn't. They did get
- removed from the documentation, however, so no-one should be
- using them (?).
- - Change \x (where x is not one of the characters that gets special
- backslash treatment) to expand to x, not \x.
- Rationale: the current behavior is inconsistent with all other
- programs I know of that handle backslashes, and I think it's
- confusing.
- - Change "format" so it doesn't do an additional layer of backslash
- processing on its format string.
- Rationale: I don't know why it currently behaves as it does, and
- I think it's confusing.
-
-4. Change "regsub" so that when no match occurs it sets the result
-variable to the original string, rather than leaving it unmodified.
-Rationale: the current behavior results in extra tests of the regsub
-result that could sometimes be avoided with the proposed new behavior.
-I doubt that there's much code that will break with the change (this
-would have to be code that depends on the result variable *not* being
-modified).
-
-5. Change the name "UNIX" in the "errorCode" variable to "POSIX".
-Rationale: I suspect that I'm eventually going to get a call from the
-USL lawyers on this one if I don't change it. Better to change it now
-in an orderly fashion so I don't have change it hastily in the future.
-
-6. Change glob to return only the names of existing files.
-Rationale: at present "glob */foo" expands * and generates a result
-without checking to see if each directory has a "foo" file in it. This
-makes the current behavior incompatible with csh, for example. One
-question is whether constructs like "glob {a,b}.c" should also check for
-the existence of each of the files. At present they don't (i.e. a.c and
-b.c will be returned even if they don't exist), but neither does csh. My
-inclination is to make the behavior match csh (names containing *?[] are
-checked for existence, others aren't). I'd be interested to hear
-opinions on this one: check all names for existence, check only names
-including *?[] (for csh compatibility), or keep it as it is?
-
-7. Change "gets" so it returns 1 for success and 0 for failure. At present
-it returns the line length for success and -1 for failure.
-Rationale: this would allow slightly simple Tcl scripts: you could just
-say
- while [gets $f line] {...}
-instead of
- while {[gets $f line] >= 0} {...}
-I'm not really convinced that this one is important enough to justify the
-incompatibility, so it won't take much negative feedback to kill it.
-
-Other changes:
---------------
-
-The changes listed below shouldn't introduce substantial compatibility
-problems. Of course, any change can potentially cause scripts to stop
-working (e.g. almost any change will break the test suite), but very
-few if any people should be affected by these changes.
-
-8. Implement Tcl_CreateExternVar() procedure along lines proposed by
-Andreas Stolcke to tie a C variable to a Tcl variable with automatic
-updates between them.
-
-9. Changes to exec:
- - Allow redirection to an existing file descriptor in "exec",
- with a mechanism like >&1 or >& stdout.
- - Allow file names immediately after ">" and "<" without
- intervening spaces.
-
-10. Changes related to files:
- - Fix Scott Bolte bug (closing stdin and stdout).
- - Move TclGetOpenFile and OpenFile stuff to tcl.h so that they're
- accessible to applications.
- - Extend access modes in open to include the complete set of POSIX
- access modes (such as O_EXCL and O_NONBLOCK).
-
-11. Re-instate Tcl_WatchInterp to notify application when an interpreter
-is deleted.
-
-12. Add "elseif" mechanism to "if" command for chaining "else {if ..."
-constructs more cleanly. Require exact matches on "then" and "else"
-keywords.
-
-13. Remove UNIX system call declarations from tclUnix.h. Use them from
-unistd.h instead, and provide a default version of unistd.h for systems
-that don't have one.
-
-14. Changes in the expr command, mostly following suggestions made by
-George Howlett a long time ago:
- - Increase precision of floating-point results.
- - Make floating-point numbers always print with a point.
- - Add transcendental functions like sin and exp.
- - Add explicit integer and floating conversion operations.
- - Don't promote large integers to floating-point automatically.
- - Allow multiple arguments to expr command.
-
-15. Extend lsort to allow alternate sorting mechanisms, like numeric,
-or client-supplied.
-
-16. Allow alternate pattern-matching forms (e.g. exact or regexp) for
-lsearch and case.
-
-17. Add XPG/3 positional argument specifiers to format (code contributed
-by Mark Diekhans).
-
-18. Change "file readlink" to return an error on systems that don't
-support it rather than removing the option entirely.
-
-19. Add a mechanism for scheduling a Tcl command to be executed when the
-interpreter reaches a clean point. This is needed for things like
-signal support.
-
-20. Change upvar so that you can refer to an element of an array as
-well as a whole array.
-
-
Bugs
Make yyparse recursion longjmp() proof.
Make "delete $array{$key} while ($key) = each %array" safe
- Wrong line reported for runtime elsif condition error
- TOOSTRICT is not too strict
- recv and sysread should taint
+ <$handle> doesn't work intuitively if $handle is ARGV
+ Anything in the Bugs directory
Regexp extensions
/m for multiline
Would be nice to have
Profiler
pack "(stuff)*"
+ Contiguous bitfields in pack/unpack
lexperl
Bundled perl preprocessor
Make $[ compile-time instead of run-time
Multiple levels of warning
.= shouldn't complain about undefined under -w
report HANDLE [formats].
+ tie(FILEHANDLE, ...)
+ __DATA__
-Pragmas ("assume" maybe?)
- integer, float
- nodebug, debug
- autocroak?
+Possible averments
+ debugger
+ optimize
Optimizations
Optimize switch statements
compile to real threaded code
structured types
paren counting in tokener to queue remote expectations
+ autocroak?
-?X: These units are based on the ones supplied with dist-3.0
-?X: patchlevel 22. They have been changed or enhanced to work with
-?X: perl5alpha. I would appreciate hearing about any changes,
-?X: corrections, or enhancements.
-?X: Andy Dougherty doughera@lafcol.lafayette.edu
-?X: Dept. of Physics
-?X: Lafayette College
-?X: Easton, PA 18042-1782
-?X: Sat Apr 2 15:45:17 EST 1994
?RCS: $Id: Extensions.U,v$
?RCS:
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS:
?RCS: $Log: Extensions.U,v $
?RCS:
-?MAKE:extensions : find package
+?MAKE:extensions : find Myread i_dbm i_ndbm i_gdbm i_sdbm
?MAKE: -pick add $@ %<
?S:extensions:
?S: This variable holds a list of extension files we want to
?S: include in perl.
?S:.
+?T:xxx
?INIT:: List of extensions we want:
?INIT:extensions=''
?X:
-echo " "
case "$extensions" in
' '|'') echo "Looking for extensions..."
case "$find" in
*find*)
cd ..
- dflt="`$find ext -type f -name \*.xs -print`"
+ extensions=`$find ext -type f -name \*.xs -print`
+ set X $extensions
+ shift
+ extensions="$*"
cd UU
;;
- *) dflt='ext/dbm/NDBM_File.xs ext/dbm/ODBM_File.xs ext/dbm/GDBM_File.xs ext/dbm/SDBM_File.xs ext/posix/POSIX.xs'
+ *) extensions='ext/dbm/NDBM_File.xs ext/dbm/ODBM_File.xs ext/dbm/GDBM_File.xs ext/dbm/SDBM_File.xs ext/posix/POSIX.xs'
;;
esac
;;
-none) dflt='' ;;
-*) dflt="$extensions" ;;
+none) extensions='' ;;
+*) ;;
esac
+: Now see which are supported on this system.
+dflt=""
+for xxx in $extensions ; do
+ case "$xxx" in
+ *ODBM*) case "$i_dbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *NDBM*) case "$i_ndbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *GDBM*) case "$i_gdbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *SDBM*) case "$i_sdbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *) dflt="$dflt $xxx"
+ ;;
+ esac
+done
+
rp="What extensions do you wish to include?"
. ./myread
extensions="$ans"
--- /dev/null
+?RCS: $Id: Guess.U,v 3.0.1.3 1993/12/15 08:14:35 ram Exp $
+?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.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: 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:.
+?X:We don't use BSD in the source. It's too vague, and often defined
+?X:in header files anyway (e.g. NetBSD).
+?X:?S:d_bsd:
+?X:?S: This symbol conditionally defines the symbol BSD when running on a
+?X:?S: BSD system.
+?X:?S:.
+?C:EUNICE:
+?C: This symbol, if defined, indicates that the program is being compiled
+?C: under the EUNICE package under VMS. The program will need to handle
+?C: things like files that don't go away the first time you unlink them,
+?C: due to version numbering. It will also need to compensate for lack
+?C: of a respectable link() command.
+?C:.
+?C:VMS:
+?C: This symbol, if defined, indicates that the program is running under
+?C: VMS. It is currently only set in conjunction with the EUNICE symbol.
+?C:.
+?C:XENIX:
+?C: This symbol, if defined, indicates thet the program is running under
+?C: Xenix (at least 3.0 ?).
+?C:.
+?X:We don't use BSD in the source. It's too vague.
+?X:?C:BSD:
+?X:?C: This symbol, if defined, indicates that the program is running under
+?X:?C: a BSD system.
+?X:?C:.
+?H:#$d_eunice EUNICE /**/
+?H:#$d_eunice VMS /**/
+?H:#$d_xenix XENIX /**/
+?X:?H:#$d_bsd BSD /**/
+?H:.
+?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
+?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..."
+ 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
+
-?X: These units are based on the ones supplied with dist-3.0
-?X: patchlevel 22. They have been changed or enhanced to work with
-?X: perl5alpha. I would appreciate hearing about any changes,
-?X: corrections, or enhancements.
-?X: Andy Dougherty doughera@lafcol.lafayette.edu
-?X: Dept. of Physics
-?X: Lafayette College
-?X: Easton, PA 18042-1782
-?X: Sat Apr 2 15:45:17 EST 1994
?RCS: $Id: Loc.U,v 3.0.1.3 1994/01/24 14:01:44 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?vi:vi
?zcat:zcat
"
-?LINT:set Loc Mcc awk bash bison byacc cat chgrp chmod chown compress cp cpio cpp \
- csh date echo egrep emacs expr flex gcc 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 sh shar sleep smail sort submit tail tar tbl test touch tr \
- troff uname uniq uuname vi zcat
+?LINT:set Loc Mcc awk bash bison byacc cat chgrp chmod chown compress cp \
+ cpio cpp csh date echo egrep emacs expr find flex gcc 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 sh shar sleep \
+ smail sort submit tail tar tbl test touch tr troff uname uniq \
+ uuname vi zcat
pth=`echo $PATH | sed -e 's/:/ /g'`
pth="$pth /lib /usr/lib"
for file in $loclist; do
-?X: These units are based on the ones supplied with dist-3.0
-?X: patchlevel 22. They have been changed or enhanced to work with
-?X: perl5alpha. I would appreciate hearing about any changes,
-?X: corrections, or enhancements.
-?X: Andy Dougherty doughera@lafcol.lafayette.edu
-?X: Dept. of Physics
-?X: Lafayette College
-?X: Easton, PA 18042-1782
-?X: Sat Apr 2 15:45:17 EST 1994
?RCS: $Id: Oldconfig.U,v 3.0.1.2 1994/01/24 14:05:02 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?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: Instruct Myread uname sed test cat rm n c \
- contains Loc Options
+?MAKE:Oldconfig hint myuname osname osvers: Instruct Myread uname \
+ sed test cat rm n c contains Loc Options
?MAKE: -pick wipe $@ %<
?S:myuname:
?S: The output of 'uname -a' if available, otherwise the hostname. On Xenix,
?S: Gives the type of hints used for previous answers. May be one of
?S: "default", "recommended" or "previous".
?S:.
-?T:tmp file oldmyuname tans _
+?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. It is set to '' 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:.
+?T:tmp file oldmyuname hintfile tans _
?LINT:change n c
: Try to determine whether config.sh was made on this system
case "$config_sh" in
: Half the following guesses are probably wrong... If you have better
: tests or hints, please send them to <MAINTLOC>
: The metaconfig authors would also appreciate a copy...
- $test -f /irix && dflt="$dflt sgi"
- $test -f /xenix && dflt="$dflt sco_xenix"
- $test -f /dynix && dflt="$dflt dynix"
- $test -f /dnix && dflt="$dflt dnix"
- $test -f /bin/mips && /bin/mips && dflt="$dflt mips"
- $test -d /NextApps && test -f /usr/adm/software_version && dflt="$dflt next"
- $test -d /usr/include/minix && dflt="$dflt minix"
+ $test -f /irix && osname=sgi
+ $test -f /xenix && osname=sco_xenix
+ $test -f /dynix && osname=dynix
+ $test -f /dnix && osname=dnix
+ $test -f /bin/mips && /bin/mips && osname=mips
+ $test -d /NextApps && test -f /usr/adm/software_version && osname=next
+ $test -d /usr/include/minix && osname=minix
?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
$test -f $5.sh && dflt="$dflt $5"
case "$5" in
- fps*) dflt="$dflt fps";;
+ fps*) osname=fps ;;
mips*)
case "$4" in
- umips) dflt="$dflt umips";;
- *) dflt="$dflt mips";;
+ umips) osname=umips ;;
+ *) osname=mips ;;
esac;;
- [23]100) dflt="$dflt mips";;
- next*) dflt="$dflt next" ;;
- news*) dflt="$dflt news" ;;
+ [23]100) osname=mips ;;
+ next*) osname=next ;;
+ news*) osname=news ;;
i386*) if $test -f /etc/kconfig; then
+ osname=isc
if $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
- dflt="$dflt isc_3_2_3"
+ osvers=3.2.3
elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
- dflt="$dflt isc_3_2_2"
+ osvers=3.2.2
fi
- : i386.sh hint is wrong for Interactive.
- dflt=`echo $dflt | $sed 's/i386//'`
fi
;;
esac
case "$1" in
- aix) dflt="$dflt aix_rs" ;;
- sun[Oo][Ss]) case "$3" in
- [34]*) vers=`echo $3 | $sed 's/\./_/g'`
- dflt="$dflt sunos_$vers" ;;
- 5*) vers=`echo $3 | $sed 's/^5/2/g'`
- dflt="$dflt solaris_$vers" ;;
+ aix) osname=aix_rs ;;
+ sunos) osname=sunos
+ case "$3" in
+ [34]*) osvers=$3 ;;
+ 5*) osname=solaris
+ osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+ esac
+ ;;
+ solaris) osname=solaris
+ case "$3" in
+ 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
esac
;;
- [sS]olaris) case "$3" in
- 5*) vers=`echo $3 | $sed 's/^5/2/g'`
- dflt="$dflt solaris_$vers" ;;
+ dnix) osname=dnix ;;
+ dgux) osname=dgux ;;
+ genix) osname=genix ;;
+ hp*ux) osname=hpux ;;
+ next) osname=next ;;
+ irix) osname=sgi ;;
+ ultrix) osname=ultrix
+ case "$3" in
+ 1*) osvers=1 ;;
+ 2*) osvers=2 ;;
+ 3*) osvers=3 ;;
+ 4*) osvers=4 ;;
esac
;;
- dnix) dflt="$dflt dnix" ;;
- dgux) dflt="$dflt dgux" ;;
- genix) dflt="$dflt genix" ;;
- hp*ux) dflt="$dflt hpux" ;;
- next) dflt="$dflt next" ;;
- irix) dflt="$dflt sgi" ;;
- ultrix) case "$3" in
- 3*) dflt="$dflt ultrix_3" ;;
- 4*) dflt="$dflt ultrix_4" ;;
+ osf1) case "$5" in
+ alpha) osname=dec_osf
+ case "$3" in
+ [vt]1\.*) osvers=1 ;;
+ [vt]2\.*) osvers=2 ;;
+ [vt]3\.*) osvers=3 ;;
+ esac
+ ;;
+ hp*) osname=hp_osf1 ;; # TR
+ mips) osname=mips_osf1 ;; # TR
+ # TR = Technology Releases: (un^N)supported
esac
;;
- uts) dflt="$dflt uts" ;;
- $2) case "$dflt" in
+ uts) osname=uts ;;
+ $2) case "$osname" in
*isc*) ;;
*) if test -f /etc/systemid; then
+ osname=sco
+ : Does anyone know if these next gyrations are needed
set `echo $3 | $sed 's/\./ /g'` $4
if $test -f sco_$1_$2_$3.sh; then
- dflt="$dflt sco_$1_$2_$3"
+ osvers=$1.$2.$3
elif $test -f sco_$1_$2.sh; then
- dflt="$dflt sco_$1_$2"
+ osvers=$1.$2
elif $test -f sco_$1.sh; then
- dflt="$dflt sco_$1"
+ osvers=$1
fi
fi
;;
if test -f /vmunix -a -f news_os.sh; then
(what /vmunix | tr '[A-Z]' '[a-z]') > ../UU/kernel.what 2>&1
if $contains news-os ../UU/kernel.what >/dev/null 2>&1; then
- dflt="$dflt news_os"
+ osname=news_os
fi
$rm -f ../UU/kernel.what
fi
fi
- set X `echo $dflt | tr ' ' '\012' | sort | uniq`
- shift
- dflt=''
- for file in $*; do
- if $test -f "$file.sh"; then
- dflt="$dflt $file"
- fi
- done
- set X $dflt
- shift
- dflt=${1+"$@"}
- case "$dflt" in
- '') dflt=none;;
+
+ : Now look for a hint file osname_osvers
+ file=`echo "${osname}_${osvers}" | sed -e 's@\.@_@g' -e 's@_$@@'`
+ case "$file" in
+ '') dflt=none ;;
+ *) case "$osvers" in
+ '') dflt=$file
+ ;;
+ *) if $test -f $file.sh ; then
+ dflt=$file
+ elif $test -f "${osname}.sh" ; then
+ dflt="${osname}"
+ else
+ dflt=none
+ fi
+ ;;
+ esac
+ ;;
esac
+
$cat <<EOM
You may give one or more space-separated answers, or "none" if appropriate.
EOM
rp="Which of these apply, if any?"
. ../UU/myread
- for file in $ans; do
+ tans=$ans
+ for file in $tans; do
if $test -f $file.sh; then
. ./$file.sh
$cat $file.sh >> ../UU/config.sh
- elif $test X$ans = X -o X$ans = Xnone ; then
+ elif $test X$tans = X -o X$tans = Xnone ; then
: nothing
else
- echo "$file.sh does not exist -- ignored"
+ : 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 "$file.sh"; then
+ . ./$file.sh
+ $cat $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 "$file.sh" ; then
+ hintfile="$file.sh"
+ else
+ hintfile=none
+ fi
+
cd ..
fi
cd UU
eval $file="\$_$file"
done
+cat << EOM
+Configure uses the operating system name and version to set some defaults.
+Say "none" to leave it blank.
+EOM
+
+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="$ans" ;;
+esac
+
+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'` ;;
+ esac
+ ;;
+ *) dflt="$osvers" ;;
+esac
+rp="Operating system version?"
+. ./myread
+case "$ans" in
+ none) osvers='' ;;
+ *) osvers="$ans" ;;
+esac
--- /dev/null
+?RCS: $Id: alignbytes.U,v 3.0 1993/08/18 12:05:23 ram Exp $
+?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: alignbytes.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:23 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:memalignbytes: Myread cat cc ccflags rm
+?MAKE: -pick add $@ %<
+?S:memalignbytes:
+?S: This variable holds the number of bytes required to align a
+?S: double. Usual values are 2, 4 and 8.
+?S:.
+?X: This used to be called ALIGNBYTES, but that conflicts with
+?X: <machines/param.h> in NetBSD.
+?C:MEM_ALIGNBYTES (ALIGNBYTES):
+?C: This symbol contains the number of bytes required to align a
+?C: double. Usual values are 2, 4 and 8.
+?C:.
+?H:#define MEM_ALIGNBYTES $memalignbytes /**/
+?H:.
+: check for alignment requirements
+echo " "
+case "$memalignbytes" in
+'') echo "Checking alignment constraints..." >&4
+ $cat >try.c <<'EOCP'
+struct foobar {
+ char foo;
+ double bar;
+} try;
+main()
+{
+ printf("%d\n", (char *)&try.bar - (char *)&try.foo);
+}
+EOCP
+ if $cc $ccflags try.c -o try >/dev/null 2>&1; then
+ dflt=`./try`
+ else
+ dflt='8'
+ echo"(I can't seem to compile the test program...)"
+ fi
+ ;;
+*) dflt="$memalignbytes"
+ ;;
+esac
+rp="Doubles must be aligned on a how-many-byte boundary?"
+. ./myread
+memalignbytes="$ans"
+$rm -f try.c try
+
-?X: These units are based on the ones supplied with dist-3.0
-?X: patchlevel 22. They have been changed or enhanced to work with
-?X: perl5alpha. I would appreciate hearing about any changes,
-?X: corrections, or enhancements.
-?X: Andy Dougherty doughera@lafcol.lafayette.edu
-?X: Dept. of Physics
-?X: Lafayette College
-?X: Easton, PA 18042-1782
-?X: Sat Apr 2 15:45:17 EST 1994
?RCS: $Id: cc.U,v 3.0 1993/08/18 12:05:30 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS: Revision 3.0 1993/08/18 12:05:30 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:gccversion cc: cat contains sysman +large cpp \
+?MAKE:gccversion cc: cat contains sysman +large cpp rm test \
Mcc Myread Guess Oldconfig Loc
?MAKE: -pick add $@ %<
?S:cc:
?S: If GNU cc (gcc) is used, this variable holds '1' or '2' to
?S: indicate whether the compiler is version 1 or 2. This is used in
?S: setting some of the default cflags.
+?S:.
?D:cc='cc'
?INIT:gccversion=''
?LINT:change cpp
#endif
}
EOM
- if $cc -o gccvers $ccflags gccvers.c >/dev/null 2>&1; then
+ if $cc -o gccvers gccvers.c >/dev/null 2>&1; then
gccversion=`./gccvers`
echo "You appear to have version $gccversion."
else
-?X: These units are based on the ones supplied with dist-3.0
-?X: patchlevel 22. They have been changed or enhanced to work with
-?X: perl5alpha. I would appreciate hearing about any changes,
-?X: corrections, or enhancements.
-?X: Andy Dougherty doughera@lafcol.lafayette.edu
-?X: Dept. of Physics
-?X: Lafayette College
-?X: Easton, PA 18042-1782
-?X: Sat Apr 2 15:45:17 EST 1994
?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
'none') optimize=" ";;
esac
+dflt=''
case "$ccflags" in
'') case "$cc" in
*gcc*) if $test "$gccversion" = "1"; then
dflt='-fpcc-struct-return'
fi ;;
- *) dflt='';;
esac
case "$optimize" in
*-g*) dflt="$dflt -DDEBUGGING";;
;;
esac
;;
-*) dflt="$ccflags" ;;
esac
?X: In USG mode, a MIPS system may need some BSD includes
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
want $package to honor its debug switch, you should include -DDEBUGGING here.
To use no flags, specify the word "none".
-Your C compiler might also need additional flags, such as -DJMPCLOBBER
-or -DCRIPPLED_CC.
+Your C compiler might also need additional flags, such as -DJMPCLOBBER,
+-DHIDEMYMALLOC or -DCRIPPLED_CC.
EOH
?X: strip leading space
set X $dflt
: 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 ;;
+*gcc*) case "$gccversion" in
+ 1) cppflags="$cppflags -D__GNUC__" ;;
+ esac
+ ;;
esac
case "$mips_type" in
'');;
for flag
do
case $flag in
- -D*|-I*|-traditional|-ansi|-nostdinc) cppflags="$cppflags $flag";;
+ -D*|-I*|-traditional|-ansi|-nostdinc|-posix|-Xp) cppflags="$cppflags $flag";;
esac
done
case "$cppflags" in
-?X: These units are based on the ones supplied with dist-3.0
-?X: patchlevel 22. They have been changed or enhanced to work with
-?X: perl5alpha. I would appreciate hearing about any changes,
-?X: corrections, or enhancements.
-?X: Andy Dougherty doughera@lafcol.lafayette.edu
-?X: Dept. of Physics
-?X: Lafayette College
-?X: Easton, PA 18042-1782
-?X: Sat Apr 2 15:45:17 EST 1994
?RCS: $Id: d_casti32.U,v 3.0 1993/08/18 12:05:47 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?X:
?X: Can the compiler cast large floats to 32-bit integers?
?X:
-?MAKE:d_casti32: cat cc ccflags rm intsize Setvar
+?MAKE:d_casti32: cat cc ccflags rm intsize Setvar test
?MAKE: -pick add $@ %<
?S:d_casti32:
?S: This variable conditionally defines CASTI32, which indicates
: check for ability to cast large floats to 32-bit ints.
echo " "
echo 'Checking whether your C compiler can cast large floats to int32.' >&4
-if $test "$intsize" -ge 4; then
+if $test "$intsize" -eq 4; then
xxx=int
else
xxx=long
esac
set d_casti32
eval $setvar
-$rm -f try.*
+$rm -f try try.*
--- /dev/null
+?RCS: $Id: d_htonl.U,v 3.0 1993/08/18 12:06:22 ram Exp $
+?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_htonl.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:22 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_htonl: cc ccflags Inlibc i_niin i_sysin rm
+?MAKE: -pick add $@ %<
+?S:d_htonl:
+?S: This variable conditionally defines HAS_HTONL if htonl() and its
+?S: friends are available to do network order byte swapping.
+?S:.
+?C:HAS_HTONL (HTONL):
+?C: This symbol, if defined, indicates that the htonl() routine (and
+?C: friends htons() ntohl() ntohs()) are available to do network
+?C: order byte swapping.
+?C:.
+?C:HAS_HTONS (HTONS):
+?C: This symbol, if defined, indicates that the htons() routine (and
+?C: friends htonl() ntohl() ntohs()) are available to do network
+?C: order byte swapping.
+?C:.
+?C:HAS_NTOHL (NTOHL):
+?C: This symbol, if defined, indicates that the ntohl() routine (and
+?C: friends htonl() htons() ntohs()) are available to do network
+?C: order byte swapping.
+?C:.
+?C:HAS_NTOHS (NTOHS):
+?C: This symbol, if defined, indicates that the ntohs() routine (and
+?C: friends htonl() htons() ntohl()) are available to do network
+?C: order byte swapping.
+?C:.
+?H:#$d_htonl HAS_HTONL /**/
+?H:#$d_htonl HAS_HTONS /**/
+?H:#$d_htonl HAS_NTOHL /**/
+?H:#$d_htonl HAS_NTOHS /**/
+?H:.
+?LINT:set d_htonl
+: see if htonl --and friends-- exists
+set htonl d_htonl
+eval $inlibc
+: Maybe they are macros.
+case "$d_htonl" in
+'define') ;;
+*) cat > try.c <<EOM
+#include <stdio.h>
+#include <sys/types.h>
+#$i_niin I_NETINET_IN
+#$i_sysin I_SYS_IN
+#ifdef I_NETINET_IN
+# include <netinet/in.h>
+#endif
+#ifdef I_SYS_IN
+# include <sys/in.h>
+#endif
+int main()
+{
+ int x;
+ printf("x = ", htonl(7));
+}
+EOM
+ if $cc $ccflags -c try.c >/dev/null 2>&1; then
+ d_htonl="$define"
+ echo "But it seems to be defined as a macro."
+ fi
+ $rm -f try.* try
+ ;;
+esac
-?X: These units are based on the ones supplied with dist-3.0
-?X: patchlevel 22. They have been changed or enhanced to work with
-?X: perl5alpha. I would appreciate hearing about any changes,
-?X: corrections, or enhancements.
-?X: Andy Dougherty doughera@lafcol.lafayette.edu
-?X: Dept. of Physics
-?X: Lafayette College
-?X: Easton, PA 18042-1782
-?X: Sat Apr 2 15:45:17 EST 1994
?RCS: $Id: d_isascii.U,v 3.0 1993/08/18 12:06:44 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
?RCS: Revision 3.0 1993/08/18 12:06:44 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_isascii: test cc cat cppflags libs rm Setvar Findhdr
+?MAKE:d_isascii: cc cat cppflags rm Setvar Findhdr
?MAKE: -pick add $@ %<
?S:d_isascii:
?S: This variable conditionally defines the HAS_ISASCII manifest constant,
--- /dev/null
+?RCS: $Id: d_readdir.U,v 3.0 1993/08/18 12:06:52 ram Exp $
+?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