From 4b86b5390157b27ef6f13cfffac669a4ca39ca45 Mon Sep 17 00:00:00 2001 From: guenther <> Date: Mon, 14 Sep 2015 07:38:38 +0000 Subject: Finish wrapping so that calls go direct and the symbols are all weak --- src/lib/libc/net/freeaddrinfo.c | 3 ++- src/lib/libc/net/gai_strerror.c | 3 ++- src/lib/libc/net/getproto.c | 3 ++- src/lib/libc/net/getprotoent.c | 5 ++++- src/lib/libc/net/getprotoname.c | 4 +++- src/lib/libc/net/getservbyname.c | 4 +++- src/lib/libc/net/getservbyport.c | 3 ++- src/lib/libc/net/getservent.c | 5 ++++- src/lib/libc/net/herror.c | 3 ++- 9 files changed, 24 insertions(+), 9 deletions(-) (limited to 'src') 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 @@ -/* $OpenBSD: freeaddrinfo.c,v 1.6 2005/03/25 13:24:11 otto Exp $ */ +/* $OpenBSD: freeaddrinfo.c,v 1.7 2015/09/14 07:38:38 guenther Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 1999, Craig Metz, All rights reserved. @@ -48,3 +48,4 @@ freeaddrinfo(struct addrinfo *ai) free((void *)p); } while (ai); } +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 @@ -/* $OpenBSD: gai_strerror.c,v 1.7 2009/06/02 16:47:50 jasper Exp $ */ +/* $OpenBSD: gai_strerror.c,v 1.8 2015/09/14 07:38:38 guenther Exp $ */ /* * Copyright (c) 1997-1999, Craig Metz, All rights reserved. @@ -76,3 +76,4 @@ gai_strerror(int errnum) return "unknown/invalid error"; } } +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 @@ -/* $OpenBSD: getproto.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ +/* $OpenBSD: getproto.c,v 1.8 2015/09/14 07:38:38 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * 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) } return (error); } +DEF_WEAK(getprotobynumber_r); struct protoent * 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 @@ -/* $OpenBSD: getprotoent.c,v 1.12 2014/10/11 03:12:13 doug Exp $ */ +/* $OpenBSD: getprotoent.c,v 1.13 2015/09/14 07:38:38 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -47,6 +47,7 @@ setprotoent_r(int f, struct protoent_data *pd) rewind(pd->fp); pd->stayopen |= f; } +DEF_WEAK(setprotoent_r); void endprotoent_r(struct protoent_data *pd) @@ -62,6 +63,7 @@ endprotoent_r(struct protoent_data *pd) pd->line = NULL; pd->stayopen = 0; } +DEF_WEAK(endprotoent_r); int getprotoent_r(struct protoent *pe, struct protoent_data *pd) @@ -140,6 +142,7 @@ again: *q = NULL; return (0); } +DEF_WEAK(getprotoent_r); struct protoent_data _protoent_data; /* shared with getproto{,name}.c */ 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 @@ -/* $OpenBSD: getprotoname.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ +/* $OpenBSD: getprotoname.c,v 1.8 2015/09/14 07:38:38 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -54,6 +54,7 @@ found: } return (error); } +DEF_WEAK(getprotobyname_r); struct protoent * getprotobyname(const char *name) @@ -65,3 +66,4 @@ getprotobyname(const char *name) return (NULL); return (&proto); } +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 @@ -/* $OpenBSD: getservbyname.c,v 1.10 2005/08/06 20:30:03 espie Exp $ */ +/* $OpenBSD: getservbyname.c,v 1.11 2015/09/14 07:38:38 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -57,6 +57,7 @@ gotname: } return (error); } +DEF_WEAK(getservbyname_r); struct servent * getservbyname(const char *name, const char *proto) @@ -68,3 +69,4 @@ getservbyname(const char *name, const char *proto) return (NULL); return (&serv); } +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 @@ -/* $OpenBSD: getservbyport.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ +/* $OpenBSD: getservbyport.c,v 1.8 2015/09/14 07:38:38 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -51,6 +51,7 @@ getservbyport_r(int port, const char *proto, struct servent *se, } return (error); } +DEF_WEAK(getservbyport_r); struct servent * 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 @@ -/* $OpenBSD: getservent.c,v 1.14 2014/10/11 04:22:03 doug Exp $ */ +/* $OpenBSD: getservent.c,v 1.15 2015/09/14 07:38:38 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -47,6 +47,7 @@ setservent_r(int f, struct servent_data *sd) rewind(sd->fp); sd->stayopen |= f; } +DEF_WEAK(setservent_r); void endservent_r(struct servent_data *sd) @@ -62,6 +63,7 @@ endservent_r(struct servent_data *sd) sd->line = NULL; sd->stayopen = 0; } +DEF_WEAK(endservent_r); int getservent_r(struct servent *se, struct servent_data *sd) @@ -142,6 +144,7 @@ again: *q = NULL; return (0); } +DEF_WEAK(getservent_r); struct servent_data _servent_data; /* shared with getservby{name,port}.c */ 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 @@ -/* $OpenBSD: herror.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */ +/* $OpenBSD: herror.c,v 1.10 2015/09/14 07:38:38 guenther Exp $ */ /* * ++Copyright++ 1987, 1993 @@ -103,3 +103,4 @@ hstrerror(int err) return (h_errlist[err]); return ("Unknown resolver error"); } +DEF_WEAK(hstrerror); -- cgit v1.2.3-55-g6feb