Re: small fix for Windows build

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: small fix for Windows build
Дата
Msg-id 1302026260.27487.8.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: small fix for Windows build  (Andrew Dunstan <andrew@dunslane.net>)
Список 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[\@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[\@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.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: WIP: Allow SQL-language functions to reference parameters by parameter name
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [DOCS] Uppercase SGML entity declarations