xserver: Branch 'master' - 2 commits

Eric Anholt anholt at kemper.freedesktop.org
Thu Apr 10 11:39:12 PDT 2008


 acinclude.m4                 |    8 ++++----
 configure.ac                 |    2 --
 hw/kdrive/ephyr/ephyr_draw.c |    1 -
 hw/kdrive/ephyr/ephyrlog.h   |    4 ++--
 hw/kdrive/src/kinput.c       |    4 ++--
 hw/xgl/egl/kinput.c          |    4 ++--
 hw/xquartz/darwinKeyboard.c  |    6 ------
 hw/xquartz/quartzStartup.c   |    6 ------
 include/dix-config.h.in      |    3 ---
 include/xorg-server.h.in     |    3 ---
 10 files changed, 10 insertions(+), 31 deletions(-)

New commits:
commit 13dcde6bf994fae09c67c3edce9de42df61ef043
Author: Eric Anholt <eric at anholt.net>
Date:   Thu Apr 10 11:08:49 2008 -0700

    Fix dolt to error out on compile error, and not print errors on race to mkdir.
    
    Both of these changes have been submitted upstream.

diff --git a/acinclude.m4 b/acinclude.m4
index 0d31e85..cbb68e1 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -65,7 +65,7 @@ dnl Write out shared compilation code.
         cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
 libobjdir="${obj%$objbase}.libs"
 if test ! -d "$libobjdir" ; then
-    mkdir "$libobjdir"
+    mkdir -p "$libobjdir"
     mkdir_ret=$?
     if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then
         exit $mkdir_ret
@@ -73,7 +73,7 @@ if test ! -d "$libobjdir" ; then
 fi
 pic_object="$libobjdir/$objbase.o"
 args@<:@$objarg@:>@="$pic_object"
-"${args@<:@@@:>@}" -fPIC -DPIC
+"${args@<:@@@:>@}" -fPIC -DPIC || exit $?
 __DOLTCOMPILE__EOF__
     fi
 
@@ -86,11 +86,11 @@ args@<:@$objarg@:>@="$non_pic_object"
 __DOLTCOMPILE__EOF__
         if test x$enable_shared = xyes; then
             cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
-"${args@<:@@@:>@}" >/dev/null 2>&1
+"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $?
 __DOLTCOMPILE__EOF__
         else
             cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
-"${args@<:@@@:>@}"
+"${args@<:@@@:>@}" || exit $?
 __DOLTCOMPILE__EOF__
         fi
     fi
commit a7e3ad1c6b455bda7c4abb352a20845d1d4574a0
Author: Eric Anholt <eric at anholt.net>
Date:   Thu Apr 10 10:33:11 2008 -0700

    Remove NDEBUG (assert() disable) define from the X Server.
    
    A few pieces of code were abusing this define for other purposes, which are
    converted to #ifndef DEBUG instead.  There should be no ABI consequences
    to this change.
    
    The rationale is that having the define in xorg-server.h also disables
    assert() drivers, which is unexpected, and also difficult to avoid since
    xorg-server.h is included in their config.h, and you can't put a #undef in
    config.h.  As for removing it from the server instead of moving it to an
    internal header, we probably shouldn't have unnecessary assert()s in
    critical server paths anyway, and if we do we could #define NDEBUG in the
    specific cases needed.

diff --git a/configure.ac b/configure.ac
index eb6fcda..b57dc1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1099,8 +1099,6 @@ AC_DEFINE(NO_LIBCWRAPPER, 1, [Define to 1 if modules should avoid the libcwrappe
 
 if test "x$DEBUGGING" = xyes; then
        AC_DEFINE(DEBUG, 1, [Enable debugging code])
-else
-       AC_DEFINE(NDEBUG, 1, [Disable some debugging code])
 fi
 AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes])
 
diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c
index 422b7c6..7b579c2 100644
--- a/hw/kdrive/ephyr/ephyr_draw.c
+++ b/hw/kdrive/ephyr/ephyr_draw.c
@@ -28,7 +28,6 @@
 #ifdef HAVE_CONFIG_H
 #include <kdrive-config.h>
 #endif
