From owner-svn-src-head@freebsd.org Sat Sep 3 13:33:29 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 A47B1BCB93C; Sat, 3 Sep 2016 13:33:29 +0000 (UTC) (envelope-from dim@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 72737379; Sat, 3 Sep 2016 13:33:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u83DXSeR075880; Sat, 3 Sep 2016 13:33:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u83DXS77075879; Sat, 3 Sep 2016 13:33:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201609031333.u83DXS77075879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 3 Sep 2016 13:33:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305344 - head/sys/dev/drm2 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: Sat, 03 Sep 2016 13:33:29 -0000 Author: dim Date: Sat Sep 3 13:33:28 2016 New Revision: 305344 URL: https://svnweb.freebsd.org/changeset/base/305344 Log: Define drmP.h's __OS_HAS_AGP and __OS_HAS_MTRR macros in a defined and portable way. Reviewed by: dumbbell MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D7770 Modified: head/sys/dev/drm2/drmP.h Modified: head/sys/dev/drm2/drmP.h ============================================================================== --- head/sys/dev/drm2/drmP.h Sat Sep 3 13:01:37 2016 (r305343) +++ head/sys/dev/drm2/drmP.h Sat Sep 3 13:33:28 2016 (r305344) @@ -103,8 +103,16 @@ __FBSDID("$FreeBSD$"); #include -#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) -#define __OS_HAS_MTRR (defined(CONFIG_MTRR)) +#if defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE)) +#define __OS_HAS_AGP 1 +#else +#define __OS_HAS_AGP 0 +#endif +#if defined(CONFIG_MTRR) +#define __OS_HAS_MTRR 1 +#else +#define __OS_HAS_MTRR 0 +#endif struct drm_file; struct drm_device;