#include <stdio.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "../back-ldap/back-ldap.h"
#include "back-meta.h"
new_cached_query->lru_down = NULL;
new_cached_query->expiry_time = slap_get_time() + templ->ttl;
#ifdef NEW_LOGGING
- LDAP_LOG( BACK_META, DETAIL1, "Added query expires at %d\n",
- new_cached_query->expiry_time, 0, 0 );
+ LDAP_LOG( BACK_META, DETAIL1, "Added query expires at %ld\n",
+ (long) new_cached_query->expiry_time, 0, 0 );
#else
- Debug( LDAP_DEBUG_ANY, "Added query expires at %d\n",
- new_cached_query->expiry_time, 0, 0 );
+ Debug( LDAP_DEBUG_ANY, "Added query expires at %ld\n",
+ (long) new_cached_query->expiry_time, 0, 0 );
#endif
new_query = (Query*)new_cached_query;
cm->num_cached_queries--;
#ifdef NEW_LOGGING
LDAP_LOG( BACK_META, DETAIL1,
- "STORED QUERIES = %d\n",
+ "STORED QUERIES = %lu\n",
cm->num_cached_queries, 0, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ANY,
- "STORED QUERIES = %d\n",
+ "STORED QUERIES = %lu\n",
cm->num_cached_queries, 0, 0 );
#endif /* !NEW_LOGGING */
ldap_pvt_thread_mutex_unlock(
#ifdef NEW_LOGGING
LDAP_LOG( BACK_META, DETAIL1,
"QUERY REMOVED, CACHE SIZE="
- "%d bytes %d entries\n",
+ "%lu bytes %d entries\n",
cm->cache_size,
cm->total_entries, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ANY,
"QUERY REMOVED, CACHE SIZE="
- "%d bytes %d entries\n",
+ "%lu bytes %d entries\n",
cm->cache_size,
cm->total_entries, 0 );
#endif /* !NEW_LOGGING */
cm->cache_size += return_val;
#ifdef NEW_LOGGING
LDAP_LOG( BACK_META, DETAIL1,
- "ENTRY ADDED/MERGED, CACHE SIZE=%d bytes\n",
+ "ENTRY ADDED/MERGED, CACHE SIZE=%lu bytes\n",
cm->cache_size, 0, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ANY,
- "ENTRY ADDED/MERGED, CACHE SIZE=%d bytes\n",
+ "ENTRY ADDED/MERGED, CACHE SIZE=%lu bytes\n",
cm->cache_size, 0, 0 );
#endif /* !NEW_LOGGING */
#ifdef NEW_LOGGING
ldap_pvt_thread_mutex_lock(&cm->cache_mutex);
cm->num_cached_queries++;
#ifdef NEW_LOGGING
- LDAP_LOG( BACK_META, DETAIL1, "STORED QUERIES = %d\n",
+ LDAP_LOG( BACK_META, DETAIL1, "STORED QUERIES = %lu\n",
cm->num_cached_queries, 0, 0 );
#else /* !NEW_LOGGING */
- Debug( LDAP_DEBUG_ANY, "STORED QUERIES = %d\n",
+ Debug( LDAP_DEBUG_ANY, "STORED QUERIES = %lu\n",
cm->num_cached_queries, 0, 0 );
#endif /* !NEW_LOGGING */
ldap_pvt_thread_mutex_unlock(&cm->cache_mutex);
cm->total_entries -= result.rc;
cm->num_cached_queries--;
#ifdef NEW_LOGGING
- LDAP_LOG( BACK_META, DETAIL1, "STORED QUERIES = %d\n",
+ LDAP_LOG( BACK_META, DETAIL1, "STORED QUERIES = %lu\n",
cm->num_cached_queries, 0, 0 );
#else /* !NEW_LOGGING */
- Debug( LDAP_DEBUG_ANY, "STORED QUERIES = %d\n",
+ Debug( LDAP_DEBUG_ANY, "STORED QUERIES = %lu\n",
cm->num_cached_queries, 0, 0 );
#endif /* !NEW_LOGGING */
ldap_pvt_thread_mutex_unlock(&cm->cache_mutex);
0: (cm->cache_size-return_val);
#ifdef NEW_LOGGING
LDAP_LOG( BACK_META, DETAIL1,
- "STALE QUERY REMOVED, CACHE SIZE=%d bytes %d "
+ "STALE QUERY REMOVED, CACHE SIZE=%lu bytes %d "
"entries\n", cm->cache_size,
cm->total_entries, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ANY,
- "STALE QUERY REMOVED, CACHE SIZE=%d bytes %d "
+ "STALE QUERY REMOVED, CACHE SIZE=%lu bytes %d "
"entries\n", cm->cache_size,
cm->total_entries, 0 );
#endif /* !NEW_LOGGING */