Commit 6f8e0d13 authored by unknown's avatar unknown

Fix for 64 bit machines (To remove warnings on Itanium)


mysys/thr_alarm.c:
  Safety fix
parent 6fea1f33
...@@ -634,7 +634,12 @@ extern double my_atof(const char*); ...@@ -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 Max size that must be added to a so that we know Size to make
adressable obj. adressable obj.
*/ */
#if SIZEOF_CHARP == 4
typedef long my_ptrdiff_t; typedef long my_ptrdiff_t;
#else
typedef long long my_ptrdiff_t;
#endif
#define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1)) #define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1))
#define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double)) #define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double))
/* Size to make adressable obj. */ /* Size to make adressable obj. */
......
...@@ -169,6 +169,7 @@ bool thr_alarm(thr_alarm_t *alrm, uint sec, ALARM *alarm_data) ...@@ -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)))) if (!(alarm_data=(ALARM*) my_malloc(sizeof(ALARM),MYF(MY_WME))))
{ {
DBUG_PRINT("info", ("failed my_malloc()")); DBUG_PRINT("info", ("failed my_malloc()"));
*alrm= 0; /* No alarm */
pthread_mutex_unlock(&LOCK_alarm); pthread_mutex_unlock(&LOCK_alarm);
pthread_sigmask(SIG_SETMASK,&old_mask,NULL); pthread_sigmask(SIG_SETMASK,&old_mask,NULL);
DBUG_RETURN(1); DBUG_RETURN(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment