Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Mar 2008 12:45:16 +0300
From:      "Yar Tikhiy" <yar@comp.chem.msu.su>
To:        "Jung-uk Kim" <jkim@freebsd.org>
Cc:        Max Laier <max@love2party.net>, src-committers@freebsd.org, cvs-all@freebsd.org, cvs-src@freebsd.org
Subject:   Re: cvs commit: src/usr.sbin/moused moused.c
Message-ID:  <fbaf9b70803060145w6939c23buaf5034fddfca2ddb@mail.gmail.com>
In-Reply-To: <200803052143.48208.jkim@FreeBSD.org>
References:  <200803060214.m262EjmG032525@repoman.freebsd.org> <53687.192.168.4.151.1204770665.squirrel@router> <200803052143.48208.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 6, 2008 at 5:43 AM, Jung-uk Kim <jkim@freebsd.org> wrote:
> On Wednesday 05 March 2008 09:31 pm, Max Laier wrote:
>  > Am Do, 6.03.2008, 03:14, schrieb Jung-uk Kim:
>  > > jkim        2008-03-06 02:14:45 UTC
>  > >
>  > >   FreeBSD src repository
>  > >
>  > >   Modified files:
>  > >     usr.sbin/moused      moused.c
>  > >   Log:
>  > >   Cast time_t to long to mute tinderbox build failure.
>  >
>  > doesn't this defeat the purpose of having time_t in the first
>  > place?  I'd rather cast to intmax_t and print with %j  ... though
>  > it probably doesn't matter.
>
>  Now the timestamp is uptime and the breakage was just debugging
>  output, it shouldn't really matter at all but I will do that soon.

Yes it matters because it has to do with everyday coding practice. It
is one of small yet important advances in C99 that we can now printf
non-basic integral types _portably_[1] and _reliably_ through %j[du]
and a cast to [u]intmax_t.

[1] Well, almost portably as we need to guess the signedness of the type.

-- 
Yar



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fbaf9b70803060145w6939c23buaf5034fddfca2ddb>