From cce65f439697627afbccf5a67035a957bb4d784a Mon Sep 17 00:00:00 2001 From: Ollivier Robert Date: Sun, 17 Aug 2008 17:37:33 +0000 Subject: Flatten the dist and various 4.n.n trees in preparation of future ntp imports. --- include/ntp_sprintf.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 include/ntp_sprintf.h (limited to 'include/ntp_sprintf.h') diff --git a/include/ntp_sprintf.h b/include/ntp_sprintf.h new file mode 100644 index 0000000000000..a456a89259497 --- /dev/null +++ b/include/ntp_sprintf.h @@ -0,0 +1,13 @@ +/* + * 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 -- cgit v1.2.3