# HG changeset patch # User Marc-André Lureau # Date 1327407716 -3600 # Node ID 2afce32badc00e3650ae02ec86453b33484093f0 # Parent ca5972990d4f7c109fc755836114208431fce269 malloca: Avoid warnings on x86_64 mingw64. * lib/malloca.c: Include . (mmalloca, freea): Use uintptr_t to convert pointers to integers. * modules/malloca (Depends-on): Add stdint. * modules/relocatable-prog-wrapper (Depends-on): Likewise. diff -r ca5972990d4f -r 2afce32badc0 ChangeLog --- a/ChangeLog Wed Jan 25 11:08:01 2012 -0800 +++ b/ChangeLog Tue Jan 24 13:21:56 2012 +0100 @@ -1,3 +1,12 @@ +2012-01-24 Marc-André Lureau (tiny change) + Bruno Haible + + malloca: Avoid warnings on x86_64 mingw64. + * lib/malloca.c: Include . + (mmalloca, freea): Use uintptr_t to convert pointers to integers. + * modules/malloca (Depends-on): Add stdint. + * modules/relocatable-prog-wrapper (Depends-on): Likewise. + 2012-01-25 Paul Eggert obstack: remove __STDC__ conditionals diff -r ca5972990d4f -r 2afce32badc0 lib/malloca.c --- a/lib/malloca.c Wed Jan 25 11:08:01 2012 -0800 +++ b/lib/malloca.c Tue Jan 24 13:21:56 2012 +0100 @@ -22,6 +22,8 @@ /* Specification. */ #include "malloca.h" +#include + #include "verify.h" /* The speed critical point in this file is freea() applied to an alloca() @@ -85,7 +87,7 @@ ((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 +120,7 @@ { /* 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;) { diff -r ca5972990d4f -r 2afce32badc0 modules/malloca --- a/modules/malloca Wed Jan 25 11:08:01 2012 -0800 +++ b/modules/malloca Tue Jan 24 13:21:56 2012 +0100 @@ -11,6 +11,7 @@ Depends-on: alloca-opt +stdint verify configure.ac: diff -r ca5972990d4f -r 2afce32badc0 modules/relocatable-prog-wrapper --- a/modules/relocatable-prog-wrapper Wed Jan 25 11:08:01 2012 -0800 +++ b/modules/relocatable-prog-wrapper Tue Jan 24 13:21:56 2012 +0100 @@ -39,6 +39,7 @@ pathmax ssize_t stdbool +stdint stdlib unistd environ