Commit 373a9caa authored by monty@narttu.mysql.fi's avatar monty@narttu.mysql.fi

Fixed compiler optimization problem with doubleget()

(Casused problems in GIS functions in 4.1)
parent 87303393
...@@ -795,8 +795,11 @@ typedef union { ...@@ -795,8 +795,11 @@ typedef union {
double v; double v;
long m[2]; long m[2];
} doubleget_union; } doubleget_union;
#define doubleget(V,M) { ((doubleget_union *)&V)->m[0] = *((long*) M); \ #define doubleget(V,M) \
((doubleget_union *)&V)->m[1] = *(((long*) M)+1); } { doubleget_union _tmp; \
_tmp.m[0] = *((long*)(M)); \
_tmp.m[1] = *(((long*) (M))+1); \
(V) = _tmp.v; }
#define doublestore(T,V) { *((long *) T) = ((doubleget_union *)&V)->m[0]; \ #define doublestore(T,V) { *((long *) T) = ((doubleget_union *)&V)->m[0]; \
*(((long *) T)+1) = ((doubleget_union *)&V)->m[1]; } *(((long *) T)+1) = ((doubleget_union *)&V)->m[1]; }
#define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); } #define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); }
......
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