From owner-svn-src-head@freebsd.org Tue May 31 13:31:20 2016 Return-Path: Delivered-To: svn-src-head@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 DEA82B55BAC; Tue, 31 May 2016 13:31:20 +0000 (UTC) (envelope-from ed@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 AC49C1ED9; Tue, 31 May 2016 13:31:20 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4VDVJTg026327; Tue, 31 May 2016 13:31:19 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4VDVJsx026326; Tue, 31 May 2016 13:31:19 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201605311331.u4VDVJsx026326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Tue, 31 May 2016 13:31:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301037 - head/sys/x86/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2016 13:31:21 -0000 Author: ed Date: Tue May 31 13:31:19 2016 New Revision: 301037 URL: https://svnweb.freebsd.org/changeset/base/301037 Log: Implement _ALIGN() using internal integer types. The existing version depends on register_t and uintptr_t, which are only available when including headers such as . As this macro is used by , for example, it should be written in such a way that it doesn't depend on those types. Modified: head/sys/x86/include/_align.h Modified: head/sys/x86/include/_align.h ============================================================================== --- head/sys/x86/include/_align.h Tue May 31 12:39:54 2016 (r301036) +++ head/sys/x86/include/_align.h Tue May 31 13:31:19 2016 (r301037) @@ -46,7 +46,7 @@ * for all data types (int, long, ...). The result is unsigned int * and must be cast to any desired pointer type. */ -#define _ALIGNBYTES (sizeof(register_t) - 1) -#define _ALIGN(p) (((uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) +#define _ALIGNBYTES (sizeof(__register_t) - 1) +#define _ALIGN(p) (((__uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) #endif /* !_X86_INCLUDE__ALIGN_H_ */