]> git.ipfire.org Git - thirdparty/squid.git/blob - compat/debug.cc
SourceFormat Enforcement
[thirdparty/squid.git] / compat / debug.cc
1 /*
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9 #include "squid.h"
10 #include "compat/debug.h"
11
12 /* default off */
13 int debug_enabled = 0;
14
15 #ifndef __GNUC__
16 /* under gcc a macro define in compat/debug.h is used instead */
17
18 void
19 debug(const char *format,...)
20 {
21 if (!debug_enabled)
22 return;
23 va_list args;
24 va_start (args,format);
25 vfprintf(stderr,format,args);
26 va_end(args);
27 }
28
29 #endif /* __GNUC__ */
30