1995-02-18 01:27:10 +00:00
|
|
|
#include <assert/assert.h>
|
2002-04-09 20:36:24 +00:00
|
|
|
|
2012-02-25 23:18:39 -05:00
|
|
|
#ifndef _ISOMAC
|
2002-08-03 07:02:10 +00:00
|
|
|
/* This prints an "Assertion failed" message and aborts.
|
|
|
|
|
In installed assert.h this is only conditionally declared,
|
|
|
|
|
so it has to be repeated here. */
|
2012-01-07 23:57:22 -05:00
|
|
|
extern void __assert_fail (const char *__assertion, const char *__file,
|
|
|
|
|
unsigned int __line, const char *__function)
|
2011-05-15 00:34:48 -04:00
|
|
|
__THROW __attribute__ ((__noreturn__));
|
2002-08-03 07:02:10 +00:00
|
|
|
|
2002-08-30 01:31:18 +00:00
|
|
|
/* Likewise, but prints the error text for ERRNUM. */
|
2012-01-07 23:57:22 -05:00
|
|
|
extern void __assert_perror_fail (int __errnum, const char *__file,
|
2002-08-30 01:31:18 +00:00
|
|
|
unsigned int __line,
|
2012-01-07 23:57:22 -05:00
|
|
|
const char *__function)
|
2002-08-30 01:31:18 +00:00
|
|
|
__THROW __attribute__ ((__noreturn__));
|
|
|
|
|
|
2011-05-15 00:34:48 -04:00
|
|
|
/* The real implementation of the two functions above. */
|
|
|
|
|
extern void __assert_fail_base (const char *fmt, const char *assertion,
|
|
|
|
|
const char *file, unsigned int line,
|
|
|
|
|
const char *function)
|
|
|
|
|
__THROW __attribute__ ((__noreturn__));
|
|
|
|
|
|
2014-11-24 15:03:45 +05:30
|
|
|
# if IS_IN (libc) || IS_IN (rtld)
|
2002-08-03 07:02:10 +00:00
|
|
|
hidden_proto (__assert_fail)
|
2002-08-30 01:31:18 +00:00
|
|
|
hidden_proto (__assert_perror_fail)
|
2012-02-25 23:18:39 -05:00
|
|
|
# endif
|
2002-07-25 08:19:59 +00:00
|
|
|
#endif
|