aboutsummaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw/vnc
diff options
context:
space:
mode:
Diffstat (limited to 'unix/xserver/hw/vnc')
-rw-r--r--unix/xserver/hw/vnc/xorg-version.h4
-rw-r--r--unix/xserver/hw/vnc/xvnc.c25
2 files changed, 14 insertions, 15 deletions
diff --git a/unix/xserver/hw/vnc/xorg-version.h b/unix/xserver/hw/vnc/xorg-version.h
index 057c31e7..083c1b1e 100644
--- a/unix/xserver/hw/vnc/xorg-version.h
+++ b/unix/xserver/hw/vnc/xorg-version.h
@@ -48,8 +48,10 @@
#define XORG 115
#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (16 * 100000) + (99 * 1000))
#define XORG 116
+#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (17 * 100000) + (99 * 1000))
+#define XORG 117
#else
-#error "X.Org newer than 1.16 is not supported"
+#error "X.Org newer than 1.17 is not supported"
#endif
#endif
diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c
index 627e797c..cc87efb0 100644
--- a/unix/xserver/hw/vnc/xvnc.c
+++ b/unix/xserver/hw/vnc/xvnc.c
@@ -87,13 +87,8 @@ from the X Consortium.
#endif
#include "site.h"
-#if XORG >= 110
-#define Xalloc malloc
-#define Xfree free
-#endif
-
#define XVNCVERSION "TigerVNC 1.4.80"
-#define XVNCCOPYRIGHT ("Copyright (C) 1999-2013 TigerVNC Team and many others (see README.txt)\n" \
+#define XVNCCOPYRIGHT ("Copyright (C) 1999-2015 TigerVNC Team and many others (see README.txt)\n" \
"See http://www.tigervnc.org for information on TigerVNC.\n")
#define VFB_DEFAULT_WIDTH 1024
@@ -699,9 +694,11 @@ vfbInstallColormap(ColormapPtr pmap)
entries = pmap->pVisual->ColormapEntries;
pVisual = pmap->pVisual;
- ppix = (Pixel *)xalloc(entries * sizeof(Pixel));
- prgb = (xrgb *)xalloc(entries * sizeof(xrgb));
- defs = (xColorItem *)xalloc(entries * sizeof(xColorItem));
+ ppix = (Pixel *)calloc(entries, sizeof(Pixel));
+ prgb = (xrgb *)calloc(entries, sizeof(xrgb));
+ defs = (xColorItem *)calloc(entries, sizeof(xColorItem));
+ if (!ppix || !prgb || !defs)
+ FatalError ("Not enough memory for color map\n");
for (i = 0; i < entries; i++) ppix[i] = i;
/* XXX truecolor */
@@ -720,9 +717,9 @@ vfbInstallColormap(ColormapPtr pmap)
}
(*pmap->pScreen->StoreColors)(pmap, entries, defs);
- xfree(ppix);
- xfree(prgb);
- xfree(defs);
+ free(ppix);
+ free(prgb);
+ free(defs);
}
}
@@ -806,7 +803,7 @@ vfbAllocateFramebufferMemory(vfbFramebufferInfoPtr pfb)
break;
#endif
case NORMAL_MEMORY_FB:
- pfb->pfbMemory = Xalloc(pfb->sizeInBytes);
+ pfb->pfbMemory = malloc(pfb->sizeInBytes);
break;
}
@@ -833,7 +830,7 @@ vfbFreeFramebufferMemory(vfbFramebufferInfoPtr pfb)
break;
#endif /* HAS_SHM */
case NORMAL_MEMORY_FB:
- Xfree(pfb->pfbMemory);
+ free(pfb->pfbMemory);
break;
}