Commit e0cda2fe authored by unknown's avatar unknown

Merge work:/my/mysql into donna.mysql.com:/home/my/bk/mysql

parents 0d3b7ae0 6102a85c
......@@ -812,7 +812,7 @@ typedef union {
#define float4get(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(float))
#define float4store(V,M) memcpy_fixed((byte*) V,(byte*) (&M),sizeof(float))
#if (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
#define doublestore(T,V) { *(T)= ((byte *) &V)[4];\
*((T)+1)=(char) ((byte *) &V)[5];\
*((T)+2)=(char) ((byte *) &V)[6];\
......
......@@ -167,7 +167,7 @@
((byte*) &def_temp)[3]=(M)[0];\
(V)=def_temp; }
#if (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
#define mi_float8store(T,V) { *(T)= ((byte *) &V)[3];\
*((T)+1)=(char) ((byte *) &V)[2];\
*((T)+2)=(char) ((byte *) &V)[1];\
......
......@@ -2107,7 +2107,7 @@ int Field_double::cmp(const char *a_ptr, const char *b_ptr)
#endif
{
/* could this ALWAYS be 2 calls to doubleget() ?? */
#if (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
doubleget(a, a_ptr);
doubleget(b, b_ptr);
#else
......@@ -2134,7 +2134,7 @@ void Field_double::sort_string(char *to,uint length __attribute__((unused)))
else
#endif
/* could this ALWAYS be 2 calls to doubleget() ?? */
#if (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
doubleget(nr,ptr);
#else
memcpy_fixed(&nr,ptr,sizeof(nr));
......
......@@ -932,7 +932,7 @@ void change_double_for_sort(double nr,byte *to)
#else
{
uchar *ptr= (uchar*) &nr;
#if (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
tmp[0]= ptr[3]; tmp[1]=ptr[2]; tmp[2]= ptr[1]; tmp[3]=ptr[0];
tmp[4]= ptr[7]; tmp[5]=ptr[6]; tmp[6]= ptr[5]; tmp[7]=ptr[4];
#else
......
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