develooper Front page | perl.perl5.porters | Postings from March 2003

Re: [PATCH] sig_num, etc.

Thread Previous
Craig A. Berry
March 14, 2003 14:52
Re: [PATCH] sig_num, etc.
Message ID:
At 11:40 PM -0800 3/13/03, Gurusamy Sarathy wrote:
>On Fri, 14 Mar 2003 01:07:56 CST, "Craig A. Berry" wrote:
>>You may be right, but after an hour or two I gave up trying to figure
>>out what the comments in config_h.SH and the docs in Porting/Glossary
>>were trying to tell me and went with what I thought Configure was
> >actually doing. 

>Porting/Glossary is quite clear, IMO:

<actual definitions snipped>

>Note that both sig_num and sig_num_init have the "terminated with a 0".

Right, but despite what Porting/Glossary says, platforms that use
Configure do not terminate either sig_num or sig_name with 0.  They
still don't as of perl@18978 and perhaps never did.  In a way it
makes sense that they wouldn't if these variables are (as I infer)
for use within Perl where it's easy to know which element in an array
is the last.  sig_num_init and sig_name_init, on the other hand, are
apparently for the creation of C macros, which may in turn be used to
declare arrays, and it's nice to have a sanity check at the end of
the array even if you have sig_size to go by.  If sig_size is used
correctly and exclusively for determining how many signals you have,
then the presence or absence of the final 0 will never be noticed in
either C or Perl.

Following that rationale, and in light of the long-standing practice
of Configure-based platforms and a new test that enforced that
practice, I went with the practice rather than with Porting/Glossary.
But I'm happy to be steered in the direction of changing and Configure to do what Porting/Glossary says.  If
that's the consensus, the attached patch implements the change (yikes
-- my first dip into awk).

Craig A. Berry

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser
Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About