Add $FreeBSD$.
Change assert() macro to print failing function name. Change K&R function prototype wrapper to ANSI prototype. This makes us C99 conforming.
This commit is contained in:
parent
b792b54c89
commit
8c825c1afd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85421
@ -36,6 +36,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)assert.h 8.2 (Berkeley) 1/21/94
|
* @(#)assert.h 8.2 (Berkeley) 1/21/94
|
||||||
|
* $FreeBSD$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -52,14 +53,16 @@
|
|||||||
#else
|
#else
|
||||||
#define _assert(e) assert(e)
|
#define _assert(e) assert(e)
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e))
|
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
|
||||||
|
__LINE__, #e))
|
||||||
#else /* PCC */
|
#else /* PCC */
|
||||||
#define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, "e"))
|
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
|
||||||
|
__LINE__, "e"))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
void __assert __P((const char *, int, const char *));
|
void __assert(const char *, const char *, int, const char *);
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
Loading…
Reference in New Issue
Block a user