2012-11-07 23:49:14 +08:00
|
|
|
#ifndef DEBUG_H
|
|
|
|
#define DEBUG_H
|
|
|
|
|
|
|
|
# include <stdio.h>
|
2020-09-21 00:00:10 +08:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
2013-06-23 13:12:25 +08:00
|
|
|
# define PSTDERR(fmt, args...) do { dprintf(2,fmt, ## args); } while(0)
|
2021-02-05 09:45:19 +08:00
|
|
|
# define PDEBUG(fmt, args...) PSTDERR("DEBUG:pid[%d]:" fmt, getpid(), ## args)
|
2015-06-14 17:53:33 +08:00
|
|
|
# define DEBUGDECL(args...) args
|
2020-09-21 00:00:10 +08:00
|
|
|
# define DUMP_PROXY_CHAIN(A, B) dump_proxy_chain(A, B)
|
2012-11-07 23:49:14 +08:00
|
|
|
#else
|
|
|
|
# define PDEBUG(fmt, args...) do {} while (0)
|
2015-06-14 17:53:33 +08:00
|
|
|
# define DEBUGDECL(args...)
|
2013-06-23 13:12:25 +08:00
|
|
|
# define DUMP_PROXY_CHAIN(args...) do {} while (0)
|
2012-11-07 23:49:14 +08:00
|
|
|
#endif
|
|
|
|
|
2021-02-05 09:45:19 +08:00
|
|
|
# define PFUNC() do { PDEBUG("%s()\n", __FUNCTION__); } while(0)
|
2012-11-07 23:49:14 +08:00
|
|
|
|
2020-09-21 00:00:10 +08:00
|
|
|
#include "core.h"
|
|
|
|
void dump_proxy_chain(proxy_data *pchain, unsigned int count);
|
|
|
|
|
|
|
|
|
2012-12-26 01:01:11 +08:00
|
|
|
#endif
|
|
|
|
|