Nico Huber has uploaded this change for review. ( https://review.coreboot.org/21982
Change subject: Fix some whitespace and parentheses recently introduced ......................................................................
Fix some whitespace and parentheses recently introduced
51e43039 (Fix undefined behavior in some preprocessor define checks) broke patch compatibility with the staging branch, fix that.
Change-Id: I4dd7af338596584b678a915e3b0dc57520be01bc Signed-off-by: Nico Huber nico.h@gmx.de --- M hwaccess.c M platform.h 2 files changed, 18 insertions(+), 18 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/82/21982/1
diff --git a/hwaccess.c b/hwaccess.c index 80852e7..3406334 100644 --- a/hwaccess.c +++ b/hwaccess.c @@ -37,20 +37,20 @@ #error "Unknown operating system" #endif
-#if (IS_LINUX || IS_MACOSX || defined(__NetBSD__) || defined(__OpenBSD__)) - #define USE_IOPL (1) +#if IS_LINUX || IS_MACOSX || defined(__NetBSD__) || defined(__OpenBSD__) +#define USE_IOPL 1 #else - #define USE_IOPL (0) +#define USE_IOPL 0 #endif -#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)) - #define USE_DEV_IO (1) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) +#define USE_DEV_IO 1 #else - #define USE_DEV_IO (0) +#define USE_DEV_IO 0 #endif -#if (defined(__gnu_hurd__)) - #define USE_IOPERM (1) +#if defined(__gnu_hurd__) +#define USE_IOPERM 1 #else - #define USE_IOPERM (0) +#define USE_IOPERM 0 #endif
#if USE_IOPERM diff --git a/platform.h b/platform.h index d70a6e0..b2fdcd0 100644 --- a/platform.h +++ b/platform.h @@ -25,20 +25,20 @@ #define __PLATFORM_H__ 1
// Helper defines for operating systems -#if (defined(__gnu_linux__) || defined(__linux__)) - #define IS_LINUX (1) +#if defined(__gnu_linux__) || defined(__linux__) +#define IS_LINUX 1 #else - #define IS_LINUX (0) +#define IS_LINUX 0 #endif -#if (defined(__APPLE__) && defined(__MACH__)) /* yes, both. */ - #define IS_MACOSX (1) +#if defined(__APPLE__) && defined(__MACH__) /* yes, both. */ +#define IS_MACOSX 1 #else - #define IS_MACOSX (0) +#define IS_MACOSX 0 #endif -#if (defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__WINDOWS__)) - #define IS_WINDOWS (1) +#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__WINDOWS__) +#define IS_WINDOWS 1 #else - #define IS_WINDOWS (0) +#define IS_WINDOWS 0 #endif
// Likewise for target architectures