[HarfBuzz] harfbuzz-ng: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Jul 15 11:21:54 PDT 2010


 src/hb-blob.c               |   10 +++++-----
 src/hb-open-type-private.hh |    5 +++--
 2 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 17e9ff938b638fd1cb80c990ba13bd47562116b8
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Jul 15 11:21:34 2010 -0700

    Fix 64bit issues with debug prints

diff --git a/src/hb-blob.c b/src/hb-blob.c
index 370148f..0357fb4 100644
--- a/src/hb-blob.c
+++ b/src/hb-blob.c
@@ -247,15 +247,15 @@ _try_make_writable_inplace_unix_locked (hb_blob_t *blob)
     return FALSE;
   }
   if (HB_DEBUG_BLOB)
-    fprintf (stderr, "%p %s: pagesize is %u\n", blob, __FUNCTION__, pagesize);
+    fprintf (stderr, "%p %s: pagesize is %lu\n", blob, __FUNCTION__, (unsigned long) pagesize);
 
   mask = ~(pagesize-1);
   addr = (const char *) (((uintptr_t) blob->data) & mask);
   length = (const char *) (((uintptr_t) blob->data + blob->length + pagesize-1) & mask)  - addr;
   if (HB_DEBUG_BLOB)
-    fprintf (stderr, "%p %s: calling mprotect on [%p..%p] (%d bytes)\n",
+    fprintf (stderr, "%p %s: calling mprotect on [%p..%p] (%lu bytes)\n",
 	     blob, __FUNCTION__,
-	     addr, addr+length, length);
+	     addr, addr+length, (unsigned long) length);
   if (-1 == mprotect ((void *) addr, length, PROT_READ | PROT_WRITE)) {
     if (HB_DEBUG_BLOB)
       fprintf (stderr, "%p %s: %s\n", blob, __FUNCTION__, strerror (errno));
@@ -263,9 +263,9 @@ _try_make_writable_inplace_unix_locked (hb_blob_t *blob)
   }
 
   if (HB_DEBUG_BLOB)
-    fprintf (stderr, "%p %s: successfully made [%p..%p] (%d bytes) writable\n",
+    fprintf (stderr, "%p %s: successfully made [%p..%p] (%lu bytes) writable\n",
 	     blob, __FUNCTION__,
-	     addr, addr+length, length);
+	     addr, addr+length, (unsigned long) length);
   return TRUE;
 #else
   return FALSE;
diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index 9925577..34d6cb0 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
@@ -191,8 +191,9 @@ struct hb_sanitize_context_t
     this->debug_depth = 0;
 
     if (HB_DEBUG_SANITIZE)
-      fprintf (stderr, "sanitize %p init [%p..%p] (%u bytes)\n",
-	       this->blob, this->start, this->end, this->end - this->start);
+      fprintf (stderr, "sanitize %p init [%p..%p] (%lu bytes)\n",
+	       this->blob, this->start, this->end,
+	       (unsigned long) (this->end - this->start));
   }
 
   inline void finish (void)



More information about the HarfBuzz mailing list