define __func__ as __FUNCTION__...

...if the former isn't found and the latter is. This also allows
removing the sunos special VALIDATE version
This commit is contained in:
Tomasz Śniatowski 2008-12-22 19:58:50 +01:00
parent a72de56f6f
commit 121606bde9

View file

@ -39,13 +39,14 @@ class display;
#endif
#endif
// Sun Studio compilers call __func__ not __FUNCTION__
#ifdef __SUNPRO_CC
#define VALIDATE(cond, message) if(!(cond)) wml_exception(#cond, __FILE__, __LINE__, __func__, message)
#else
#define VALIDATE(cond, message) if(!(cond)) wml_exception(#cond, __FILE__, __LINE__, __FUNCTION__, message)
#ifndef __func__
#ifdef __FUNCTION__
#define __func__ __FUNCTION__
#endif
#endif
#define VALIDATE(cond, message) if(!(cond)) wml_exception(#cond, __FILE__, __LINE__, __func__, message)
/**
* Helper function, don't call this directly.
*