author | Elliott Hughes <enh@google.com> | |
Mon, 30 Jun 2014 23:03:21 +0000 (23:03 +0000) | ||
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | |
Mon, 30 Jun 2014 22:33:03 +0000 (22:33 +0000) |
libc/dns/net/nsdispatch.c | patch | blob | history | |
libc/include/nsswitch.h | [moved from libc/dns/include/nsswitch.h with 92% similarity] | patch | blob | history |
index 15282bed81cf776ce03b357b07a8ef50b890a0b0..fb6d8f6ab0ee4949d405e7dd87e90b5f09c360cd 100644 (file)
*/
#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/stat.h>
#include <assert.h>
-#ifdef __ELF__
-#include <dlfcn.h>
-#endif /* __ELF__ */
-#include <fcntl.h>
-#define _NS_PRIVATE
#include <nsswitch.h>
#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <strings.h>
-#include <unistd.h>
static nss_method
-_nsmethod(const char *source, const char *database, const char *method,
+_nsmethod(const char *source, const char *database __unused, const char *method __unused,
const ns_dtab disp_tab[], void **cb_data)
{
int curdisp;
similarity index 92%
rename from libc/dns/include/nsswitch.h
rename to libc/include/nsswitch.h
index e03844bd633f4d0871a85f3485d130c01a588329..af88433f46b4a2c508a0b402f3c24ea9a470fe80 100644 (file)
rename from libc/dns/include/nsswitch.h
rename to libc/include/nsswitch.h
index e03844bd633f4d0871a85f3485d130c01a588329..af88433f46b4a2c508a0b402f3c24ea9a470fe80 100644 (file)
+++ b/libc/include/nsswitch.h
-/* $NetBSD: nsswitch.h,v 1.18 2005/11/29 03:12:58 christos Exp $ */
+/* $NetBSD: nsswitch.h,v 1.21 2011/07/17 20:54:34 joerg Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
#else
# define NS_NIS_CB(F,C)
#endif
+#define NS_NULL_CB { .src = NULL },
/*
* ns_src - `nsswitch source'
} ns_src;
-#if 0
/*
* Default sourcelists (if nsswitch.conf is missing, corrupt,
* or the requested database doesn't have an entry)
extern const ns_src __nsdefaultfiles_forceall[];
extern const ns_src __nsdefaultnis[];
extern const ns_src __nsdefaultnis_forceall[];
-#endif
+
/*
* ns_mtab - `nsswitch method table'
__BEGIN_DECLS
int nsdispatch(void *, const ns_dtab [], const char *,
- const char *, const ns_src [], ...);
+ const char *, const ns_src [], ...) __LIBC_ABI_PUBLIC__;
#ifdef _NS_PRIVATE
int _nsdbtaddsrc(ns_dbt *, const ns_src *);