Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Avoid cgetcap &co prototypes conflicting with those provided...
details: https://anonhg.NetBSD.org/src/rev/888999c983f5
branches: trunk
changeset: 542520:888999c983f5
user: uwe <uwe%NetBSD.org@localhost>
date: Fri Jan 31 20:50:29 2003 +0000
description:
Avoid cgetcap &co prototypes conflicting with those provided by the host.
With this change we can cross-compile on FreeBSD 4.x.
diffstat:
lib/libc/gen/getcap.c | 8 ++++++--
tools/compat/compat_defs.h | 25 ++++++++++++++++++++++++-
usr.bin/cap_mkdb/cap_mkdb.c | 8 ++++++--
3 files changed, 36 insertions(+), 5 deletions(-)
diffs (95 lines):
diff -r 51cb668ec786 -r 888999c983f5 lib/libc/gen/getcap.c
--- a/lib/libc/gen/getcap.c Fri Jan 31 20:14:25 2003 +0000
+++ b/lib/libc/gen/getcap.c Fri Jan 31 20:50:29 2003 +0000
@@ -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 */
diff -r 51cb668ec786 -r 888999c983f5 tools/compat/compat_defs.h
--- a/tools/compat/compat_defs.h Fri Jan 31 20:14:25 2003 +0000
+++ b/tools/compat/compat_defs.h Fri Jan 31 20:50:29 2003 +0000
@@ -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 @@
# 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
diff -r 51cb668ec786 -r 888999c983f5 usr.bin/cap_mkdb/cap_mkdb.c
--- a/usr.bin/cap_mkdb/cap_mkdb.c Fri Jan 31 20:14:25 2003 +0000
+++ b/usr.bin/cap_mkdb/cap_mkdb.c Fri Jan 31 20:50:29 2003 +0000
@@ -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 @@
#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>
Home |
Main Index |
Thread Index |
Old Index