summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2013-03-28 18:09:39 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2013-03-28 18:09:39 +0000
commit14238d14e00f4a71f79e75ce67e273c6c19ae841 (patch)
tree96e59e4d578c3e6cd56b77bcef7408afed0e4212 /lib/libc/stdlib
parent082441c0c4b4a60860a60b78b9f451526c393600 (diff)
Switch libc and libm to use strong aliases rather than weak aliases
where appropriate. Among other things makes the symbols consistent across all architectures (notably where ldbl mantissa is 53 bits). While at it, kill unused LINTLIBRARY/PROTOLIB1 cruft which was there to trick lint into recording the right prototypes for aliased functions. Most of the work done at the awesome n2k13 hackathon. Agreed by kettenis@, guenther@, matthew@.
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/strtoll.c13
-rw-r--r--lib/libc/stdlib/strtoull.c13
2 files changed, 4 insertions, 22 deletions
diff --git a/lib/libc/stdlib/strtoll.c b/lib/libc/stdlib/strtoll.c
index 37379252e36..4bcc5565be2 100644
--- a/lib/libc/stdlib/strtoll.c
+++ b/lib/libc/stdlib/strtoll.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strtoll.c,v 1.6 2005/11/10 10:00:17 espie Exp $ */
+/* $OpenBSD: strtoll.c,v 1.7 2013/03/28 18:09:38 martynas Exp $ */
/*-
* Copyright (c) 1992 The Regents of the University of California.
* All rights reserved.
@@ -141,13 +141,4 @@ strtoll(const char *nptr, char **endptr, int base)
return (acc);
}
-#ifdef __weak_alias
-__weak_alias(strtoq, strtoll);
-#else
-quad_t
-strtoq(const char *nptr, char **endptr, int base)
-{
-
- return ((quad_t)strtoll(nptr, endptr, base));
-}
-#endif
+__strong_alias(strtoq, strtoll);
diff --git a/lib/libc/stdlib/strtoull.c b/lib/libc/stdlib/strtoull.c
index 37859776f9b..28f613a0875 100644
--- a/lib/libc/stdlib/strtoull.c
+++ b/lib/libc/stdlib/strtoull.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strtoull.c,v 1.5 2005/08/08 08:05:37 espie Exp $ */
+/* $OpenBSD: strtoull.c,v 1.6 2013/03/28 18:09:38 martynas Exp $ */
/*-
* Copyright (c) 1992 The Regents of the University of California.
* All rights reserved.
@@ -103,13 +103,4 @@ strtoull(const char *nptr, char **endptr, int base)
return (acc);
}
-#ifdef __weak_alias
-__weak_alias(strtouq, strtoull);
-#else
-u_quad_t
-strtouq(const char *nptr, char **endptr, int base)
-{
-
- return ((u_quad_t)strtoull(nptr, endptr, base));
-}
-#endif
+__strong_alias(strtouq, strtoull);