diff --git a/distrib/utils/libhack/getcap.c b/distrib/utils/libhack/getcap.c index 6f7b4265ef4c..fe2d279b1014 100644 --- a/distrib/utils/libhack/getcap.c +++ b/distrib/utils/libhack/getcap.c @@ -1,4 +1,4 @@ -/* $NetBSD: getcap.c,v 1.2 1999/03/13 19:11:54 sommerfe Exp $ */ +/* $NetBSD: getcap.c,v 1.3 2001/06/15 17:26:50 tsutsui Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -46,10 +46,23 @@ #if 0 static char sccsid[] = "@(#)getcap.c 8.3 (Berkeley) 3/25/94"; #else -__RCSID("$NetBSD: getcap.c,v 1.2 1999/03/13 19:11:54 sommerfe Exp $"); +__RCSID("$NetBSD: getcap.c,v 1.3 2001/06/15 17:26:50 tsutsui Exp $"); #endif #endif /* LIBC_SCCS and not lint */ +#ifdef __weak_alias +#define cgetcap _cgetcap +#define cgetclose _cgetclose +#define cgetent _cgetent +#define cgetfirst _cgetfirst +#define cgetmatch _cgetmatch +#define cgetnext _cgetnext +#define cgetnum _cgetnum +#define cgetset _cgetset +#define cgetstr _cgetstr +#define cgetustr _cgetustr +#endif + #include #include #include @@ -70,6 +83,19 @@ __RCSID("$NetBSD: getcap.c,v 1.2 1999/03/13 19:11:54 sommerfe Exp $"); #define TCERR (char)1 #define SHADOW (char)2 +#ifdef __weak_alias +__weak_alias(cgetcap,_cgetcap) +__weak_alias(cgetclose,_cgetclose) +__weak_alias(cgetent,_cgetent) +__weak_alias(cgetfirst,_cgetfirst) +__weak_alias(cgetmatch,_cgetmatch) +__weak_alias(cgetnext,_cgetnext) +__weak_alias(cgetnum,_cgetnum) +__weak_alias(cgetset,_cgetset) +__weak_alias(cgetstr,_cgetstr) +__weak_alias(cgetustr,_cgetustr) +#endif + static size_t topreclen; /* toprec length */ static char *toprec; /* Additional record specified by cgetset() */ static int gottoprec; /* Flag indicating retrieval of toprecord */ diff --git a/distrib/utils/libhack/getgrent.c b/distrib/utils/libhack/getgrent.c index 2b3d1a201439..2dce255f8b2f 100644 --- a/distrib/utils/libhack/getgrent.c +++ b/distrib/utils/libhack/getgrent.c @@ -1,4 +1,4 @@ -/* $NetBSD: getgrent.c,v 1.3 1999/03/13 19:08:44 sommerfe Exp $ */ +/* $NetBSD: getgrent.c,v 1.4 2001/06/15 17:26:51 tsutsui Exp $ */ /* * Copyright (c) 1989, 1993 @@ -39,12 +39,32 @@ * and then gutted, leaving only /etc/group support. */ +#include + +#ifdef __weak_alias +#define endgrent _endgrent +#define getgrent _getgrent +#define getgrgid _getgrgid +#define getgrnam _getgrnam +#define setgrent _setgrent +#define setgroupent _setgroupent +#endif + #include #include #include #include #include +#ifdef __weak_alias +__weak_alias(endgrent,_endgrent) +__weak_alias(getgrent,_getgrent) +__weak_alias(getgrgid,_getgrgid) +__weak_alias(getgrnam,_getgrnam) +__weak_alias(setgrent,_setgrent) +__weak_alias(setgroupent,_setgroupent) +#endif + static FILE *_gr_fp; static struct group _gr_group; static int _gr_stayopen; diff --git a/distrib/utils/libhack/gethost.c b/distrib/utils/libhack/gethost.c index 1e85b168dcf8..b02dc2a8ab4e 100644 --- a/distrib/utils/libhack/gethost.c +++ b/distrib/utils/libhack/gethost.c @@ -1,4 +1,4 @@ -/* $NetBSD: gethost.c,v 1.6 2001/04/28 14:56:42 kleink Exp $ */ +/* $NetBSD: gethost.c,v 1.7 2001/06/15 17:26:51 tsutsui Exp $ */ /*- * Copyright (c) 1985, 1988, 1993 @@ -60,15 +60,9 @@ #include -#if defined(__weak_alias) -/* From namespace.h: */ -#define gethostbyaddr _gethostbyaddr -#define gethostbyname _gethostbyname -#define gethostname _gethostname - -__weak_alias(gethostbyaddr,_gethostbyaddr); -__weak_alias(gethostbyname,_gethostbyname); -__weak_alias(gethostbyname2,gethostbyname); +#ifdef __weak_alias +#define gethostbyaddr _gethostbyaddr +#define gethostbyname _gethostbyname #endif #include @@ -83,6 +77,11 @@ __weak_alias(gethostbyname2,gethostbyname); #include #include +#ifdef __weak_alias +__weak_alias(gethostbyaddr,_gethostbyaddr); +__weak_alias(gethostbyname,_gethostbyname); +#endif + #define MAXALIASES 35 #define MAXADDRS 35 diff --git a/distrib/utils/libhack/getnet.c b/distrib/utils/libhack/getnet.c index fad158f66870..d22ee3793669 100644 --- a/distrib/utils/libhack/getnet.c +++ b/distrib/utils/libhack/getnet.c @@ -1,4 +1,4 @@ -/* $NetBSD: getnet.c,v 1.1 1997/12/12 03:05:59 gwr Exp $ */ +/* $NetBSD: getnet.c,v 1.2 2001/06/15 17:26:51 tsutsui Exp $ */ /* Copyright (c) 1993 Carlos Leandro and Rui Salgueiro * Dep. Matematica Universidade de Coimbra, Portugal, Europe @@ -45,6 +45,13 @@ * and then gutted, leaving only stubs. */ +#include + +#ifdef __weak_alias +#define getnetbyaddr _getnetbyaddr +#define getnetbyname _getnetbyname +#endif + #include #include #include @@ -58,6 +65,11 @@ #include #include +#ifdef __weak_alias +__weak_alias(getnetbyaddr,_getnetbyaddr) +__weak_alias(getnetbyname,_getnetbyname) +#endif + struct netent * getnetbyaddr(net, net_type) register u_long net; diff --git a/distrib/utils/libhack/getnetgr.c b/distrib/utils/libhack/getnetgr.c index e4839e203d25..6abe9ce4af3a 100644 --- a/distrib/utils/libhack/getnetgr.c +++ b/distrib/utils/libhack/getnetgr.c @@ -1,7 +1,23 @@ -/* $NetBSD: getnetgr.c,v 1.3 1999/03/13 19:08:44 sommerfe Exp $ */ +/* $NetBSD: getnetgr.c,v 1.4 2001/06/15 17:26:51 tsutsui Exp $ */ + +#include + +#ifdef __weak_alias +#define endnetgrent _endnetgrent +#define innetgr _innetgr +#define getnetgrent _getnetgrent +#define setnetgrent _setnetgrent +#endif #include +#ifdef __weak_alias +__weak_alias(endnetgrent,_endnetgrent) +__weak_alias(getnetgrent,_getnetgrent) +__weak_alias(innetgr,_innetgr) +__weak_alias(setnetgrent,_setnetgrent) +#endif + /* * Just stub these out, so it looks like * we are not in any any netgroups. diff --git a/distrib/utils/libhack/getpwent.c b/distrib/utils/libhack/getpwent.c index 9f1f2c8aa057..c5a60be02d39 100644 --- a/distrib/utils/libhack/getpwent.c +++ b/distrib/utils/libhack/getpwent.c @@ -1,4 +1,4 @@ -/* $NetBSD: getpwent.c,v 1.3 1999/03/13 19:08:44 sommerfe Exp $ */ +/* $NetBSD: getpwent.c,v 1.4 2001/06/15 17:26:51 tsutsui Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross @@ -35,11 +35,31 @@ * Needed by programs like: rsh, rlogin */ +#include + +#ifdef __weak_alias +#define endpwent _endpwent +#define getpwent _getpwent +#define getpwnam _getpwnam +#define getpwuid _getpwuid +#define setpassent _setpassent +#define setpwent _setpwent +#endif + #include #include #include #include +#ifdef __weak_alias +__weak_alias(endpwent,_endpwent) +__weak_alias(getpwent,_getpwent) +__weak_alias(getpwnam,_getpwnam) +__weak_alias(getpwuid,_getpwuid) +__weak_alias(setpassent,_setpassent) +__weak_alias(setpwent,_setpwent) +#endif + #define PWNULL (struct passwd *)0 #define MAXFIELD 8 diff --git a/distrib/utils/libhack/opendir.c b/distrib/utils/libhack/opendir.c index 6cbdb2630c2d..a8b1ca171d4b 100644 --- a/distrib/utils/libhack/opendir.c +++ b/distrib/utils/libhack/opendir.c @@ -1,4 +1,4 @@ -/* $NetBSD: opendir.c,v 1.2 1999/05/23 22:08:17 gwr Exp $ */ +/* $NetBSD: opendir.c,v 1.3 2001/06/15 17:26:51 tsutsui Exp $ */ /* * Copyright (c) 1983, 1993 @@ -33,6 +33,12 @@ * SUCH DAMAGE. */ +#include + +#ifdef __weak_alias +#define opendir _opendir +#endif + #include #include #include @@ -44,6 +50,10 @@ #include #include +#ifdef __weak_alias +__weak_alias(opendir,_opendir) +#endif + /* * Open a directory. */ diff --git a/distrib/utils/libhack/strsignal.c b/distrib/utils/libhack/strsignal.c index bc6c03401c5d..f9693e0dfd97 100644 --- a/distrib/utils/libhack/strsignal.c +++ b/distrib/utils/libhack/strsignal.c @@ -1,4 +1,4 @@ -/* $NetBSD: strsignal.c,v 1.2 1999/05/27 05:41:15 gwr Exp $ */ +/* $NetBSD: strsignal.c,v 1.3 2001/06/15 17:26:51 tsutsui Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -33,10 +33,20 @@ * SUCH DAMAGE. */ +#include + +#ifdef __weak_alias +#define strsignal _strsignal +#endif + #include #include #include +#ifdef __weak_alias +__weak_alias(strsignal,_strsignal) +#endif + /* * Simplified from the libc version. */