summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguenther <>2015-09-13 08:31:48 +0000
committerguenther <>2015-09-13 08:31:48 +0000
commit37a8e8e2fe93b45ab3b39108d9af4b75cf4dd663 (patch)
tree97578b890ec56dd23cc1e63d9bb8ef626aa1e803
parent3ab8135e9f87e6a6b3e4d7790fce947888eab2f8 (diff)
downloadopenbsd-37a8e8e2fe93b45ab3b39108d9af4b75cf4dd663.tar.gz
openbsd-37a8e8e2fe93b45ab3b39108d9af4b75cf4dd663.tar.bz2
openbsd-37a8e8e2fe93b45ab3b39108d9af4b75cf4dd663.zip
Wrap <stdlib.h> so that calls go direct and the symbols not in the
C standard are all weak. Apply __{BEGIN,END}_HIDDEN_DECLS to gdtoa{,imp}.h, hiding the arch-specific __strtorx, __ULtox_D2A, __strtorQ, __ULtoQ_D2A symbols.
-rw-r--r--src/lib/libc/crypt/arc4random.c4
-rw-r--r--src/lib/libc/crypt/arc4random_uniform.c3
-rw-r--r--src/lib/libc/stdlib/abort.c3
-rw-r--r--src/lib/libc/stdlib/abs.c3
-rw-r--r--src/lib/libc/stdlib/atoi.c3
-rw-r--r--src/lib/libc/stdlib/div.c3
-rw-r--r--src/lib/libc/stdlib/erand48.c3
-rw-r--r--src/lib/libc/stdlib/exit.c3
-rw-r--r--src/lib/libc/stdlib/getenv.c4
-rw-r--r--src/lib/libc/stdlib/lcong48.c3
-rw-r--r--src/lib/libc/stdlib/malloc.c9
-rw-r--r--src/lib/libc/stdlib/qsort.c3
-rw-r--r--src/lib/libc/stdlib/rand.c1
-rw-r--r--src/lib/libc/stdlib/reallocarray.c3
-rw-r--r--src/lib/libc/stdlib/setenv.c7
-rw-r--r--src/lib/libc/stdlib/srand48.c3
-rw-r--r--src/lib/libc/stdlib/strtol.c3
-rw-r--r--src/lib/libc/stdlib/strtoll.c5
-rw-r--r--src/lib/libc/stdlib/strtonum.c3
-rw-r--r--src/lib/libc/stdlib/strtoul.c3
-rw-r--r--src/lib/libc/stdlib/strtoull.c5
-rw-r--r--src/lib/libc/stdlib/system.c3
22 files changed, 54 insertions, 26 deletions
diff --git a/src/lib/libc/crypt/arc4random.c b/src/lib/libc/crypt/arc4random.c
index 5afc6a15ab..8a4ecc9e89 100644
--- a/src/lib/libc/crypt/arc4random.c
+++ b/src/lib/libc/crypt/arc4random.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: arc4random.c,v 1.53 2015/09/10 18:53:50 bcook Exp $ */ 1/* $OpenBSD: arc4random.c,v 1.54 2015/09/13 08:31:47 guenther Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996, David Mazieres <dm@uun.org> 4 * Copyright (c) 1996, David Mazieres <dm@uun.org>
@@ -186,6 +186,7 @@ arc4random(void)
186 _ARC4_UNLOCK(); 186 _ARC4_UNLOCK();
187 return val; 187 return val;
188} 188}
189DEF_WEAK(arc4random);
189 190
190void 191void
191arc4random_buf(void *buf, size_t n) 192arc4random_buf(void *buf, size_t n)
@@ -194,3 +195,4 @@ arc4random_buf(void *buf, size_t n)
194 _rs_random_buf(buf, n); 195 _rs_random_buf(buf, n);
195 _ARC4_UNLOCK(); 196 _ARC4_UNLOCK();
196} 197}
198DEF_WEAK(arc4random_buf);
diff --git a/src/lib/libc/crypt/arc4random_uniform.c b/src/lib/libc/crypt/arc4random_uniform.c
index 1aa9a622f1..23a15e34fd 100644
--- a/src/lib/libc/crypt/arc4random_uniform.c
+++ b/src/lib/libc/crypt/arc4random_uniform.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: arc4random_uniform.c,v 1.1 2014/07/12 13:24:54 deraadt Exp $ */ 1/* $OpenBSD: arc4random_uniform.c,v 1.2 2015/09/13 08:31:47 guenther Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2008, Damien Miller <djm@openbsd.org> 4 * Copyright (c) 2008, Damien Miller <djm@openbsd.org>
@@ -54,3 +54,4 @@ arc4random_uniform(uint32_t upper_bound)
54 54
55 return r % upper_bound; 55 return r % upper_bound;
56} 56}
57DEF_WEAK(arc4random_uniform);
diff --git a/src/lib/libc/stdlib/abort.c b/src/lib/libc/stdlib/abort.c
index dd057710ff..903bfa78e1 100644
--- a/src/lib/libc/stdlib/abort.c
+++ b/src/lib/libc/stdlib/abort.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: abort.c,v 1.17 2014/05/14 21:54:20 tedu Exp $ */ 1/* $OpenBSD: abort.c,v 1.18 2015/09/13 08:31:47 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 1985 Regents of the University of California. 3 * Copyright (c) 1985 Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -61,3 +61,4 @@ abort(void)
61 (void)raise(SIGABRT); 61 (void)raise(SIGABRT);
62 _exit(1); 62 _exit(1);
63} 63}
64DEF_STRONG(abort);
diff --git a/src/lib/libc/stdlib/abs.c b/src/lib/libc/stdlib/abs.c
index 5d2fbae69f..0e39cc5536 100644
--- a/src/lib/libc/stdlib/abs.c
+++ b/src/lib/libc/stdlib/abs.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: abs.c,v 1.5 2005/08/08 08:05:36 espie Exp $ */ 1/* $OpenBSD: abs.c,v 1.6 2015/09/13 08:31:47 guenther Exp $ */
2/*- 2/*-
3 * Copyright (c) 1990 The Regents of the University of California. 3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -35,3 +35,4 @@ abs(int j)
35{ 35{
36 return(j < 0 ? -j : j); 36 return(j < 0 ? -j : j);
37} 37}
38DEF_STRONG(abs);
diff --git a/src/lib/libc/stdlib/atoi.c b/src/lib/libc/stdlib/atoi.c
index b0842678e2..7c9eb1331b 100644
--- a/src/lib/libc/stdlib/atoi.c
+++ b/src/lib/libc/stdlib/atoi.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: atoi.c,v 1.5 2005/08/08 08:05:36 espie Exp $ */ 1/* $OpenBSD: atoi.c,v 1.6 2015/09/13 08:31:47 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 1988 Regents of the University of California. 3 * Copyright (c) 1988 Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -35,3 +35,4 @@ atoi(const char *str)
35{ 35{
36 return((int)strtol(str, (char **)NULL, 10)); 36 return((int)strtol(str, (char **)NULL, 10));
37} 37}
38DEF_STRONG(atoi);
diff --git a/src/lib/libc/stdlib/div.c b/src/lib/libc/stdlib/div.c
index f7ac2db4b0..beaa428c7a 100644
--- a/src/lib/libc/stdlib/div.c
+++ b/src/lib/libc/stdlib/div.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: div.c,v 1.5 2005/08/08 08:05:36 espie Exp $ */ 1/* $OpenBSD: div.c,v 1.6 2015/09/13 08:31:47 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 1990 Regents of the University of California. 3 * Copyright (c) 1990 Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -69,3 +69,4 @@ div(int num, int denom)
69 } 69 }
70 return (r); 70 return (r);
71} 71}
72DEF_STRONG(div);
diff --git a/src/lib/libc/stdlib/erand48.c b/src/lib/libc/stdlib/erand48.c
index 2ffeaa6e71..20d6a2dd69 100644
--- a/src/lib/libc/stdlib/erand48.c
+++ b/src/lib/libc/stdlib/erand48.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: erand48.c,v 1.3 2005/08/08 08:05:36 espie Exp $ */ 1/* $OpenBSD: erand48.c,v 1.4 2015/09/13 08:31:47 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 1993 Martin Birgmeier 3 * Copyright (c) 1993 Martin Birgmeier
4 * All rights reserved. 4 * All rights reserved.
@@ -22,3 +22,4 @@ erand48(unsigned short xseed[3])
22 ldexp((double) xseed[1], -32) + 22 ldexp((double) xseed[1], -32) +
23 ldexp((double) xseed[2], -16); 23 ldexp((double) xseed[2], -16);
24} 24}
25DEF_WEAK(erand48);
diff --git a/src/lib/libc/stdlib/exit.c b/src/lib/libc/stdlib/exit.c
index 83fe3d2de5..d30b91ed46 100644
--- a/src/lib/libc/stdlib/exit.c
+++ b/src/lib/libc/stdlib/exit.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: exit.c,v 1.12 2007/09/03 14:40:16 millert Exp $ */ 1/* $OpenBSD: exit.c,v 1.13 2015/09/13 08:31:47 guenther Exp $ */
2/*- 2/*-
3 * Copyright (c) 1990 The Regents of the University of California. 3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -57,3 +57,4 @@ exit(int status)
57 __cxa_finalize(NULL); 57 __cxa_finalize(NULL);
58 _exit(status); 58 _exit(status);
59} 59}
60DEF_STRONG(exit);
diff --git a/src/lib/libc/stdlib/getenv.c b/src/lib/libc/stdlib/getenv.c
index fd8482e9e3..6ddad9225a 100644
--- a/src/lib/libc/stdlib/getenv.c
+++ b/src/lib/libc/stdlib/getenv.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getenv.c,v 1.10 2010/08/23 22:31:50 millert Exp $ */ 1/* $OpenBSD: getenv.c,v 1.11 2015/09/13 08:31:47 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 1987, 1993 3 * Copyright (c) 1987, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
@@ -31,7 +31,6 @@
31#include <stdlib.h> 31#include <stdlib.h>
32#include <string.h> 32#include <string.h>
33 33
34char *__findenv(const char *name, int len, int *offset);
35 34
36/* 35/*
37 * __findenv -- 36 * __findenv --
@@ -79,3 +78,4 @@ getenv(const char *name)
79 ; 78 ;
80 return (__findenv(name, (int)(np - name), &offset)); 79 return (__findenv(name, (int)(np - name), &offset));
81} 80}
81DEF_STRONG(getenv);
diff --git a/src/lib/libc/stdlib/lcong48.c b/src/lib/libc/stdlib/lcong48.c
index 5b297ddbfc..f03083e3c8 100644
--- a/src/lib/libc/stdlib/lcong48.c
+++ b/src/lib/libc/stdlib/lcong48.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: lcong48.c,v 1.5 2015/08/27 04:33:31 guenther Exp $ */ 1/* $OpenBSD: lcong48.c,v 1.6 2015/09/13 08:31:47 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 1993 Martin Birgmeier 3 * Copyright (c) 1993 Martin Birgmeier
4 * All rights reserved. 4 * All rights reserved.
@@ -33,3 +33,4 @@ lcong48_deterministic(unsigned short p[7])
33 __rand48_mult[2] = p[5]; 33 __rand48_mult[2] = p[5];
34 __rand48_add = p[6]; 34 __rand48_add = p[6];
35} 35}
36DEF_WEAK(lcong48_deterministic);
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c
index 5e5dafbd17..0967fe3a08 100644
--- a/src/lib/libc/stdlib/malloc.c
+++ b/src/lib/libc/stdlib/malloc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: malloc.c,v 1.174 2015/04/06 09:18:51 tedu Exp $ */ 1/* $OpenBSD: malloc.c,v 1.175 2015/09/13 08:31:47 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 2008, 2010, 2011 Otto Moerbeek <otto@drijf.net> 3 * Copyright (c) 2008, 2010, 2011 Otto Moerbeek <otto@drijf.net>
4 * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> 4 * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
@@ -211,6 +211,7 @@ extern char *__progname;
211 211
212#ifdef MALLOC_STATS 212#ifdef MALLOC_STATS
213void malloc_dump(int); 213void malloc_dump(int);
214PROTO_NORMAL(malloc_dump);
214static void malloc_exit(void); 215static void malloc_exit(void);
215#define CALLER __builtin_return_address(0) 216#define CALLER __builtin_return_address(0)
216#else 217#else
@@ -1186,6 +1187,7 @@ malloc(size_t size)
1186 errno = saved_errno; 1187 errno = saved_errno;
1187 return r; 1188 return r;
1188} 1189}
1190DEF_STRONG(malloc);
1189 1191
1190static void 1192static void
1191ofree(void *p) 1193ofree(void *p)
@@ -1289,6 +1291,7 @@ free(void *ptr)
1289 _MALLOC_UNLOCK(); 1291 _MALLOC_UNLOCK();
1290 errno = saved_errno; 1292 errno = saved_errno;
1291} 1293}
1294DEF_STRONG(free);
1292 1295
1293 1296
1294static void * 1297static void *
@@ -1429,6 +1432,7 @@ realloc(void *ptr, size_t size)
1429 errno = saved_errno; 1432 errno = saved_errno;
1430 return r; 1433 return r;
1431} 1434}
1435DEF_STRONG(realloc);
1432 1436
1433 1437
1434/* 1438/*
@@ -1476,6 +1480,7 @@ calloc(size_t nmemb, size_t size)
1476 errno = saved_errno; 1480 errno = saved_errno;
1477 return r; 1481 return r;
1478} 1482}
1483DEF_STRONG(calloc);
1479 1484
1480static void * 1485static void *
1481mapalign(struct dir_info *d, size_t alignment, size_t sz, int zero_fill) 1486mapalign(struct dir_info *d, size_t alignment, size_t sz, int zero_fill)
@@ -1609,6 +1614,7 @@ err:
1609 errno = saved_errno; 1614 errno = saved_errno;
1610 return res; 1615 return res;
1611} 1616}
1617DEF_STRONG(posix_memalign);
1612 1618
1613#ifdef MALLOC_STATS 1619#ifdef MALLOC_STATS
1614 1620
@@ -1853,6 +1859,7 @@ malloc_dump(int fd)
1853 malloc_dump1(fd, pool); 1859 malloc_dump1(fd, pool);
1854 errno = saved_errno; 1860 errno = saved_errno;
1855} 1861}
1862DEF_WEAK(malloc_dump);
1856 1863
1857static void 1864static void
1858malloc_exit(void) 1865malloc_exit(void)
diff --git a/src/lib/libc/stdlib/qsort.c b/src/lib/libc/stdlib/qsort.c
index 2a51c77634..1d9b1e9122 100644
--- a/src/lib/libc/stdlib/qsort.c
+++ b/src/lib/libc/stdlib/qsort.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: qsort.c,v 1.12 2014/06/12 14:54:25 millert Exp $ */ 1/* $OpenBSD: qsort.c,v 1.13 2015/09/13 08:31:47 guenther Exp $ */
2/*- 2/*-
3 * Copyright (c) 1992, 1993 3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
@@ -149,3 +149,4 @@ loop: SWAPINIT(a, es);
149 } 149 }
150/* qsort(pn - r, r / es, es, cmp);*/ 150/* qsort(pn - r, r / es, es, cmp);*/
151} 151}
152DEF_STRONG(qsort);
diff --git a/src/lib/libc/stdlib/rand.c b/src/lib/libc/stdlib/rand.c
index f163581e8d..7054b81c64 100644
--- a/src/lib/libc/stdlib/rand.c
+++ b/src/lib/libc/stdlib/rand.c
@@ -39,6 +39,7 @@ rand_r(u_int *seed)
39 *seed = *seed * 1103515245 + 12345; 39 *seed = *seed * 1103515245 + 12345;
40 return (*seed % ((u_int)RAND_MAX + 1)); 40 return (*seed % ((u_int)RAND_MAX + 1));
41} 41}
42DEF_WEAK(rand_r);
42 43
43#if defined(APIWARN) 44#if defined(APIWARN)
44__warn_references(rand_r, 45__warn_references(rand_r,
diff --git a/src/lib/libc/stdlib/reallocarray.c b/src/lib/libc/stdlib/reallocarray.c
index ed3244e22f..baea252a87 100644
--- a/src/lib/libc/stdlib/reallocarray.c
+++ b/src/lib/libc/stdlib/reallocarray.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: reallocarray.c,v 1.2 2014/12/08 03:45:00 bcook Exp $ */ 1/* $OpenBSD: reallocarray.c,v 1.3 2015/09/13 08:31:47 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net> 3 * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
4 * 4 *
@@ -36,3 +36,4 @@ reallocarray(void *optr, size_t nmemb, size_t size)
36 } 36 }
37 return realloc(optr, size * nmemb); 37 return realloc(optr, size * nmemb);
38} 38}
39DEF_WEAK(reallocarray);
diff --git a/src/lib/libc/stdlib/setenv.c b/src/lib/libc/stdlib/setenv.c
index 10b55445f7..e55a1feb6f 100644
--- a/src/lib/libc/stdlib/setenv.c
+++ b/src/lib/libc/stdlib/setenv.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: setenv.c,v 1.15 2014/10/08 05:33:31 deraadt Exp $ */ 1/* $OpenBSD: setenv.c,v 1.16 2015/09/13 08:31:47 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 1987 Regents of the University of California. 3 * Copyright (c) 1987 Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -32,8 +32,6 @@
32#include <stdlib.h> 32#include <stdlib.h>
33#include <string.h> 33#include <string.h>
34 34
35char *__findenv(const char *name, int len, int *offset);
36
37extern char **environ; 35extern char **environ;
38static char **lastenv; /* last value of environ */ 36static char **lastenv; /* last value of environ */
39 37
@@ -81,6 +79,7 @@ putenv(char *str)
81 environ[cnt + 1] = NULL; 79 environ[cnt + 1] = NULL;
82 return (0); 80 return (0);
83} 81}
82DEF_WEAK(putenv);
84 83
85/* 84/*
86 * setenv -- 85 * setenv --
@@ -147,6 +146,7 @@ setenv(const char *name, const char *value, int rewrite)
147 ; 146 ;
148 return (0); 147 return (0);
149} 148}
149DEF_WEAK(setenv);
150 150
151/* 151/*
152 * unsetenv(name) -- 152 * unsetenv(name) --
@@ -178,3 +178,4 @@ unsetenv(const char *name)
178 } 178 }
179 return (0); 179 return (0);
180} 180}
181DEF_WEAK(unsetenv);
diff --git a/src/lib/libc/stdlib/srand48.c b/src/lib/libc/stdlib/srand48.c
index ce4b45225d..d41391d445 100644
--- a/src/lib/libc/stdlib/srand48.c
+++ b/src/lib/libc/stdlib/srand48.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: srand48.c,v 1.5 2015/08/27 04:33:31 guenther Exp $ */ 1/* $OpenBSD: srand48.c,v 1.6 2015/09/13 08:31:48 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 1993 Martin Birgmeier 3 * Copyright (c) 1993 Martin Birgmeier
4 * All rights reserved. 4 * All rights reserved.
@@ -35,3 +35,4 @@ srand48_deterministic(long seed)
35 __rand48_mult[2] = RAND48_MULT_2; 35 __rand48_mult[2] = RAND48_MULT_2;
36 __rand48_add = RAND48_ADD; 36 __rand48_add = RAND48_ADD;
37} 37}
38DEF_WEAK(srand48_deterministic);
diff --git a/src/lib/libc/stdlib/strtol.c b/src/lib/libc/stdlib/strtol.c
index 86cec35086..49465e28ee 100644
--- a/src/lib/libc/stdlib/strtol.c
+++ b/src/lib/libc/stdlib/strtol.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strtol.c,v 1.10 2014/09/13 20:10:12 schwarze Exp $ */ 1/* $OpenBSD: strtol.c,v 1.11 2015/09/13 08:31:48 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 1990 The Regents of the University of California. 3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -148,3 +148,4 @@ strtol(const char *nptr, char **endptr, int base)
148 *endptr = (char *) (any ? s - 1 : nptr); 148 *endptr = (char *) (any ? s - 1 : nptr);
149 return (acc); 149 return (acc);
150} 150}
151DEF_STRONG(strtol);
diff --git a/src/lib/libc/stdlib/strtoll.c b/src/lib/libc/stdlib/strtoll.c
index cf82c8e1a6..0ba51da77e 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.8 2014/09/13 20:10:12 schwarze Exp $ */ 1/* $OpenBSD: strtoll.c,v 1.9 2015/09/13 08:31:48 guenther 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.
@@ -151,5 +151,6 @@ strtoll(const char *nptr, char **endptr, int base)
151 *endptr = (char *) (any ? s - 1 : nptr); 151 *endptr = (char *) (any ? s - 1 : nptr);
152 return (acc); 152 return (acc);
153} 153}
154DEF_STRONG(strtoll);
154 155
155__strong_alias(strtoq, strtoll); 156__weak_alias(strtoq, strtoll);
diff --git a/src/lib/libc/stdlib/strtonum.c b/src/lib/libc/stdlib/strtonum.c
index 1aeee3467b..ad22d1c30c 100644
--- a/src/lib/libc/stdlib/strtonum.c
+++ b/src/lib/libc/stdlib/strtonum.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strtonum.c,v 1.7 2013/04/17 18:40:58 tedu Exp $ */ 1/* $OpenBSD: strtonum.c,v 1.8 2015/09/13 08:31:48 guenther Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004 Ted Unangst and Todd Miller 4 * Copyright (c) 2004 Ted Unangst and Todd Miller
@@ -63,3 +63,4 @@ strtonum(const char *numstr, long long minval, long long maxval,
63 63
64 return (ll); 64 return (ll);
65} 65}
66DEF_WEAK(strtonum);
diff --git a/src/lib/libc/stdlib/strtoul.c b/src/lib/libc/stdlib/strtoul.c
index 2aa41b76e4..98e8abcbdb 100644
--- a/src/lib/libc/stdlib/strtoul.c
+++ b/src/lib/libc/stdlib/strtoul.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strtoul.c,v 1.9 2014/09/13 20:10:12 schwarze Exp $ */ 1/* $OpenBSD: strtoul.c,v 1.10 2015/09/13 08:31:48 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 1990 The Regents of the University of California. 3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -107,3 +107,4 @@ strtoul(const char *nptr, char **endptr, int base)
107 *endptr = (char *) (any ? s - 1 : nptr); 107 *endptr = (char *) (any ? s - 1 : nptr);
108 return (acc); 108 return (acc);
109} 109}
110DEF_STRONG(strtoul);
diff --git a/src/lib/libc/stdlib/strtoull.c b/src/lib/libc/stdlib/strtoull.c
index 846417630f..a5d07de6cf 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.7 2014/09/13 20:10:12 schwarze Exp $ */ 1/* $OpenBSD: strtoull.c,v 1.8 2015/09/13 08:31:48 guenther 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.
@@ -109,5 +109,6 @@ strtoull(const char *nptr, char **endptr, int base)
109 *endptr = (char *) (any ? s - 1 : nptr); 109 *endptr = (char *) (any ? s - 1 : nptr);
110 return (acc); 110 return (acc);
111} 111}
112DEF_STRONG(strtoull);
112 113
113__strong_alias(strtouq, strtoull); 114__weak_alias(strtouq, strtoull);
diff --git a/src/lib/libc/stdlib/system.c b/src/lib/libc/stdlib/system.c
index 14ddcae8d3..2a50ec7490 100644
--- a/src/lib/libc/stdlib/system.c
+++ b/src/lib/libc/stdlib/system.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: system.c,v 1.8 2005/08/08 08:05:37 espie Exp $ */ 1/* $OpenBSD: system.c,v 1.9 2015/09/13 08:31:48 guenther Exp $ */
2/* 2/*
3 * Copyright (c) 1988 The Regents of the University of California. 3 * Copyright (c) 1988 The Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -72,3 +72,4 @@ system(const char *command)
72 (void)signal(SIGQUIT, quitsave); 72 (void)signal(SIGQUIT, quitsave);
73 return (pid == -1 ? -1 : pstat); 73 return (pid == -1 ? -1 : pstat);
74} 74}
75DEF_STRONG(system);