On Tue, 05 Dec 2006 10:29:12 +0000, Steve Hay wrote:

I have a question about creating a new Config setting in perl.

Way back in April, Andy Dougherty suggested that Windows builds with the
fork () emulation should ideally define something like
$Config{d_pseudofork}, so that test scripts and other code can say:

my $can_fork = $Config{d_fork} || $Config{d_pseudofork}

rather than having to go through contortions like the following (seen at
the start of ext/IO/t/io_sock.t and various other test scripts):

my $can_fork = $Config{d_fork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config{useithreads} and
$Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/

My question is: what needs doing to make this happen? I can easily
insert new entries (turned off by default) into the win32/ canned config
files (config.bc, config.gc, config.vc and config.vc64), and then have
config_sh.PL change those settings to 'define' in the appropriate cases.
But do I need to have some corresponding setting in config_H.bc,
config_H.gc, config_H.vc and config_H.vc64? How does the new setting get
into the Porting/Glossary? Does anything else need doing, e.g. would all
other systems want to have this setting added (as 'undef') as well?
It gets into Porting/Glossary after generating Configure *and* using that to
Configure a perl and analyzing config.sh. That has been more automated in my
latest changes to my build process, so now Glossary is more reliable and
doesn't miss some variables, something that used to happen a lot in the past,
so I had to hand-add the new items to the Glossary

If the d_pseudofork is only a define, I could add it to an already existing
part of the config system, like where d_fork is defined, and you give me the
sections for Glossary and config_h.SH
Then all systems that use Configure will have it undef. Define it for those
that use it in the win-subsystem or hint file(s), and we're done.


H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.9.x on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.0 & 10.1, AIX 4.3 & 5.2, and Cygwin. http://qa.perl.org
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 7 | next ›
Discussion Overview
groupperl5-porters @
postedDec 5, '06 at 10:30a
activeDec 6, '06 at 5:00a



site design / logo © 2018 Grokbase