Hi,

I used a slightly modified script:

if (@ARGV[0]) {
        while(<>) { print "foo".$_; }
} else {
        print "Running on $^O, using: $^X, version $]\n";
        open STDOUT,"| \"$^X\" $0 -";
        print "bar\n";
        close STDOUT;
}

Results (the first sentence is comments of me regarding the used platform, the 
other 2 lines are output of the perl script):

HPUX 11.11 on PA risc: 
Running on hpux, using: perl, version 5.008
foobar

HPUX11.23 on Itanium:
Running on hpux, using: perl, version 5.008009
foobar

Linux Suse SLES 10 SP2, x64:
Running on linux, using: /usr/bin/perl, version 5.008008
foobar

Solaris 10, ultrasparc IIIi:
Running on solaris, using: perl, version 5.008004
foobar

Solaris 10, T200-sparc:
Running on solaris, using: perl, version 5.008004
Foobar

Solaris 9:
Running on solaris, using: perl, version 5.006001
foobar

AIX6.1 (oslevel: 6100-06-07-1207):
Running on aix, using: perl, version 5.008008
foobar

Tru64 V5.1B-5:
Running on dec_osf, using: perl, version 5.008
Foobar

I don’t have Suse SLES 9 and AIX5.3 boxes anymore, but the previous outcome may 
give a fairly confidence that quoting $^X should work (in most cases).
Windows was already tested by me, and also works. I don't know what the lowest 
supported perl version is. You may want to add 5.6.1 or 5.8 as minimum 
requirement?
Solaris 9 is not supported anymore by Oracle. So that system is some ancient 
relict from the past in our hardware farm :-).

Regards,
Kees

-----Original Message-----
From: Andy Polyakov via RT [mailto:[email protected]] 
Sent: Tuesday, June 26, 2012 18:07
To: Kees Dekker
Cc: [email protected]
Subject: Re: [openssl.org #2835] question/proposal for openssl 1.0.1c to make 
do_ms.bat and do_win64a.bat somewhat more consisent + solve build errors for 
WIN64a.

> It is indeed the quoting of the perl command interpreter issue.
> 
> I also work often on *nix platforms, and tested with \"$^X\", which
> worked. But I can’t guarantee that too for all *nix flavors... It may
> be worth trying it (unless someone else complains). If you are unsure
> for a certain *nix flavor, please let me know. We may have that
> platform in house (currently, our product is built on Suse Linux,
> HPUX (PA-risc + Itanium), Solaris, AIX, Windows. Secondary platforms:
> Tru64. Our product also run on RedHat linux (although we built on
> Suse SLES 10)).

Well, scripts in question are not executed non-x86_64, so that OSes like
AIX, HPUX are irrelevant in the context. I was referring to x86_64 BSDs,
Solaris, MacOS X... And it's not necessarily OS, but Perl version. Even
with Perl it can get bizarre when you least expect it...

Let's put it this way. Even though non-x86_64 platforms are not relevant
in the context, if you can confirm that below script works on all of
your *nix platforms, then I'd be comfortable to propagate \"$^X\". Also
tell what Perl versions do you have.

if (@ARGV[0]) {
        while(<>) { print "foo".$_; }
} else {
        open STDOUT,"| \"$^X\" $0 -";
        print "bar\n";
        close STDOUT;
}


Reply via email to