diff options
author | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2023-03-07 11:13:20 +0100 |
---|---|---|
committer | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2023-03-07 11:13:20 +0100 |
commit | 1e58b8afc086da755cf9209ed17fc36351da5563 (patch) | |
tree | 385419bf33341a8697a313b132050de00d08292e /include/my_sys.h | |
parent | b1646d0433c98662c50af029a121d681ddfb7a2b (diff) | |
download | mariadb-git-1e58b8afc086da755cf9209ed17fc36351da5563.tar.gz |
move alloca() definition from all *.h files to one new header file
Diffstat (limited to 'include/my_sys.h')
-rw-r--r-- | include/my_sys.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index 0b851841f58..2a7cb32fe68 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -28,9 +28,7 @@ C_MODE_START #include <m_ctype.h> /* for CHARSET_INFO */ #include <stdarg.h> #include <typelib.h> -#ifdef _WIN32 -#include <malloc.h> /*for alloca*/ -#endif +#include <my_alloca.h> #include <mysql/plugin.h> #include <mysql/service_my_print_error.h> @@ -185,16 +183,6 @@ my_bool my_test_if_atomic_write(File handle, int pagesize); extern my_bool my_may_have_atomic_write; #if defined(HAVE_ALLOCA) && !defined(HAVE_valgrind) -#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43) -#pragma alloca -#endif /* _AIX */ -#if defined(__MWERKS__) -#undef alloca -#define alloca _alloca -#endif /* __MWERKS__ */ -#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca) -#define alloca __builtin_alloca -#endif /* GNUC */ #define my_alloca(SZ) alloca((size_t) (SZ)) #define my_afree(PTR) ((void)0) #define MAX_ALLOCA_SZ 4096 |