diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-07-08 17:12:02 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-07-08 17:12:02 +0000 |
commit | bff7f2b3b440c30d0d6eb692576af57ef42edd1b (patch) | |
tree | 0ba45051db1ee7b7808339cfb587f8f76d8c7c5c /libdimension/dimension/error.h | |
parent | 14c9cd86e1b7c6ff27c5000d72721c54a718daac (diff) | |
download | dimension-bff7f2b3b440c30d0d6eb692576af57ef42edd1b.tar.xz |
Comments and style adjustments, and a couple fixes.
Diffstat (limited to 'libdimension/dimension/error.h')
-rw-r--r-- | libdimension/dimension/error.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libdimension/dimension/error.h b/libdimension/dimension/error.h index cd7dd81..c5bf2a1 100644 --- a/libdimension/dimension/error.h +++ b/libdimension/dimension/error.h @@ -34,10 +34,17 @@ typedef enum { DMNSN_SEVERITY_HIGH /* Always die */ } dmnsn_severity; +#ifdef __GNUC__ + #define DMNSN_FUNC __PRETTY_FUNCTION__ +#elif (__STDC_VERSION__ >= 199901L) + #define DMNSN_FUNC __func__ +#else + #define DMNSN_FUNC __FILE__ +#endif + /* Use this macro to report an error */ #define dmnsn_error(severity, str) \ - dmnsn_report_error((dmnsn_severity)(severity), __PRETTY_FUNCTION__, __LINE__,\ - (str)) + dmnsn_report_error((dmnsn_severity)(severity), DMNSN_FUNC, __LINE__, (str)) /* Called by dmnsn_error() - don't call directly */ void dmnsn_report_error(dmnsn_severity severity, |