The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
rad_assert.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16  */
17 
18 /**
19  * $Id: 3828370ff3254416342acff825ba54a1c98aaab4 $
20  *
21  * @file lib/server/rad_assert.h
22  * @brief Debug assertions, with logging.
23  *
24  * @copyright 2000,2001,2006 The FreeRADIUS server project
25  */
26 RCSIDH(fr_assert_h, "$Id: 3828370ff3254416342acff825ba54a1c98aaab4 $")
27 
28 #include <stdbool.h>
29 #include <freeradius-devel/util/debug.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #ifdef NDEBUG
36 # define fr_assert(_expr)
37 #elif !defined(STATIC_ANALYZER)
38 # define fr_assert(_expr) ((void) ((_expr) ? (void) 0 : (void) fr_assert_exit(__FILE__, __LINE__, #_expr)))
39 #else
40 # include <assert.h>
41 # define fr_assert assert
42 #endif
43 
44 
45 
46 #ifdef __cplusplus
47 }
48 #endif
#define RCSIDH(h, id)
Definition: build.h:482