xserver: Branch 'master' - 4 commits
Keith Packard
keithp at kemper.freedesktop.org
Wed Dec 19 12:18:49 PST 2012
hw/dmx/dmxinit.c | 2 +-
include/dix-config.h.in | 3 +++
mi/miinitext.c | 9 ++++++---
3 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 386e4d76baaffe226d2d561ff936509454eb0ac2
Merge: 014a5c8 9ff2e83
Author: Keith Packard <keithp at keithp.com>
Date: Wed Dec 19 12:17:59 2012 -0800
Merge remote-tracking branch 'alanc/master'
commit 9ff2e831517875f96477862f979abff394e8d551
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Tue Dec 18 00:41:08 2012 -0800
EnableDisableExtensionError: Use ARRAY_SIZE rather than sentinel
d785368e0e converted the other miinitext functions to use ARRAY_SIZE,
and removed the sentinel, but missed EnableDisableExtensionError so
passing an invalid extension name could cause the server to walk off
the end off the list looking for a sentinel that wasn't there.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 369da5e..81c663a 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -212,10 +212,12 @@ EnableDisableExtension(const char *name, Bool enable)
void
EnableDisableExtensionError(const char *name, Bool enable)
{
- ExtensionToggle *ext = &ExtensionToggleList[0];
+ ExtensionToggle *ext;
+ int i;
Bool found = FALSE;
- for (ext = &ExtensionToggleList[0]; ext->name != NULL; ext++) {
+ for (i = 0; i < ARRAY_SIZE(ExtensionToggleList); i++) {
+ ext = &ExtensionToggleList[i];
if ((strcmp(name, ext->name) == 0) && (ext->disablePtr == NULL)) {
ErrorF("[mi] Extension \"%s\" can not be disabled\n", name);
found = TRUE;
@@ -226,7 +228,8 @@ EnableDisableExtensionError(const char *name, Bool enable)
ErrorF("[mi] Extension \"%s\" is not recognized\n", name);
ErrorF("[mi] Only the following extensions can be run-time %s:\n",
enable ? "enabled" : "disabled");
- for (ext = &ExtensionToggleList[0]; ext->name != NULL; ext++) {
+ for (i = 0; i < ARRAY_SIZE(ExtensionToggleList); i++) {
+ ext = &ExtensionToggleList[i];
if (ext->disablePtr != NULL) {
ErrorF("[mi] %s\n", ext->name);
}
commit 07a91fa6c6d535f3f05d4c3bd9c4d2b8c382c475
Author: Rob Clark <robdclark at gmail.com>
Date: Wed Dec 5 23:21:27 2012 +0000
hw/dmx: fix build without GLX
Fixes this compile break that showed up on arm recently:
dmxinit.c:746:26: error: 'glxSupported' undeclared (first use in this function)
dmxinit.c:746:26: note: each undeclared identifier is reported only once for each function it appears in
Signed-off-by: Rob Clark <robdclark at gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
index 7a50aeb..7de402b 100644
--- a/hw/dmx/dmxinit.c
+++ b/hw/dmx/dmxinit.c
@@ -740,10 +740,10 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
/* Check if GLX extension exists on all back-end servers */
for (i = 0; i < dmxNumScreens; i++)
glxSupported &= (dmxScreens[i].glxMajorOpcode > 0);
-#endif
if (serverGeneration == 1)
dmxAddExtensions(glxSupported);
+#endif
/* Tell dix layer about the backend displays */
for (i = 0; i < dmxNumScreens; i++) {
commit 5692a1e8f5befd3698134b1a5516a4dadda00115
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Thu Dec 6 16:15:50 2012 -0800
Support compilers with alternate spellings of typeof
The AC_C_TYPEOF adds a #undef typeof to its autogenerated config.h.in
template, but b8ab93dfbc7f292 didn't copy that to dix-config.h.in
when HAVE_TYPEOF was, so the macro could claim typeof support but not
make it work, when used with compilers like Solaris Studio 12.1 which
only recognize it as __typeof__.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Acked-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index b270a32..e1cb9eb 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -429,6 +429,9 @@
/* Define to 1 if typeof works with your compiler. */
#undef HAVE_TYPEOF
+/* Define to __typeof__ if your compiler spells it that way. */
+#undef typeof
+
/* The compiler supported TLS storage class, prefering initial-exec if tls_model is supported */
#undef TLS
More information about the xorg-commit
mailing list