]>
git.ipfire.org Git - thirdparty/squid.git/blob - compat/stdvarargs.h
2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 #ifndef _SQUID_STDVARARGS_H
10 #define _SQUID_STDVARARGS_H
13 * va_* variables come from various places on different platforms.
14 * We provide a clean set of wrappers for the various operations
15 * Depending on what is available and needed.
17 #if defined(__cplusplus)
23 #define HAVE_STDARGS /* let's hope that works everywhere (mj) */
24 #define VA_LOCAL_DECL va_list ap;
25 #define VA_START(f) va_start(ap, f)
26 #define VA_SHIFT(v,t) ; /* no-op for ANSI */
27 #define VA_END va_end(ap)
29 #else /* !HAVE_STDARG_H */
33 #define VA_LOCAL_DECL va_list ap;
34 #define VA_START(f) va_start(ap) /* f is ignored! */
35 #define VA_SHIFT(v,t) v = va_arg(ap,t)
36 #define VA_END va_end(ap)
38 #else /* !HAVE_VARARGS_H*/
39 #error XX **NO VARARGS ** XX
40 #endif /* HAVE_VARARGS_H */
41 #endif /* HAVE_STDARG_H */
42 #endif /* HAVE_CSTDARG */
44 /* Make sure syslog goes after stdarg/varargs */
49 #endif /* _SQUID_STDVARARGS_H */