*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
- * Copyright 2000,2001 The FreeRADIUS server project
+ * Copyright 2000,2001,2006 The FreeRADIUS server project
*/
-extern void rad_assert_fail (const char *file, unsigned int line);
+#include <freeradius-devel/ident.h>
+RCSIDH(rad_assert_h, "$Id$")
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void rad_assert_fail (const char *file, unsigned int line, const char *expr);
#ifdef NDEBUG
#define rad_assert(expr) ((void) (0))
-#else
+
+#elif !defined(FR_SCAN_BUILD)
#define rad_assert(expr) \
- ((void) ((expr) ? 0 : \
- rad_assert_fail (__FILE__, __LINE__)))
+ ((void) ((expr) ? (void) 0 : \
+ (void) rad_assert_fail (__FILE__, __LINE__, #expr)))
+
+#else
+#include <assert.h>
+#define rad_assert assert
+#endif
+
+#ifdef __cplusplus
+}
#endif
#endif