nsswitch: Fix checking for config.h #define in nsstest.h
[samba.git] / nsswitch / winbind_nss.h
1 /*
2    Unix SMB/CIFS implementation.
3
4    A common place to work out how to define NSS_STATUS on various
5    platforms.
6
7    Copyright (C) Tim Potter 2000
8
9    This library is free software; you can redistribute it and/or
10    modify it under the terms of the GNU Lesser General Public
11    License as published by the Free Software Foundation; either
12    version 3 of the License, or (at your option) any later version.
13
14    This library is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17    Library General Public License for more details.
18
19    You should have received a copy of the GNU Lesser General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 */
22
23 #ifndef _NSSWITCH_NSS_H
24 #define _NSSWITCH_NSS_H
25
26 #ifdef HAVE_NSS_COMMON_H
27
28 /*
29  * Sun Solaris
30  */
31
32 #include "nsswitch/winbind_nss_solaris.h"
33 #include "nsswitch/winbind_nss_linux.h"
34
35 #elif HAVE_NSS_H
36
37 /*
38  * Linux (glibc)
39  */
40
41 #include <nss.h>
42
43 typedef enum nss_status NSS_STATUS;
44
45 #include "nsswitch/winbind_nss_linux.h"
46
47 #elif HAVE_NS_API_H
48
49 /*
50  * SGI IRIX
51  */
52
53 #include "nsswitch/winbind_nss_irix.h"
54
55 #elif defined(HPUX) && defined(HAVE_NSSWITCH_H)
56
57 /* HP-UX 11 */
58
59 #include "nsswitch/winbind_nss_hpux.h"
60
61 #elif defined(__NetBSD__) && defined(HAVE_GETPWENT_R)
62
63 /*
64  * NetBSD 3 and newer
65  */
66
67 #include "nsswitch/winbind_nss_netbsd.h"
68 #include "nsswitch/winbind_nss_linux.h"
69
70 #else /* Nothing's defined. Neither gnu nor netbsd nor sun nor hp */
71
72 typedef enum
73 {
74   NSS_STATUS_SUCCESS=0,
75   NSS_STATUS_NOTFOUND=1,
76   NSS_STATUS_UNAVAIL=2,
77   NSS_STATUS_TRYAGAIN=3
78 } NSS_STATUS;
79
80 #endif
81
82 #endif /* _NSSWITCH_NSS_H */