freebsd-dev/contrib/ntp/include/ntp_sprintf.h
2004-07-20 15:01:56 +00:00

14 lines
341 B
C

/*
* 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