Re: ...->sprintf (...)

Tony Graham <[email protected]>
Newsgroups gmane.text.xml.xmlroff.general
Message-ID <[email protected]>
Tim Waugh <[email protected]> writes:
> I just tried compiling xmlroff 0.3.2 and I got this error:
>
> fo-object.c: In function 'fo_object_sprintf':
> fo-object.c:251: error: 'struct _FoObjectClass' has no member named
> '__builtin___sprintf_chk'
> fo-object.c:251: error: syntax error before ')' token
>
> It's because sprintf is a macro (I have -D_FORTIFY_SOURCE=2 in my
> CFLAGS).
>
> Names of C functions that may be implemented as macros cannot be used
> as user functions or variables, and that includes this struct member.
>
> I think it needs to be changed to something other than 'sprintf'.

But 'sprintf' is such an evocative but descriptive name that just
rolls off the tongue so easily!

While 'sprintf' is actually not evocative, or descriptive, or easily
rolling off the tongue, it is well known.  Would gcc complain if it
was '->sprintf_func'?  Are there any other suggestions for a name?

Regards,


Tony.



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.