From 1829528d1fb2b87c726341aaf8d69d1190f83d6b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 30 Jun 1998 21:19:40 +0000 Subject: nttrans.c: More code towards NT protocol. smb.h: More code towards NT protocol. time.c: Fix for sco bug. Jeremy. (This used to be commit e53f4396ead540bcf9ecd18f3253e49216404a1b) --- source3/lib/time.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/time.c b/source3/lib/time.c index 1b2347a45b..c73d219120 100644 --- a/source3/lib/time.c +++ b/source3/lib/time.c @@ -253,9 +253,13 @@ time_t interpret_long_date(char *p) double d; time_t ret; uint32 tlow,thigh; + /* The next two lines are a fix needed for the + broken SCO compiler. JRA. */ + time_t l_time_min = TIME_T_MIN; + time_t l_time_max = TIME_T_MAX; + tlow = IVAL(p,0); thigh = IVAL(p,4); - if (thigh == 0) return(0); d = ((double)thigh)*4.0*(double)(1<<30); @@ -265,7 +269,7 @@ time_t interpret_long_date(char *p) /* now adjust by 369 years to make the secs since 1970 */ d -= TIME_FIXUP_CONSTANT; - if (!(TIME_T_MIN <= d && d <= TIME_T_MAX)) + if (!(l_time_min <= d && d <= l_time_max)) return(0); ret = (time_t)(d+0.5); -- cgit