From: Vasu Dasari <vdasari@gmail.com>
[mpls-ldp-portable.git] / common / mpls_assert.h
blob92a4c816a62cdcac5d8e0116680f2ed8f7b7bb93
2 /*
3 * Copyright (C) James R. Leu 2002
4 * jleu@mindspring.com
6 * This software is covered under the LGPL, for more
7 * info check out http://www.gnu.org/copyleft/lgpl.html
8 */
10 #ifndef _MPLS_ASSERT_H_
11 #define _MPLS_ASSERT_H_
13 #include <assert.h>
15 #define NO_ASSERT_PLEASE
16 #ifdef NO_ASSERT_PLEASE
17 extern void mpls_assert(const char* func, const int line, int condition);
18 #define MPLS_ASSERT(x) mpls_assert(__func__, __LINE__, (int)(x))
19 #else
20 #define MPLS_ASSERT(x) assert(x)
21 #endif
23 #endif