diff options
author | Zephaniah E. Hull <warp@agamemnon.b5> | 2007-06-04 02:03:44 -0400 |
---|---|---|
committer | Zephaniah E. Hull <warp@agamemnon.b5> | 2007-06-04 02:03:44 -0400 |
commit | 0cbc3a4da2ddb6e4f30f60d2bc7f405d31aa554a (patch) | |
tree | edabcbbeb789e65c821c2fca33156cbf705c84e6 | |
parent | 9a7aaeb3f6ff79af60fde91cd0575a54ba0b9587 (diff) |
Print the build time as well as the date if we can.
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Build.h.in | 1 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 8 |
3 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 350245eae..1f9455646 100644 --- a/configure.ac +++ b/configure.ac @@ -1948,6 +1948,8 @@ AM_CONDITIONAL(SUN_KBD_MODE, [test x$KBD_MODE_TYPE = xsun]) 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 3f254133a..a4f56b0ae 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 221ab9ae8..8423fca36 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) |