From eedca52b23193e105196c0d6f7e7adb053f330be Mon Sep 17 00:00:00 2001 From: "monty@narttu.mysql.fi" <> Date: Mon, 26 May 2003 19:11:22 +0300 Subject: [PATCH] Fix for 64 bit machines (To remove warnings on Itanium) --- include/my_global.h | 5 +++++ mysys/thr_alarm.c | 1 + 2 files changed, 6 insertions(+) diff --git a/include/my_global.h b/include/my_global.h index 15495c60dd7..ca24c21c688 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -634,7 +634,12 @@ extern double my_atof(const char*); Max size that must be added to a so that we know Size to make adressable obj. */ +#if SIZEOF_CHARP == 4 typedef long my_ptrdiff_t; +#else +typedef long long my_ptrdiff_t; +#endif + #define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1)) #define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double)) /* Size to make adressable obj. */ diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c index 1b58a0274ff..ca8e4e8bcb6 100644 --- a/mysys/thr_alarm.c +++ b/mysys/thr_alarm.c @@ -169,6 +169,7 @@ bool thr_alarm(thr_alarm_t *alrm, uint sec, ALARM *alarm_data) if (!(alarm_data=(ALARM*) my_malloc(sizeof(ALARM),MYF(MY_WME)))) { DBUG_PRINT("info", ("failed my_malloc()")); + *alrm= 0; /* No alarm */ pthread_mutex_unlock(&LOCK_alarm); pthread_sigmask(SIG_SETMASK,&old_mask,NULL); DBUG_RETURN(1);