Date: Sat, 31 Dec 2011 20:46:36 +0000 (UTC) From: Matthew D Fleming <mdf@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r229158 - in stable/8/sys/dev: cxgbe drm speaker tws Message-ID: <201112312046.pBVKkaQp082673@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mdf Date: Sat Dec 31 20:46:35 2011 New Revision: 229158 URL: http://svn.freebsd.org/changeset/base/229158 Log: MFC r228443: Do not define bool/true/false if the symbols already exist. Note that the ofed and dev/vxge parts of r228443 are not in stable/8. Modified: stable/8/sys/dev/cxgbe/osdep.h stable/8/sys/dev/drm/i915_drv.h stable/8/sys/dev/speaker/spkr.c stable/8/sys/dev/tws/tws.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/cxgbe/osdep.h ============================================================================== --- stable/8/sys/dev/cxgbe/osdep.h Sat Dec 31 20:42:34 2011 (r229157) +++ stable/8/sys/dev/cxgbe/osdep.h Sat Dec 31 20:46:35 2011 (r229158) @@ -70,9 +70,11 @@ typedef uint64_t __be64; #error "Must set BYTE_ORDER" #endif +#ifndef __bool_true_false_are_defined typedef boolean_t bool; #define false FALSE #define true TRUE +#endif #define mdelay(x) DELAY((x) * 1000) #define udelay(x) DELAY(x) Modified: stable/8/sys/dev/drm/i915_drv.h ============================================================================== --- stable/8/sys/dev/drm/i915_drv.h Sat Dec 31 20:42:34 2011 (r229157) +++ stable/8/sys/dev/drm/i915_drv.h Sat Dec 31 20:46:35 2011 (r229158) @@ -560,7 +560,7 @@ extern void opregion_enable_asle(struct LOCK_TEST_WITH_RETURN(dev, file_priv); \ } while (0) -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) && !defined(__bool_true_false_are_defined) typedef boolean_t bool; #endif Modified: stable/8/sys/dev/speaker/spkr.c ============================================================================== --- stable/8/sys/dev/speaker/spkr.c Sat Dec 31 20:42:34 2011 (r229157) +++ stable/8/sys/dev/speaker/spkr.c Sat Dec 31 20:46:35 2011 (r229158) @@ -130,7 +130,9 @@ rest(int centisecs) * except possibly at physical block boundaries. */ +#ifndef __bool_true_false_are_defined typedef int bool; +#endif #define TRUE 1 #define FALSE 0 Modified: stable/8/sys/dev/tws/tws.h ============================================================================== --- stable/8/sys/dev/tws/tws.h Sat Dec 31 20:42:34 2011 (r229157) +++ stable/8/sys/dev/tws/tws.h Sat Dec 31 20:46:35 2011 (r229158) @@ -205,7 +205,11 @@ struct tws_init_connect_info { /* ------------ boolean types ------------------- */ +#ifndef __bool_true_false_are_defined typedef enum _boolean { false, true } boolean; +#else +#define boolean bool +#endif enum err { SUCCESS, FAILURE }; /* ----------- per instance data ---------------- */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112312046.pBVKkaQp082673>