From 43ae065d4313c8a0233a8011dada31d22939c395 Mon Sep 17 00:00:00 2001 From: martynas <> Date: Thu, 28 Mar 2013 18:09:38 +0000 Subject: 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@. --- src/lib/libc/stdlib/strtoll.c | 13 ++----------- src/lib/libc/stdlib/strtoull.c | 13 ++----------- 2 files changed, 4 insertions(+), 22 deletions(-) (limited to 'src') 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 @@ -/* $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/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 @@ -/* $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); -- cgit v1.2.3-55-g6feb