From 666342d312f16e22117a5d1e5a9106ad81d0850a Mon Sep 17 00:00:00 2001 From: "lenz@mysql.com" <> Date: Thu, 8 Aug 2002 20:09:57 +0200 Subject: - portability fix for AIX in include/my_sys.h: define alloca as a compiler builtin when using gcc --- include/my_sys.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/my_sys.h b/include/my_sys.h index 8cdc78025f3..61395114a5d 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -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 -- cgit v1.2.1 From ea3fe233e3597d506c7f0c2e50f598afc99e3570 Mon Sep 17 00:00:00 2001 From: "monty@hundin.mysql.fi" <> Date: Thu, 8 Aug 2002 22:09:25 +0300 Subject: Portability fix for AIX --- include/my_sys.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/my_sys.h b/include/my_sys.h index 61395114a5d..fd201d39183 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -145,22 +145,18 @@ extern my_string my_strdup(const char *from,myf MyFlags); #define CALLER_INFO /* nothing */ #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 +#if defined(_AIX) && !defined(__GNUC__) +#pragma alloca #endif /* _AIX */ -#endif /* __GNUC__ */ #define my_alloca(SZ) alloca((size_t) (SZ)) #define my_afree(PTR) {} #else #define my_alloca(SZ) my_malloc(SZ,MYF(0)) #define my_afree(PTR) my_free(PTR,MYF(MY_WME)) #endif /* HAVE_ALLOCA */ + #ifdef MSDOS #ifdef __ZTC__ void * __CDECL halloc(long count,size_t length); -- cgit v1.2.1 From 7d33814c1bfb33e5699ab7b77a3386a735139377 Mon Sep 17 00:00:00 2001 From: "lenz@mysql.com" <> Date: Sat, 10 Aug 2002 01:47:51 +0200 Subject: After discussing it with Monty by phone once more: - Only define alloca as a compiler builtin, if we use GCC and there is no alloca.h installed --- include/my_sys.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/my_sys.h b/include/my_sys.h index fd201d39183..cd6ec62719a 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -150,6 +150,9 @@ extern my_string my_strdup(const char *from,myf MyFlags); #if defined(_AIX) && !defined(__GNUC__) #pragma alloca #endif /* _AIX */ +#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) +#define alloca __builtin_alloca +#endif /* GNUC */ #define my_alloca(SZ) alloca((size_t) (SZ)) #define my_afree(PTR) {} #else -- cgit v1.2.1 From b779b63862990857c2dd0456196529364ff02d1a Mon Sep 17 00:00:00 2001 From: "monty@hundin.mysql.fi" <> Date: Mon, 12 Aug 2002 03:28:02 +0300 Subject: Fixed problem with BIGINT and shutdown on AIX Moved IF(test,column,NULL) code to 4.0 Changed mysys_priv.h to include my_pthread.h or my_no_pthread.h. Removed some CR's in os2 files. --- include/global.h | 2 ++ include/my_no_pthread.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index 61e00df375d..a6cc561fb0a 100644 --- a/include/global.h +++ b/include/global.h @@ -104,6 +104,8 @@ #define _H_STRINGS #define _SYS_STREAM_H #define _AIX32_CURSES +#define longlong2double(A) my_longlong2double(A) +double my_longlong2double(unsigned long long A); #endif #ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */ diff --git a/include/my_no_pthread.h b/include/my_no_pthread.h index 2ff8896fa74..328086ec388 100644 --- a/include/my_no_pthread.h +++ b/include/my_no_pthread.h @@ -21,7 +21,7 @@ environment, easier to use. */ -#if !defined(_my_no_pthread_h) && !defined(THREADS) +#if !defined(_my_no_pthread_h) && !defined(THREAD) #define _my_no_pthread_h #define pthread_mutex_init(A,B) -- cgit v1.2.1