]> git.ipfire.org Git - thirdparty/squid.git/blame - compat/debug.cc
SourceFormat Enforcement
[thirdparty/squid.git] / compat / debug.cc
CommitLineData
37be9888 1/*
4ac4a490 2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
37be9888
AJ
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
f7f3304a 9#include "squid.h"
2a9c817f 10#include "compat/debug.h"
c19c2c0b
AJ
11
12/* default off */
13int debug_enabled = 0;
2a9c817f 14
a45f2153 15#if !defined(__GNUC__) && !defined(__SUNPRO_CC)
2a9c817f
FC
16/* under gcc a macro define in compat/debug.h is used instead */
17
18void
21737d17 19debug(const char *format,...)
2a9c817f
FC
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
a45f2153 29#endif /* __GNUC__ || __SUNPRO_CC */
f53969cc 30