s4:auth/system_session.c - check for OOM
[Samba/id10ts.git] / source3 / include / smb_ldap.h
blob45e586859dbd2aee051bda0136e43c69e85065ef
1 #ifndef _SMB_LDAP_H
2 #define _SMB_LDAP_H
4 #if HAVE_LBER_H
5 #include <lber.h>
6 #if defined(HPUX) && !defined(_LBER_TYPES_H)
7 /* Define ber_tag_t and ber_int_t for using
8 * HP LDAP-UX Integration products' LDAP libraries.
9 */
10 #ifndef ber_tag_t
11 typedef unsigned long ber_tag_t;
12 typedef int ber_int_t;
13 #endif
14 #endif /* defined(HPUX) && !defined(_LBER_TYPES_H) */
15 #ifndef LBER_USE_DER
16 #define LBER_USE_DER 0x01
17 #endif
18 #endif /* HAVE_LBER_H */
20 #if HAVE_LDAP_H
21 #include <ldap.h>
22 #ifndef LDAP_CONST
23 #define LDAP_CONST const
24 #endif
25 #ifndef LDAP_OPT_SUCCESS
26 #define LDAP_OPT_SUCCESS 0
27 #endif
28 /* Solaris 8 and maybe other LDAP implementations spell this "..._INPROGRESS": */
29 #if defined(LDAP_SASL_BIND_INPROGRESS) && !defined(LDAP_SASL_BIND_IN_PROGRESS)
30 #define LDAP_SASL_BIND_IN_PROGRESS LDAP_SASL_BIND_INPROGRESS
31 #endif
32 /* Solaris 8 defines SSL_LDAP_PORT, not LDAPS_PORT and it only does so if
33 LDAP_SSL is defined - but SSL is not working. We just want the
34 port number! Let's just define LDAPS_PORT correct. */
35 #if !defined(LDAPS_PORT)
36 #define LDAPS_PORT 636
37 #endif
39 /* function declarations not included in proto.h */
40 LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to);
42 #endif /* HAVE_LDAP_H */
44 #ifndef HAVE_LDAP
45 #define LDAP void
46 #define LDAPMessage void
47 #define LDAPMod void
48 #define LDAP_CONST const
49 #define LDAPControl void
50 struct berval;
51 struct ldapsam_privates;
52 #endif /* HAVE_LDAP */
54 #ifndef LDAP_OPT_SUCCESS
55 #define LDAP_OPT_SUCCESS 0
56 #endif
58 #endif /* _SMB_LDAP_H */