Slight hack to get this building on OS X again: Undo the renaming before

including the host's <pwd.h> to avoid renaming the host's versions of
these functions (which causes a prototype conflict).  After <pwd.h> has
been included, then re-apply the renaming.
This commit is contained in:
thorpej 2004-06-18 20:34:58 +00:00
parent b45be21f86
commit a6ae8a84ac
1 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pwcache.c,v 1.27 2004/05/18 22:14:35 sjg Exp $ */
/* $NetBSD: pwcache.c,v 1.28 2004/06/18 20:34:58 thorpej Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@ -68,6 +68,12 @@
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
/*
* XXX Undefine the renames of these functions so that we don't
* XXX rename the versions found in the host's <pwd.h> by mistake!
*/
#undef group_from_gid
#undef user_from_uid
#endif
#include <sys/cdefs.h>
@ -75,7 +81,7 @@
#if 0
static char sccsid[] = "@(#)cache.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: pwcache.c,v 1.27 2004/05/18 22:14:35 sjg Exp $");
__RCSID("$NetBSD: pwcache.c,v 1.28 2004/06/18 20:34:58 thorpej Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -92,6 +98,12 @@ __RCSID("$NetBSD: pwcache.c,v 1.27 2004/05/18 22:14:35 sjg Exp $");
#include <string.h>
#include <unistd.h>
#if HAVE_NBTOOL_CONFIG_H
/* XXX Now, re-apply the renaming that we undid above. */
#define group_from_gid __nbcompat_group_from_gid
#define user_from_uid __nbcompat_user_from_uid
#endif
#ifdef __weak_alias
__weak_alias(user_from_uid,_user_from_uid)
__weak_alias(group_from_gid,_group_from_gid)