]> git.sur5r.net Git - openldap/blobdiff - include/ldap_cdefs.h
Correct typo ldap_count_reference -> ldap_count_references
[openldap] / include / ldap_cdefs.h
index 2f7ed6e987491c61bff4efc498be9356baecb136..87a6ca4d26ea7cf525032c95b86584268e220d3e 100644 (file)
@@ -1,3 +1,12 @@
+/*
+ * Copyright 1998,1999 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.
+ */
 /* LDAP C Defines */
 
 #ifndef _LDAP_CDEFS_H
 #      define LDAP_BEGIN_DECL  extern "C" {
 #      define LDAP_END_DECL    }
 #else
-#      define LDAP_BEGIN_DECL
-#      define LDAP_END_DECL    
+#      define LDAP_BEGIN_DECL  /* begin declarations */
+#      define LDAP_END_DECL    /* end declarations */
 #endif
 
-#if defined(__STDC__) || defined(__cplusplus)
+#if !defined(__NO_PROTOTYPES) && ( \
+       defined(__STDC__) || defined(__cplusplus) || \
+       defined(__NEED_PROTOTYPES) )
+
        /* 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 */
+
+#else /* no prototypes */
+
        /* traditional C */
 #      define LDAP_P(protos)   ()
 #      define LDAP_CONCAT(x,y) x/**/y
 #      define LDAP_STRING(x)   "x"
-#endif /* __STDC__ || __cplusplus */
+
+#endif /* no prototypes */
+
 
 #ifndef LDAP_F
 #      ifdef _WIN32