---
 ChangeLog     |    5 +++++
 lib/malloca.c |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5eff018..81d9557 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-24  Marc-André Lureau  <marcandre.lur...@redhat.com>
+
+       * lib/malloca.c: Use uintptr_t to convert pointers to
+       integers. Fix warnings with MinGW64 x64.
+
 2012-01-23  Paul Eggert  <egg...@cs.ucla.edu>
 
        doc: omit trailing empty lines from INSTALL etc.
diff --git a/lib/malloca.c b/lib/malloca.c
index c81ffbc..8b214e4 100644
--- a/lib/malloca.c
+++ b/lib/malloca.c
@@ -85,7 +85,7 @@ mmalloca (size_t n)
           ((int *) p)[-1] = MAGIC_NUMBER;
 
           /* Enter p into the hash table.  */
-          slot = (unsigned long) p % HASH_TABLE_SIZE;
+          slot = (uintptr_t) p % HASH_TABLE_SIZE;
           ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot];
           mmalloca_results[slot] = p;
 
@@ -118,7 +118,7 @@ freea (void *p)
         {
           /* Looks like a mmalloca() result.  To see whether it really is one,
              perform a lookup in the hash table.  */
-          size_t slot = (unsigned long) p % HASH_TABLE_SIZE;
+          size_t slot = (uintptr_t) p % HASH_TABLE_SIZE;
           void **chain = &mmalloca_results[slot];
           for (; *chain != NULL;)
             {
-- 
1.7.7.5


Reply via email to