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)

From:
Nick Ing-Simmons
Date:
May 19, 2003 06:16
Subject:
RE: [perl #22189] patch: perl 5.8.0 compile error on ia64/HP-UX ( broken attribute test)
Message ID:
20030519131631.2941.3@bactrian.elixent.com
Robin Barker <Robin.Barker@npl.co.uk> writes:
>Nick
>
>Something needs to change 

Apparently!

>-- at the moment
>nostdio.h defines 'printf' as 'CANNOT _printf_', so
>'format(printf,1,2)' becomes 'format(CANNOT _printf_,1,2)'
>which does not parse.  (You only get this with -DCHECK_FORMAT.)

For some meaning of "at the moment". I am reasonably sure 
we fixed the #define of printf in bleadperl (post 5.8.0)
It does not only mess up attributes but also preculdes using printf() 
in XS code in general - in the brave new PerlIO world that is allowed.

In older perls the ordering of the #include-s via perl.h is supposed to 
be cleverly (diabolically?) contrived so that the attributes worked.
I know that when that printf mess went in the equivalent of 
-DCHECK_FORMAT was the default (at least for gcc I habitually used).
I guess that now CHECK_FORMAT is optional (because of all the %_ stuff
makes it noisy) - patches may have broken the clever ordering and 
we only just noticed.

>


>Using '__printf__' seemed the neated way to fix this.

But suppose (as seems to be the case) HP/UX compiler supports
format(printf,...) but does NOT support format(__printf__,...)?
Do we want to stop HP/UXers do -DCHECK_FORMAT?

The easiest way is 
#undef printf

the best way is loose the #define.


-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About