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

RE: [perl #22189] patch: perl 5.8.0 compile error on ia64/HP-UX ( broken attribute test)

Robin Barker
May 14, 2003 07:39
RE: [perl #22189] patch: perl 5.8.0 compile error on ia64/HP-UX ( broken attribute test)
Message ID:

I changed 'printf' to '__printf__' in the format enabled by CHECKFORMAT
because the 'printf' was caught up in stdio/sfio MACRO merry-go-round.

I could have changed format but it wasn't a problem, and I didn't know 
it was an option.

I think the remaining 'format's and 'printf's should be changed to
'__format__' and '__printf__', including in Configure.


-----Original Message-----
From: Andy Dougherty []
Sent: 14 May 2003 15:26
Subject: Re: [perl #22189] patch: perl 5.8.0 compile error on ia64/HP-UX
(broken attribute test)

On Tue, 13 May 2003, Petter Reinholdtsen wrote:

> I ran into a compile error when trying to compile perl 5.8.0 on ia64
> HP/UX 11.22.  I got this error message when trying to compile
> miniperlmain.c:
>   Error 172: "perlio.h", line 209 # Undeclared variable '__printf__'.
> The problem was the following code:
>     __attribute__ ((__format__(__printf__, 1, 2)));
> Tracking the problem further, I discovered the test for __attribute__
> in Configure, where it is testing if the following construct is
> compilable:
>   #include <stdio.h>
>   void croak (char* pat,...)

> I belive the test in Configure should test for the same feature that
> is used in the perl code, and rewrote 'format' to '__format__' and
> 'printf' to '__printf__' to match perlio.h.

Unfortunately, both forms (format and __format__) are used in the perl
code.  I don't know why.  Nor do I understand why your compiler would
accept one but not the other.  That's truly strange, and probably worth
investigating.  Does your compiler actually support
__attribute__((format())) but not __attribute__((__format__())), or is
test flawed in some other way such that __attribute__ isn't supported,
we fail to adequately detect that.

> I also discovered that the result from this test isn't printed to
> stdout, making it hard to find out what the result from this test was.

Actually, it does print the result.  You just told Configure to suppress
that information by supplying the -s switch to Configure.  Configure
similarly suppresses other outputs from the "Checking ..." sorts of
If you don't want Configure to suppress information, don't supply the -s

In short, I have no objection to changing format to __format__ and
printf to __printf__, but it'd be nice to know just why it matters so
we can make the test more robust so that this issue wouldn't have
come up in the first place.

    Andy Dougherty

This e-mail and any attachments may contain confidential and/or
privileged material; it is for the intended addressee(s) only.
If you are not a named addressee, you must not use, retain or
disclose such information.

NPL Management Ltd cannot guarantee that the e-mail or any
attachments are free from viruses.

NPL Management Ltd. Registered in England and Wales. No: 2937881
Registered Office: Teddington, Middlesex, United Kingdom TW11 0LW.
------------------------------------------------------------------- Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About