Avoid cgetcap &co prototypes conflicting with those provided by the host.

With this change we can cross-compile on FreeBSD 4.x.
This commit is contained in:
uwe 2003-01-31 20:50:29 +00:00
parent 5adf511512
commit 4eb408dcd9
3 changed files with 36 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: getcap.c,v 1.36 2002/08/04 11:55:51 tron Exp $ */
/* $NetBSD: getcap.c,v 1.37 2003/01/31 20:50:30 uwe Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -36,12 +36,16 @@
* SUCH DAMAGE.
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)getcap.c 8.3 (Berkeley) 3/25/94";
#else
__RCSID("$NetBSD: getcap.c,v 1.36 2002/08/04 11:55:51 tron Exp $");
__RCSID("$NetBSD: getcap.c,v 1.37 2003/01/31 20:50:30 uwe Exp $");
#endif
#endif /* LIBC_SCCS and not lint */

View File

@ -1,4 +1,4 @@
/* $NetBSD: compat_defs.h,v 1.24 2003/01/27 01:17:47 uwe Exp $ */
/* $NetBSD: compat_defs.h,v 1.25 2003/01/31 20:50:29 uwe Exp $ */
#ifndef __NETBSD_COMPAT_DEFS_H__
#define __NETBSD_COMPAT_DEFS_H__
@ -410,6 +410,29 @@ char *alloca ();
# endif
#endif
/* avoid prototype conflicts with host */
#define cgetcap __nbcompat_cgetcap
#define cgetclose __nbcompat_cgetclose
#define cgetent __nbcompat_cgetent
#define cgetfirst __nbcompat_cgetfirst
#define cgetmatch __nbcompat_cgetmatch
#define cgetnext __nbcompat_cgetnext
#define cgetnum __nbcompat_cgetnum
#define cgetset __nbcompat_cgetset
#define cgetstr __nbcompat_cgetstr
#define cgetustr __nbcompat_cgetustr
char *cgetcap(char *, const char *, int);
int cgetclose(void);
int cgetent(char **, char **, const char *);
int cgetfirst(char **, char **);
int cgetmatch(const char *, const char *);
int cgetnext(char **, char **);
int cgetnum(char *, const char *, long *);
int cgetset(const char *);
int cgetstr(char *, const char *, char **);
int cgetustr(char *, const char *, char **);
/* <sys/endian.h> */
#ifndef HAVE_SYS_ENDIAN_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: cap_mkdb.c,v 1.16 2002/01/31 19:23:50 tv Exp $ */
/* $NetBSD: cap_mkdb.c,v 1.17 2003/01/31 20:50:30 uwe Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -33,6 +33,10 @@
* SUCH DAMAGE.
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <sys/cdefs.h>
#if defined(__COPYRIGHT) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1992, 1993\n\
@ -43,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 1993\n\
#if 0
static char sccsid[] = "@(#)cap_mkdb.c 8.2 (Berkeley) 4/27/95";
#endif
__RCSID("$NetBSD: cap_mkdb.c,v 1.16 2002/01/31 19:23:50 tv Exp $");
__RCSID("$NetBSD: cap_mkdb.c,v 1.17 2003/01/31 20:50:30 uwe Exp $");
#endif /* not lint */
#include <sys/param.h>