From owner-svn-src-all@FreeBSD.ORG Thu Jun 26 05:23:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACF19CDA; Thu, 26 Jun 2014 05:23:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A3A32E3B; Thu, 26 Jun 2014 05:23:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5Q5NnA8069181; Thu, 26 Jun 2014 05:23:49 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5Q5NnuP069180; Thu, 26 Jun 2014 05:23:49 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201406260523.s5Q5NnuP069180@svn.freebsd.org> From: Davide Italiano Date: Thu, 26 Jun 2014 05:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267896 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 05:23:49 -0000 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 . 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)