Adapt gen_offset_header to work with MinGW.

This patch change the custom macro WINDOWS for the macros
provided by the compiler to determine if it is being build
on Windows or Linux to use the correct flags for opening files.

Change-Id: I7278439767e93754eaae831b6f234b48c3ac8eac
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
This commit is contained in:
Louise Mendoza 2015-12-08 20:07:43 -06:00 committed by Anas Nashif
commit 2386328e7e

View file

@ -83,7 +83,7 @@
#define SWAB_Elf32_Off SWAB_Elf32_Word #define SWAB_Elf32_Off SWAB_Elf32_Word
#define SWAB_Elf32_Sword SWAB_Elf32_Word #define SWAB_Elf32_Sword SWAB_Elf32_Word
#if defined(WINDOWS) #if defined(_WIN32) || defined(__CYGWIN32__) || defined(__WIN32__)
#define OPEN_FLAGS (O_RDONLY|O_BINARY) #define OPEN_FLAGS (O_RDONLY|O_BINARY)
#else #else
#define OPEN_FLAGS (O_RDONLY) #define OPEN_FLAGS (O_RDONLY)