From e9482079a48cbbaeb622730e3fa84c4f8d641bf3 Mon Sep 17 00:00:00 2001 From: Frank Voorburg Date: Tue, 8 Feb 2022 20:58:05 +0000 Subject: [PATCH] Refs #1402. Added MinGW support for building LibOpenBLT with the recently added Ixxat CAN driver. git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@939 5dc33758-31d5-4daf-9ae8-b24bf3d40d73 --- .../port/windows/canif/ixxat/stdtype.h | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/Host/Source/LibOpenBLT/port/windows/canif/ixxat/stdtype.h b/Host/Source/LibOpenBLT/port/windows/canif/ixxat/stdtype.h index 146aaebb..d9f59a64 100644 --- a/Host/Source/LibOpenBLT/port/windows/canif/ixxat/stdtype.h +++ b/Host/Source/LibOpenBLT/port/windows/canif/ixxat/stdtype.h @@ -40,6 +40,11 @@ #define _COMPILER_ NILABWIN_C #endif +#ifdef __GNUC__ +#define GNU_C __GNUC__ +#define _COMPILER_ GNU_C +#endif + #ifndef _COMPILER_ #error "Compiler not supported" #endif @@ -103,6 +108,12 @@ #define _M_IX86_ _M_IX86 #define _M_BYTE_ORDER _LITTLE_ENDIAN #endif +#elif defined(GNU_C) + #if !defined(_M_IX86_) && defined(_M_IX86) + #define _M_BITS 32 + #define _M_IX86_ _M_IX86 + #define _M_BYTE_ORDER _LITTLE_ENDIAN + #endif #endif #ifndef _M_BITS @@ -153,6 +164,15 @@ #define __UINT8 unsigned __INT8 #endif +// +// GNU C/C++ compiler +// +#ifdef GNU_C + #define __INT8 __int8 + #define __SINT8 signed __INT8 + #define __UINT8 unsigned __INT8 +#endif + //------------------------------------------------------------------------ // 16 bit integer @@ -193,6 +213,15 @@ #define __UINT16 unsigned __INT16 #endif +// +// GNU C/C++ compiler +// +#ifdef GNU_C + #define __INT16 __int16 + #define __SINT16 signed __INT16 + #define __UINT16 unsigned __INT16 +#endif + //------------------------------------------------------------------------ // 32 bit integer @@ -233,6 +262,15 @@ #define __UINT32 unsigned __INT32 #endif +// +// GNU C/C++ compiler +// +#ifdef GNU_C + #define __INT32 __int32 + #define __SINT32 signed __INT32 + #define __UINT32 unsigned __INT32 +#endif + //------------------------------------------------------------------------ // 64 bit integer @@ -281,6 +319,15 @@ #endif #endif +// +// GNU C/C++ compiler +// +#ifdef GNU_C + #define __INT64 __int64 + #define __SINT64 signed __INT64 + #define __UINT64 unsigned __INT64 +#endif + /***************************************************************************** * alignment definitions