2
* $Id: snprintf.h,v 1.7 2003/01/23 00:36:48 robertc Exp $
5
#ifndef SQUID_SNPRINTF_H
6
#define SQUID_SNPRINTF_H
8
/* if you have configure you can use this */
9
#if defined(HAVE_CONFIG_H)
13
/* varargs declarations: */
14
/* you might have to hand force this by doing #define HAVE_STDARG_H */
16
#if defined(HAVE_STDARG_H)
18
#define HAVE_STDARGS /* let's hope that works everywhere (mj) */
19
#define VA_LOCAL_DECL va_list ap;
20
#define VA_START(f) va_start(ap, f)
21
#define VA_SHIFT(v,t) ; /* no-op for ANSI */
22
#define VA_END va_end(ap)
24
#if defined(HAVE_VARARGS_H)
27
#define VA_LOCAL_DECL va_list ap;
28
#define VA_START(f) va_start(ap) /* f is ignored! */
29
#define VA_SHIFT(v,t) v = va_arg(ap,t)
30
#define VA_END va_end(ap)
32
#error **NO VARARGS **
36
/* you can have ANSI C definitions */
40
int snprintf(char *str, size_t count, const char *fmt,...);
48
int vsnprintf(char *str, size_t count, const char *fmt, va_list arg);
54
#endif /* SQUID_SNPRINTF_H */