Mailing List Archive

PATCH (Was: Re: Yet Another Problem)
On Wed, 30 Aug 1995, Lionel Cons wrote:

> Unfortunately, my PATH contains /usr/local/bin which contain a
> cppstdin program (comimg from gcc) so makedepend uses gcc's cppstdin
> which does not work with the selected cc flags:

Uh-oh. I didn't know gcc made & installed a cppstdin command. That's not
very nice of it. Beware that gcc's cppstdin is going to get clobbered when
you install perl (assuming you install perl into /usr/local/bin).

Still, even if gcc didn't do this, you could run into the same problem in
the following way:

1. Build & install perl4 or perl5 with compiler A. If compiler A needs
a cppstdin script, it'll be built and installed into /usr/local/bin.

2. Now try to Configure & build perl5 with compiler B. When cppstdin
gets called, the A version in /usr/local/bin will get called if
/usr/local/bin is in your PATH ahead of '..'.

> So can we put either a better path name in $cppstdin or modify the
> PATH to have . and .. BEFORE the rest of the PATH. This kind of
> conflicts may appear with other programs also...

We can't really use a better path name because $cppstdin has to be
findable both during build and after installation when the build tree
might have been deleted.

Here's your PATH alteration wrapped up into a patch:

Index: makedepend.SH
*** perl5.001m/makedepend.SH Thu May 25 11:05:52 1995
--- perl5.001n/makedepend.SH Wed Aug 30 22:55:44 1995
***************
*** 45,51 ****

# We need .. when we are in the x2p directory if we are using the
# cppstdin wrapper script.
! PATH="$PATH:.:.."
export PATH

$cat /dev/null >.deptmp
--- 45,53 ----

# We need .. when we are in the x2p directory if we are using the
# cppstdin wrapper script.
! # Put .. and . first so that we pick up the present cppstdin, not
! # an older one lying about in /usr/local/bin.
! PATH=".:..:$PATH"
export PATH

$cat /dev/null >.deptmp


End of patch.

Andy Dougherty doughera@lafcol.lafayette.edu
Dept. of Physics
Lafayette College, Easton PA 18042
Re: PATCH (Was: Re: Yet Another Problem) [ In reply to ]
Andy Dougherty writes:
>
> Here's your PATH alteration wrapped up into a patch:

Thanks, I hope this will be in the next unofficial patch...

BTW, I think I've reported some time ago two bugs that are not fixed
in 5.001m, maybe you can fix them in the next patch.

getcwd.pl: there is a useless test on lstat return value that fails in
some cases (for instance in AFS), here is the quick patch that we use:

*** perl5.001m/lib/getcwd.pl Fri Jun 2 17:33:24 1995
--- perl5.001m+/lib/getcwd.pl Thu Aug 31 09:09:41 1995
***************
*** 44,52 ****
}
unless (@tst = lstat("$dotdots/$dir"))
{
! warn "lstat($dotdots/$dir): $!";
! closedir(getcwd'PARENT); #');
! return '';
}
}
while ($dir eq '.' || $dir eq '..' || $tst[$[] != $pst[$[] ||
--- 44,52 ----
}
unless (@tst = lstat("$dotdots/$dir"))
{
! #warn "lstat($dotdots/$dir): $!";
! #closedir(getcwd'PARENT); #');
! #return '';
}
}
while ($dir eq '.' || $dir eq '..' || $tst[$[] != $pst[$[] ||

complete.pl: this one is really buggy, it uses "global" variables that
are not reset... here is our patch:

*** perl5.001m/lib/complete.pl Tue Oct 18 17:35:49 1994
--- perl5.001m+/lib/complete.pl Thu Aug 31 09:07:28 1995
***************
*** 1,6 ****
--- 1,8 ----
;#
;# @(#)complete.pl,v1.1 (me@anywhere.EBay.Sun.COM) 09/23/91
;#
+ ;# (some) bugs fixed by Lionel.Cons@cern.ch
+ ;#
;# Author: Wayne Thompson
;#
;# Description:
***************
*** 23,31 ****
;# $input = &Complete('prompt_string', @completion_list);
;#

! CONFIG: {
! package Complete;

$complete = "\004";
$kill = "\025";
$erase1 = "\177";
--- 25,33 ----
;# $input = &Complete('prompt_string', @completion_list);
;#

! package Complete;

+ CONFIG: {
$complete = "\004";
$kill = "\025";
$erase1 = "\177";
***************
*** 32,41 ****
$erase2 = "\010";
}

! sub Complete {
! package Complete;

- local($[) = 0;
if ($_[1] =~ /^StB\0/) {
($prompt, *_) = @_;
}
--- 34,42 ----
$erase2 = "\010";
}

! sub main'Complete {
! local($prompt, @cmp_list, $return, @match, $l, $test, $cmp, $r);

if ($_[1] =~ /^StB\0/) {
($prompt, *_) = @_;
}

Note that Term/Complete.pm has the same sort of bugs, for instance $r
is not reset...

Lionel Cons

+------- CERN - European Laboratory for Particle Physics -------+
| E-mail: Lionel.Cons@cern.ch |
| Earth-mail: CN/DCI/UWS, CERN, CH-1211 GENEVE 23, Switzerland |
| Phone: + (41 22) 767 49 13 Fax: + (41 22) 767 71 55 |
+---------------------------------------------------------------+

#!/usr/local/bin/perl5
($_=join('',map(srand($_*3)&&pack("c4",map($_+96,rand(23),
rand(23),rand(23),rand(23))),4303,214508,284492,89992,9907,
42475)))=~s'`' 'g;print"\u$_!\n";
Re: PATCH (Was: Re: Yet Another Problem) [ In reply to ]
: BTW, I think I've reported some time ago two bugs that are not fixed
: in 5.001m, maybe you can fix them in the next patch.

It would ease my life somewhat if people wouldn't bundle multiple bug
reports into one message. Not picking particularly on you, Lionel, but
it occurred to me that I shouldn't expect behavior I hadn't requested.

Larry