summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-05-26 19:11:22 +0300
committerunknown <monty@narttu.mysql.fi>2003-05-26 19:11:22 +0300
commit6f8e0d13642a43f35f4deb15437be029df023b45 (patch)
tree9cac5a3c7a7067dbf4a68793f0de86fe1b298f57
parent6fea1f3373ef5568a1e4242a1eac9e832397da01 (diff)
downloadmariadb-git-6f8e0d13642a43f35f4deb15437be029df023b45.tar.gz
Fix for 64 bit machines (To remove warnings on Itanium)
mysys/thr_alarm.c: Safety fix
-rw-r--r--include/my_global.h5
-rw-r--r--mysys/thr_alarm.c1
2 files changed, 6 insertions, 0 deletions
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);