1 #ifndef _NSSWITCH_NSS_H
2 #define _NSSWITCH_NSS_H
4 Unix SMB/CIFS implementation.
6 a common place to work out how to define NSS_STATUS on various
9 Copyright (C) Tim Potter 2000
11 This library is free software; you can redistribute it and/or
12 modify it under the terms of the GNU Library General Public
13 License as published by the Free Software Foundation; either
14 version 2 of the License, or (at your option) any later version.
16 This library is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Library General Public License for more details.
21 You should have received a copy of the GNU Library General Public
22 License along with this library; if not, write to the
23 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA.
27 #ifdef HAVE_NSS_COMMON_H
31 #include <nss_common.h>
32 #include <nss_dbdefs.h>
35 typedef nss_status_t NSS_STATUS;
37 #define NSS_STATUS_SUCCESS NSS_SUCCESS
38 #define NSS_STATUS_NOTFOUND NSS_NOTFOUND
39 #define NSS_STATUS_UNAVAIL NSS_UNAVAIL
40 #define NSS_STATUS_TRYAGAIN NSS_TRYAGAIN
48 typedef enum nss_status NSS_STATUS;
54 /* following required to prevent warnings of double definition
55 * of datum from ns_api.h
58 #define _DATUM_DEFINED
65 NSS_STATUS_SUCCESS=NS_SUCCESS,
66 NSS_STATUS_NOTFOUND=NS_NOTFOUND,
67 NSS_STATUS_UNAVAIL=NS_UNAVAIL,
68 NSS_STATUS_TRYAGAIN=NS_TRYAGAIN
71 #define NSD_MEM_STATIC 0
72 #define NSD_MEM_VOLATILE 1
73 #define NSD_MEM_DYNAMIC 2
78 #include "nsswitch/hp_nss_common.h"
79 #include "nsswitch/hp_nss_dbdefs.h"
82 #ifndef _HAVE_TYPEDEF_NSS_STATUS
83 #define _HAVE_TYPEDEF_NSS_STATUS
84 typedef nss_status_t NSS_STATUS;
86 #define NSS_STATUS_SUCCESS NSS_SUCCESS
87 #define NSS_STATUS_NOTFOUND NSS_NOTFOUND
88 #define NSS_STATUS_UNAVAIL NSS_UNAVAIL
89 #define NSS_STATUS_TRYAGAIN NSS_TRYAGAIN
92 #else /* Nothing's defined. Neither gnu nor sun nor hp */
97 NSS_STATUS_NOTFOUND=1,
104 #endif /* _NSSWITCH_NSS_H */