diff options
author | guenther <> | 2015-09-14 07:38:38 +0000 |
---|---|---|
committer | guenther <> | 2015-09-14 07:38:38 +0000 |
commit | 4b86b5390157b27ef6f13cfffac669a4ca39ca45 (patch) | |
tree | 3e8e48085acccfec6ea84d7f7dfa4ec85ac6335f /src/lib | |
parent | 631e2e1c0de0d507d6c3ef3349cce9c9003dac9b (diff) | |
download | openbsd-4b86b5390157b27ef6f13cfffac669a4ca39ca45.tar.gz openbsd-4b86b5390157b27ef6f13cfffac669a4ca39ca45.tar.bz2 openbsd-4b86b5390157b27ef6f13cfffac669a4ca39ca45.zip |
Finish wrapping <netdb.h> so that calls go direct and the symbols are all weak
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/net/freeaddrinfo.c | 3 | ||||
-rw-r--r-- | src/lib/libc/net/gai_strerror.c | 3 | ||||
-rw-r--r-- | src/lib/libc/net/getproto.c | 3 | ||||
-rw-r--r-- | src/lib/libc/net/getprotoent.c | 5 | ||||
-rw-r--r-- | src/lib/libc/net/getprotoname.c | 4 | ||||
-rw-r--r-- | src/lib/libc/net/getservbyname.c | 4 | ||||
-rw-r--r-- | src/lib/libc/net/getservbyport.c | 3 | ||||
-rw-r--r-- | src/lib/libc/net/getservent.c | 5 | ||||
-rw-r--r-- | src/lib/libc/net/herror.c | 3 |
9 files changed, 24 insertions, 9 deletions
diff --git a/src/lib/libc/net/freeaddrinfo.c b/src/lib/libc/net/freeaddrinfo.c index 58702d0b18..5efb97db92 100644 --- a/src/lib/libc/net/freeaddrinfo.c +++ b/src/lib/libc/net/freeaddrinfo.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: freeaddrinfo.c,v 1.6 2005/03/25 13:24:11 otto Exp $ */ | 1 | /* $OpenBSD: freeaddrinfo.c,v 1.7 2015/09/14 07:38:38 guenther Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1996, 1997, 1998, 1999, Craig Metz, All rights reserved. | 4 | * Copyright (c) 1996, 1997, 1998, 1999, Craig Metz, All rights reserved. |
@@ -48,3 +48,4 @@ freeaddrinfo(struct addrinfo *ai) | |||
48 | free((void *)p); | 48 | free((void *)p); |
49 | } while (ai); | 49 | } while (ai); |
50 | } | 50 | } |
51 | DEF_WEAK(freeaddrinfo); | ||
diff --git a/src/lib/libc/net/gai_strerror.c b/src/lib/libc/net/gai_strerror.c index f4126413f8..1e9b585029 100644 --- a/src/lib/libc/net/gai_strerror.c +++ b/src/lib/libc/net/gai_strerror.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: gai_strerror.c,v 1.7 2009/06/02 16:47:50 jasper Exp $ */ | 1 | /* $OpenBSD: gai_strerror.c,v 1.8 2015/09/14 07:38:38 guenther Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1997-1999, Craig Metz, All rights reserved. | 4 | * Copyright (c) 1997-1999, Craig Metz, All rights reserved. |
@@ -76,3 +76,4 @@ gai_strerror(int errnum) | |||
76 | return "unknown/invalid error"; | 76 | return "unknown/invalid error"; |
77 | } | 77 | } |
78 | } | 78 | } |
79 | DEF_WEAK(gai_strerror); | ||
diff --git a/src/lib/libc/net/getproto.c b/src/lib/libc/net/getproto.c index 07fa33288d..8e080679d0 100644 --- a/src/lib/libc/net/getproto.c +++ b/src/lib/libc/net/getproto.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getproto.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ | 1 | /* $OpenBSD: getproto.c,v 1.8 2015/09/14 07:38:38 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1983, 1993 | 3 | * Copyright (c) 1983, 1993 |
4 | * The Regents of the University of California. All rights reserved. | 4 | * The Regents of the University of California. All rights reserved. |
@@ -46,6 +46,7 @@ getprotobynumber_r(int num, struct protoent *pe, struct protoent_data *pd) | |||
46 | } | 46 | } |
47 | return (error); | 47 | return (error); |
48 | } | 48 | } |
49 | DEF_WEAK(getprotobynumber_r); | ||
49 | 50 | ||
50 | struct protoent * | 51 | struct protoent * |
51 | getprotobynumber(int num) | 52 | getprotobynumber(int num) |
diff --git a/src/lib/libc/net/getprotoent.c b/src/lib/libc/net/getprotoent.c index 7431566f85..a218863d07 100644 --- a/src/lib/libc/net/getprotoent.c +++ b/src/lib/libc/net/getprotoent.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getprotoent.c,v 1.12 2014/10/11 03:12:13 doug Exp $ */ | 1 | /* $OpenBSD: getprotoent.c,v 1.13 2015/09/14 07:38:38 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1983, 1993 | 3 | * Copyright (c) 1983, 1993 |
4 | * The Regents of the University of California. All rights reserved. | 4 | * The Regents of the University of California. All rights reserved. |
@@ -47,6 +47,7 @@ setprotoent_r(int f, struct protoent_data *pd) | |||
47 | rewind(pd->fp); | 47 | rewind(pd->fp); |
48 | pd->stayopen |= f; | 48 | pd->stayopen |= f; |
49 | } | 49 | } |
50 | DEF_WEAK(setprotoent_r); | ||
50 | 51 | ||
51 | void | 52 | void |
52 | endprotoent_r(struct protoent_data *pd) | 53 | endprotoent_r(struct protoent_data *pd) |
@@ -62,6 +63,7 @@ endprotoent_r(struct protoent_data *pd) | |||
62 | pd->line = NULL; | 63 | pd->line = NULL; |
63 | pd->stayopen = 0; | 64 | pd->stayopen = 0; |
64 | } | 65 | } |
66 | DEF_WEAK(endprotoent_r); | ||
65 | 67 | ||
66 | int | 68 | int |
67 | getprotoent_r(struct protoent *pe, struct protoent_data *pd) | 69 | getprotoent_r(struct protoent *pe, struct protoent_data *pd) |
@@ -140,6 +142,7 @@ again: | |||
140 | *q = NULL; | 142 | *q = NULL; |
141 | return (0); | 143 | return (0); |
142 | } | 144 | } |
145 | DEF_WEAK(getprotoent_r); | ||
143 | 146 | ||
144 | struct protoent_data _protoent_data; /* shared with getproto{,name}.c */ | 147 | struct protoent_data _protoent_data; /* shared with getproto{,name}.c */ |
145 | 148 | ||
diff --git a/src/lib/libc/net/getprotoname.c b/src/lib/libc/net/getprotoname.c index 749b6b3f13..f6ed4c49b1 100644 --- a/src/lib/libc/net/getprotoname.c +++ b/src/lib/libc/net/getprotoname.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getprotoname.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ | 1 | /* $OpenBSD: getprotoname.c,v 1.8 2015/09/14 07:38:38 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1983, 1993 | 3 | * Copyright (c) 1983, 1993 |
4 | * The Regents of the University of California. All rights reserved. | 4 | * The Regents of the University of California. All rights reserved. |
@@ -54,6 +54,7 @@ found: | |||
54 | } | 54 | } |
55 | return (error); | 55 | return (error); |
56 | } | 56 | } |
57 | DEF_WEAK(getprotobyname_r); | ||
57 | 58 | ||
58 | struct protoent * | 59 | struct protoent * |
59 | getprotobyname(const char *name) | 60 | getprotobyname(const char *name) |
@@ -65,3 +66,4 @@ getprotobyname(const char *name) | |||
65 | return (NULL); | 66 | return (NULL); |
66 | return (&proto); | 67 | return (&proto); |
67 | } | 68 | } |
69 | DEF_WEAK(getprotobyname); | ||
diff --git a/src/lib/libc/net/getservbyname.c b/src/lib/libc/net/getservbyname.c index beb8943af6..80c7e62a41 100644 --- a/src/lib/libc/net/getservbyname.c +++ b/src/lib/libc/net/getservbyname.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getservbyname.c,v 1.10 2005/08/06 20:30:03 espie Exp $ */ | 1 | /* $OpenBSD: getservbyname.c,v 1.11 2015/09/14 07:38:38 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1983, 1993 | 3 | * Copyright (c) 1983, 1993 |
4 | * The Regents of the University of California. All rights reserved. | 4 | * The Regents of the University of California. All rights reserved. |
@@ -57,6 +57,7 @@ gotname: | |||
57 | } | 57 | } |
58 | return (error); | 58 | return (error); |
59 | } | 59 | } |
60 | DEF_WEAK(getservbyname_r); | ||
60 | 61 | ||
61 | struct servent * | 62 | struct servent * |
62 | getservbyname(const char *name, const char *proto) | 63 | getservbyname(const char *name, const char *proto) |
@@ -68,3 +69,4 @@ getservbyname(const char *name, const char *proto) | |||
68 | return (NULL); | 69 | return (NULL); |
69 | return (&serv); | 70 | return (&serv); |
70 | } | 71 | } |
72 | DEF_WEAK(getservbyname); | ||
diff --git a/src/lib/libc/net/getservbyport.c b/src/lib/libc/net/getservbyport.c index 46679ba366..3584fbea3a 100644 --- a/src/lib/libc/net/getservbyport.c +++ b/src/lib/libc/net/getservbyport.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getservbyport.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ | 1 | /* $OpenBSD: getservbyport.c,v 1.8 2015/09/14 07:38:38 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1983, 1993 | 3 | * Copyright (c) 1983, 1993 |
4 | * The Regents of the University of California. All rights reserved. | 4 | * The Regents of the University of California. All rights reserved. |
@@ -51,6 +51,7 @@ getservbyport_r(int port, const char *proto, struct servent *se, | |||
51 | } | 51 | } |
52 | return (error); | 52 | return (error); |
53 | } | 53 | } |
54 | DEF_WEAK(getservbyport_r); | ||
54 | 55 | ||
55 | struct servent * | 56 | struct servent * |
56 | getservbyport(int port, const char *proto) | 57 | getservbyport(int port, const char *proto) |
diff --git a/src/lib/libc/net/getservent.c b/src/lib/libc/net/getservent.c index dc43da0a8b..220a5851ce 100644 --- a/src/lib/libc/net/getservent.c +++ b/src/lib/libc/net/getservent.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getservent.c,v 1.14 2014/10/11 04:22:03 doug Exp $ */ | 1 | /* $OpenBSD: getservent.c,v 1.15 2015/09/14 07:38:38 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1983, 1993 | 3 | * Copyright (c) 1983, 1993 |
4 | * The Regents of the University of California. All rights reserved. | 4 | * The Regents of the University of California. All rights reserved. |
@@ -47,6 +47,7 @@ setservent_r(int f, struct servent_data *sd) | |||
47 | rewind(sd->fp); | 47 | rewind(sd->fp); |
48 | sd->stayopen |= f; | 48 | sd->stayopen |= f; |
49 | } | 49 | } |
50 | DEF_WEAK(setservent_r); | ||
50 | 51 | ||
51 | void | 52 | void |
52 | endservent_r(struct servent_data *sd) | 53 | endservent_r(struct servent_data *sd) |
@@ -62,6 +63,7 @@ endservent_r(struct servent_data *sd) | |||
62 | sd->line = NULL; | 63 | sd->line = NULL; |
63 | sd->stayopen = 0; | 64 | sd->stayopen = 0; |
64 | } | 65 | } |
66 | DEF_WEAK(endservent_r); | ||
65 | 67 | ||
66 | int | 68 | int |
67 | getservent_r(struct servent *se, struct servent_data *sd) | 69 | getservent_r(struct servent *se, struct servent_data *sd) |
@@ -142,6 +144,7 @@ again: | |||
142 | *q = NULL; | 144 | *q = NULL; |
143 | return (0); | 145 | return (0); |
144 | } | 146 | } |
147 | DEF_WEAK(getservent_r); | ||
145 | 148 | ||
146 | struct servent_data _servent_data; /* shared with getservby{name,port}.c */ | 149 | struct servent_data _servent_data; /* shared with getservby{name,port}.c */ |
147 | 150 | ||
diff --git a/src/lib/libc/net/herror.c b/src/lib/libc/net/herror.c index 8dee0cc382..356c85fa1d 100644 --- a/src/lib/libc/net/herror.c +++ b/src/lib/libc/net/herror.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: herror.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */ | 1 | /* $OpenBSD: herror.c,v 1.10 2015/09/14 07:38:38 guenther Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * ++Copyright++ 1987, 1993 | 4 | * ++Copyright++ 1987, 1993 |
@@ -103,3 +103,4 @@ hstrerror(int err) | |||
103 | return (h_errlist[err]); | 103 | return (h_errlist[err]); |
104 | return ("Unknown resolver error"); | 104 | return ("Unknown resolver error"); |
105 | } | 105 | } |
106 | DEF_WEAK(hstrerror); | ||