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

This commit is contained in:
Zephaniah E. Hull 2007-06-04 02:03:44 -04:00
parent 9a7aaeb3f6
commit 0cbc3a4da2
3 changed files with 11 additions and 0 deletions

View File

@ -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"

View File

@ -1 +1,2 @@
#define BUILD_DATE @BUILD_DATE@
#define BUILD_TIME @BUILD_TIME@

View File

@ -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)