From 63e7569fa56074f0755ab01d541703e9a70b22a4 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 22 Sep 1998 09:00:51 +0000 Subject: [PATCH] Add header for special C defines. --- include/ldap_cdefs.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 include/ldap_cdefs.h diff --git a/include/ldap_cdefs.h b/include/ldap_cdefs.h new file mode 100644 index 0000000000..2f7ed6e987 --- /dev/null +++ b/include/ldap_cdefs.h @@ -0,0 +1,36 @@ +/* LDAP C Defines */ + +#ifndef _LDAP_CDEFS_H +#define _LDAP_CDEFS_H + +#if defined(__cplusplus) +# define LDAP_BEGIN_DECL extern "C" { +# define LDAP_END_DECL } +#else +# define LDAP_BEGIN_DECL +# define LDAP_END_DECL +#endif + +#if defined(__STDC__) || defined(__cplusplus) + /* ANSI C or C++ */ +# define LDAP_P(protos) protos +# define LDAP_CONCAT1(x,y) x ## y +# define LDAP_CONCAT(x,y) LDAP_CONCAT1(x,y) +# define LDAP_STRING(x) #x /* stringify without expanding x */ +# define LDAP_XSTRING(x) LDAP_STRING(x) /* expand x, then stringify */ +#else /* ! __STDC__ && ! __cplusplus */ + /* traditional C */ +# define LDAP_P(protos) () +# define LDAP_CONCAT(x,y) x/**/y +# define LDAP_STRING(x) "x" +#endif /* __STDC__ || __cplusplus */ + +#ifndef LDAP_F +# ifdef _WIN32 +# define LDAP_F __declspec( dllexport ) +# else /* ! _WIN32 */ +# define LDAP_F extern +# endif /* _WIN32 */ +#endif /* LDAP_FDECL */ + +#endif /* _LDAP_CDEFS_H */ -- 2.39.5