Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jun 2014 05:23:49 +0000 (UTC)
From:      Davide Italiano <davide@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267896 - head/sys/sys
Message-ID:  <201406260523.s5Q5NnuP069180@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davide
Date: Thu Jun 26 05:23:48 2014
New Revision: 267896
URL: http://svnweb.freebsd.org/changeset/base/267896

Log:
  Improve r264388 removing namespace pollution previously introduced in
  <sys/time.h>. INT64_MAX actually requires __INT64_C() hack to get the
  type right on exotic architectures (e.g. on ones with 63-bit ints or long
  0x7fffffffffffffff is unsigned int or long). The hardcoded LL suffix is
  good enough to avoid these problems for SBT_MAX (it makes the type always
  signed long long, without overflow since long long has at least 64 bits).
  Many thanks to Bruce Evans for the time spent me to explain this.
  
  Reported by:	bde
  Reviewed by:	bde

Modified:
  head/sys/sys/time.h

Modified: head/sys/sys/time.h
==============================================================================
--- head/sys/sys/time.h	Thu Jun 26 04:12:41 2014	(r267895)
+++ head/sys/sys/time.h	Thu Jun 26 05:23:48 2014	(r267896)
@@ -129,7 +129,7 @@ bintime_shift(struct bintime *_bt, int _
 #define	SBT_1MS	(SBT_1S / 1000)
 #define	SBT_1US	(SBT_1S / 1000000)
 #define	SBT_1NS	(SBT_1S / 1000000000)
-#define	SBT_MAX	INT64_MAX
+#define	SBT_MAX	0x7fffffffffffffffLL
 
 static __inline int
 sbintime_getsec(sbintime_t _sbt)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406260523.s5Q5NnuP069180>