summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-09-14 12:49:33 +0000
committerguenther <guenther@openbsd.org>2015-09-14 12:49:33 +0000
commit63161a5d6627aaea81f63687903f6ec57ec366d4 (patch)
tree10c1633856a3904e04a1afccd76e6c05de5f41a3 /lib/libc
parentExpose EOF without close-notify via tls_close(). (diff)
downloadwireguard-openbsd-63161a5d6627aaea81f63687903f6ec57ec366d4.tar.xz
wireguard-openbsd-63161a5d6627aaea81f63687903f6ec57ec366d4.zip
Wrap the remaining __*dtoa() functions so that internal calls go direct
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gdtoa/dmisc.c1
-rw-r--r--lib/libc/gdtoa/dtoa.c1
-rw-r--r--lib/libc/gdtoa/gdtoa.c1
-rw-r--r--lib/libc/gdtoa/gdtoa.h10
-rw-r--r--lib/libc/gdtoa/hdtoa.c5
-rw-r--r--lib/libc/gdtoa/ldtoa.c4
-rw-r--r--lib/libc/stdio/floatio.h6
7 files changed, 21 insertions, 7 deletions
diff --git a/lib/libc/gdtoa/dmisc.c b/lib/libc/gdtoa/dmisc.c
index a5795cfb79a..f3d8ea71acf 100644
--- a/lib/libc/gdtoa/dmisc.c
+++ b/lib/libc/gdtoa/dmisc.c
@@ -104,6 +104,7 @@ freedtoa(char *s)
dtoa_result = 0;
#endif
}
+DEF_STRONG(freedtoa);
int
quorem
diff --git a/lib/libc/gdtoa/dtoa.c b/lib/libc/gdtoa/dtoa.c
index 668f7b50b2d..c1c87245601 100644
--- a/lib/libc/gdtoa/dtoa.c
+++ b/lib/libc/gdtoa/dtoa.c
@@ -837,3 +837,4 @@ dtoa
*rve = s;
return s0;
}
+DEF_STRONG(dtoa);
diff --git a/lib/libc/gdtoa/gdtoa.c b/lib/libc/gdtoa/gdtoa.c
index fd11de56001..feae5afa335 100644
--- a/lib/libc/gdtoa/gdtoa.c
+++ b/lib/libc/gdtoa/gdtoa.c
@@ -827,3 +827,4 @@ gdtoa
*kindp |= inex;
return s0;
}
+DEF_STRONG(gdtoa);
diff --git a/lib/libc/gdtoa/gdtoa.h b/lib/libc/gdtoa/gdtoa.h
index a883194012a..8d621b06ba2 100644
--- a/lib/libc/gdtoa/gdtoa.h
+++ b/lib/libc/gdtoa/gdtoa.h
@@ -112,6 +112,16 @@ extern void __freedtoa ANSI((char*));
extern float strtof ANSI((CONST char *, char **));
extern double strtod ANSI((CONST char *, char **));
extern int __strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
+char *__hdtoa(double, const char *, int, int *, int *, char **);
+char *__hldtoa(long double, const char *, int, int *, int *, char **);
+char *__ldtoa(long double *, int, int, int *, int *, char **);
+
+PROTO_NORMAL(__dtoa);
+PROTO_NORMAL(__gdtoa);
+PROTO_NORMAL(__freedtoa);
+PROTO_NORMAL(__hdtoa);
+PROTO_NORMAL(__hldtoa);
+PROTO_NORMAL(__ldtoa);
__BEGIN_HIDDEN_DECLS
extern char* __g_ddfmt ANSI((char*, double*, int, size_t));
diff --git a/lib/libc/gdtoa/hdtoa.c b/lib/libc/gdtoa/hdtoa.c
index c62f6d5d390..45caef40a50 100644
--- a/lib/libc/gdtoa/hdtoa.c
+++ b/lib/libc/gdtoa/hdtoa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hdtoa.c,v 1.2 2009/10/16 12:15:03 martynas Exp $ */
+/* $OpenBSD: hdtoa.c,v 1.3 2015/09/14 12:49:33 guenther Exp $ */
/*-
* Copyright (c) 2004, 2005 David Schultz <das@FreeBSD.ORG>
* All rights reserved.
@@ -210,6 +210,7 @@ __hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign,
return (s0);
}
+DEF_STRONG(__hdtoa);
#if (LDBL_MANT_DIG > DBL_MANT_DIG)
@@ -319,6 +320,7 @@ __hldtoa(long double e, const char *xdigs, int ndigits, int *decpt, int *sign,
return (s0);
}
+DEF_STRONG(__hldtoa);
#else /* (LDBL_MANT_DIG == DBL_MANT_DIG) */
@@ -328,5 +330,6 @@ __hldtoa(long double e, const char *xdigs, int ndigits, int *decpt, int *sign,
{
return (__hdtoa((double)e, xdigs, ndigits, decpt, sign, rve));
}
+DEF_STRONG(__hldtoa);
#endif /* (LDBL_MANT_DIG == DBL_MANT_DIG) */
diff --git a/lib/libc/gdtoa/ldtoa.c b/lib/libc/gdtoa/ldtoa.c
index 16f6f9c75f3..963afd227d0 100644
--- a/lib/libc/gdtoa/ldtoa.c
+++ b/lib/libc/gdtoa/ldtoa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldtoa.c,v 1.2 2014/08/10 02:15:18 guenther Exp $ */
+/* $OpenBSD: ldtoa.c,v 1.3 2015/09/14 12:49:33 guenther Exp $ */
/*-
* Copyright (c) 2003 David Schultz <das@FreeBSD.ORG>
* All rights reserved.
@@ -106,6 +106,7 @@ __ldtoa(long double *ld, int mode, int ndigits, int *decpt, int *sign,
*decpt = INT_MAX;
return ret;
}
+DEF_STRONG(__ldtoa);
#else /* (LDBL_MANT_DIG == DBL_MANT_DIG) */
@@ -120,5 +121,6 @@ __ldtoa(long double *ld, int mode, int ndigits, int *decpt, int *sign,
*decpt = INT_MAX;
return ret;
}
+DEF_STRONG(__ldtoa);
#endif /* (LDBL_MANT_DIG == DBL_MANT_DIG) */
diff --git a/lib/libc/stdio/floatio.h b/lib/libc/stdio/floatio.h
index 97690308442..c3a723519b3 100644
--- a/lib/libc/stdio/floatio.h
+++ b/lib/libc/stdio/floatio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: floatio.h,v 1.4 2008/09/07 20:36:08 martynas Exp $ */
+/* $OpenBSD: floatio.h,v 1.5 2015/09/14 12:49:33 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -52,7 +52,3 @@
#if LDBL_MAX_EXP > 999999
#error "floating point buffers too small"
#endif
-
-char *__hdtoa(double, const char *, int, int *, int *, char **);
-char *__hldtoa(long double, const char *, int, int *, int *, char **);
-char *__ldtoa(long double *, int, int, int *, int *, char **);