BUILD_TIME in xserver

Michel Dänzer michel at tungstengraphics.com
Mon Jun 11 04:00:51 PDT 2007


On Thu, 2007-06-07 at 11:00 -0400, Clark Rawlins wrote:
> 
>  DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"
> diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
> index 8423fca..6a6789b 100644
> --- a/hw/xfree86/common/xf86Init.c
> +++ b/hw/xfree86/common/xf86Init.c
> @@ -1733,7 +1733,7 @@ xf86PrintBanner()
>  #if defined(BUILD_TIME)
>      t.tm_sec = BUILD_TIME % 100;
>      t.tm_min = (BUILD_TIME / 100) % 100;
> -    t.tm_hour = (BUILD_TIME / 10000);
> +    t.tm_hour = (BUILD_TIME / 10000) % 10000;
>      if (strftime(buf, sizeof(buf), "%d %B %Y  %I:%M:%s%p", &t))
>         ErrorF("Build Date: %s\n", buf);
>  #else

This isn't correct; 1xxxxxx / 10000 = 1xx % 10000 = 1xx.

I've pushed a simpler fix which just uses %k instead of %H with date.
Thanks for the detailed analysis of the problem though.


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer




More information about the xorg mailing list