Re: small fix for Windows build

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: small fix for Windows build
Date: 2011-04-05 17:57:40
Message-ID: 1302026260.27487.8.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On mån, 2011-04-04 at 17:08 -0400, Andrew Dunstan wrote:
>
> On 04/04/2011 04:41 PM, Peter Eisentraut wrote:
> > My not yet complete attempt at doing a Windows build produces several of
> > these warnings during the build phase:
> >
> > Hash %ENV missing the % in argument 1 of each() at -e line 1.
> >
> > I believe the attached patch is the fix for that.
> >
>
> I am not seeing any such errors on currawong or mastodon. So I'm not
> sure what you're doing that's causing you to get the errors, or if your
> platform is different. But I think we need to get to the bottom of it
> before changing something that's working.

My Perl installation is 5.12, which is the latest from ActiveState.
According to <http://dev.perl.org/perl5/news/2010/perl-5.12.0.html>,
"Perl now warns the user about the use of deprecated features by
default." (I also see a bunch of other warnings, btw.)

The code in question is

perl -e "require 'src/tools/msvc/buildenv.pl'; while(($k,$v) = each %ENV) { print qq[\(at)SET $k=$v\n]; }" > bldenv.bat

The % is apparently interpolated, and I guess that since there is no bat
variable %ENV, it just removes the % and effectively executes

perl -e "require 'src/tools/msvc/buildenv.pl'; while(($k,$v) = each ENV) { print qq[\(at)SET $k=$v\n]; }" > bldenv.bat

which will draw a warning when run with -w in any recent Perl version.

If you replace the % by %%, one % will remain in the final command.

I suggest that someone who is more fluent with the Windows build either
run the whole build with Perl 5.12, or with Perl 5.10 plus warnings, and
clean it up. In the future, this stuff might break.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2011-04-05 18:18:04 Re: [HACKERS] Uppercase SGML entity declarations
Previous Message Peter Eisentraut 2011-04-05 17:45:28 Re: WIP: Allow SQL-language functions to reference parameters by parameter name