]> git.sur5r.net Git - openldap/blobdiff - include/ldap_cdefs.h
Misc DESC updates
[openldap] / include / ldap_cdefs.h
index 85de67933570599419a1064da73ca8b6896fda84..12e6064922bf1124006b5a358302e4924aa1c5a8 100644 (file)
@@ -1,12 +1,13 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
+ * Copyright 1998-2001 The OpenLDAP Foundation, Redwood City, California, USA
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms are permitted only
- * as authorized by the OpenLDAP Public License.  A copy of this
- * license is available at http://www.OpenLDAP.org/license.html or
- * in file LICENSE in the top-level directory of the distribution.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.  A copy of this license is available at
+ * http://www.OpenLDAP.org/license.html or in file LICENSE in the
+ * top-level directory of the distribution.
  */
 /* LDAP C Defines */
 
@@ -21,7 +22,7 @@
 #      define LDAP_END_DECL    /* end declarations */
 #endif
 
-#if !defined(__NO_PROTOTYPES) && ( defined(__NEED_PROTOTYPES) || \
+#if !defined(LDAP_NO_PROTOTYPES) && ( defined(LDAP_NEEDS_PROTOTYPES) || \
        defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) )
 
        /* ANSI C or C++ */
 
 #endif /* no prototypes */
 
-#if _WIN32 && _DLL
-#      define LDAP_F_IMPORT    extern __declspec( dllimport )
-#      define LDAP_F_EXPORT    extern __declspec( dllexport )
-#else
-#      define LDAP_F_IMPORT    extern
-#      define LDAP_F_EXPORT    extern
-#endif
-
 #if (__GNUC__) * 1000 + (__GNUC_MINOR__) >= 2006
 #      define LDAP_GCCATTR(attrs)      __attribute__(attrs)
 #else
 #      define LDAP_GCCATTR(attrs)
 #endif
 
-/* Proper support for NT dynamic libraries. */
+
+/* Support for NT dynamic libraries. */
+
+/* LBER library */
+#if defined(LBER_DECL) && defined(_WIN32)
+#      define LBER_F(type)             extern __declspec(LBER_DECL) type
+#      define LBER_V(type)             extern __declspec(LBER_DECL) type
+#else
+#      define LBER_F(type)             extern type
+#      define LBER_V(type)             extern type
+#endif
+
+/* LDAP library */
+#if defined(LDAP_DECL) && defined(_WIN32)
+#      define LDAP_F(type)             extern __declspec(LDAP_DECL) type
+#      define LDAP_V(type)             extern __declspec(LDAP_DECL) type
+#else
+#      define LDAP_F(type)             extern type
+#      define LDAP_V(type)             extern type
+#endif
 
 /*
  * C library. Mingw32 links with the C run-time library by default,
  */
 #if (defined(__MINGW32__) && !defined(CSTATIC) || \
      defined(_WIN32) && defined(_DLL))
-#      define LIBC_F(type)     extern __declspec(dllimport) type
+#      define LDAP_LIBC_F(type)        extern __declspec(dllimport) type
+#      define LDAP_LIBC_V(type)        extern __declspec(dllimport) type
 #else
-#      define LIBC_F(type)     extern type
+#      define LDAP_LIBC_F(type)        extern type
+#      define LDAP_LIBC_V(type)        extern type
 #endif
 
 /* AVL library */
-#if defined(LIBAVL_DECL) && defined(_WIN32)
-#      define LIBAVL_F(type)   extern __declspec(LIBAVL_DECL) type
-#else
-#      define LIBAVL_F(type)   extern type
-#endif
-
-/* LBER library */
-#if defined(LIBLBER_DECL) && defined(_WIN32)
-#      define LIBLBER_F(type)  extern __declspec(LIBLBER_DECL) type
+#if defined(LDAP_AVL_DECL) && defined(_WIN32)
+#      define LDAP_AVL_F(type) extern __declspec(LDAP_AVL_DECL) type
+#      define LDAP_AVL_V(type) extern __declspec(LDAP_AVL_DECL) type
 #else
