Use a more sophisticated check that works better with older versions

of GCC when setting __func__ to NULL.  This also better supports GCC
when using C++.  Move the definition to a better location.

Submitted by:	bde
This commit is contained in:
Mike Barcroft 2001-10-29 07:29:03 +00:00
parent 762e881bab
commit 95d839a1c7

View File

@ -48,11 +48,6 @@
#define __END_DECLS
#endif
/* XXX: should have __STDC_VERSION__ < 199901 */
#if !defined(__GNUC__) || defined(__cplusplus)
#define __func__ NULL
#endif
/*
* The __CONCAT macro is used to concatenate parts of symbol names, e.g.
* with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
@ -133,6 +128,11 @@
#define __unused __attribute__((__unused__))
#endif
/* XXX: should use `#if __STDC_VERSION__ < 199901'. */
#if !(__GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ >= 3)
#define __func__ NULL
#endif
/*
* Compiler-dependent macros to declare that functions take printf-like
* or scanf-like arguments. They are null except for versions of gcc