summaryrefslogtreecommitdiffstats
path: root/libc/misc/assert
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/assert')
-rw-r--r--libc/misc/assert/Makefile.in19
-rw-r--r--libc/misc/assert/__assert.c9
2 files changed, 16 insertions, 12 deletions
diff --git a/libc/misc/assert/Makefile.in b/libc/misc/assert/Makefile.in
index 0e41268b2..20f9c2115 100644
--- a/libc/misc/assert/Makefile.in
+++ b/libc/misc/assert/Makefile.in
@@ -1,25 +1,22 @@
# Makefile for uClibc
#
# Copyright (C) 2000 by Lineo, inc.
-# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC:=__assert.c
+CSRC := __assert.c
-MISC_ASSERT_DIR:=$(top_srcdir)libc/misc/assert
-MISC_ASSERT_OUT:=$(top_builddir)libc/misc/assert
+MISC_ASSERT_DIR := $(top_srcdir)libc/misc/assert
+MISC_ASSERT_OUT := $(top_builddir)libc/misc/assert
-MISC_ASSERT_SRC:=$(MISC_ASSERT_DIR)/__assert.c
-MISC_ASSERT_OBJ:=$(MISC_ASSERT_OUT)/__assert.o
+MISC_ASSERT_SRC := $(MISC_ASSERT_DIR)/__assert.c
+MISC_ASSERT_OBJ := $(MISC_ASSERT_OUT)/__assert.o
-libc-a-y+=$(MISC_ASSERT_OBJ)
-libc-so-y+=$(MISC_ASSERT_OBJ:.o=.os)
+libc-y += $(MISC_ASSERT_OBJ)
-libc-multi-y+=$(MISC_ASSERT_SRC)
-
-objclean-y+=misc_assert_objclean
+objclean-y += misc_assert_objclean
misc_assert_objclean:
$(RM) $(MISC_ASSERT_OUT)/*.{o,os}
diff --git a/libc/misc/assert/__assert.c b/libc/misc/assert/__assert.c
index c55f0b6ae..4282812a5 100644
--- a/libc/misc/assert/__assert.c
+++ b/libc/misc/assert/__assert.c
@@ -33,17 +33,22 @@
#include <unistd.h>
#include <bits/uClibc_uintmaxtostr.h>
+libc_hidden_proto(fprintf)
+libc_hidden_proto(abort)
+libc_hidden_proto(stderr)
+
/* Get the prototype from assert.h as a double-check. */
#undef NDEBUG
#include <assert.h>
#undef assert
+libc_hidden_proto(__assert)
#define ASSERT_SHOW_PROGNAME 1
static int in_assert; /* bss inits to 0. */
-void __assert(const char *assertion, const char * filename,
+void attribute_noreturn __assert(const char *assertion, const char * filename,
int linenumber, register const char * function)
{
if (!in_assert) {
@@ -64,3 +69,5 @@ void __assert(const char *assertion, const char * filename,
}
abort();
}
+
+libc_hidden_def(__assert)