diff options
author | John Tytgat <joty@netsurf-browser.org> | 2004-07-08 20:13:35 +0000 |
---|---|---|
committer | John Tytgat <joty@netsurf-browser.org> | 2004-07-08 20:13:35 +0000 |
commit | 9295b0bcb142c1f11dc314d211a4cbedfdaafd14 (patch) | |
tree | dffdc043532ca237fffa4337ee2fa90784605386 | |
parent | 7148840fbe7ed5d4ef375ebd0c737d3fde5a512a (diff) | |
download | netsurf-9295b0bcb142c1f11dc314d211a4cbedfdaafd14.tar.gz netsurf-9295b0bcb142c1f11dc314d211a4cbedfdaafd14.tar.bz2 |
[project @ 2004-07-08 20:13:35 by joty]
Log function name too when compiling with Norcroft.
svn path=/import/netsurf/; revision=1058
-rw-r--r-- | utils/log.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/utils/log.h b/utils/log.h index 62911b454..65417b930 100644 --- a/utils/log.h +++ b/utils/log.h @@ -3,6 +3,7 @@ * Licensed under the GNU General Public License, * http://www.opensource.org/licenses/gpl-license * Copyright 2003 James Bursa <bursa@users.sourceforge.net> + * Copyright 2004 John Tytgat <John.Tytgat@aaug.net> */ #include <stdio.h> @@ -11,17 +12,15 @@ #define _NETSURF_LOG_H_ #ifdef NDEBUG - -#define LOG(x) ((void) 0) - -#else - -#ifdef __GNUC__ -#define LOG(x) (printf(__FILE__ " %s %i: ", __PRETTY_FUNCTION__, __LINE__), printf x, printf("\n")) +# define LOG(x) ((void) 0) #else -#define LOG(x) (printf(__FILE__ " %i: ", __LINE__), printf x, printf("\n")) -#endif - +# ifdef __GNUC__ +# define LOG(x) (printf(__FILE__ " %s %i: ", __PRETTY_FUNCTION__, __LINE__), printf x, fputc('\n', stdout)) +# elif defined(__CC_NORCROFT) +# define LOG(x) (printf(__FILE__ " %s %i: ", __func__, __LINE__), printf x, fputc('\n', stdout)) +# else +# define LOG(x) (printf(__FILE__ " %i: ", __LINE__), printf x, fputc('\n', stdout)) +# endif #endif #endif |