mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-02-16 17:21:21 +00:00
Workaround for MCST-LCC compiler < 1.28 version
mcst-lcc < 1.28 does not support __builtin_alloca_with_align() Ref: http://mcst.ru/lcc
This commit is contained in:
parent
8a3e0a328f
commit
6ed10c1dac
1 changed files with 6 additions and 4 deletions
|
@ -185,12 +185,14 @@ If you have questions concerning this license or the applicable additional terms
|
|||
// Unix
|
||||
#ifdef __unix__
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define _alloca16( x ) ( ({assert((x)<ID_MAX_ALLOCA_SIZE);}), __builtin_alloca_with_align( (x), 16*8 ) )
|
||||
#define _alloca( x ) ( ({assert((x)<ID_MAX_ALLOCA_SIZE);}), __builtin_alloca( (x) ) )
|
||||
#else
|
||||
#if !defined(__GNUC__) || (defined(__MCST__) && __LCC__ < 128)
|
||||
// MCST-LCC < 1.28 does not support __builtin_alloca_with_align()
|
||||
#define _alloca( x ) (({assert( (x)<ID_MAX_ALLOCA_SIZE );}), alloca( (x) ))
|
||||
#define _alloca16( x ) (({assert( (x)<ID_MAX_ALLOCA_SIZE );}),((void *)((((uintptr_t)alloca( (x)+15 )) + 15) & ~15)))
|
||||
#else
|
||||
// GCC, CLANG, MCST-LCC >= 1.28
|
||||
#define _alloca16( x ) ( ({assert((x)<ID_MAX_ALLOCA_SIZE);}), __builtin_alloca_with_align( (x), 16*8 ) )
|
||||
#define _alloca( x ) ( ({assert((x)<ID_MAX_ALLOCA_SIZE);}), __builtin_alloca( (x) ) )
|
||||
#endif
|
||||
|
||||
#ifdef GAME_DLL
|
||||
|
|
Loading…
Reference in a new issue