Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc/arch/arm/gen Kernel and standalone code uses...



details:   https://anonhg.NetBSD.org/src/rev/0a3f1393b359
branches:  trunk
changeset: 793192:0a3f1393b359
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Jan 29 22:29:43 2014 +0000

description:
Kernel and standalone code uses panic() for broken code.

diffstat:

 common/lib/libc/arch/arm/gen/__aeabi_idiv0.c |  10 +++++++---
 common/lib/libc/arch/arm/gen/__aeabi_ldiv0.c |  10 +++++++---
 2 files changed, 14 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r 7d7d1da48835 -r 0a3f1393b359 common/lib/libc/arch/arm/gen/__aeabi_idiv0.c
--- a/common/lib/libc/arch/arm/gen/__aeabi_idiv0.c      Wed Jan 29 20:57:49 2014 +0000
+++ b/common/lib/libc/arch/arm/gen/__aeabi_idiv0.c      Wed Jan 29 22:29:43 2014 +0000
@@ -29,9 +29,11 @@
 
 #include <sys/cdefs.h>
 
-__RCSID("$NetBSD: __aeabi_idiv0.c,v 1.2 2013/05/08 05:13:56 matt Exp $");
+__RCSID("$NetBSD: __aeabi_idiv0.c,v 1.3 2014/01/29 22:29:43 joerg Exp $");
 
-#if !defined(_KERNEL) && !defined(_STANDALONE)
+#if defined(_KERNEL) || defined(_STANDALONE)
+#include <sys/systm.h>
+#else
 #include <string.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -44,7 +46,9 @@
 int
 __aeabi_idiv0(int result)
 {
-#if !defined(_KERNEL) || !defined(_STANDALONE)
+#if defined(_KERNEL) || defined(_STANDALONE)
+       panic("divide by 0");
+#else
        siginfo_t info;
        
        memset(&info, 0, sizeof info);
diff -r 7d7d1da48835 -r 0a3f1393b359 common/lib/libc/arch/arm/gen/__aeabi_ldiv0.c
--- a/common/lib/libc/arch/arm/gen/__aeabi_ldiv0.c      Wed Jan 29 20:57:49 2014 +0000
+++ b/common/lib/libc/arch/arm/gen/__aeabi_ldiv0.c      Wed Jan 29 22:29:43 2014 +0000
@@ -29,9 +29,11 @@
 
 #include <sys/cdefs.h>
 
-__RCSID("$NetBSD: __aeabi_ldiv0.c,v 1.2 2013/05/08 05:13:56 matt Exp $");
+__RCSID("$NetBSD: __aeabi_ldiv0.c,v 1.3 2014/01/29 22:29:43 joerg Exp $");
 
-#if !defined(_KERNEL) && !defined(_STANDALONE)
+#if defined(_KERNEL) || defined(_STANDALONE)
+#include <sys/systm.h>
+#else
 #include <string.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -44,7 +46,9 @@
 long long
 __aeabi_ldiv0(long long result)
 {
-#if !defined(_KERNEL) && !defined(_STANDALONE)
+#if defined(_KERNEL) || defined(_STANDALONE)
+       panic("divide by 0");
+#else
        siginfo_t info;
        
        memset(&info, 0, sizeof info);



Home | Main Index | Thread Index | Old Index