2013-05-31 16:30:13 +02:00
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
/*
|
|
|
|
assert.h
|
|
|
|
|
|
|
|
Copyright 1995 Philip Homburg
|
|
|
|
*/
|
|
|
|
#ifndef INET_ASSERT_H
|
|
|
|
#define INET_ASSERT_H
|
|
|
|
|
|
|
|
#if !NDEBUG
|
|
|
|
|
2005-06-28 17:19:58 +02:00
|
|
|
void bad_assertion(char *file, int line, char *what) _NORETURN;
|
|
|
|
void bad_compare(char *file, int line, int lhs, char *what, int rhs) _NORETURN;
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2013-05-31 16:30:13 +02:00
|
|
|
#define compare(a,t,b) assert((a) t (b))
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
#else /* NDEBUG */
|
|
|
|
|
|
|
|
#define compare(a,t,b) 0
|
|
|
|
|
|
|
|
#endif /* NDEBUG */
|
|
|
|
|
|
|
|
#endif /* INET_ASSERT_H */
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2005-06-28 17:19:58 +02:00
|
|
|
* $PchId: assert.h,v 1.8 2002/03/18 21:50:32 philip Exp $
|
2005-04-21 16:53:53 +02:00
|
|
|
*/
|