1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Check that __FLOAT_WORD_ORDER is defined

This commit is contained in:
unknown
2001-02-08 04:43:55 +02:00
parent 2f40648f2a
commit 6d4d727efb
4 changed files with 5 additions and 5 deletions

View File

@ -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];\

View File

@ -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];\

View File

@ -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));

View File

@ -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