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
This commit is contained in:
Frank Voorburg 2022-02-08 20:58:05 +00:00
parent dd7d1a90c1
commit e9482079a4
1 changed files with 47 additions and 0 deletions

View File

@ -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