bug-gnulib
[Top][All Lists]
Advanced

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

Re: gethrxtime: fall back on gettime?


From: Jim Meyering
Subject: Re: gethrxtime: fall back on gettime?
Date: Sat, 12 Nov 2005 20:07:28 +0100

Paul Eggert <address@hidden> wrote:
> Jim Meyering <address@hidden> writes:
>
>> Assuming someone cares about the affected systems,
>> I'd be happy to let them do it.
>
> But in the meantime, everyone else who wanted to run on mingw would be
> left high and dry, as coreutils wouldn't build.
>
> Is there some middle ground here, where we can generate a warning for
> people building on old-fashioned systems without sub-second clocks,
> without refusing to build coreutils entirely?  Admittedly warnings are
> often ignored, but I hope you get the idea.
>
> Perhaps something like the following?
>
> #ifdef OK_TO_USE_1S_CLOCK
>   ts->tv_sec = time (NULL);
>   ts->tv_nsec = 0;
> #else
>   #error "Only 1-second nominal clock resolution found.  Is that intended?  
> If so, recompile with -DOK_TO_USE_1S_CLOCK"
> #endif

I like it.
Thanks!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]