[comp.lang.perl] pl27, op.dup, and whitespace

marc@athena.mit.edu (08/13/90)

I just finished getting perl p27 working on the three major platforms
around here (vax/bsd 4.3, rt/aos 4, and decstation 3100/ultrix 3.1).

Comments and bugs:

Our build tree consists of a source tree, and several object
directories containing symlinks.  When pl18 was installed, the test ||
mv stuff at the top of the Configure script just moved the symlinks;
the original files were not moved.  (I've inherited perl from the
previous maintainer, who's in Taiwan right now.  He might have done
something wrong.)  Also, a single list of new files so I can create
all the new symlinks at once (rather than watching Configure fail lots
of times) whould be helpful.  Basically, I'm asking for more support
for multi-platform build trees.

The diff's I got from the newsgroup also had spaces substituted for
tabs in a lot of places.  Using the -l option to patch kept patch from
complaining, but I had to hand edit Makefile.SH to replace the spaces
with tabs.

There was a bug in perl.y which caused an infinite loop in the rule
for nonquoted strings (the new default rule at the end).  diff -c:

*** perl.y.pl27 Sun Aug 12 03:19:22 1990
--- perl.y      Sun Aug 12 03:22:36 1990
***************
*** 784,789 ****
--- 784,790 ----
                            while (*s) {
                                if (!islower(*s))
                                    break;
+                             s++;
                            }
                            if (dowarn && !*s)
                                warn("\"%s\" may clash with future reserved word", $1);

Running yacc on a2p.y gave 226 shift/reduce conflicts on all
architectures.  The makefile said there should be 232.  I'm not sure
if this is a bug or a feature. :-)

There's no easy way do get around this, but if you run the tests
inside an Andrew File System (AFS) volume, io.fs#18 and op.stat#4 fail
because AFS only stores mtime, and will return it as atime and ctime
as well.

There was another bug on the Ultrix machine which I expect is the same
on the Encore (although I can't test that).  It appears that after a
dup(), the new fd has close-on-exec set.  So when you set STDOUT to a
dup'ed fd, that stdout gets closed in the child process, and the cat
sends the bits into the twilight zone.  This patch fixes the problem
under ultrix, and doesn't hurt my bsd or aos systems.  The fnctl()
will probably need to be #ifdef'd out or replaced or something on
systems which don't have fnctl.  diff -c:

*** doio.c.pl27 Sun Aug 12 11:19:46 1990
--- doio.c      Sun Aug 12 11:24:50 1990
***************
*** 169,174 ****
--- 169,175 ----
                    fd = -1;
            }
            fp = fdopen(dup(fd),mode);
+           fcntl(fileno(fp),F_SETFD,0);
        }
        else {
            while (isspace(*name))

I think that's it.

		Marc

giles@hpausla.aso.hp.com (Giles Lean) (08/14/90)

<marc@athena.mit.edu> writes in comp.lang.perl:
> I just finished getting perl p27 working on the three major platforms
> around here (vax/bsd 4.3, rt/aos 4, and decstation 3100/ultrix 3.1).

I've just compiled on HP-UX 7.0 (S800).  Passed all tests first time.

Ta, Larry.

Giles Lean
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Hewlett Packard	Australian Software Operation, Melbourne.	
Australia:	giles@aso.hp.oz		   (03)  871 1647
Internet:	giles@aso.hp.com	   +61 3 871 1647

darrylo@hpnmdla.HP.COM (Darryl Okahata) (08/16/90)

In comp.lang.perl, giles@hpausla.aso.hp.com (Giles Lean) writes:

> I've just compiled on HP-UX 7.0 (S800).  Passed all tests first time.

     Perl3 patchlevel 28 also passes all tests on S300 HP-UX 7.0
(68k-based, as opposed to the RISC-based version mentioned above).

     The only problem that I had was that configure placed a "-lx" in
the list of libraries to be linked with perl.  This library does not
exist on HP S300 machines.

     Keep up the good work, Larry.

     -- Darryl Okahata
	UUCP: {hplabs!, hpcea!, hpfcla!} hpnmd!darrylo
	Internet: darrylo%hpnmd@hp-sde.sde.hp.com

DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion or policy of Hewlett-Packard or of the
little green men that have been following him all day.