Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc Add indirect reference stubs for inet_[ap]ton() for...
details: https://anonhg.NetBSD.org/src/rev/7274a8f2eab1
branches: trunk
changeset: 476389:7274a8f2eab1
user: kleink <kleink%NetBSD.org@localhost>
date: Wed Sep 15 14:21:01 1999 +0000
description:
Add indirect reference stubs for inet_[ap]ton() for environments not supporting
weak aliases; addresses PR lib/7435 but leaves the original file intact.
diffstat:
lib/libc/include/namespace.h | 6 +++---
lib/libc/net/Makefile.inc | 4 ++--
lib/libc/net/_inet_aton.c | 28 ++++++++++++++++++++++++++++
lib/libc/net/_inet_pton.c | 29 +++++++++++++++++++++++++++++
4 files changed, 62 insertions(+), 5 deletions(-)
diffs (117 lines):
diff -r c765a84118fe -r 7274a8f2eab1 lib/libc/include/namespace.h
--- a/lib/libc/include/namespace.h Wed Sep 15 14:17:14 1999 +0000
+++ b/lib/libc/include/namespace.h Wed Sep 15 14:21:01 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: namespace.h,v 1.38 1999/08/17 05:20:23 mycroft Exp $ */
+/* $NetBSD: namespace.h,v 1.39 1999/09/15 14:21:01 kleink Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -43,6 +43,8 @@
#define catopen _catopen
#define err _err
#define errx _errx
+#define inet_aton _inet_aton
+#define inet_pton _inet_pton
#define strtoq _strtoq
#define strtouq _strtouq
#define sys_errlist _sys_errlist
@@ -223,7 +225,6 @@
#define hesiod_init _hesiod_init
#define hesiod_resolve _hesiod_resolve
#define hesiod_to_bind _hesiod_to_bind
-#define inet_aton _inet_aton
#define inet_lnaof _inet_lnaof
#define inet_makeaddr _inet_makeaddr
#define inet_net_ntop _inet_net_ntop
@@ -235,7 +236,6 @@
#define inet_nsap_ntoa _inet_nsap_ntoa
#define inet_ntoa _inet_ntoa
#define inet_ntop _inet_ntop
-#define inet_pton _inet_pton
#define initgroups _initgroups
#define initstate _initstate
#define innetgr _innetgr
diff -r c765a84118fe -r 7274a8f2eab1 lib/libc/net/Makefile.inc
--- a/lib/libc/net/Makefile.inc Wed Sep 15 14:17:14 1999 +0000
+++ b/lib/libc/net/Makefile.inc Wed Sep 15 14:21:01 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.43 1999/07/01 18:23:53 itojun Exp $
+# $NetBSD: Makefile.inc,v 1.44 1999/09/15 14:21:02 kleink Exp $
# @(#)Makefile.inc 8.2 (Berkeley) 9/5/93
# net sources
@@ -13,7 +13,7 @@
rcmd.c recv.c res_comp.c res_data.c res_debug.c res_init.c \
res_mkquery.c res_query.c res_send.c send.c sethostent.c
-SRCS+= __dn_comp.c __res_close.c __res_send.c
+SRCS+= __dn_comp.c __res_close.c __res_send.c _inet_aton.c _inet_pton.c
CPPFLAGS+=-DRESOLVSORT -I.
# IPv6
diff -r c765a84118fe -r 7274a8f2eab1 lib/libc/net/_inet_aton.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/net/_inet_aton.c Wed Sep 15 14:21:01 1999 +0000
@@ -0,0 +1,28 @@
+/* $NetBSD: _inet_aton.c,v 1.1 1999/09/15 14:21:03 kleink Exp $ */
+
+/*
+ * Written by Klaus Klein, September 14, 1999.
+ * Public domain.
+ */
+
+#include <sys/cdefs.h>
+
+#ifdef __indr_reference
+__indr_reference(_inet_aton,inet_aton)
+#else
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+extern int _inet_aton __P((const char *, struct in_addr *));
+
+int
+inet_aton(cp, addr)
+ const char *cp;
+ struct in_addr *addr;
+{
+
+ return _inet_aton(cp, addr);
+}
+#endif
diff -r c765a84118fe -r 7274a8f2eab1 lib/libc/net/_inet_pton.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/net/_inet_pton.c Wed Sep 15 14:21:01 1999 +0000
@@ -0,0 +1,29 @@
+/* $NetBSD: _inet_pton.c,v 1.1 1999/09/15 14:21:03 kleink Exp $ */
+
+/*
+ * Written by Klaus Klein, September 14, 1999.
+ * Public domain.
+ */
+
+#include <sys/cdefs.h>
+
+#ifdef __indr_reference
+__indr_reference(_inet_pton,inet_pton)
+#else
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+extern int _inet_pton __P((int, const char *, void *));
+
+int
+inet_pton(af, src, dst)
+ int af;
+ const char *src;
+ void *dst;
+{
+
+ return _inet_pton(af, src, dst);
+}
+#endif
Home |
Main Index |
Thread Index |
Old Index