]> git.sur5r.net Git - openldap/commitdiff
keep compatibility with slapd's gmtime_mutex (ITS#6262)
authorPierangelo Masarati <ando@openldap.org>
Tue, 8 Sep 2009 23:21:21 +0000 (23:21 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 8 Sep 2009 23:21:21 +0000 (23:21 +0000)
libraries/libldap/util-int.c
servers/slapd/proto-slap.h

index d19f2b80695df047b1ec73765ba36a50275af33c..45259665030eabe1a765b865e29d098da03f7546 100644 (file)
@@ -68,12 +68,17 @@ extern int h_errno;
 
 /* USE_GMTIME_R and USE_LOCALTIME_R defined in ldap_pvt.h */
 
+#ifdef LDAP_DEVEL
+       /* to be released with 2.5 */
 #if !defined( USE_GMTIME_R ) || !defined( USE_LOCALTIME_R )
        /* we use the same mutex for gmtime(3) and localtime(3)
         * because implementations may use the same buffer
         * for both functions */
        static ldap_pvt_thread_mutex_t ldap_int_gmtime_mutex;
 #endif
+#else /* ! LDAP_DEVEL */
+       ldap_pvt_thread_mutex_t ldap_int_gmtime_mutex;
+#endif /* ! LDAP_DEVEL */
 
 # if defined(HAVE_GETHOSTBYNAME_R) && \
        (GETHOSTBYNAME_R_NARGS < 5) || (6 < GETHOSTBYNAME_R_NARGS)
index 5f5bc14a6b7306fda2398311c8c4fb6fae729a1e..e97e23f8f59285d6f1d6af2b80b124b29cd8ccee 100644 (file)
@@ -1977,6 +1977,11 @@ LDAP_SLAPD_V (int)                       slap_tool_thread_max;
 
 LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) entry2str_mutex;
 
+#ifndef LDAP_DEVEL
+       /* to be removed with 2.5 */
+#define gmtime_mutex ldap_int_gmtime_mutex
+#endif /* ! LDAP_DEVEL */
+
 LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) ad_undef_mutex;
 LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) oc_undef_mutex;