diff options
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/hidden/arpa/inet.h | 36 | ||||
-rw-r--r-- | lib/libc/hidden/arpa/nameser.h | 26 | ||||
-rw-r--r-- | lib/libc/net/inet_addr.c | 3 | ||||
-rw-r--r-- | lib/libc/net/inet_network.c | 3 | ||||
-rw-r--r-- | lib/libc/net/inet_ntop.c | 3 | ||||
-rw-r--r-- | lib/libc/net/inet_pton.c | 3 | ||||
-rw-r--r-- | lib/libc/net/res_comp.c | 4 |
7 files changed, 73 insertions, 5 deletions
diff --git a/lib/libc/hidden/arpa/inet.h b/lib/libc/hidden/arpa/inet.h new file mode 100644 index 00000000000..694425b2e4a --- /dev/null +++ b/lib/libc/hidden/arpa/inet.h @@ -0,0 +1,36 @@ +/* $OpenBSD: inet.h,v 1.1 2015/09/13 21:36:08 guenther Exp $ */ +/* + * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _LIBC_INET_H_ +#define _LIBC_INET_H_ + +#include_next <arpa/inet.h> + +PROTO_DEPRECATED(inet_addr); +PROTO_NORMAL(inet_aton); +PROTO_DEPRECATED(inet_lnaof); +PROTO_DEPRECATED(inet_makeaddr); +PROTO_DEPRECATED(inet_net_ntop); +PROTO_DEPRECATED(inet_net_pton); +PROTO_DEPRECATED(inet_neta); +PROTO_DEPRECATED(inet_netof); +PROTO_NORMAL(inet_network); +PROTO_DEPRECATED(inet_ntoa); +PROTO_NORMAL(inet_ntop); +PROTO_NORMAL(inet_pton); + +#endif /* !_LIBC_INET_H_ */ diff --git a/lib/libc/hidden/arpa/nameser.h b/lib/libc/hidden/arpa/nameser.h new file mode 100644 index 00000000000..a7155a21a7e --- /dev/null +++ b/lib/libc/hidden/arpa/nameser.h @@ -0,0 +1,26 @@ +/* $OpenBSD: nameser.h,v 1.1 2015/09/13 21:36:08 guenther Exp $ */ +/* + * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _LIBC_NAMESER_H_ +#define _LIBC_NAMESER_H_ + +#include_next <arpa/nameser.h> + +PROTO_NORMAL(_getshort); +PROTO_NORMAL(_getlong); + +#endif /* !_LIBC_NAMESER_H_ */ diff --git a/lib/libc/net/inet_addr.c b/lib/libc/net/inet_addr.c index 2c9aa3051b6..62d46ad664f 100644 --- a/lib/libc/net/inet_addr.c +++ b/lib/libc/net/inet_addr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_addr.c,v 1.11 2015/01/16 16:48:51 deraadt Exp $ */ +/* $OpenBSD: inet_addr.c,v 1.12 2015/09/13 21:36:08 guenther Exp $ */ /* * ++Copyright++ 1983, 1990, 1993 @@ -172,3 +172,4 @@ inet_aton(const char *cp, struct in_addr *addr) addr->s_addr = htonl(val); return (1); } +DEF_WEAK(inet_aton); diff --git a/lib/libc/net/inet_network.c b/lib/libc/net/inet_network.c index ecf554e4f9a..ef8f21b2800 100644 --- a/lib/libc/net/inet_network.c +++ b/lib/libc/net/inet_network.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_network.c,v 1.11 2013/11/25 17:29:19 deraadt Exp $ */ +/* $OpenBSD: inet_network.c,v 1.12 2015/09/13 21:36:08 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -82,3 +82,4 @@ again: } return (val); } +DEF_WEAK(inet_network); diff --git a/lib/libc/net/inet_ntop.c b/lib/libc/net/inet_ntop.c index 722761e2ed9..f44dd080221 100644 --- a/lib/libc/net/inet_ntop.c +++ b/lib/libc/net/inet_ntop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_ntop.c,v 1.11 2015/01/16 16:48:51 deraadt Exp $ */ +/* $OpenBSD: inet_ntop.c,v 1.12 2015/09/13 21:36:08 guenther Exp $ */ /* Copyright (c) 1996 by Internet Software Consortium. * @@ -55,6 +55,7 @@ inet_ntop(int af, const void *src, char *dst, socklen_t size) } /* NOTREACHED */ } +DEF_WEAK(inet_ntop); /* const char * * inet_ntop4(src, dst, size) diff --git a/lib/libc/net/inet_pton.c b/lib/libc/net/inet_pton.c index f8e299b7b8a..5d7148e8e91 100644 --- a/lib/libc/net/inet_pton.c +++ b/lib/libc/net/inet_pton.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_pton.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */ +/* $OpenBSD: inet_pton.c,v 1.10 2015/09/13 21:36:08 guenther Exp $ */ /* Copyright (c) 1996 by Internet Software Consortium. * @@ -57,6 +57,7 @@ inet_pton(int af, const char *src, void *dst) } /* NOTREACHED */ } +DEF_WEAK(inet_pton); /* int * inet_pton4(src, dst) diff --git a/lib/libc/net/res_comp.c b/lib/libc/net/res_comp.c index a1467c3dbb7..f6f987eb0e8 100644 --- a/lib/libc/net/res_comp.c +++ b/lib/libc/net/res_comp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_comp.c,v 1.16 2015/01/16 18:18:58 millert Exp $ */ +/* $OpenBSD: res_comp.c,v 1.17 2015/09/13 21:36:08 guenther Exp $ */ /* * ++Copyright++ 1985, 1993 @@ -440,6 +440,7 @@ _getshort(const u_char *msgp) GETSHORT(u, msgp); return (u); } +DEF_STRONG(_getshort); #ifdef NeXT /* @@ -461,6 +462,7 @@ _getlong(const u_char *msgp) GETLONG(u, msgp); return (u); } +DEF_STRONG(_getlong); void __putshort(u_int16_t s, u_char *msgp) |