-#      define LIBLBER_F(type)  extern type
+#      define LDAP_AVL_F(type) extern type
+#      define LDAP_AVL_V(type) extern type
 #endif
 
-/* LDAP library */
-#if defined(LIBLDAP_DECL) && defined(_WIN32)
-#      define LIBLDAP_F(type)  extern __declspec(LIBLDAP_DECL) type
+/* LDBM library */
+#if defined(LDAP_LDBM_DECL) && defined(_WIN32)
+#      define LDAP_LDBM_F(type)        extern __declspec(LDAP_LDBM_DECL) type
+#      define LDAP_LDBM_V(type)        extern __declspec(LDAP_LDBM_DECL) type
 #else
-#      define LIBLDAP_F(type)  extern type
+#      define LDAP_LDBM_F(type)        extern type
+#      define LDAP_LDBM_V(type)        extern type
 #endif
 
-/* LDBM library */
-#if defined(LIBLDBM_DECL) && defined(_WIN32)
-#      define LIBLDBM_F(type)  extern __declspec(LIBLDBM_DECL) type
+/* LDIF library */
+#if defined(LDAP_LDIF_DECL) && defined(_WIN32)
+#      define LDAP_LDIF_F(type)        extern __declspec(LDAP_LDIF_DECL) type
+#      define LDAP_LDIF_V(type)        extern __declspec(LDAP_LDIF_DECL) type
 #else
-#      define LIBLDBM_F(type)  extern type
+#      define LDAP_LDIF_F(type)        extern type
+#      define LDAP_LDIF_V(type)        extern type
 #endif
 
-/* LDIF library */
-#if defined(LIBLDIF_DECL) && defined(_WIN32)
-#      define LIBLDIF_F(type)  extern __declspec(LIBLDIF_DECL) type
+/* LUNICODE library */
+#if defined(LDAP_LUNICODE_DECL) && defined(_WIN32)
+#      define LDAP_LUNICODE_F(type)    extern __declspec(LDAP_LUNICODE_DECL) type
+#      define LDAP_LUNICODE_V(type)    extern __declspec(LDAP_LUNICODE_DECL) type
 #else
-#      define LIBLDIF_F(type)  extern type
+#      define LDAP_LUNICODE_F(type)    extern type
+#      define LDAP_LUNICODE_V(type)    extern type
 #endif
 
 /* LUTIL library */
-#if defined(LIBLUTIL_DECL) && defined(_WIN32)
-#      define LIBLUTIL_F(type) extern __declspec(LIBLUTIL_DECL) type
+#if defined(LDAP_LUTIL_DECL) && defined(_WIN32)
+#      define LDAP_LUTIL_F(type)       extern __declspec(LDAP_LUTIL_DECL) type
+#      define LDAP_LUTIL_V(type)       extern __declspec(LDAP_LUTIL_DECL) type
 #else
-#      define LIBLUTIL_F(type) extern type
+#      define LDAP_LUTIL_F(type)       extern type
+#      define LDAP_LUTIL_V(type)       extern type
 #endif
 
-/* SLAPD (as a module exporting symbols */
-#if defined(LIBSLAPD_DECL) && defined(_WIN32)
-#      define LIBSLAPD_F(type) extern __declspec(LIBSLAPD_DECL) type
+/* SLAPD (as a module exporting symbols) */
+#if defined(LDAP_SLAPD_DECL) && defined(_WIN32)
+#      define LDAP_SLAPD_F(type)       extern __declspec(LDAP_SLAPD_DECL) type
+#      define LDAP_SLAPD_V(type)       extern __declspec(LDAP_SLAPD_DECL) type
 #else
-#      define LIBSLAPD_F(type) extern type
+#      define LDAP_SLAPD_F(type)       extern type
+#      define LDAP_SLAPD_V(type)       extern type
 #endif
 
 #endif /* _LDAP_CDEFS_H */