Print this page
remove support for non-ANSI compilation


   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*


  22  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*
  27  * nsswitch.h
  28  *
  29  * Low-level interface to the name-service switch.  The interface defined
  30  * in <nss_common.h> should be used in preference to this.
  31  *
  32  * This is a Project Private interface.  It may change in future releases.
  33  */
  34 
  35 #ifndef _NSSWITCH_H
  36 #define _NSSWITCH_H
  37 
  38 #pragma ident   "%Z%%M% %I%     %E% SMI"
  39 
  40 #ifdef  __cplusplus
  41 extern "C" {
  42 #endif
  43 
  44 #ifndef __NSW_CONFIG_FILE
  45 #define __NSW_CONFIG_FILE       "/etc/nsswitch.conf"
  46 #endif
  47 #define __NSW_DEFAULT_FILE      "/etc/default/nss"
  48 
  49 #define __NSW_HOSTS_DB          "hosts"
  50 #define __NSW_PASSWD_DB         "passwd"
  51 #define __NSW_GROUP_DB          "group"
  52 #define __NSW_NETGROUP_DB       "netgroup"
  53 #define __NSW_NETWORKS_DB       "networks"
  54 #define __NSW_PROTOCOLS_DB      "protocols"
  55 #define __NSW_RPC_DB            "rpc"
  56 #define __NSW_SERVICES_DB       "services"
  57 #define __NSW_ETHERS_DB         "ethers"
  58 #define __NSW_BOOTPARAMS_DB     "bootparams"
  59 #define __NSW_NETMASKS_DB       "netmasks"


 108         struct __nsw_long_err *long_errs;
 109         struct __nsw_lookup *next;
 110 };
 111 
 112 struct __nsw_switchconfig {
 113         int vers;
 114         char *dbase;
 115         int num_lookups;
 116         struct __nsw_lookup *lookups;
 117 };
 118 
 119 #define __NSW_ACTION(lkp, err)  \
 120         ((lkp)->next == NULL ? \
 121                 __NSW_RETURN \
 122         : \
 123                 ((err) >= 0 && (err) < __NSW_STD_ERRS ? \
 124                         (lkp)->actions[err] \
 125                 : \
 126                         __nsw_extended_action(lkp, err)))
 127 
 128 #ifdef __STDC__
 129 
 130 struct __nsw_switchconfig *__nsw_getconfig
 131         (const char *, enum __nsw_parse_err *);
 132 int __nsw_freeconfig(struct __nsw_switchconfig *);
 133 action_t __nsw_extended_action(struct __nsw_lookup *, int);
 134 
 135 #else
 136 
 137 struct __nsw_switchconfig *__nsw_getconfig();
 138 int __nsw_freeconfig();
 139 action_t __nsw_extended_action();
 140 
 141 #endif /* __STDC__ */
 142 
 143 #ifdef  __cplusplus
 144 }
 145 #endif
 146 
 147 #endif /* _NSSWITCH_H */


   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  23  *
  24  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  25  * Use is subject to license terms.
  26  */
  27 
  28 /*
  29  * nsswitch.h
  30  *
  31  * Low-level interface to the name-service switch.  The interface defined
  32  * in <nss_common.h> should be used in preference to this.
  33  *
  34  * This is a Project Private interface.  It may change in future releases.
  35  */
  36 
  37 #ifndef _NSSWITCH_H
  38 #define _NSSWITCH_H
  39 


  40 #ifdef  __cplusplus
  41 extern "C" {
  42 #endif
  43 
  44 #ifndef __NSW_CONFIG_FILE
  45 #define __NSW_CONFIG_FILE       "/etc/nsswitch.conf"
  46 #endif
  47 #define __NSW_DEFAULT_FILE      "/etc/default/nss"
  48 
  49 #define __NSW_HOSTS_DB          "hosts"
  50 #define __NSW_PASSWD_DB         "passwd"
  51 #define __NSW_GROUP_DB          "group"
  52 #define __NSW_NETGROUP_DB       "netgroup"
  53 #define __NSW_NETWORKS_DB       "networks"
  54 #define __NSW_PROTOCOLS_DB      "protocols"
  55 #define __NSW_RPC_DB            "rpc"
  56 #define __NSW_SERVICES_DB       "services"
  57 #define __NSW_ETHERS_DB         "ethers"
  58 #define __NSW_BOOTPARAMS_DB     "bootparams"
  59 #define __NSW_NETMASKS_DB       "netmasks"


 108         struct __nsw_long_err *long_errs;
 109         struct __nsw_lookup *next;
 110 };
 111 
 112 struct __nsw_switchconfig {
 113         int vers;
 114         char *dbase;
 115         int num_lookups;
 116         struct __nsw_lookup *lookups;
 117 };
 118 
 119 #define __NSW_ACTION(lkp, err)  \
 120         ((lkp)->next == NULL ? \
 121                 __NSW_RETURN \
 122         : \
 123                 ((err) >= 0 && (err) < __NSW_STD_ERRS ? \
 124                         (lkp)->actions[err] \
 125                 : \
 126                         __nsw_extended_action(lkp, err)))
 127 


 128 struct __nsw_switchconfig *__nsw_getconfig
 129         (const char *, enum __nsw_parse_err *);
 130 int __nsw_freeconfig(struct __nsw_switchconfig *);
 131 action_t __nsw_extended_action(struct __nsw_lookup *, int);
 132 








 133 #ifdef  __cplusplus
 134 }
 135 #endif
 136 
 137 #endif /* _NSSWITCH_H */