freebsd-dev/contrib/ntp/include/ntp_sprintf.h

14 lines
341 B
C
Raw Normal View History

2004-07-20 15:01:56 +00:00
/*
* Handle ancient char* *s*printf*() systems
*/
#ifdef SPRINTF_CHAR
# define SPRINTF(x) strlen(sprintf/**/x)
# define SNPRINTF(x) strlen(snprintf/**/x)
# define VSNPRINTF(x) strlen(vsnprintf/**/x)
#else
# define SPRINTF(x) ((size_t)sprintf x)
# define SNPRINTF(x) ((size_t)snprintf x)
# define VSNPRINTF(x) ((size_t)vsnprintf x)
#endif