diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h index 05e5fabd1..6ebd00efd 100644 --- a/hw/dmx/dmx.h +++ b/hw/dmx/dmx.h @@ -341,21 +341,21 @@ do { \ #define _MAXSCREENSALLOCF(o,size,fatal) \ do { \ if (!o) { \ - o = xcalloc((size), sizeof(*(o))); \ + o = calloc((size), sizeof(*(o))); \ if (!o && fatal) FatalError(MAXSCREEN_FAILED_TXT #o); \ } \ } while (0) #define _MAXSCREENSALLOCR(o,size,retval) \ do { \ if (!o) { \ - o = xcalloc((size), sizeof(*(o))); \ + o = calloc((size), sizeof(*(o))); \ if (!o) return retval; \ } \ } while (0) #define MAXSCREENSFREE(o) \ do { \ - if (o) xfree(o); \ + if (o) free(o); \ o = NULL; \ } while (0) diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c index d20c844aa..d367f262c 100644 --- a/hw/dmx/dmxextension.c +++ b/hw/dmx/dmxextension.c @@ -41,6 +41,8 @@ #include #endif +#include + #include "dmx.h" #include "dmxinit.h" #include "dmxextension.h" @@ -1121,9 +1123,9 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n) } /* Now allocate the memory we need */ - images = xcalloc(len_images, sizeof(char)); - gids = xalloc(glyphSet->hash.tableEntries*sizeof(Glyph)); - glyphs = xalloc(glyphSet->hash.tableEntries*sizeof(XGlyphInfo)); + images = calloc(len_images, sizeof(char)); + gids = malloc(glyphSet->hash.tableEntries*sizeof(Glyph)); + glyphs = malloc(glyphSet->hash.tableEntries*sizeof(XGlyphInfo)); pos = images; ctr = 0; @@ -1158,9 +1160,9 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n) len_images); /* Clean up */ - xfree(len_images); - xfree(gids); - xfree(glyphs); + free(len_images); + free(gids); + free(glyphs); } #endif diff --git a/hw/dmx/glxProxy/glxutil.c b/hw/dmx/glxProxy/glxutil.c index 67ac822c6..70f8b74bb 100644 --- a/hw/dmx/glxProxy/glxutil.c +++ b/hw/dmx/glxProxy/glxutil.c @@ -34,6 +34,7 @@ #include #include #include "glxutil.h" +#include /************************************************************************/ @@ -51,7 +52,7 @@ __glXMalloc(size_t size) if (size == 0) { return NULL; } - addr = (void *) xalloc(size); + addr = malloc(size); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -68,7 +69,7 @@ __glXCalloc(size_t numElements, size_t elementSize) if ((numElements == 0) || (elementSize == 0)) { return NULL; } - addr = xcalloc(numElements, elementSize); + addr = calloc(numElements, elementSize); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -86,13 +87,13 @@ __glXRealloc(void *addr, size_t newSize) xfree(addr); return NULL; } else { - newAddr = xrealloc(addr, newSize); + newAddr = realloc(addr, newSize); } } else { if (newSize == 0) { return NULL; } else { - newAddr = xalloc(newSize); + newAddr = malloc(newSize); } } if (newAddr == NULL) { @@ -106,6 +107,6 @@ void __glXFree(void *addr) { if (addr) { - xfree(addr); + free(addr); } } diff --git a/hw/dmx/glxProxy/glxvisuals.c b/hw/dmx/glxProxy/glxvisuals.c index b961dfaef..898c6be7b 100644 --- a/hw/dmx/glxProxy/glxvisuals.c +++ b/hw/dmx/glxProxy/glxvisuals.c @@ -37,6 +37,7 @@ #include "glxserver.h" #include "glxutil.h" #include "dmx_glxvisuals.h" +#include static int numConfigs = 0; static __GLXvisualConfig *visualConfigs = NULL;