# New Ticket Created by  "Andrew Whitworth" 
# Please include the string:  [perl #51980]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=51980 >


the snprintf macro was defined in Parrot/misc.h and src/spf_render.c.
I moved both definitions into the misc.h file and used conditionals to
determine which one to activate. The current definition goes like
this:

1) if the _MSC_VER macro is defined, use _snprintf
2) if the PARROT_HAS_C99_SNPRINTF macro is not defined, use
Parrot_secret_snprintf instead
3) otherwise, don't define the snprintf macro at all.

In Parrot/has_header.h (which is, I know, automatically generated),
there is a definition on my system for PARROT_HAS_SNPRINTF, but not a
definition for PARROT_HAS_C99_SNPRINTF. I assume, on first glance that
these two macros are one in the same and should be united. I don't
want to change anything if I don't know for certain. I could submit
another patch to fix it, if this is the case.

--Andrew Whitworth

Attachment: snprintfsingledef.patch
Description: Binary data

Reply via email to