From 2298aec5a165b22f893559fad7ede008be74c17c Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 26 Jun 2000 21:33:57 +0000 Subject: [PATCH] test for high bit being set in isc_file_settime needed to use an unsigned long long constant to work correctly on platforms that have a 64 bit timeval.tv_sec and 32 bit ints. --- lib/isc/unix/file.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/isc/unix/file.c b/lib/isc/unix/file.c index 793b8a7f49..e08005d647 100644 --- a/lib/isc/unix/file.c +++ b/lib/isc/unix/file.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: file.c,v 1.17 2000/06/22 21:58:35 tale Exp $ */ +/* $Id: file.c,v 1.18 2000/06/26 21:33:57 tale Exp $ */ #include @@ -90,12 +90,10 @@ isc_file_settime(const char *file, isc_time_t *time) { times[0].tv_sec = times[1].tv_sec = (long)isc_time_seconds(time); /* - * Solaris 5.6 gives this warning about the left shift: - * warning: integer overflow detected: op "<<" - * if the U(nsigned) qualifier is not on the 1. + * Here is the real check for the high bit being set. */ if ((times[0].tv_sec & - (1U << (sizeof(times[0].tv_sec) * CHAR_BIT - 1))) != 0) + (1ULL << (sizeof(times[0].tv_sec) * CHAR_BIT - 1))) != 0) return (ISC_R_RANGE); /*