From b0eee9b8d649efc3db9a6c5f333b0fff5204a979 Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Sat, 10 Jan 2015 09:32:50 +0000 Subject: Unify target OS and CPU architecture checks We do CPU architecture checks once for the makefile in arch.h and once for HW access abstraction in hwaccess.c. This patch unifies related files so that they can share the checks to improve maintainability and reduce the chance of inconsistencies. Furthermore, it refines some of the definitions, which - adds "support" for AARCH64 and PPC64, - adds big-endian handling on arm as well as LE handling on PPC64, - fixes compilation of internal.c on AARCH64 and PPC64. Additionally, this patch continues to unify all OS checks in flashrom by adding a new helper macro IS_WINDOWS. The old header file for architecture checking is renamed to platform.h to reflect its broader scope and all new macros are add in there. Corresponding to flashrom svn r1864. Signed-off-by: Stefan Tauner Acked-by: Stefan Tauner --- flash.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'flash.h') diff --git a/flash.h b/flash.h index 81fd61b..56d9e4b 100644 --- a/flash.h +++ b/flash.h @@ -24,12 +24,14 @@ #ifndef __FLASH_H__ #define __FLASH_H__ 1 +#include "platform.h" + #include #include #include #include #include -#ifdef _WIN32 +#if IS_WINDOWS #include #undef min #undef max -- cgit v1.1