File: assert.h

package info (click to toggle)
linux86 0.16.21-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,072 kB
  • sloc: ansic: 66,757; asm: 6,154; makefile: 1,374; sh: 703
file content (23 lines) | stat: -rw-r--r-- 501 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef	__ASSERT_H
#define	__ASSERT_H
#include <features.h>

/* If NDEBUG is defined, do nothing.
   If not, and EXPRESSION is zero, print an error message and abort.  */

#ifdef	NDEBUG

#define	assert(expr)		((void) 0)

#else /* Not NDEBUG.  */

extern void __assert __P((const char *, const char *, int));

#define	assert(expr)							      \
  ((void) ((expr) ||							      \
	   (__assert (__STRING(expr),				      \
			   __FILE__, __LINE__), 0)))

#endif /* NDEBUG.  */

#endif /* __ASSERT_H */