From owner-svn-src-all@freebsd.org Sat Aug 26 03:21:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65743DEB6BB; Sat, 26 Aug 2017 03:21:13 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 3320380722; Sat, 26 Aug 2017 03:21:13 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7Q3LCBK027951; Sat, 26 Aug 2017 03:21:12 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7Q3LCq2027950; Sat, 26 Aug 2017 03:21:12 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201708260321.v7Q3LCq2027950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 26 Aug 2017 03:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322920 - head/sys/mips/include X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/mips/include X-SVN-Commit-Revision: 322920 X-SVN-Commit-Repository: base 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.23 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: Sat, 26 Aug 2017 03:21:13 -0000 Author: cem Date: Sat Aug 26 03:21:12 2017 New Revision: 322920 URL: https://svnweb.freebsd.org/changeset/base/322920 Log: Fix limits.h constants to have correct type on MIPS Use correctly typed constants to avoid bogus errors like https://lists.freebsd.org/pipermail/svn-src-all/2017-August/150400.html (like x86 _limits.h). Reported by: bde, asomers Reviewed by: mjoras, tinderbox Sponsored by: Dell EMC Isilon Modified: head/sys/mips/include/_limits.h Modified: head/sys/mips/include/_limits.h ============================================================================== --- head/sys/mips/include/_limits.h Sat Aug 26 00:35:49 2017 (r322919) +++ head/sys/mips/include/_limits.h Sat Aug 26 03:21:12 2017 (r322920) @@ -75,17 +75,23 @@ #define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ #define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ +#ifdef __mips_n64 #define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ - #define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */ - -#define __OFF_MAX __LLONG_MAX /* max value for an off_t */ -#define __OFF_MIN __LLONG_MIN /* min value for an off_t */ - -/* Quads and long longs are the same size. Ensure they stay in sync. */ -#define __UQUAD_MAX __ULLONG_MAX /* max value for a uquad_t */ -#define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */ -#define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */ +#define __OFF_MAX __LONG_MAX /* max value for an off_t */ +#define __OFF_MIN __LONG_MIN /* min value for an off_t */ +#define __UQUAD_MAX __ULONG_MAX /* max value for a uquad_t */ +#define __QUAD_MAX __LONG_MAX /* max value for a quad_t */ +#define __QUAD_MIN __LONG_MIN /* min value for a quad_t */ +#else +#define __SSIZE_MAX __INT_MAX +#define __SIZE_T_MAX __UINT_MAX +#define __OFF_MAX __LLONG_MAX +#define __OFF_MIN __LLONG_MIN +#define __UQUAD_MAX __ULLONG_MAX +#define __QUAD_MAX __LLONG_MAX +#define __QUAD_MIN __LLONG_MIN +#endif #define __WORD_BIT 32