]> git.sur5r.net Git - openldap/commitdiff
#include <ac/string.h>.
authorHallvard Furuseth <hallvard@openldap.org>
Tue, 29 Apr 2003 15:05:19 +0000 (15:05 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Tue, 29 Apr 2003 15:05:19 +0000 (15:05 +0000)
Print unsigned long with %lu, not %d.

servers/slapd/back-meta/cache-query.c
servers/slapd/back-meta/cache-search.c
servers/slapd/back-meta/init.c

index 98a67882a7926b6272387777102518a3f881dda7..2353e61bb1722e470b1f4e6a764fe212ca55c8bf 100644 (file)
@@ -20,6 +20,8 @@
 
 #include <stdio.h>
 
+#include <ac/string.h>
+
 #include "slap.h"
 #include "../back-ldap/back-ldap.h"
 #include "back-meta.h"
@@ -331,11 +333,11 @@ void add_query(
        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; 
 
index 9e31a226abe0c8ec6fcdc1ac261aaf6d06b21bf0..7a09e9447cb7e4bb412c101cce574b291014cc98 100644 (file)
@@ -1491,11 +1491,11 @@ cache_entries(
                                        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(
@@ -1506,13 +1506,13 @@ cache_entries(
 #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 */
@@ -1523,11 +1523,11 @@ cache_entries(
                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
@@ -1561,10 +1561,10 @@ cache_entries(
        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); 
@@ -1668,10 +1668,10 @@ consistency_check(Backend* be, Backend* glue_be, Connection* conn)
                        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); 
@@ -1679,12 +1679,12 @@ consistency_check(Backend* be, Backend* glue_be, Connection* conn)
                                                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 */
index 20c783902a985b05211e63fc459fff8220c43cf2..e6ccf06a4735f2ebc7374f09f4efa8cfa0b66602 100644 (file)
@@ -68,6 +68,7 @@
 
 #include <stdio.h>
 
+#include <ac/string.h>
 #include <ac/socket.h>
 
 #include "slap.h"