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)
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to