summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-12-19 12:17:59 -0800
committerKeith Packard <keithp@keithp.com>2012-12-19 12:17:59 -0800
commit386e4d76baaffe226d2d561ff936509454eb0ac2 (patch)
tree174bcb52d7c96479c1445f96259c2a67af635a1f
parent014a5c8a9d86f2f992183bff9106354fac2c3b0e (diff)
parent9ff2e831517875f96477862f979abff394e8d551 (diff)
Merge remote-tracking branch 'alanc/master'
-rw-r--r--hw/dmx/dmxinit.c2
-rw-r--r--include/dix-config.h.in3
-rw-r--r--mi/miinitext.c9
3 files changed, 10 insertions, 4 deletions
diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
index 7a50aebc3..7de402b06 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++) {
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index b270a3238..e1cb9eb51 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
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 369da5ede..81c663abe 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);
}