Commit e14d1fda authored by Lubomir Bulej's avatar Lubomir Bulej

Move debug macros out of common.h

Update the users to include debug.h where necessary.
parent 6696337c
......@@ -45,26 +45,11 @@
/**
* Prints a debug message to stdout, unless NDEBUG is defined.
*
* @format format string for printf
* @args arguments associated with the format string
*
*/
#ifdef NDEBUG
# define debug(args...) do {} while (0)
#else
# define debug(args...) fprintf (stdout, args); fflush (stdout)
#endif
#define ldebug(args...) { \
debug ("%s:%d: ", __FUNCTION__, __LINE__); \
debug (args); \
}
//
#define warn(args...) { \
fprintf (stderr, "warning: "); \
fprintf (stderr, args); \
......
#include "common.h"
#include "debug.h"
#include "connection.h"
#include <assert.h>
......
#include "common.h"
#include "debug.h"
#include "list.h"
#include "connection.h"
#include "connpool.h"
......
#ifndef _DEBUG_H_
#define _DEBUG_H_
#include <stdio.h>
/**
* Prints a debug message to stdout, unless NDEBUG is defined.
*
* @format format string for printf
* @args arguments associated with the format string
*/
#ifdef NDEBUG
# define debug(args...) do {} while (0)
#else
# define debug(args...) fprintf (stdout, args); fflush (stdout)
#endif
/**
* Prints a debug message to stdout prefixed with the name of
* the function and the source code line, unless NDEBUG is defined.
*
* @format format string for printf
* @args arguments associated with the format string
*/
#define ldebug(args...) { \
debug ("%s:%d: ", __FUNCTION__, __LINE__); \
debug (args); \
}
#endif /* _DEBUG_H_ */
#include "common.h"
#include "debug.h"
#include "msgchannel.h"
#include "connection.h"
......
#include "common.h"
#include "debug.h"
#include "threads.h"
#include "connpool.h"
#include "connection.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment