xserver: Branch 'master'

Zephaniah E. Hull warp at kemper.freedesktop.org
Sun Jun 3 23:03:45 PDT 2007


 configure.ac                     |    2 ++
 hw/xfree86/common/xf86Build.h.in |    1 +
 hw/xfree86/common/xf86Init.c     |    8 ++++++++
 3 files changed, 11 insertions(+)

New commits:
diff-tree 0cbc3a4da2ddb6e4f30f60d2bc7f405d31aa554a (from 9a7aaeb3f6ff79af60fde91cd0575a54ba0b9587)
Author: Zephaniah E. Hull <warp at agamemnon.b5>
Date:   Mon Jun 4 02:03:44 2007 -0400

    Print the build time as well as the date if we can.

diff --git a/configure.ac b/configure.ac
index 350245e..1f94556 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1948,6 +1948,8 @@ AM_CONDITIONAL(SUN_KBD_MODE, [test x$KBD
 
 BUILD_DATE="$(date +'%Y%m%d')"
 AC_SUBST([BUILD_DATE])
+BUILD_TIME="$(date +'%H%M%S')"
+AC_SUBST([BUILD_TIME])
 
 DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"
 
diff --git a/hw/xfree86/common/xf86Build.h.in b/hw/xfree86/common/xf86Build.h.in
index 3f25413..a4f56b0 100644
--- a/hw/xfree86/common/xf86Build.h.in
+++ b/hw/xfree86/common/xf86Build.h.in
@@ -1 +1,2 @@
 #define BUILD_DATE @BUILD_DATE@
+#define BUILD_TIME @BUILD_TIME@
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 221ab9a..8423fca 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1730,8 +1730,16 @@ xf86PrintBanner()
     t.tm_mday = BUILD_DATE % 100;
     t.tm_mon = (BUILD_DATE / 100) % 100 - 1;
     t.tm_year = BUILD_DATE / 10000 - 1900;
+#if defined(BUILD_TIME)
+    t.tm_sec = BUILD_TIME % 100;
+    t.tm_min = (BUILD_TIME / 100) % 100;
+    t.tm_hour = (BUILD_TIME / 10000);
+    if (strftime(buf, sizeof(buf), "%d %B %Y  %I:%M:%s%p", &t))
+       ErrorF("Build Date: %s\n", buf);
+#else
     if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
        ErrorF("Build Date: %s\n", buf);
+#endif
   }
 #endif
 #if defined(CLOG_DATE) && (CLOG_DATE > 19000000)


More information about the xorg-commit mailing list