summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormartynas <martynas@openbsd.org>2011-07-08 19:21:41 +0000
committermartynas <martynas@openbsd.org>2011-07-08 19:21:41 +0000
commitf0aa5457975e1c147c73a11d3a6276e89dc13e2d (patch)
tree3067e85de89502c56a519242d343e1ad4c8be9b3 /lib
parentdown to one compat option... (diff)
downloadwireguard-openbsd-f0aa5457975e1c147c73a11d3a6276e89dc13e2d.tar.xz
wireguard-openbsd-f0aa5457975e1c147c73a11d3a6276e89dc13e2d.zip
Move fabs(3), frexp(3), and modf(3) to libm--nothing has been using
them in libc for a very long time. OK guenther@.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/arch/alpha/gen/Makefile.inc4
-rw-r--r--lib/libc/arch/amd64/gen/Makefile.inc4
-rw-r--r--lib/libc/arch/arm/gen/Makefile.inc6
-rw-r--r--lib/libc/arch/arm/gen/fabs.c35
-rw-r--r--lib/libc/arch/hppa/gen/Makefile.inc5
-rw-r--r--lib/libc/arch/hppa64/gen/Makefile.inc5
-rw-r--r--lib/libc/arch/i386/gen/Makefile.inc6
-rw-r--r--lib/libc/arch/m68k/gen/Makefile.inc6
-rw-r--r--lib/libc/arch/m88k/gen/Makefile.inc6
-rw-r--r--lib/libc/arch/mips64/gen/Makefile.inc4
-rw-r--r--lib/libc/arch/powerpc/gen/Makefile.inc3
-rw-r--r--lib/libc/arch/sh/gen/Makefile.inc6
-rw-r--r--lib/libc/arch/sparc/gen/Makefile.inc4
-rw-r--r--lib/libc/arch/sparc64/gen/Makefile.inc4
-rw-r--r--lib/libc/arch/vax/gen/Makefile.inc4
-rw-r--r--lib/libc/gen/Makefile.inc13
-rw-r--r--lib/libc/gen/frexp.c79
-rw-r--r--lib/libc/gen/modf.c104
-rw-r--r--lib/libc/shlib_version4
-rw-r--r--lib/libm/Makefile60
-rw-r--r--lib/libm/arch/alpha/s_fabs.S (renamed from lib/libc/arch/alpha/gen/fabs.S)2
-rw-r--r--lib/libm/arch/amd64/s_fabs.S (renamed from lib/libc/arch/amd64/gen/fabs.S)2
-rw-r--r--lib/libm/arch/amd64/s_modf.S (renamed from lib/libc/arch/amd64/gen/modf.S)2
-rw-r--r--lib/libm/arch/hppa/s_fabs.c (renamed from lib/libc/arch/hppa/gen/fabs.c)2
-rw-r--r--lib/libm/arch/hppa64/s_fabs.c (renamed from lib/libc/arch/hppa64/gen/fabs.c)2
-rw-r--r--lib/libm/arch/i387/s_fabs.S (renamed from lib/libc/arch/i386/gen/fabs.S)2
-rw-r--r--lib/libm/arch/i387/s_modf.S (renamed from lib/libc/arch/i386/gen/modf.S)2
-rw-r--r--lib/libm/arch/m88k/s_fabs.S (renamed from lib/libc/arch/m88k/gen/fabs.S)2
-rw-r--r--lib/libm/arch/mc68881/s_fabs.S (renamed from lib/libc/arch/m68k/gen/fabs.S)2
-rw-r--r--lib/libm/arch/mc68881/s_modf.S (renamed from lib/libc/arch/m68k/gen/modf.S)2
-rw-r--r--lib/libm/arch/mips64/s_fabs.S (renamed from lib/libc/arch/mips64/gen/fabs.S)2
-rw-r--r--lib/libm/arch/mips64/s_modf.S (renamed from lib/libc/arch/mips64/gen/modf.S)2
-rw-r--r--lib/libm/arch/powerpc/s_fabs.c (renamed from lib/libc/arch/powerpc/gen/fabs.c)2
-rw-r--r--lib/libm/arch/sh/s_fabs.c (renamed from lib/libc/arch/sh/gen/fabs.c)2
-rw-r--r--lib/libm/arch/sparc/s_fabs.S (renamed from lib/libc/arch/sparc/gen/fabs.S)2
-rw-r--r--lib/libm/arch/sparc/s_modf.S (renamed from lib/libc/arch/sparc/gen/modf.S)2
-rw-r--r--lib/libm/arch/sparc64/s_fabs.S (renamed from lib/libc/arch/sparc64/gen/fabs.S)2
-rw-r--r--lib/libm/arch/sparc64/s_modf.S (renamed from lib/libc/arch/sparc64/gen/modf.S)2
-rw-r--r--lib/libm/arch/vax/n_fabs.S (renamed from lib/libc/arch/vax/gen/fabs.S)2
-rw-r--r--lib/libm/arch/vax/n_modf.S (renamed from lib/libc/arch/vax/gen/modf.S)2
-rw-r--r--lib/libm/man/frexp.3 (renamed from lib/libc/gen/frexp.3)4
-rw-r--r--lib/libm/man/modf.3 (renamed from lib/libc/gen/modf.3)18
-rw-r--r--lib/libm/noieee_src/n_frexp.c (renamed from lib/libc/arch/vax/gen/frexp.c)2
-rw-r--r--lib/libm/shlib_version4
-rw-r--r--lib/libm/src/n_fabs.c1
-rw-r--r--lib/libm/src/n_modf.c1
46 files changed, 114 insertions, 318 deletions
diff --git a/lib/libc/arch/alpha/gen/Makefile.inc b/lib/libc/arch/alpha/gen/Makefile.inc
index fc116f249be..0ea3b2aca9a 100644
--- a/lib/libc/arch/alpha/gen/Makefile.inc
+++ b/lib/libc/arch/alpha/gen/Makefile.inc
@@ -1,7 +1,7 @@
-# $OpenBSD: Makefile.inc,v 1.10 2009/04/21 09:34:50 martynas Exp $
+# $OpenBSD: Makefile.inc,v 1.11 2011/07/08 19:21:41 martynas Exp $
# $NetBSD: Makefile.inc,v 1.3 1995/04/29 05:09:14 cgd Exp $
-SRCS+= _setjmp.S fabs.S infinity.c ldexp.c modf.c nan.c setjmp.S
+SRCS+= _setjmp.S infinity.c ldexp.c nan.c setjmp.S
SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
fpsetround.c fpsetsticky.c
SRCS+= sigsetjmp.S
diff --git a/lib/libc/arch/amd64/gen/Makefile.inc b/lib/libc/arch/amd64/gen/Makefile.inc
index ab680d1c73f..eae9b4a4649 100644
--- a/lib/libc/arch/amd64/gen/Makefile.inc
+++ b/lib/libc/arch/amd64/gen/Makefile.inc
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile.inc,v 1.8 2009/04/21 09:34:50 martynas Exp $
+# $OpenBSD: Makefile.inc,v 1.9 2011/07/08 19:21:41 martynas Exp $
-SRCS+= _setjmp.S fabs.S infinity.c ldexp.c modf.S nan.c setjmp.S \
+SRCS+= _setjmp.S infinity.c ldexp.c nan.c setjmp.S \
sigsetjmp.S
SRCS+= fpclassifyl.c isfinitel.c isinfl.c isnanl.c isnormall.c signbitl.c
SRCS+= flt_rounds.S fpgetmask.S fpgetround.S fpgetsticky.S fpsetmask.S \
diff --git a/lib/libc/arch/arm/gen/Makefile.inc b/lib/libc/arch/arm/gen/Makefile.inc
index 1c0756a4270..e60db0bb264 100644
--- a/lib/libc/arch/arm/gen/Makefile.inc
+++ b/lib/libc/arch/arm/gen/Makefile.inc
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile.inc,v 1.11 2009/04/21 09:34:50 martynas Exp $
+# $OpenBSD: Makefile.inc,v 1.12 2011/07/08 19:21:41 martynas Exp $
# $NetBSD: Makefile.inc,v 1.6 2003/08/01 17:03:47 lukem Exp $
-SRCS+= byte_swap_2.S byte_swap_4.S divsi3.S fabs.c flt_rounds.c infinity.c
-SRCS+= ldexp.c modf.c nan.c
+SRCS+= byte_swap_2.S byte_swap_4.S divsi3.S flt_rounds.c infinity.c
+SRCS+= ldexp.c nan.c
SRCS+= setjmp.S _setjmp.S sigsetjmp.S
SRCS+= alloca.S
diff --git a/lib/libc/arch/arm/gen/fabs.c b/lib/libc/arch/arm/gen/fabs.c
deleted file mode 100644
index 1c39d2b10f6..00000000000
--- a/lib/libc/arch/arm/gen/fabs.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* $OpenBSD: fabs.c,v 1.5 2008/12/10 01:15:02 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/cdefs.h>
-#include <sys/types.h>
-#include <machine/ieee.h>
-
-/*
- * fabs(d) returns the absolute value of d.
- */
-double
-fabs(double d)
-{
- struct ieee_double *p = (struct ieee_double *)&d;
-
- p->dbl_sign = 0;
-
- return(d);
-}
-
-__weak_alias(fabsl, fabs);
diff --git a/lib/libc/arch/hppa/gen/Makefile.inc b/lib/libc/arch/hppa/gen/Makefile.inc
index bd35fa41df7..99588741c72 100644
--- a/lib/libc/arch/hppa/gen/Makefile.inc
+++ b/lib/libc/arch/hppa/gen/Makefile.inc
@@ -1,8 +1,7 @@
-# $OpenBSD: Makefile.inc,v 1.11 2009/04/21 09:34:50 martynas Exp $
+# $OpenBSD: Makefile.inc,v 1.12 2011/07/08 19:21:41 martynas Exp $
SRCS+= setjmp.S
-SRCS+= fabs.c
-SRCS+= infinity.c ldexp.c modf.c nan.c setjmp.S
+SRCS+= infinity.c ldexp.c nan.c setjmp.S
SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
fpsetround.c fpsetsticky.c
diff --git a/lib/libc/arch/hppa64/gen/Makefile.inc b/lib/libc/arch/hppa64/gen/Makefile.inc
index 18be48436ca..66add238ee0 100644
--- a/lib/libc/arch/hppa64/gen/Makefile.inc
+++ b/lib/libc/arch/hppa64/gen/Makefile.inc
@@ -1,8 +1,7 @@
-# $OpenBSD: Makefile.inc,v 1.7 2009/04/21 09:34:50 martynas Exp $
+# $OpenBSD: Makefile.inc,v 1.8 2011/07/08 19:21:41 martynas Exp $
SRCS+= setjmp.S
-SRCS+= fabs.c
-SRCS+= infinity.c ldexp.c modf.c nan.c setjmp.S
+SRCS+= infinity.c ldexp.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
diff --git a/lib/libc/arch/i386/gen/Makefile.inc b/lib/libc/arch/i386/gen/Makefile.inc
index 3cdeb020d1e..2afe10d6644 100644
--- a/lib/libc/arch/i386/gen/Makefile.inc
+++ b/lib/libc/arch/i386/gen/Makefile.inc
@@ -1,7 +1,7 @@
-# $OpenBSD: Makefile.inc,v 1.10 2009/04/21 09:34:50 martynas Exp $
+# $OpenBSD: Makefile.inc,v 1.11 2011/07/08 19:21:41 martynas Exp $
-SRCS+= _setjmp.S alloca.S fabs.S infinity.c ldexp.c \
- modf.S nan.c setjmp.S sigsetjmp.S
+SRCS+= _setjmp.S alloca.S infinity.c ldexp.c \
+ nan.c setjmp.S sigsetjmp.S
SRCS+= fpclassifyl.c isfinitel.c isinfl.c isnanl.c isnormall.c signbitl.c
SRCS+= flt_rounds.S fpgetmask.S fpgetround.S fpgetsticky.S fpsetmask.S \
fpsetround.S fpsetsticky.S
diff --git a/lib/libc/arch/m68k/gen/Makefile.inc b/lib/libc/arch/m68k/gen/Makefile.inc
index 53ebb5d3df3..18e477d7fb6 100644
--- a/lib/libc/arch/m68k/gen/Makefile.inc
+++ b/lib/libc/arch/m68k/gen/Makefile.inc
@@ -1,7 +1,7 @@
-# $OpenBSD: Makefile.inc,v 1.8 2008/12/09 19:52:33 martynas Exp $
+# $OpenBSD: Makefile.inc,v 1.9 2011/07/08 19:21:41 martynas Exp $
-SRCS+= _setjmp.S fabs.S infinity.c ldexp.S \
- modf.S nan.c setjmp.S sigsetjmp.S
+SRCS+= _setjmp.S infinity.c ldexp.S \
+ nan.c setjmp.S sigsetjmp.S
SRCS+= flt_rounds.S fpgetmask.S fpgetround.S fpgetsticky.S fpsetmask.S \
fpsetround.S fpsetsticky.S
SRCS+= fpclassifyl.c isfinitel.c isinfl.c isnanl.c isnormall.c signbitl.c
diff --git a/lib/libc/arch/m88k/gen/Makefile.inc b/lib/libc/arch/m88k/gen/Makefile.inc
index f744b69149e..0c830c1f82c 100644
--- a/lib/libc/arch/m88k/gen/Makefile.inc
+++ b/lib/libc/arch/m88k/gen/Makefile.inc
@@ -1,12 +1,12 @@
-# $OpenBSD: Makefile.inc,v 1.10 2009/04/21 09:34:50 martynas Exp $
+# $OpenBSD: Makefile.inc,v 1.11 2011/07/08 19:21:41 martynas Exp $
# $NetBSD: Makefile.inc,v 1.3 1995/04/10 21:09:06 jtc Exp $
-#SRCS+= _setjmp.S fabs.S infinity.c ldexp.c modf.c nan.c
+#SRCS+= _setjmp.S infinity.c ldexp.c nan.c
#SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
# fpsetround.c fpsetsticky.c
#SRCS+= fixunsdfsi.S mul.S umul.S saveregs.S setjmp.S sigsetjmp.S
-SRCS+= _setjmp.S fabs.S infinity.c ldexp.c modf.c nan.c
+SRCS+= _setjmp.S infinity.c ldexp.c nan.c
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
diff --git a/lib/libc/arch/mips64/gen/Makefile.inc b/lib/libc/arch/mips64/gen/Makefile.inc
index 296154bc164..bc18a54e966 100644
--- a/lib/libc/arch/mips64/gen/Makefile.inc
+++ b/lib/libc/arch/mips64/gen/Makefile.inc
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile.inc,v 1.9 2010/09/24 13:54:06 miod Exp $
+# $OpenBSD: Makefile.inc,v 1.10 2011/07/08 19:21:41 martynas Exp $
-SRCS+= _setjmp.S fabs.S infinity.c ldexp.S modf.S nan.c
+SRCS+= _setjmp.S infinity.c ldexp.S nan.c
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
diff --git a/lib/libc/arch/powerpc/gen/Makefile.inc b/lib/libc/arch/powerpc/gen/Makefile.inc
index 80766c400a2..a34902b061f 100644
--- a/lib/libc/arch/powerpc/gen/Makefile.inc
+++ b/lib/libc/arch/powerpc/gen/Makefile.inc
@@ -1,5 +1,4 @@
-SRCS+= infinity.c setjmp.S sigsetjmp.S flt_rounds.c ldexp.c modf.c nan.c
-SRCS+= fabs.c
+SRCS+= infinity.c setjmp.S sigsetjmp.S flt_rounds.c ldexp.c nan.c
SRCS+= fpgetmask.c fpsetmask.c
SRCS+= fpgetround.c fpsetround.c
SRCS+= fpgetsticky.c fpsetsticky.c
diff --git a/lib/libc/arch/sh/gen/Makefile.inc b/lib/libc/arch/sh/gen/Makefile.inc
index 8cc98ad7436..5566687b208 100644
--- a/lib/libc/arch/sh/gen/Makefile.inc
+++ b/lib/libc/arch/sh/gen/Makefile.inc
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile.inc,v 1.8 2009/04/21 09:34:50 martynas Exp $
+# $OpenBSD: Makefile.inc,v 1.9 2011/07/08 19:21:42 martynas Exp $
-SRCS+= flt_rounds.c infinity.c ldexp.c modf.c nan.c setjmp.S _setjmp.S
+SRCS+= flt_rounds.c infinity.c ldexp.c nan.c setjmp.S _setjmp.S
SRCS+= sigsetjmp.S
-SRCS+= fabs.c fpgetmask.c fpgetround.c fpgetsticky.c \
+SRCS+= fpgetmask.c fpgetround.c fpgetsticky.c \
fpsetmask.c fpsetround.c fpsetsticky.c
diff --git a/lib/libc/arch/sparc/gen/Makefile.inc b/lib/libc/arch/sparc/gen/Makefile.inc
index 79edaa969ba..f47b5e53980 100644
--- a/lib/libc/arch/sparc/gen/Makefile.inc
+++ b/lib/libc/arch/sparc/gen/Makefile.inc
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile.inc,v 1.10 2009/04/21 09:34:51 martynas Exp $
+# $OpenBSD: Makefile.inc,v 1.11 2011/07/08 19:21:42 martynas Exp $
-SRCS+= _setjmp.S fabs.S infinity.c ldexp.c modf.S nan.c
+SRCS+= _setjmp.S infinity.c ldexp.c nan.c
SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \
fpsetround.c fpsetsticky.c
SRCS+= fixunsdfsi.S mul.S umul.S saveregs.S setjmp.S sigsetjmp.S
diff --git a/lib/libc/arch/sparc64/gen/Makefile.inc b/lib/libc/arch/sparc64/gen/Makefile.inc
index baded89344d..4a38fffef49 100644
--- a/lib/libc/arch/sparc64/gen/Makefile.inc
+++ b/lib/libc/arch/sparc64/gen/Makefile.inc
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile.inc,v 1.9 2009/04/21 09:34:51 martynas Exp $
+# $OpenBSD: Makefile.inc,v 1.10 2011/07/08 19:21:42 martynas Exp $
-SRCS+= _setjmp.S fabs.S infinity.c ldexp.c modf.S nan.c
+SRCS+= _setjmp.S infinity.c ldexp.c nan.c
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
diff --git a/lib/libc/arch/vax/gen/Makefile.inc b/lib/libc/arch/vax/gen/Makefile.inc
index 2c3618cda7b..7741bc2d65f 100644
--- a/lib/libc/arch/vax/gen/Makefile.inc
+++ b/lib/libc/arch/vax/gen/Makefile.inc
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile.inc,v 1.7 2009/04/21 09:34:51 martynas Exp $
+# $OpenBSD: Makefile.inc,v 1.8 2011/07/08 19:21:42 martynas Exp $
-SRCS+= _setjmp.S fabs.S infinity.c ldexp.S modf.S \
+SRCS+= _setjmp.S infinity.c ldexp.S \
setjmp.S udiv.S urem.S sigsetjmp.S
SRCS+= alloca.S
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index 7f532f5fdae..03165e1a5b6 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.50 2010/02/03 20:49:00 miod Exp $
+# $OpenBSD: Makefile.inc,v 1.51 2011/07/08 19:21:42 martynas Exp $
# gen sources
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/gen ${LIBCSRCDIR}/gen
@@ -6,7 +6,7 @@
SRCS+= alarm.c assert.c auth_subr.c authenticate.c \
basename.c clock.c closedir.c confstr.c ctermid.c ctype_.c \
daemon.c devname.c dirname.c disklabel.c elf_hash.c err.c \
- errx.c errlist.c errno.c exec.c fnmatch.c fpclassify.c frexp.c \
+ errx.c errlist.c errno.c exec.c fnmatch.c fpclassify.c \
fstab.c ftok.c fts.c ftw.c getbsize.c getcap.c getcwd.c \
getdomainname.c getgrent.c getgrouplist.c gethostname.c \
getloadavg.c getlogin.c getmntinfo.c getnetgrent.c getpagesize.c \
@@ -30,8 +30,7 @@ SRCS+= _sys_errlist.c _sys_nerr.c _sys_siglist.c
# machine-dependent gen sources
# m-d Makefile.inc must include sources for:
-# _setjmp() fabs() frexp() infinity ldexp() modf() nan
-# setjmp() sigsetjmp()
+# _setjmp() infinity ldexp() nan setjmp() sigsetjmp()
.include "${LIBCSRCDIR}/arch/${MACHINE_CPU}/gen/Makefile.inc"
@@ -49,7 +48,7 @@ errlst.o errlst.po:
MAN+= alarm.3 auth_subr.3 authenticate.3 basename.3 clock.3 confstr.3 \
ctermid.3 ctype.3 daemon.3 devname.3 directory.3 dirname.3 err.3 \
- exec.3 fnmatch.3 fpclassify.3 fpgetmask.3 frexp.3 ftok.3 fts.3 ftw.3 \
+ exec.3 fnmatch.3 fpclassify.3 fpgetmask.3 ftok.3 fts.3 ftw.3 \
getbsize.3 getcap.3 getcwd.3 getdomainname.3 getdiskbyname.3 \
getfsent.3 getgrent.3 getgrouplist.3 gethostname.3 getloadavg.3 \
getmntinfo.3 getnetgrent.3 getpagesize.3 getpass.3 getpwent.3 \
@@ -57,7 +56,7 @@ MAN+= alarm.3 auth_subr.3 authenticate.3 basename.3 clock.3 confstr.3 \
getttyent.3 getusershell.3 glob.3 initgroups.3 isalnum.3 isalpha.3 \
isascii.3 isblank.3 iscntrl.3 isdigit.3 isfdtype.3 isgraph.3 \
isgreater.3 islower.3 isprint.3 ispunct.3 isspace.3 isupper.3 \
- isxdigit.3 ldexp.3 lockf.3 login_cap.3 modf.3 nice.3 nlist.3 pause.3 \
+ isxdigit.3 ldexp.3 lockf.3 login_cap.3 nice.3 nlist.3 pause.3 \
popen.3 psignal.3 pw_dup.3 pwcache.3 raise.3 readpassphrase.3 \
scandir.3 setjmp.3 setmode.3 setproctitle.3 siginterrupt.3 signal.3 \
sigsetops.3 sleep.3 statvfs.3 sysconf.3 sysctl.3 strtofflags.3 \
@@ -92,7 +91,6 @@ MLINKS+=fpclassify.3 finite.3 fpclassify.3 finitef.3 fpclassify.3 isfinite.3 \
MLINKS+=fpgetmask.3 fpgetround.3 fpgetmask.3 fpgetsticky.3 \
fpgetmask.3 fpsetmask.3 fpgetmask.3 fpsetround.3 \
fpgetmask.3 fpsetsticky.3
-MLINKS+=frexp.3 frexpf.3 frexp.3 frexpl.3
MLINKS+=fts.3 fts_open.3 fts.3 fts_read.3 fts.3 fts_children.3 \
fts.3 fts_set.3 fts.3 fts_close.3
MLINKS+=ftw.3 nftw.3
@@ -124,7 +122,6 @@ MLINKS+=login_cap.3 login_getclass.3 login_cap.3 login_getstyle.3 login_cap.3 \
login_getcapsize.3 login_cap.3 login_getcapstr.3 login_cap.3 \
login_getcaptime.3 login_cap.3 login_close.3 login_cap.3 \
secure_path.3 login_cap.3 setclasscontext.3 login_cap.3 setusercontext.3
-MLINKS+=modf.3 modff.3
MLINKS+=popen.3 pclose.3
MLINKS+=psignal.3 sys_siglist.3 psignal.3 sys_signame.3
MLINKS+=pwcache.3 user_from_uid.3 pwcache.3 group_from_gid.3
diff --git a/lib/libc/gen/frexp.c b/lib/libc/gen/frexp.c
deleted file mode 100644
index 29d416f6701..00000000000
--- a/lib/libc/gen/frexp.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* $OpenBSD: frexp.c,v 1.5 2011/05/30 17:28:15 martynas Exp $ */
-
-/*-
- * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: frexp.c,v 1.1 2004/07/18 21:23:39 das Exp $
- */
-
-/* LINTLIBRARY */
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-#include <machine/ieee.h>
-#include <float.h>
-#include <math.h>
-
-double
-frexp(double v, int *ex)
-{
- union {
- double v;
- struct ieee_double s;
- } u;
-
- u.v = v;
- switch (u.s.dbl_exp) {
- case 0: /* 0 or subnormal */
- if ((u.s.dbl_fracl | u.s.dbl_frach) == 0) {
- *ex = 0;
- } else {
- /*
- * The power of 2 is arbitrary, any value from 54 to
- * 1024 will do.
- */
- u.v *= 0x1.0p514;
- *ex = u.s.dbl_exp - (DBL_EXP_BIAS - 1 + 514);
- u.s.dbl_exp = DBL_EXP_BIAS - 1;
- }
- break;
- case DBL_EXP_INFNAN: /* Inf or NaN; value of *ex is unspecified */
- break;
- default: /* normal */
- *ex = u.s.dbl_exp - (DBL_EXP_BIAS - 1);
- u.s.dbl_exp = DBL_EXP_BIAS - 1;
- break;
- }
- return (u.v);
-}
-
-#if LDBL_MANT_DIG == 53
-#ifdef lint
-/* PROTOLIB1 */
-long double frexpl(long double, int *);
-#else /* lint */
-__weak_alias(frexpl, frexp);
-#endif /* lint */
-#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libc/gen/modf.c b/lib/libc/gen/modf.c
deleted file mode 100644
index 022cf94d34c..00000000000
--- a/lib/libc/gen/modf.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* $OpenBSD: modf.c,v 1.1 2009/04/19 16:42:06 martynas Exp $ */
-/* $NetBSD: modf.c,v 1.1 1995/02/10 17:50:25 cgd Exp $ */
-
-/*
- * Copyright (c) 1994, 1995 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Author: Chris G. Demetriou
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-#include <sys/types.h>
-#include <machine/ieee.h>
-#include <errno.h>
-#include <math.h>
-
-/*
- * double modf(double val, double *iptr)
- * returns: f and i such that |f| < 1.0, (f + i) = val, and
- * sign(f) == sign(i) == sign(val).
- *
- * Beware signedness when doing subtraction, and also operand size!
- */
-double
-modf(double val, double *iptr)
-{
- union doub {
- double v;
- struct ieee_double s;
- } u, v;
- u_int64_t frac;
-
- /*
- * If input is Inf or NaN, return it and leave i alone.
- */
- u.v = val;
- if (u.s.dbl_exp == DBL_EXP_INFNAN)
- return (u.v);
-
- /*
- * If input can't have a fractional part, return
- * (appropriately signed) zero, and make i be the input.
- */
- if ((int)u.s.dbl_exp - DBL_EXP_BIAS > DBL_FRACBITS - 1) {
- *iptr = u.v;
- v.v = 0.0;
- v.s.dbl_sign = u.s.dbl_sign;
- return (v.v);
- }
-
- /*
- * If |input| < 1.0, return it, and set i to the appropriately
- * signed zero.
- */
- if (u.s.dbl_exp < DBL_EXP_BIAS) {
- v.v = 0.0;
- v.s.dbl_sign = u.s.dbl_sign;
- *iptr = v.v;
- return (u.v);
- }
-
- /*
- * There can be a fractional part of the input.
- * If you look at the math involved for a few seconds, it's
- * plain to see that the integral part is the input, with the
- * low (DBL_FRACBITS - (exponent - DBL_EXP_BIAS)) bits zeroed,
- * the fractional part is the part with the rest of the
- * bits zeroed. Just zeroing the high bits to get the
- * fractional part would yield a fraction in need of
- * normalization. Therefore, we take the easy way out, and
- * just use subtraction to get the fractional part.
- */
- v.v = u.v;
- /* Zero the low bits of the fraction, the sleazy way. */
- frac = ((u_int64_t)v.s.dbl_frach << 32) + v.s.dbl_fracl;
- frac >>= DBL_FRACBITS - (u.s.dbl_exp - DBL_EXP_BIAS);
- frac <<= DBL_FRACBITS - (u.s.dbl_exp - DBL_EXP_BIAS);
- v.s.dbl_fracl = frac & 0xffffffff;
- v.s.dbl_frach = frac >> 32;
- *iptr = v.v;
-
- u.v -= v.v;
- u.s.dbl_sign = v.s.dbl_sign;
- return (u.v);
-}
diff --git a/lib/libc/shlib_version b/lib/libc/shlib_version
index f070ec09cdf..98a31a2a31f 100644
--- a/lib/libc/shlib_version
+++ b/lib/libc/shlib_version
@@ -1,4 +1,4 @@
-major=58
-minor=4
+major=59
+minor=0
# note: If changes were made to include/thread_private.h or if system
# calls were added/changed then libpthread must also be updated.
diff --git a/lib/libm/Makefile b/lib/libm/Makefile
index 08b143d08f8..30232fe4aec 100644
--- a/lib/libm/Makefile
+++ b/lib/libm/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.86 2011/07/07 01:20:24 martynas Exp $
+# $OpenBSD: Makefile,v 1.87 2011/07/08 19:21:42 martynas Exp $
# $NetBSD: Makefile,v 1.28 1995/11/20 22:06:19 jtc Exp $
#
# @(#)Makefile 5.1beta 93/09/24
@@ -18,7 +18,7 @@ CFLAGS+= -O0
.if (${MACHINE_ARCH} == "alpha")
.PATH: ${.CURDIR}/arch/alpha
-ARCH_SRCS = s_copysign.S s_copysignf.S
+ARCH_SRCS = s_copysign.S s_copysignf.S s_fabs.S
.elif (${MACHINE_ARCH} == "i386")
.PATH: ${.CURDIR}/arch/i387
ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_fmod.S e_log.S e_log10.S \
@@ -26,10 +26,10 @@ ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_fmod.S e_log.S e_log10.S \
e_sqrtl.S \
invtrig.c \
s_atan.S s_atanf.S s_ceil.S s_ceilf.S s_copysign.S s_copysignf.S \
- s_cos.S s_cosf.S s_floor.S s_floorf.S \
+ s_cos.S s_cosf.S s_fabs.S s_floor.S s_floorf.S \
s_ilogb.S s_ilogbf.S s_log1p.S s_log1pf.S s_logb.S s_logbf.S \
- s_llrint.S s_llrintf.S s_lrint.S s_lrintf.S s_rint.S s_rintf.S\
- s_scalbn.S s_scalbnf.S s_significand.S s_significandf.S \
+ s_llrint.S s_llrintf.S s_lrint.S s_lrintf.S s_modf.S s_rint.S \
+ s_rintf.S s_scalbn.S s_scalbnf.S s_significand.S s_significandf.S \
s_sin.S s_sinf.S s_tan.S s_tanf.S
.elif (${MACHINE_ARCH} == "amd64")
.PATH: ${.CURDIR}/arch/amd64
@@ -39,9 +39,9 @@ ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_fmod.S e_log.S e_log10.S \
e_sqrtl.S \
invtrig.c \
s_atan.S s_atanf.S s_ceil.S s_ceilf.S s_copysign.S s_copysignf.S \
- s_cos.S s_cosf.S s_floor.S s_floorf.S \
+ s_cos.S s_cosf.S s_fabs.S s_floor.S s_floorf.S \
s_ilogb.S s_ilogbf.S s_log1p.S s_log1pf.S s_logb.S s_logbf.S \
- s_llrint.S s_llrintf.S s_lrint.S s_lrintf.S \
+ s_llrint.S s_llrintf.S s_lrint.S s_lrintf.S s_modf.S \
s_rint.S s_rintf.S s_scalbn.S s_scalbnf.S s_significand.S \
s_significandf.S s_sin.S s_sinf.S s_tan.S s_tanf.S
.elif (${MACHINE_ARCH} == "m68k")
@@ -52,38 +52,46 @@ ARCH_SRCS = e_acos.S e_acosf.S e_acosl.S e_asin.S e_asinf.S e_asinl.S \
e_scalb.S e_scalbf.S e_sinh.S e_sinhf.S e_sqrt.S e_sqrtf.S \
e_sqrtl.S s_atan.S s_atanf.S s_atanl.S s_ceil.S s_ceilf.S \
s_copysign.S s_copysignf.S s_copysignl.S s_cos.S s_cosf.S s_cosl.S \
- s_expm1.S s_expm1f.S s_floor.S s_floorf.S s_log1p.S s_log1pf.S \
- s_logb.S s_logbf.S s_logbl.S s_rint.S s_rintf.S s_rintl.S \
- s_scalbn.S s_scalbnf.S s_scalbnl.S s_sin.S s_sinf.S s_sinl.S \
- s_tan.S s_tanf.S s_tanl.S s_tanh.S s_tanhf.S
+ s_expm1.S s_expm1f.S s_fabs.S s_floor.S s_floorf.S s_log1p.S \
+ s_log1pf.S s_logb.S s_logbf.S s_logbl.S s_modf.S s_rint.S \
+ s_rintf.S s_rintl.S s_scalbn.S s_scalbnf.S s_scalbnl.S s_sin.S \
+ s_sinf.S s_sinl.S s_tan.S s_tanf.S s_tanl.S s_tanh.S s_tanhf.S
.elif (${MACHINE_ARCH} == "hppa")
.PATH: ${.CURDIR}/arch/hppa
ARCH_SRCS = e_sqrt.c e_sqrtf.c e_remainder.c e_remainderf.c \
- s_ceil.c s_ceilf.c s_floor.c s_floorf.c s_rint.c s_rintf.c \
- s_round.c s_roundf.c s_trunc.c s_truncf.c
+ s_ceil.c s_ceilf.c s_fabs.c s_floor.c s_floorf.c s_rint.c \
+ s_rintf.c s_round.c s_roundf.c s_trunc.c s_truncf.c
.elif (${MACHINE_ARCH} == "sh")
.PATH: ${.CURDIR}/arch/sh
-ARCH_SRCS = e_sqrt.c e_sqrtf.c s_fabsf.c
+ARCH_SRCS = e_sqrt.c e_sqrtf.c s_fabs.c s_fabsf.c
.elif (${MACHINE_ARCH} == "arm")
.PATH: ${.CURDIR}/arch/arm
.elif (${MACHINE_ARCH} == "hppa64")
.PATH: ${.CURDIR}/arch/hppa64
+ARCH_SRCS = s_fabs.c
.elif (${MACHINE_ARCH} == "m88k")
.PATH: ${.CURDIR}/arch/m88k
+ARCH_SRCS = s_fabs.S
.elif (${MACHINE_ARCH} == "mips64")
.PATH: ${.CURDIR}/arch/mips64
+ARCH_SRCS = s_fabs.S s_modf.S
.elif (${MACHINE_ARCH} == "mips64el")
.PATH: ${.CURDIR}/arch/mips64
+ARCH_SRCS = s_fabs.S s_modf.S
.elif (${MACHINE_ARCH} == "powerpc")
.PATH: ${.CURDIR}/arch/powerpc
+ARCH_SRCS = s_fabs.c
.elif (${MACHINE_ARCH} == "sparc")
.PATH: ${.CURDIR}/arch/sparc
+ARCH_SRCS = s_fabs.S s_modf.S
.elif (${MACHINE_ARCH} == "sparc64")
.PATH: ${.CURDIR}/arch/sparc64
+ARCH_SRCS = s_fabs.S s_modf.S
.elif (${MACHINE_ARCH} == "vax")
.PATH: ${.CURDIR}/arch/vax
-NOIEEE_ARCH = n_argred.S n_infnan.S n_sqrt.S
-ARCH_SRCS = n_atan2.S n_cbrt.S n_hypot.S n_sincos.S n_support.S n_tan.S
+NOIEEE_ARCH = n_argred.S n_fabs.S n_infnan.S n_modf.S n_sqrt.S
+ARCH_SRCS = n_atan2.S n_cbrt.S n_fabs.S n_hypot.S n_modf.S n_sincos.S \
+ n_support.S n_tan.S
.endif
.PATH: ${.CURDIR}/man
@@ -115,11 +123,12 @@ COMMON_SRCS = b_exp__D.c b_log__D.c b_tgamma.c \
s_cproj.c s_cprojf.c s_creal.c s_crealf.c s_csin.c s_csinf.c s_csinh.c \
s_csinhf.c s_csqrt.c s_csqrtf.c s_ctan.c s_ctanf.c s_ctanh.c \
s_ctanhf.c s_erf.c s_erff.c s_exp2.c s_exp2f.c s_expm1.c s_expm1f.c \
- s_fabsf.c s_fdim.c s_fma.c s_fmaf.c s_fmax.c s_fmaxf.c s_fmin.c \
- s_fminf.c s_floor.c s_floorf.c s_frexpf.c s_ilogb.c s_ilogbf.c \
+ s_fabs.c s_fabsf.c s_fdim.c s_fma.c s_fmaf.c s_fmax.c s_fmaxf.c \
+ s_fmin.c s_fminf.c s_floor.c s_floorf.c s_frexp.c s_frexpf.c s_ilogb.c \
+ s_ilogbf.c \
s_log1p.c \
s_log1pf.c s_logb.c s_logbf.c s_llrint.c s_llrintf.c s_lrint.c \
- s_lrintf.c s_modff.c s_nan.c s_nearbyint.c s_nextafter.c \
+ s_lrintf.c s_modf.c s_modff.c s_nan.c s_nearbyint.c s_nextafter.c \
s_nextafterf.c s_nexttowardf.c s_remquo.c s_remquof.c s_rint.c \
s_rintf.c s_round.c s_roundf.c \
s_scalbln.c s_scalbn.c s_scalbnf.c s_signgam.c s_significand.c \
@@ -148,15 +157,12 @@ NOIEEE_SRCS = n_acosh.c n_argred.c n_asincos.c n_asinh.c n_atan.c \
n_conjf.c n_cosh.c n_cpow.c n_cproj.c n_cprojf.c n_creal.c \
n_crealf.c n_csin.c n_csinh.c n_csqrt.c n_ctan.c n_ctanh.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_fmax.c n_fmaxf.c n_fmin.c n_fminf.c n_fmod.c n_frexp.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_nan.c n_pow.c n_round.c n_scalbln.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:
-#COMMON_SRCS+= s_fabs.c s_frexp.c s_modf.c
-
.if (${MACHINE_ARCH} == "vax")
SRCS= ${NOIEEE_SRCS} ${NOIEEE_ARCH}
MAN+= infnan.3
@@ -192,8 +198,8 @@ SRCS+= ${LONG_SRCS}
MAN+= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 ceil.3 \
cimag.3 conj.3 copysign.3 cos.3 cosh.3 cproj.3 erf.3 exp.3 \
fabs.3 fdim.3 feclearexcept.3 feenableexcept.3 fegetenv.3 \
- fegetround.3 floor.3 fmax.3 fmod.3 hypot.3 ilogb.3 j0.3 \
- lgamma.3 logb.3 lrint.3 lround.3 nan.3 nextafter.3 \
+ fegetround.3 floor.3 fmax.3 fmod.3 frexp.3 hypot.3 ilogb.3 j0.3 \
+ lgamma.3 logb.3 lrint.3 lround.3 modf.3 nan.3 nextafter.3 \
remainder.3 rint.3 round.3 scalbn.3 sin.3 sinh.3 sqrt.3 \
tan.3 tanh.3 trunc.3
@@ -259,6 +265,7 @@ MLINKS+=floor.3 floorf.3
MLINKS+=fmax.3 fmaxf.3
MLINKS+=fmax.3 fminf.3
MLINKS+=fmod.3 fmodf.3
+MLINKS+=frexp.3 frexpf.3
MLINKS+=hypot.3 cabsf.3
MLINKS+=hypot.3 hypotf.3
MLINKS+=ilogb.3 ilogbf.3
@@ -278,6 +285,7 @@ MLINKS+=lrint.3 llrintf.3
MLINKS+=lrint.3 lrintf.3
MLINKS+=lround.3 llroundf.3
MLINKS+=lround.3 lroundf.3
+MLINKS+=modf.3 modff.3
MLINKS+=nan.3 nanf.3
MLINKS+=nearbyint.3 nearbyintf.3
MLINKS+=nextafter.3 nextafterf.3
@@ -324,6 +332,7 @@ MLINKS+=floor.3 floorl.3
MLINKS+=fmax.3 fmaxl.3
MLINKS+=fmax.3 fminl.3
MLINKS+=fmod.3 fmodl.3
+MLINKS+=frexp.3 frexpl.3
MLINKS+=hypot.3 hypotl.3
MLINKS+=ilogb.3 ilogbl.3
MLINKS+=lgamma.3 lgammal.3
@@ -334,6 +343,7 @@ MLINKS+=lrint.3 llrintl.3
MLINKS+=lrint.3 lrintl.3
MLINKS+=lround.3 llroundl.3
MLINKS+=lround.3 lroundl.3
+MLINKS+=modf.3 modfl.3
MLINKS+=nan.3 nanl.3
MLINKS+=nearbyint.3 nearbyintl.3
MLINKS+=nextafter.3 nextafterl.3
diff --git a/lib/libc/arch/alpha/gen/fabs.S b/lib/libm/arch/alpha/s_fabs.S
index 6bcb3a2e30a..c97714c08c2 100644
--- a/lib/libc/arch/alpha/gen/fabs.S
+++ b/lib/libm/arch/alpha/s_fabs.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: fabs.S,v 1.5 2008/12/09 20:21:06 martynas Exp $ */
+/* $OpenBSD: s_fabs.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/* $NetBSD: fabs.S,v 1.2 1996/10/17 03:08:05 cgd Exp $ */
/*
diff --git a/lib/libc/arch/amd64/gen/fabs.S b/lib/libm/arch/amd64/s_fabs.S
index c871d487365..67852816dc1 100644
--- a/lib/libc/arch/amd64/gen/fabs.S
+++ b/lib/libm/arch/amd64/s_fabs.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: fabs.S,v 1.4 2008/12/09 20:54:02 martynas Exp $ */
+/* $OpenBSD: s_fabs.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/* $NetBSD: fabs.S,v 1.1 2001/06/19 00:25:02 fvdl Exp $ */
#include <machine/asm.h>
diff --git a/lib/libc/arch/amd64/gen/modf.S b/lib/libm/arch/amd64/s_modf.S
index 44ef74ab668..c028b5bfe25 100644
--- a/lib/libc/arch/amd64/gen/modf.S
+++ b/lib/libm/arch/amd64/s_modf.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: modf.S,v 1.2 2004/02/08 17:29:39 deraadt Exp $ */
+/* $OpenBSD: s_modf.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/* $NetBSD: modf.S,v 1.1 2001/06/19 00:25:03 fvdl Exp $ */
/*-
diff --git a/lib/libc/arch/hppa/gen/fabs.c b/lib/libm/arch/hppa/s_fabs.c
index 139dc7e0125..e93635ab07b 100644
--- a/lib/libc/arch/hppa/gen/fabs.c
+++ b/lib/libm/arch/hppa/s_fabs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fabs.c,v 1.5 2008/12/10 00:59:07 deraadt Exp $ */
+/* $OpenBSD: s_fabs.c,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*
* Written by Miodrag Vallat. Public domain
diff --git a/lib/libc/arch/hppa64/gen/fabs.c b/lib/libm/arch/hppa64/s_fabs.c
index 12233d1e44e..9ed0ded94ca 100644
--- a/lib/libc/arch/hppa64/gen/fabs.c
+++ b/lib/libm/arch/hppa64/s_fabs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fabs.c,v 1.1 2005/04/01 10:54:27 mickey Exp $ */
+/* $OpenBSD: s_fabs.c,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*
* Written by Miodrag Vallat. Public domain
diff --git a/lib/libc/arch/i386/gen/fabs.S b/lib/libm/arch/i387/s_fabs.S
index 28fd9f56b30..2922728f426 100644
--- a/lib/libc/arch/i386/gen/fabs.S
+++ b/lib/libm/arch/i387/s_fabs.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: fabs.S,v 1.7 2008/12/09 20:54:02 martynas Exp $ */
+/* $OpenBSD: s_fabs.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
diff --git a/lib/libc/arch/i386/gen/modf.S b/lib/libm/arch/i387/s_modf.S
index 2d4c5151477..205c157234e 100644
--- a/lib/libc/arch/i386/gen/modf.S
+++ b/lib/libm/arch/i387/s_modf.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: modf.S,v 1.5 2005/08/07 11:30:38 espie Exp $ */
+/* $OpenBSD: s_modf.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
diff --git a/lib/libc/arch/m88k/gen/fabs.S b/lib/libm/arch/m88k/s_fabs.S
index 57bfdeb162c..494e6200ba5 100644
--- a/lib/libc/arch/m88k/gen/fabs.S
+++ b/lib/libm/arch/m88k/s_fabs.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: fabs.S,v 1.7 2008/12/09 20:54:02 martynas Exp $ */
+/* $OpenBSD: s_fabs.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*-
* Copyright (c) 1996 Nivas Madhur
* All rights reserved.
diff --git a/lib/libc/arch/m68k/gen/fabs.S b/lib/libm/arch/mc68881/s_fabs.S
index 6dda7c013a8..082d0629c9b 100644
--- a/lib/libc/arch/m68k/gen/fabs.S
+++ b/lib/libm/arch/mc68881/s_fabs.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: fabs.S,v 1.6 2008/12/09 20:54:02 martynas Exp $ */
+/* $OpenBSD: s_fabs.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
diff --git a/lib/libc/arch/m68k/gen/modf.S b/lib/libm/arch/mc68881/s_modf.S
index e77199711bc..038c5b86a54 100644
--- a/lib/libc/arch/m68k/gen/modf.S
+++ b/lib/libm/arch/mc68881/s_modf.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: modf.S,v 1.4 2005/08/07 16:40:14 espie Exp $ */
+/* $OpenBSD: s_modf.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
diff --git a/lib/libc/arch/mips64/gen/fabs.S b/lib/libm/arch/mips64/s_fabs.S
index 8f2ee42337a..622052b8a14 100644
--- a/lib/libc/arch/mips64/gen/fabs.S
+++ b/lib/libm/arch/mips64/s_fabs.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: fabs.S,v 1.5 2008/12/09 20:54:02 martynas Exp $ */
+/* $OpenBSD: s_fabs.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*-
* Copyright (c) 1993
* The Regents of the University of California. All rights reserved.
diff --git a/lib/libc/arch/mips64/gen/modf.S b/lib/libm/arch/mips64/s_modf.S
index d30d1d6bf66..c48ab11fa4f 100644
--- a/lib/libc/arch/mips64/gen/modf.S
+++ b/lib/libm/arch/mips64/s_modf.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: modf.S,v 1.3 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: s_modf.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*-
* Copyright (c) 1991, 1993, 1995
* The Regents of the University of California. All rights reserved.
diff --git a/lib/libc/arch/powerpc/gen/fabs.c b/lib/libm/arch/powerpc/s_fabs.c
index b62d68c81fc..cb11c544f7e 100644
--- a/lib/libc/arch/powerpc/gen/fabs.c
+++ b/lib/libm/arch/powerpc/s_fabs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fabs.c,v 1.4 2008/12/10 01:15:02 martynas Exp $ */
+/* $OpenBSD: s_fabs.c,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*
* Copyright (c) 2002 Theo de Raadt
diff --git a/lib/libc/arch/sh/gen/fabs.c b/lib/libm/arch/sh/s_fabs.c
index 949f1a85425..4be78384eda 100644
--- a/lib/libc/arch/sh/gen/fabs.c
+++ b/lib/libm/arch/sh/s_fabs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fabs.c,v 1.7 2009/04/05 17:21:46 martynas Exp $ */
+/* $OpenBSD: s_fabs.c,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
diff --git a/lib/libc/arch/sparc/gen/fabs.S b/lib/libm/arch/sparc/s_fabs.S
index aa4e46c27a8..793e92c8ec7 100644
--- a/lib/libc/arch/sparc/gen/fabs.S
+++ b/lib/libm/arch/sparc/s_fabs.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: fabs.S,v 1.6 2008/12/09 20:21:07 martynas Exp $ */
+/* $OpenBSD: s_fabs.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
diff --git a/lib/libc/arch/sparc/gen/modf.S b/lib/libm/arch/sparc/s_modf.S
index 7a7fb745eac..4b356f7c7c5 100644
--- a/lib/libc/arch/sparc/gen/modf.S
+++ b/lib/libm/arch/sparc/s_modf.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: modf.S,v 1.5 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: s_modf.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
diff --git a/lib/libc/arch/sparc64/gen/fabs.S b/lib/libm/arch/sparc64/s_fabs.S
index 1246d2c90f6..4f977d8251a 100644
--- a/lib/libc/arch/sparc64/gen/fabs.S
+++ b/lib/libm/arch/sparc64/s_fabs.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: fabs.S,v 1.5 2008/12/09 20:54:02 martynas Exp $ */
+/* $OpenBSD: s_fabs.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/* $NetBSD: fabs.S,v 1.2 2000/07/23 07:12:22 eeh Exp $ */
/*
* Copyright (c) 1992, 1993
diff --git a/lib/libc/arch/sparc64/gen/modf.S b/lib/libm/arch/sparc64/s_modf.S
index f4799bf4146..5241b127bd3 100644
--- a/lib/libc/arch/sparc64/gen/modf.S
+++ b/lib/libm/arch/sparc64/s_modf.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: modf.S,v 1.3 2003/06/02 20:18:32 millert Exp $ */
+/* $OpenBSD: s_modf.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/* $NetBSD: modf.S,v 1.3 2000/11/01 23:32:41 eeh Exp $ */
/*
diff --git a/lib/libc/arch/vax/gen/fabs.S b/lib/libm/arch/vax/n_fabs.S
index e6bb39f74b5..16c57e62a10 100644
--- a/lib/libc/arch/vax/gen/fabs.S
+++ b/lib/libm/arch/vax/n_fabs.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: fabs.S,v 1.6 2008/12/10 08:26:21 deraadt Exp $ */
+/* $OpenBSD: n_fabs.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
diff --git a/lib/libc/arch/vax/gen/modf.S b/lib/libm/arch/vax/n_modf.S
index a4e2bec594a..840c0b7d084 100644
--- a/lib/libc/arch/vax/gen/modf.S
+++ b/lib/libm/arch/vax/n_modf.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: modf.S,v 1.6 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: n_modf.S,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
diff --git a/lib/libc/gen/frexp.3 b/lib/libm/man/frexp.3
index 94f22cd374e..a8b00828925 100644
--- a/lib/libc/gen/frexp.3
+++ b/lib/libm/man/frexp.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: frexp.3,v 1.10 2011/07/07 13:30:28 jmc Exp $
+.\" $OpenBSD: frexp.3,v 1.1 2011/07/08 19:21:42 martynas Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 7 2011 $
+.Dd $Mdocdate: July 8 2011 $
.Dt FREXP 3
.Os
.Sh NAME
diff --git a/lib/libc/gen/modf.3 b/lib/libm/man/modf.3
index f226a9824f1..243f17cc662 100644
--- a/lib/libc/gen/modf.3
+++ b/lib/libm/man/modf.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: modf.3,v 1.8 2011/07/07 13:30:28 jmc Exp $
+.\" $OpenBSD: modf.3,v 1.1 2011/07/08 19:21:42 martynas Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -31,12 +31,13 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 7 2011 $
+.Dd $Mdocdate: July 8 2011 $
.Dt MODF 3
.Os
.Sh NAME
.Nm modf ,
-.Nm modff
+.Nm modff ,
+.Nm modfl
.Nd extract signed integral and fractional values from floating-point number
.Sh SYNOPSIS
.Fd #include <math.h>
@@ -44,6 +45,8 @@
.Fn modf "double value" "double *iptr"
.Ft float
.Fn modff "float value" "float *iptr"
+.Ft long double
+.Fn modfl "long double value" "long double *iptr"
.Sh DESCRIPTION
The
.Fn modf
@@ -59,11 +62,16 @@ The
.Fn modff
function is a single precision version of
.Fn modf .
+The
+.Fn modfl
+function is an extended precision version of
+.Fn modf .
.Sh RETURN VALUES
The
-.Fn modf
-and
+.Fn modf ,
.Fn modff
+and
+.Fn modfl
functions return the signed fractional part of
.Fa value .
.Sh SEE ALSO
diff --git a/lib/libc/arch/vax/gen/frexp.c b/lib/libm/noieee_src/n_frexp.c
index 1ddf094c270..b0615647edb 100644
--- a/lib/libc/arch/vax/gen/frexp.c
+++ b/lib/libm/noieee_src/n_frexp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frexp.c,v 1.8 2011/07/02 19:27:34 martynas Exp $ */
+/* $OpenBSD: n_frexp.c,v 1.1 2011/07/08 19:21:42 martynas Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
diff --git a/lib/libm/shlib_version b/lib/libm/shlib_version
index 11ab6a71a24..9c1551636c5 100644
--- a/lib/libm/shlib_version
+++ b/lib/libm/shlib_version
@@ -1,2 +1,2 @@
-major=5
-minor=4
+major=6
+minor=0
diff --git a/lib/libm/src/n_fabs.c b/lib/libm/src/n_fabs.c
new file mode 100644
index 00000000000..5f30645ff6e
--- /dev/null
+++ b/lib/libm/src/n_fabs.c
@@ -0,0 +1 @@
+/* empty file for lint to chew on */
diff --git a/lib/libm/src/n_modf.c b/lib/libm/src/n_modf.c
new file mode 100644
index 00000000000..5f30645ff6e
--- /dev/null
+++ b/lib/libm/src/n_modf.c
@@ -0,0 +1 @@
+/* empty file for lint to chew on */