summaryrefslogtreecommitdiff
path: root/include/assert.h
diff options
context:
space:
mode:
authorMike Barcroft <mike@FreeBSD.org>2001-10-27 19:37:20 +0000
committerMike Barcroft <mike@FreeBSD.org>2001-10-27 19:37:20 +0000
commitc44a27673ca8b85d6b3d2651e07de5c6e7501566 (patch)
tree96632115886f862fc8daf15006dacf822ef3fa97 /include/assert.h
parent4e4a76633b31733e91e91e3de0c46ae130ac6281 (diff)
Notes
Diffstat (limited to 'include/assert.h')
-rw-r--r--include/assert.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/assert.h b/include/assert.h
index 3c3fea2293c1..19800fd34e35 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -39,6 +39,8 @@
* $FreeBSD$
*/
+#include <sys/cdefs.h>
+
/*
* Unlike other ANSI header files, <assert.h> may usefully be included
* multiple times, with and without NDEBUG defined.
@@ -52,17 +54,16 @@
#define _assert(e) ((void)0)
#else
#define _assert(e) assert(e)
+
#ifdef __STDC__
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
- __LINE__, #e))
-#else /* PCC */
+ __LINE__, #e))
+#else /* !__STDC__ */
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
- __LINE__, "e"))
-#endif
-#endif
-
-#include <sys/cdefs.h>
+ __LINE__, "e"))
+#endif /* __STDC__ */
+#endif /* NDEBUG */
__BEGIN_DECLS
-void __assert(const char *, const char *, int, const char *);
+void __assert __P((const char *, const char *, int, const char *));
__END_DECLS