Cygwin: Cleanup time handling
* Redefine NSPERSEC to NS100PERSEC * Define NSPERSEC as nanosecs per second * Define USPERSEC as microsecs per second * Use above constants throughout where appropriate * Rename to_us to timespec_to_us and inline * Rename it_bad to timespec_bad and inline Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -1314,8 +1314,8 @@ fhandler_base::utimens_fs (const struct timespec *tvp)
|
||||
tmp[1] = tmp[0] = timeofday;
|
||||
else
|
||||
{
|
||||
if ((tvp[0].tv_nsec < UTIME_NOW || tvp[0].tv_nsec > 999999999L)
|
||||
|| (tvp[1].tv_nsec < UTIME_NOW || tvp[1].tv_nsec > 999999999L))
|
||||
if ((tvp[0].tv_nsec < UTIME_NOW || tvp[0].tv_nsec >= NSPERSEC)
|
||||
|| (tvp[1].tv_nsec < UTIME_NOW || tvp[1].tv_nsec >= NSPERSEC))
|
||||
{
|
||||
if (closeit)
|
||||
close_fs ();
|
||||
|
Reference in New Issue
Block a user