diff options
author | 2009-03-28 16:16:30 +0000 | |
---|---|---|
committer | 2009-03-28 16:16:30 +0000 | |
commit | d5f11a043462468d98c5b29d006fe52ead62baca (patch) | |
tree | c302757a1b4a159aca5fd31b9eb215435f7b524b /lib | |
parent | Print the correct function name in log_debug(). (diff) | |
download | wireguard-openbsd-d5f11a043462468d98c5b29d006fe52ead62baca.tar.xz wireguard-openbsd-d5f11a043462468d98c5b29d006fe52ead62baca.zip |
add C99-conformant nan, nanf, nanl for vax. always return zero,
since its fp does not have distinguished values for qnans. tested
by naddy@; fixes libnova. ok theo
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libm/Makefile | 4 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_nan.c | 29 |
2 files changed, 31 insertions, 2 deletions
diff --git a/lib/libm/Makefile b/lib/libm/Makefile index 375eed02165..5912a8291bf 100644 --- a/lib/libm/Makefile +++ b/lib/libm/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.62 2008/12/12 19:30:17 martynas Exp $ +# $OpenBSD: Makefile,v 1.63 2009/03/28 16:16:30 martynas Exp $ # $NetBSD: Makefile,v 1.28 1995/11/20 22:06:19 jtc Exp $ # # @(#)Makefile 5.1beta 93/09/24 @@ -117,7 +117,7 @@ NOIEEE_SRCS = n_acosh.c n_argred.c n_asincos.c n_asinh.c n_atan.c \ n_erf.c n_exp.c n_exp__E.c n_expm1.c n_fdim.c n_floor.c \ n_fmax.c n_fmaxf.c n_fmin.c n_fminf.c n_fmod.c n_hypot.c \ n_infnan.c n_j0.c n_j1.c n_jn.c n_lgamma.c n_log.c n_log10.c \ - n_log1p.c n_log__L.c n_pow.c n_round.c n_sincos.c n_sinh.c \ + n_log1p.c n_log__L.c n_nan.c n_pow.c n_round.c n_sincos.c n_sinh.c \ n_sqrt.c n_support.c n_tan.c n_tanh.c n_tgamma.c # OpenBSD's C library supplies these functions: diff --git a/lib/libm/noieee_src/n_nan.c b/lib/libm/noieee_src/n_nan.c new file mode 100644 index 00000000000..3b0cb57a4ba --- /dev/null +++ b/lib/libm/noieee_src/n_nan.c @@ -0,0 +1,29 @@ +/* $OpenBSD: n_nan.c,v 1.1 2009/03/28 16:16:30 martynas Exp $ */ + +/* + * Written by Martynas Venckus. Public domain + */ + +#include <math.h> + +/* ARGSUSED */ +double +nan(const char *tagp) +{ + return (0); +} + +/* ARGSUSED */ +float +nanf(const char *tagp) +{ + return (0); +} + +/* ARGSUSED */ +long double +nanl(const char *tagp) +{ + return (0); +} + |