summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1999-04-18 01:53:15 +0000
committerlukem <lukem@NetBSD.org>1999-04-18 01:53:15 +0000
commit6b9774ba41e4f5f2b8df2c110be45020bb25c8ca (patch)
tree9973edf5a4ee519c94fd97dd91b9d45f6fe05295 /include
parent8eb1fd77e94fcfff515618498bbfb2905f28567a (diff)
use _BSD_VA_LIST_ from <machine/ansi.h> instead of using va_list from
<[stdarg,varargs}.h>. as recommended by Klaus Klein.
Diffstat (limited to 'include')
-rw-r--r--include/nsswitch.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/include/nsswitch.h b/include/nsswitch.h
index ec310e6f6f0..4d75a7931c4 100644
--- a/include/nsswitch.h
+++ b/include/nsswitch.h
@@ -1,4 +1,4 @@
-/* $NetBSD: nsswitch.h,v 1.6 1999/01/26 01:04:07 lukem Exp $ */
+/* $NetBSD: nsswitch.h,v 1.7 1999/04/18 01:53:15 lukem Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -39,14 +39,16 @@
#ifndef _NSSWITCH_H
#define _NSSWITCH_H 1
+/*
+ * Don't use va_list in prototypes. Va_list is typedef'd in two places
+ * (<machine/varargs.h> and <machine/stdarg.h>), so if we include one of
+ * them here we may collide with the utility's includes. It's unreasonable
+ * for utilities to have to include one of them to include nsswitch.h, so
+ * we get _BSD_VA_LIST_ from <machine/ansi.h> and use it.
+ */
+#include <machine/ansi.h>
#include <sys/types.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
#ifndef _PATH_NS_CONF
#define _PATH_NS_CONF "/etc/nsswitch.conf"
#endif
@@ -106,7 +108,8 @@
*/
typedef struct {
const char *src;
- int (*callback)(void *retval, void *cb_data, va_list ap);
+ int (*callback) __P((void *retval, void *cb_data,
+ _BSD_VA_LIST_));
void *cb_data;
} ns_dtab;