From 5cbdf986da749a8b7cd6b2190f16305c61196923 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Sat, 22 Mar 2008 22:45:46 +0000 Subject: [PATCH] Fixed minor compilation problems in xvnc.cc. - use xalloc/xfree instead ALLOCATE_LOCAL/DEALLOCATE_LOCAL - include keysym.h from $(includedir)/X11 - removed "xor" and "and" macro defines (cannot be used with gcc 4) git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1.5-xserver@2446 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- unix/xserver/hw/vnc/xvnc.cc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/unix/xserver/hw/vnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc index 414aaf8a..e987133c 100644 --- a/unix/xserver/hw/vnc/xvnc.cc +++ b/unix/xserver/hw/vnc/xvnc.cc @@ -36,8 +36,6 @@ from the X Consortium. extern "C" { #define class c_class #define public c_public -#define xor c_xor -#define and c_and #ifdef WIN32 #include #endif @@ -78,13 +76,11 @@ extern "C" { #include "dix.h" #include "miline.h" #include "inputstr.h" -#include "keysym.h" +#include extern int defaultColorVisualClass; extern char buildtime[]; #undef class #undef public -#undef xor -#undef and } #define XVNCVERSION "TightVNC 1.5 series" @@ -667,9 +663,9 @@ vfbInstallColormap(ColormapPtr pmap) swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue); swapcopy32(pXWDHeader->colormap_entries, pVisual->ColormapEntries); - ppix = (Pixel *)ALLOCATE_LOCAL(entries * sizeof(Pixel)); - prgb = (xrgb *)ALLOCATE_LOCAL(entries * sizeof(xrgb)); - defs = (xColorItem *)ALLOCATE_LOCAL(entries * sizeof(xColorItem)); + ppix = (Pixel *)xalloc(entries * sizeof(Pixel)); + prgb = (xrgb *)xalloc(entries * sizeof(xrgb)); + defs = (xColorItem *)xalloc(entries * sizeof(xColorItem)); for (i = 0; i < entries; i++) ppix[i] = i; /* XXX truecolor */ @@ -684,9 +680,9 @@ vfbInstallColormap(ColormapPtr pmap) } (*pmap->pScreen->StoreColors)(pmap, entries, defs); - DEALLOCATE_LOCAL(ppix); - DEALLOCATE_LOCAL(prgb); - DEALLOCATE_LOCAL(defs); + xfree(ppix); + xfree(prgb); + xfree(defs); } } -- 2.39.5