Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11144/ldap/servers/slapd/back-ldbm
Modified Files: back-ldbm.h ldbm_delete.c ldbm_modrdn.c misc.c Log Message: Related: 207457 Summary: Add support for 64-bit counters (phase 1).
Index: back-ldbm.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/back-ldbm.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- back-ldbm.h 9 Oct 2008 17:40:14 -0000 1.17 +++ back-ldbm.h 17 Oct 2008 22:12:48 -0000 1.18 @@ -59,6 +59,22 @@ #endif #endif
+/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include <inttypes.h> + +/* NSPR uses the print macros a bit differently than ANSI C. We + * need to use ll for a 64-bit integer, even when a long is 64-bit. + */ +#undef PRIu64 +#define PRIu64 "llu" +#undef PRI64 +#define PRI64 "ll" + +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + /* A bunch of random system headers taken from all the source files, no source file should #include any system headers now */ #include <stdio.h>
Index: ldbm_delete.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_delete.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ldbm_delete.c 18 Oct 2007 22:40:18 -0000 1.8 +++ ldbm_delete.c 17 Oct 2008 22:12:48 -0000 1.9 @@ -93,7 +93,7 @@ if (pb->pb_conn) { - slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "enter conn=%d op=%d\n", pb->pb_conn->c_connid, operation->o_opid); + slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "enter conn=%" PRIu64 " op=%d\n", pb->pb_conn->c_connid, operation->o_opid); }
is_fixup_operation = operation_is_flag_set(operation, OP_FLAG_REPL_FIXUP); @@ -666,7 +666,7 @@ slapi_ch_free_string(&e_uniqueid); if (pb->pb_conn) { - slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "leave conn=%d op=%d\n", pb->pb_conn->c_connid, operation->o_opid); + slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "leave conn=%" PRIu64 " op=%d\n", pb->pb_conn->c_connid, operation->o_opid); } return rc; }
Index: ldbm_modrdn.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ldbm_modrdn.c 29 Jul 2008 20:37:22 -0000 1.8 +++ ldbm_modrdn.c 17 Oct 2008 22:12:48 -0000 1.9 @@ -117,7 +117,7 @@
if (pb->pb_conn) { - slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_modrdn", "enter conn=%d op=%d\n", pb->pb_conn->c_connid, operation->o_opid); + slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_modrdn", "enter conn=%" PRIu64 " op=%d\n", pb->pb_conn->c_connid, operation->o_opid); }
inst = (ldbm_instance *) be->be_instance_info; @@ -862,7 +862,7 @@ slapi_pblock_set( pb, SLAPI_ENTRY_POST_OP, postentry ); if (pb->pb_conn) { - slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_modrdn", "leave conn=%d op=%d\n", pb->pb_conn->c_connid, operation->o_opid); + slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_modrdn", "leave conn=%" PRIu64 " op=%d\n", pb->pb_conn->c_connid, operation->o_opid); } return retval; }
Index: misc.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/misc.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- misc.c 10 Nov 2006 23:45:39 -0000 1.6 +++ misc.c 17 Oct 2008 22:12:48 -0000 1.7 @@ -68,7 +68,7 @@ void ldbm_log_access_message(Slapi_PBlock *pblock,char *string) { int ret = 0; - int connection_id = 0; + PRUint64 connection_id = 0; int operation_id = 0; Operation *operation = NULL; /* DBDB this is sneaky---opid should be covered by the API directly */
@@ -81,7 +81,7 @@ return; } operation_id = operation->o_opid; - slapi_log_access( LDAP_DEBUG_STATS, "conn=%d op=%d %s\n",connection_id, operation_id,string); + slapi_log_access( LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d %s\n",connection_id, operation_id,string); }
int return_on_disk_full(struct ldbminfo *li)
389-commits@lists.fedoraproject.org