Source-Changes-HG archive

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

[src/trunk]: src/lib/libm/src add a default: case to __kernel_standard(), fai...



details:   https://anonhg.NetBSD.org/src/rev/9b0a36967926
branches:  trunk
changeset: 982397:9b0a36967926
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Apr 12 09:15:52 2021 +0000

description:
add a default: case to __kernel_standard(), failing with EDOM

diffstat:

 lib/libm/src/k_standard.c |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r 3731d9694db2 -r 9b0a36967926 lib/libm/src/k_standard.c
--- a/lib/libm/src/k_standard.c Mon Apr 12 09:12:28 2021 +0000
+++ b/lib/libm/src/k_standard.c Mon Apr 12 09:15:52 2021 +0000
@@ -12,7 +12,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_standard.c,v 1.22 2016/08/27 10:03:16 christos Exp $");
+__RCSID("$NetBSD: k_standard.c,v 1.23 2021/04/12 09:15:52 mrg Exp $");
 #endif
 
 #include "math.h"
@@ -825,6 +825,13 @@
                  errno = EDOM;
                }
                break;
+           default:
+               if (_LIB_VERSION == _SVID_)
+                 exc.retval = -HUGE;
+               else
+                 exc.retval = -HUGE_VAL;
+               errno = EDOM;
+               break;
        }
        return exc.retval;
 }



Home | Main Index | Thread Index | Old Index