Nico Huber has submitted this change. ( https://review.coreboot.org/c/flashrom/+/58276 )
Change subject: platform.h: remove IS_LINUX and IS_MACOSX macros ......................................................................
platform.h: remove IS_LINUX and IS_MACOSX macros
Replace the remaining uses by the plain macros. Windows, Linux and MacOS are the only systems with explicit macros.
Only the Windows macro is used in several places. The others can easily be handled like all other systems.
Change-Id: I23ec8fdcff8202d10ddf5a7520432e5b26b01cd4 Signed-off-by: Thomas Heijligen thomas.heijligen@secunet.de Reviewed-on: https://review.coreboot.org/c/flashrom/+/58276 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de --- M hwaccess.c M platform.h 2 files changed, 2 insertions(+), 12 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/hwaccess.c b/hwaccess.c index 3a9ca57..aa35f4b 100644 --- a/hwaccess.c +++ b/hwaccess.c @@ -30,11 +30,11 @@ #include "programmer.h" #include "hwaccess.h"
-#if !(IS_LINUX || IS_MACOSX || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__DJGPP__) || defined(__LIBPAYLOAD__) || defined(__sun) || defined(__gnu_hurd__)) +#if !(defined(__gnu_linux__) || defined(__linux__) || defined(__APPLE__) && defined(__MACH__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__DJGPP__) || defined(__LIBPAYLOAD__) || defined(__sun) || defined(__gnu_hurd__)) #error "Unknown operating system" #endif
-#if IS_LINUX || IS_MACOSX || defined(__NetBSD__) || defined(__OpenBSD__) +#if defined(__gnu_linux__) || defined(__linux__) || defined(__APPLE__) && defined(__MACH__) || defined(__NetBSD__) || defined(__OpenBSD__) #define USE_IOPL 1 #else #define USE_IOPL 0 diff --git a/platform.h b/platform.h index 9bbde54..34a56ab 100644 --- a/platform.h +++ b/platform.h @@ -21,16 +21,6 @@ #define __PLATFORM_H__ 1
// Helper defines for operating systems -#if defined(__gnu_linux__) || defined(__linux__) -#define IS_LINUX 1 -#else -#define IS_LINUX 0 -#endif -#if defined(__APPLE__) && defined(__MACH__) /* yes, both. */ -#define IS_MACOSX 1 -#else -#define IS_MACOSX 0 -#endif #if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__WINDOWS__) #define IS_WINDOWS 1 #else
5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.