diff options
author | 2011-08-19 15:44:36 +0000 | |
---|---|---|
committer | 2011-08-19 15:44:36 +0000 | |
commit | e30e335c553edf6c29af9c80dd46e1c09e058c47 (patch) | |
tree | 3934dc94e0cb24223701424f653c4b345d49ea70 /lib/libc | |
parent | Don't mention loadable streams modules are lacking. (diff) | |
download | wireguard-openbsd-e30e335c553edf6c29af9c80dd46e1c09e058c47.tar.xz wireguard-openbsd-e30e335c553edf6c29af9c80dd46e1c09e058c47.zip |
Bring libc and libm in line with the compiler now that we no longer have a
128-bit long double. Diff committed on behalf of martynas@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/arch/hppa64/gen/Makefile.inc | 3 | ||||
-rw-r--r-- | lib/libc/arch/hppa64/gen/fabs.c | 6 | ||||
-rw-r--r-- | lib/libc/arch/hppa64/gen/fpclassifyl.c | 44 | ||||
-rw-r--r-- | lib/libc/arch/hppa64/gen/isfinitel.c | 28 | ||||
-rw-r--r-- | lib/libc/arch/hppa64/gen/isinfl.c | 30 | ||||
-rw-r--r-- | lib/libc/arch/hppa64/gen/isnanl.c | 30 | ||||
-rw-r--r-- | lib/libc/arch/hppa64/gen/isnormall.c | 28 | ||||
-rw-r--r-- | lib/libc/arch/hppa64/gen/signbitl.c | 28 |
8 files changed, 6 insertions, 191 deletions
diff --git a/lib/libc/arch/hppa64/gen/Makefile.inc b/lib/libc/arch/hppa64/gen/Makefile.inc index 5fc7f14de70..3e3e1040b1c 100644 --- a/lib/libc/arch/hppa64/gen/Makefile.inc +++ b/lib/libc/arch/hppa64/gen/Makefile.inc @@ -1,10 +1,9 @@ -# $OpenBSD: Makefile.inc,v 1.9 2011/07/08 22:28:33 martynas Exp $ +# $OpenBSD: Makefile.inc,v 1.10 2011/08/19 15:44:36 kettenis Exp $ SRCS+= setjmp.S SRCS+= fabs.c SRCS+= infinity.c ldexp.c modf.c nan.c setjmp.S SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \ fpsetround.c fpsetsticky.c -SRCS+= fpclassifyl.c isfinitel.c isinfl.c isnanl.c isnormall.c signbitl.c SRCS+= alloca.c diff --git a/lib/libc/arch/hppa64/gen/fabs.c b/lib/libc/arch/hppa64/gen/fabs.c index 2a31ff0b12c..dbf1d8eea2d 100644 --- a/lib/libc/arch/hppa64/gen/fabs.c +++ b/lib/libc/arch/hppa64/gen/fabs.c @@ -1,9 +1,11 @@ -/* $OpenBSD: fabs.c,v 1.3 2011/07/08 22:28:33 martynas Exp $ */ +/* $OpenBSD: fabs.c,v 1.4 2011/08/19 15:44:36 kettenis Exp $ */ /* * Written by Miodrag Vallat. Public domain */ +#include <sys/cdefs.h> + double fabs(double val) { @@ -11,3 +13,5 @@ fabs(double val) __asm__ __volatile__("fabs,dbl %0,%0" : "+f" (val)); return (val); } + +__weak_alias(fabsl, fabs); diff --git a/lib/libc/arch/hppa64/gen/fpclassifyl.c b/lib/libc/arch/hppa64/gen/fpclassifyl.c deleted file mode 100644 index 030e9c8aac4..00000000000 --- a/lib/libc/arch/hppa64/gen/fpclassifyl.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $OpenBSD: fpclassifyl.c,v 1.1 2008/09/07 20:36:07 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__fpclassifyl(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - if (p->ext_exp == 0) { - if (p->ext_frach == 0 && p->ext_frachm == 0 && - p->ext_fraclm == 0 && p->ext_fracl == 0) - return FP_ZERO; - else - return FP_SUBNORMAL; - } - - if (p->ext_exp == EXT_EXP_INFNAN) { - if (p->ext_frach == 0 && p->ext_frachm == 0 && - p->ext_fraclm == 0 && p->ext_fracl == 0) - return FP_INFINITE; - else - return FP_NAN; - } - - return FP_NORMAL; -} diff --git a/lib/libc/arch/hppa64/gen/isfinitel.c b/lib/libc/arch/hppa64/gen/isfinitel.c deleted file mode 100644 index 02a5602ea84..00000000000 --- a/lib/libc/arch/hppa64/gen/isfinitel.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $OpenBSD: isfinitel.c,v 1.2 2008/12/09 19:52:33 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__isfinitel(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - return (p->ext_exp != EXT_EXP_INFNAN); -} diff --git a/lib/libc/arch/hppa64/gen/isinfl.c b/lib/libc/arch/hppa64/gen/isinfl.c deleted file mode 100644 index f83502e8c89..00000000000 --- a/lib/libc/arch/hppa64/gen/isinfl.c +++ /dev/null @@ -1,30 +0,0 @@ -/* $OpenBSD: isinfl.c,v 1.2 2008/12/09 19:52:33 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__isinfl(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - return (p->ext_exp == EXT_EXP_INFNAN && - p->ext_frach == 0 && p->ext_frachm == 0 && - p->ext_fraclm == 0 && p->ext_fracl == 0); -} diff --git a/lib/libc/arch/hppa64/gen/isnanl.c b/lib/libc/arch/hppa64/gen/isnanl.c deleted file mode 100644 index 85139ade7e8..00000000000 --- a/lib/libc/arch/hppa64/gen/isnanl.c +++ /dev/null @@ -1,30 +0,0 @@ -/* $OpenBSD: isnanl.c,v 1.2 2008/12/09 19:52:33 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__isnanl(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - return (p->ext_exp == EXT_EXP_INFNAN && - (p->ext_frach != 0 || p->ext_frachm != 0 || - p->ext_fraclm != 0 || p->ext_fracl != 0)); -} diff --git a/lib/libc/arch/hppa64/gen/isnormall.c b/lib/libc/arch/hppa64/gen/isnormall.c deleted file mode 100644 index 97ce382671b..00000000000 --- a/lib/libc/arch/hppa64/gen/isnormall.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $OpenBSD: isnormall.c,v 1.2 2008/12/09 19:52:33 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__isnormall(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - return (p->ext_exp != 0 && p->ext_exp != EXT_EXP_INFNAN); -} diff --git a/lib/libc/arch/hppa64/gen/signbitl.c b/lib/libc/arch/hppa64/gen/signbitl.c deleted file mode 100644 index 1f9f7ab332d..00000000000 --- a/lib/libc/arch/hppa64/gen/signbitl.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $OpenBSD: signbitl.c,v 1.1 2008/12/09 19:52:33 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__signbitl(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - return p->ext_sign; -} |