print everything to stderr, and fflush on PDEBUG

This commit is contained in:
rofl0r
2012-07-08 04:12:17 +02:00
parent 1fc7e38ee0
commit 364c785970
2 changed files with 9 additions and 16 deletions

View File

@ -132,7 +132,7 @@ int proxy_getaddrinfo(const char *node, const char *service,
void pc_stringfromipv4(unsigned char *ip_buf_4_bytes, char *outbuf_16_bytes);
#ifdef DEBUG
# define PDEBUG(fmt, args...) fprintf(stderr,"DEBUG:"fmt, ## args)
# define PDEBUG(fmt, args...) do { fprintf(stderr,"DEBUG:"fmt, ## args); fflush(stderr); } while(0)
#else
# define PDEBUG(fmt, args...) do {} while (0)
#endif