]> git.sur5r.net Git - openldap/blob - include/ldap_cdefs.h
Update NT4 port.
[openldap] / include / ldap_cdefs.h
1 /* LDAP C Defines */
2
3 #ifndef _LDAP_CDEFS_H
4 #define _LDAP_CDEFS_H
5
6 #if defined(__cplusplus)
7 #       define LDAP_BEGIN_DECL  extern "C" {
8 #       define LDAP_END_DECL    }
9 #else
10 #       define LDAP_BEGIN_DECL
11 #       define LDAP_END_DECL    
12 #endif
13
14 #if defined(__STDC__) || defined(__cplusplus) || \
15         (defined(_WIN32) && !defined(NOPROTOTYPES))
16         /* ANSI C or C++ */
17 #       define LDAP_P(protos)   protos
18 #       define LDAP_CONCAT1(x,y)        x ## y
19 #       define LDAP_CONCAT(x,y) LDAP_CONCAT1(x,y)
20 #       define LDAP_STRING(x)   #x /* stringify without expanding x */
21 #       define LDAP_XSTRING(x)  LDAP_STRING(x) /* expand x, then stringify */
22 #else /* ! __STDC__ && ! __cplusplus */
23         /* traditional C */
24 #       define LDAP_P(protos)   ()
25 #       define LDAP_CONCAT(x,y) x/**/y
26 #       define LDAP_STRING(x)   "x"
27 #endif /* __STDC__ || __cplusplus */
28
29 #ifndef LDAP_F
30 #       ifdef _WIN32
31 #               define LDAP_F   __declspec( dllexport )
32 #       else /* ! _WIN32 */
33 #               define LDAP_F   extern
34 #       endif /* _WIN32 */
35 #endif /* LDAP_FDECL */
36
37 #endif /* _LDAP_CDEFS_H */