summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormartynas <>2013-03-28 18:09:38 +0000
committermartynas <>2013-03-28 18:09:38 +0000
commit43ae065d4313c8a0233a8011dada31d22939c395 (patch)
tree7388b06e5c323564802e68dcfea52730269ef287 /src
parentff0d1de40e1753f3ad3f490475d4624605ee6d92 (diff)
downloadopenbsd-43ae065d4313c8a0233a8011dada31d22939c395.tar.gz
openbsd-43ae065d4313c8a0233a8011dada31d22939c395.tar.bz2
openbsd-43ae065d4313c8a0233a8011dada31d22939c395.zip
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 'src')
-rw-r--r--src/lib/libc/stdlib/strtoll.c13
-rw-r--r--src/lib/libc/stdlib/strtoull.c13
2 files changed, 4 insertions, 22 deletions
diff --git a/src/lib/libc/stdlib/strtoll.c b/src/lib/libc/stdlib/strtoll.c
index 37379252e3..4bcc5565be 100644
--- a/src/lib/libc/stdlib/strtoll.c
+++ b/src/lib/libc/stdlib/strtoll.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strtoll.c,v 1.6 2005/11/10 10:00:17 espie Exp $ */ 1/* $OpenBSD: strtoll.c,v 1.7 2013/03/28 18:09:38 martynas Exp $ */
2/*- 2/*-
3 * Copyright (c) 1992 The Regents of the University of California. 3 * Copyright (c) 1992 The Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -141,13 +141,4 @@ strtoll(const char *nptr, char **endptr, int base)
141 return (acc); 141 return (acc);
142} 142}
143 143
144#ifdef __weak_alias 144__strong_alias(strtoq, strtoll);
145__weak_alias(strtoq, strtoll);
146#else
147quad_t
148strtoq(const char *nptr, char **endptr, int base)
149{
150
151 return ((quad_t)strtoll(nptr, endptr, base));
152}
153#endif
diff --git a/src/lib/libc/stdlib/strtoull.c b/src/lib/libc/stdlib/strtoull.c
index 37859776f9..28f613a087 100644
--- a/src/lib/libc/stdlib/strtoull.c
+++ b/src/lib/libc/stdlib/strtoull.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strtoull.c,v 1.5 2005/08/08 08:05:37 espie Exp $ */ 1/* $OpenBSD: strtoull.c,v 1.6 2013/03/28 18:09:38 martynas Exp $ */
2/*- 2/*-
3 * Copyright (c) 1992 The Regents of the University of California. 3 * Copyright (c) 1992 The Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -103,13 +103,4 @@ strtoull(const char *nptr, char **endptr, int base)
103 return (acc); 103 return (acc);
104} 104}
105 105
106#ifdef __weak_alias 106__strong_alias(strtouq, strtoull);
107__weak_alias(strtouq, strtoull);
108#else
109u_quad_t
110strtouq(const char *nptr, char **endptr, int base)
111{
112
113 return ((u_quad_t)strtoull(nptr, endptr, base));
114}
115#endif