preparing for release of 3.0-alpha11
[Samba/ekacnet.git] / source / nsswitch / nss.h
bloba29271529fd817571e7ce8f67441c54877a2ba82
1 #ifndef _NSSWITCH_NSS_H
2 #define _NSSWITCH_NSS_H
3 /*
4 Unix SMB/Netbios implementation.
5 Version 2.0
7 a common place to work out how to define NSS_STATUS on various
8 platforms
10 Copyright (C) Tim Potter 2000
12 This library is free software; you can redistribute it and/or
13 modify it under the terms of the GNU Library General Public
14 License as published by the Free Software Foundation; either
15 version 2 of the License, or (at your option) any later version.
17 This library is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Library General Public License for more details.
22 You should have received a copy of the GNU Library General Public
23 License along with this library; if not, write to the
24 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA.
28 #ifdef HAVE_NSS_COMMON_H
30 /* Sun Solaris */
32 #include <nss_common.h>
33 #include <nss_dbdefs.h>
34 #include <nsswitch.h>
36 typedef nss_status_t NSS_STATUS;
38 #define NSS_STATUS_SUCCESS NSS_SUCCESS
39 #define NSS_STATUS_NOTFOUND NSS_NOTFOUND
40 #define NSS_STATUS_UNAVAIL NSS_UNAVAIL
41 #define NSS_STATUS_TRYAGAIN NSS_TRYAGAIN
43 #elif HAVE_NSS_H
45 /* GNU */
47 #include <nss.h>
49 typedef enum nss_status NSS_STATUS;
51 #elif HAVE_NS_API_H
53 /* SGI IRIX */
55 /* following required to prevent warnings of double definition
56 * of datum from ns_api.h
58 #ifdef DATUM
59 #define _DATUM_DEFINED
60 #endif
62 #include <ns_api.h>
64 typedef enum
66 NSS_STATUS_SUCCESS=NS_SUCCESS,
67 NSS_STATUS_NOTFOUND=NS_NOTFOUND,
68 NSS_STATUS_UNAVAIL=NS_UNAVAIL,
69 NSS_STATUS_TRYAGAIN=NS_TRYAGAIN
70 } NSS_STATUS;
72 #define NSD_MEM_STATIC 0
73 #define NSD_MEM_VOLATILE 1
74 #define NSD_MEM_DYNAMIC 2
76 #else /* Nothing's defined. Neither gnu nor sun */
78 typedef enum
80 NSS_STATUS_SUCCESS=0,
81 NSS_STATUS_NOTFOUND=1,
82 NSS_STATUS_UNAVAIL=2,
83 NSS_STATUS_TRYAGAIN=3
84 } NSS_STATUS;
86 #endif
88 #endif /* _NSSWITCH_NSS_H */