Add indirect reference stubs for inet_[ap]ton() for environments not supporting

weak aliases; addresses PR lib/7435 but leaves the original file intact.
This commit is contained in:
kleink 1999-09-15 14:21:01 +00:00
parent e54df1b10c
commit 252971afdb
4 changed files with 62 additions and 5 deletions

View File

@ -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

View File

@ -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 @@ SRCS+= base64.c ethers.c gethnamaddr.c getnetnamadr.c getnetent.c getproto.c \
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

28
lib/libc/net/_inet_aton.c Normal file
View File

@ -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

29
lib/libc/net/_inet_pton.c Normal file
View File

@ -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