~yolanda.robla/ubuntu/saucy/freeradius/dep-8-tests

« back to all changes in this revision

Viewing changes to src/include/rad_assert.h

  • Committer: Bazaar Package Importer
  • Author(s): Josip Rodin
  • Date: 2009-11-23 03:57:37 UTC
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20091123035737-snauioz5r9tf8sdr
Tags: upstream-2.1.7+dfsg
ImportĀ upstreamĀ versionĀ 2.1.7+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
/*
4
4
 * rad_assert.h   Debug assertions, with logging.
5
5
 *
6
 
 * Version:     $Id: rad_assert.h,v 1.5 2007/09/17 14:35:26 aland Exp $
 
6
 * Version:     $Id$
7
7
 *
8
8
 *   This program is free software; you can redistribute it and/or modify
9
9
 *   it under the terms of the GNU General Public License as published by
23
23
 */
24
24
 
25
25
#include <freeradius-devel/ident.h>
26
 
RCSIDH(rad_assert_h, "$Id: rad_assert.h,v 1.5 2007/09/17 14:35:26 aland Exp $")
 
26
RCSIDH(rad_assert_h, "$Id$")
27
27
 
28
28
extern void rad_assert_fail (const char *file, unsigned int line, const char *expr);
29
29
 
30
30
#ifdef NDEBUG
31
31
        #define rad_assert(expr) ((void) (0))
32
 
#else
 
32
 
 
33
#elif !defined(FR_SCAN_BUILD)
33
34
        #define rad_assert(expr) \
34
35
                ((void) ((expr) ? (void) 0 : \
35
36
                        (void) rad_assert_fail (__FILE__, __LINE__, #expr)))
 
37
 
 
38
#else
 
39
#include <assert.h>
 
40
#define rad_assert assert
36
41
#endif
37
42
 
38
43
#endif