-#undef NDEBUG	/* No, really.  The whole point of this module is to crash. */
 
 #include "ephyr.h"
 #include "exa_priv.h"
diff --git a/hw/kdrive/ephyr/ephyrlog.h b/hw/kdrive/ephyr/ephyrlog.h
index 71f7977..a07a0a0 100644
--- a/hw/kdrive/ephyr/ephyrlog.h
+++ b/hw/kdrive/ephyr/ephyrlog.h
@@ -31,11 +31,11 @@
 #include <assert.h>
 #include "os.h"
 
-#ifdef NDEBUG
+#ifndef DEBUG
 /*we are not in debug mode*/
 #define EPHYR_LOG(...)
 #define EPHYR_LOG_ERROR(...)
-#endif /*NDEBUG*/
+#endif /*!DEBUG*/
 
 #define ERROR_LOG_LEVEL 3
 #define INFO_LOG_LEVEL 4
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index df73942..9e8fd50 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -1744,7 +1744,7 @@ KdClassifyInput (KdPointerInfo *pi, int type, int x, int y, int z, int b)
     return keyboard;
 }
 
-#ifndef NDEBUG
+#ifdef DEBUG
 char	*kdStateNames[] = {
     "start",
     "button_1_pend",
@@ -1777,7 +1777,7 @@ char *kdActionNames[] = {
     "gen_down_2",
     "gen_up_2",
 };
-#endif
+#endif /* DEBUG */
 
 static void
 KdQueueEvent (DeviceIntPtr pDev, xEvent *ev)
diff --git a/hw/xgl/egl/kinput.c b/hw/xgl/egl/kinput.c
index 774e00e..f892dc1 100644
--- a/hw/xgl/egl/kinput.c
+++ b/hw/xgl/egl/kinput.c
@@ -977,7 +977,7 @@ KdClassifyInput (KdMouseInfo *mi, xEvent *ev)
     return keyboard;
 }
 
-#ifndef NDEBUG
+#ifdef DEBUG
 char	*kdStateNames[] = {
     "start",
     "button_1_pend",
@@ -1010,7 +1010,7 @@ char *kdActionNames[] = {
     "gen_down_2",
     "gen_up_2",
 };
-#endif
+#endif /* DEBUG */
 
 static void
 KdQueueEvent (xEvent *ev)
diff --git a/hw/xquartz/darwinKeyboard.c b/hw/xquartz/darwinKeyboard.c
index 6f2758e..0a8c5c0 100644
--- a/hw/xquartz/darwinKeyboard.c
+++ b/hw/xquartz/darwinKeyboard.c
@@ -76,13 +76,7 @@
 #include "quartzKeyboard.h"
 #include "quartzAudio.h"
 
-#ifdef NDEBUG
-#undef NDEBUG
 #include <assert.h>
-#define NDEBUG 1
-#else
-#include <assert.h>
-#endif
 
 #define AltMask         Mod1Mask
 #define MetaMask        Mod2Mask
diff --git a/hw/xquartz/quartzStartup.c b/hw/xquartz/quartzStartup.c
index e25e155..5ac3017 100644
--- a/hw/xquartz/quartzStartup.c
+++ b/hw/xquartz/quartzStartup.c
@@ -41,13 +41,7 @@
 #include "opaque.h"
 #include "micmap.h"
 
-#ifdef NDEBUG
-#undef NDEBUG
 #include <assert.h>
-#define NDEBUG 1
-#else
-#include <assert.h>
-#endif
 
 char **envpGlobal;      // argcGlobal and argvGlobal
                         // are from dix/globals.c
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 38639d6..a7c0c6a 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -264,9 +264,6 @@
 /* Support MIT-SHM Extension */
 #undef MITSHM
 
-/* Disable some debugging code */
-#undef NDEBUG
-
 /* Enable some debugging code */
 #undef DEBUG
 
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index 1d41b4c..72b4551 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -52,9 +52,6 @@
 /* Support MIT-SHM Extension */
 #undef MITSHM
 
-/* Disable some debugging code */
-#undef NDEBUG
-
 /* Need XFree86 helper functions */
 #undef NEED_XF86_PROTOTYPES
 


More information about the xorg-commit mailing list