From a3a62ae7a58879c77fe7de79533ad1024d8d4856 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 8 Oct 2009 16:44:10 +0000 Subject: [PATCH] 2009-10-08 Jeff Johnston * configure.host: For RTEMS, define HAVE_ASSERT_FUNC. * libc/stdlib/assert.c (_assert_func): Do not specify __assert_func if HAVE_ASSERT_FUNC flag is set. --- newlib/ChangeLog | 6 ++++++ newlib/configure.host | 2 +- newlib/libc/stdlib/assert.c | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 483f3dcef..cb1723b0e 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2009-10-08 Jeff Johnston + + * configure.host: For RTEMS, define HAVE_ASSERT_FUNC. + * libc/stdlib/assert.c (_assert_func): Do not specify + __assert_func if HAVE_ASSERT_FUNC flag is set. + 2009-10-08 Eric Blake * libc/include/getopt.h (__getopt_r, __getopt_long_r) diff --git a/newlib/configure.host b/newlib/configure.host index 8576b657f..50a541234 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -549,7 +549,7 @@ case "${host}" in *-*-rtems*) default_newlib_io_long_long="yes" default_newlib_io_c99_formats="yes" - newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL" + newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC" # turn off unsupported items in posix directory newlib_cflags="${newlib_cflags} -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN" ;; diff --git a/newlib/libc/stdlib/assert.c b/newlib/libc/stdlib/assert.c index 2da329815..135bf1519 100644 --- a/newlib/libc/stdlib/assert.c +++ b/newlib/libc/stdlib/assert.c @@ -47,6 +47,7 @@ Supporting OS subroutines required (only if enabled): <>, <>, #include #include +#ifndef HAVE_ASSERT_FUNC /* func can be NULL, in which case no function information is given. */ void _DEFUN (__assert_func, (file, line, func, failedexpr), @@ -62,6 +63,7 @@ _DEFUN (__assert_func, (file, line, func, failedexpr), abort(); /* NOTREACHED */ } +#endif /* HAVE_ASSERT_FUNC */ void _DEFUN (__assert, (file, line, failedexpr),