mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
- portability fix for AIX in include/my_sys.h: define alloca as a
compiler builtin when using gcc
This commit is contained in:
parent
3f48e0369b
commit
666342d312
1 changed files with 9 additions and 0 deletions
|
@ -146,6 +146,15 @@ extern my_string my_strdup(const char *from,myf MyFlags);
|
|||
#define ORIG_CALLER_INFO /* nothing */
|
||||
#endif
|
||||
#ifdef HAVE_ALLOCA
|
||||
#ifdef __GNUC__
|
||||
/* Remove any previous definitions. */
|
||||
#undef alloca
|
||||
#define alloca(size) __builtin_alloca (size)
|
||||
#else /* xlc */
|
||||
#ifdef _AIX
|
||||
#pragma alloca
|
||||
#endif /* _AIX */
|
||||
#endif /* __GNUC__ */
|
||||
#define my_alloca(SZ) alloca((size_t) (SZ))
|
||||
#define my_afree(PTR) {}
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue