Re: [PATCH 2/2] git-compat-util: use gettimeofday for current time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 20, 2023 at 12:40:07PM -0700, Junio C Hamano wrote:
> Paul Eggert <eggert@xxxxxxxxxxx> writes:
>
> > It might be simpler to use the gettimeofday workaround on all
> > platforms, rather than having an OVERRIDE_TIME flag and complicating
> > config.mak.uname. gettimeofday should be portable, as it's already
> > used elsewhere in Git without configury.
>
> That is an excellent point.

I'd be happy to assume OVERRIDE_TIME is set everywhere and just drop it
entirely (using gettimeofday() unconditionally within git_time()).

An alternative approach might be to leave OVERRIDE_TIME time in place,
but treat it as opt-out instead of opt-in. I can imagine that some
exotic platform might want to use time() instead of gettimeofday() for
one reason or another.

Thanks,
Taylor



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux