[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Windows & HAVE_SNPRINTF
From: |
Derek Price |
Subject: |
Re: Windows & HAVE_SNPRINTF |
Date: |
Tue, 20 Sep 2005 15:34:01 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.6 (Windows/20050716) |
Conrad T. Pino wrote:
>Windows defines:
>
>File STDIO.H:
>342 _CRTIMP int __cdecl _snprintf(char *, size_t, const char *, ...);
>352 _CRTIMP int __cdecl _vsnprintf(char *, size_t, const char *, va_list);
>
>I'm not sure using then is worth the bother.
>
>
Neither am I. In general, I opt to use the system function if I don't
already know it has bugs. GNULIB replacement functions tend to err on
the side of portability rather than efficiency.
It looks like vasnprintf.c, at least, already has support for this:
# if HAVE_DECL__SNPRINTF
/* Windows. */
# define SNPRINTF _snprintf
# else
/* Unix. */
# define SNPRINTF snprintf
# endif
Regards,
Derek
--
Derek R. Price
CVS Solutions Architect
Ximbiot <http://ximbiot.com>
v: +1 717.579.6168
f: +1 717.234.3125
<mailto:derek@ximbiot.com>