summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/libntp/snprintf.c
diff options
context:
space:
mode:
authorroberto <roberto@FreeBSD.org>2008-08-17 17:37:33 +0000
committerroberto <roberto@FreeBSD.org>2008-08-17 17:37:33 +0000
commit4ded1c1fa0bc21c61f91a2dbe864835986745121 (patch)
tree16d100fbc9dae63888d48b464e471ba0e5065193 /contrib/ntp/libntp/snprintf.c
parent8b5a86d4fda08a9c68231415812edcb26be52f79 (diff)
downloadFreeBSD-src-4ded1c1fa0bc21c61f91a2dbe864835986745121.zip
FreeBSD-src-4ded1c1fa0bc21c61f91a2dbe864835986745121.tar.gz
Flatten the dist and various 4.n.n trees in preparation of future ntp imports.
Diffstat (limited to 'contrib/ntp/libntp/snprintf.c')
-rw-r--r--contrib/ntp/libntp/snprintf.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/contrib/ntp/libntp/snprintf.c b/contrib/ntp/libntp/snprintf.c
deleted file mode 100644
index 7588b84..0000000
--- a/contrib/ntp/libntp/snprintf.c
+++ /dev/null
@@ -1,62 +0,0 @@
-#include <config.h>
-
-#if !HAVE_SNPRINTF
-#include <sys/types.h>
-
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#include <stdio.h>
-
-#include "l_stdlib.h"
-
-#ifdef __STDC__
-int snprintf(char *str, size_t n, const char *fmt, ...)
-#else
-int snprintf(str, n, fmt, va_alist)
- char *str;
- size_t n;
- const char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
- int rval;
-#ifdef VSPRINTF_CHARSTAR
- char *rp;
-#endif
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
-#ifdef VSPRINTF_CHARSTAR
- rp = vsprintf(str, fmt, ap);
- va_end(ap);
- return (strlen(rp));
-#else
- rval = vsprintf(str, fmt, ap);
- va_end(ap);
- return (rval);
-#endif
-}
-
-int
-vsnprintf(
- char *str,
- size_t n,
- const char *fmt,
- va_list ap
- )
-{
-#ifdef VSPRINTF_CHARSTAR
- return (strlen(vsprintf(str, fmt, ap)));
-#else
- return (vsprintf(str, fmt, ap));
-#endif
-}
-#else
-int snprintf_bs;
-#endif
OpenPOWER on IntegriCloud