]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/platform-bionic.git/commitdiff
am 6cdab387: Merge "Restore <nsswitch.h> which is BSD API, not private."
authorElliott Hughes <enh@google.com>
Mon, 30 Jun 2014 23:10:03 +0000 (23:10 +0000)
committerAndroid Git Automerger <android-git-automerger@android.com>
Mon, 30 Jun 2014 23:10:03 +0000 (23:10 +0000)
* commit '6cdab387b3fa6900ba918318edc426b5cb62b66e':
  Restore <nsswitch.h> which is BSD API, not private.

libc/dns/net/nsdispatch.c
libc/include/nsswitch.h [moved from libc/dns/include/nsswitch.h with 92% similarity]

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)
@@ -1,4 +1,4 @@
-/*     $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
@@ -137,6 +130,7 @@ typedef struct {
 #else
 #   define NS_NIS_CB(F,C)
 #endif
+#define        NS_NULL_CB              { .src = NULL },
 
 /*
  * ns_src - `nsswitch source'
@@ -149,7 +143,6 @@ typedef struct {
 } ns_src;
 
 
-#if 0
 /*
  * Default sourcelists (if nsswitch.conf is missing, corrupt,
  * or the requested database doesn't have an entry)
@@ -161,7 +154,7 @@ extern const ns_src __nsdefaultfiles[];
 extern const ns_src __nsdefaultfiles_forceall[];
 extern const ns_src __nsdefaultnis[];
 extern const ns_src __nsdefaultnis_forceall[];
-#endif
+
 
 /*
  * ns_mtab - `nsswitch method table'
@@ -222,7 +215,7 @@ typedef struct {
 
 __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 *);