diff --git a/mozilla/expat/xmltok/xmldef.h b/mozilla/expat/xmltok/xmldef.h index f9edff8a4cb..7ce172ba5fa 100644 --- a/mozilla/expat/xmltok/xmldef.h +++ b/mozilla/expat/xmltok/xmldef.h @@ -56,16 +56,18 @@ particular environments. */ */ #include "nspr.h" -#define malloc(x) PR_Malloc(x) -#define realloc(x, y) PR_Realloc((x), (y)) +#define malloc(x) PR_Malloc((size_t)(x)) +#define realloc(x, y) PR_Realloc((x), (size_t)(y)) #define calloc(x, y) PR_Calloc((x),(y)) #define free(x) PR_Free(x) +#define memcpy(x, y, z) memcpy((x), (y), (size_t)(z)) +#define memmove(x, y, z) memmove((x), (y), (size_t)(z)) +#define memcmp(x, y, z) memcmp((x), (y), (size_t)(z)) #if PR_BYTES_PER_INT != 4 typedef PRInt32 int; #endif - /* Enable Unicode string processing in expat */ #define XML_UNICODE diff --git a/mozilla/parser/expat/lib/xmldef.h b/mozilla/parser/expat/lib/xmldef.h index f9edff8a4cb..7ce172ba5fa 100644 --- a/mozilla/parser/expat/lib/xmldef.h +++ b/mozilla/parser/expat/lib/xmldef.h @@ -56,16 +56,18 @@ particular environments. */ */ #include "nspr.h" -#define malloc(x) PR_Malloc(x) -#define realloc(x, y) PR_Realloc((x), (y)) +#define malloc(x) PR_Malloc((size_t)(x)) +#define realloc(x, y) PR_Realloc((x), (size_t)(y)) #define calloc(x, y) PR_Calloc((x),(y)) #define free(x) PR_Free(x) +#define memcpy(x, y, z) memcpy((x), (y), (size_t)(z)) +#define memmove(x, y, z) memmove((x), (y), (size_t)(z)) +#define memcmp(x, y, z) memcmp((x), (y), (size_t)(z)) #if PR_BYTES_PER_INT != 4 typedef PRInt32 int; #endif - /* Enable Unicode string processing in expat */ #define XML_UNICODE