diff options
Diffstat (limited to 'utils/log.h')
-rw-r--r-- | utils/log.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/utils/log.h b/utils/log.h new file mode 100644 index 000000000..4ca658419 --- /dev/null +++ b/utils/log.h @@ -0,0 +1,24 @@ +/** + * $Id: log.h,v 1.1 2002/10/08 09:38:29 bursa Exp $ + */ + +#include <stdio.h> + +#ifndef _NETSURF_LOG_H_ +#define _NETSURF_LOG_H_ + +#ifdef NDEBUG + +#define LOG(x) ((void) 0) + +#else + +#ifdef __GNUC__ +#define LOG(x) (printf(__FILE__ " " __PRETTY_FUNCTION__ " %i: ", __LINE__), printf x, printf("\n")) +#else +#define LOG(x) (printf(__FILE__ " %i: ", __LINE__), printf x, printf("\n")) +#endif + +#endif + +#endif |