]>
git.ipfire.org Git - thirdparty/squid.git/blob - compat/debug.h
2 * Copyright (C) 1996-2015 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.
10 #define COMPAT_DEBUG_H
13 * A debug method for use of external helpers and tools.
14 * It shunts the debug messages down stderr for logging by Squid
15 * or display to the user instead of corrupting the stdout data stream.
23 SQUIDCEXTERN
int debug_enabled
;
25 /* the macro overload style is really a gcc-ism */
29 if (debug_enabled) { \
30 fprintf(stderr, "%s(%d): pid=%ld :", __FILE__, __LINE__, (long)getpid() ); \
36 /* non-GCC compilers can't do the above macro define yet. */
37 void debug(const char *format
,...);
40 #endif /* COMPAT_DEBUG_H */