x11-libs/qt: delete old extraversions, rebase to current portage ebuilds.
[gentoo-soor-overlay.git] / x11-libs / qt / files / qt-3.3.4-gcc4-volatile.patch
blobb88792fd7be6e05b02f411cf8d9216f9b8664d92
1 diff -Nur qt-x11-free-3.3.4.orig/src/tools/qlocale.cpp qt-x11-free-3.3.4/src/tools/qlocale.cpp
2 --- qt-x11-free-3.3.4.orig/src/tools/qlocale.cpp 2005-01-21 18:16:05.000000000 +0100
3 +++ qt-x11-free-3.3.4/src/tools/qlocale.cpp 2005-08-20 16:05:53.000000000 +0200
4 @@ -72,6 +72,12 @@
5 # define NAN DBL_QNAN
6 #endif
8 +#if (defined(Q_CC_GNU) && defined(Q_OS_WIN)) || __GNUC__ == 4 || defined(QT_QLOCALE_NEEDS_VOLATILE)
9 +# define NEEDS_VOLATILE volatile
10 +#else
11 +# define NEEDS_VOLATILE
12 +#endif
13 +
14 enum {
15 LittleEndian,
16 BigEndian
17 @@ -4068,9 +4074,9 @@
18 #error Exactly one of IEEE_BIG_OR_LITTLE_ENDIAN, VAX, or IBM should be defined.
19 #endif
21 -inline ULong getWord0(double x)
22 +inline ULong getWord0(const NEEDS_VOLATILE double x)
23 {
24 - uchar *ptr = (uchar *)&x;
25 + const NEEDS_VOLATILE uchar *ptr = reinterpret_cast<const NEEDS_VOLATILE uchar *>(&x);
26 if (ByteOrder == BigEndian) {
27 return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3];
28 } else {
29 @@ -4078,9 +4084,9 @@
30 }
31 }
33 -inline void setWord0(double *x, ULong l)
34 +inline void setWord0(NEEDS_VOLATILE double *x, ULong l)
35 {
36 - uchar *ptr = (uchar *)x;
37 + NEEDS_VOLATILE uchar *ptr = reinterpret_cast<NEEDS_VOLATILE uchar *>(x);
38 if (ByteOrder == BigEndian) {
39 ptr[0] = (uchar)(l>>24);
40 ptr[1] = (uchar)(l>>16);
41 @@ -4094,18 +4100,18 @@
42 }
43 }
45 -inline ULong getWord1(double x)
46 +inline ULong getWord1(const NEEDS_VOLATILE double x)
47 {
48 - uchar *ptr = (uchar *)&x;
49 + const NEEDS_VOLATILE uchar *ptr = reinterpret_cast<const NEEDS_VOLATILE uchar *>(&x);
50 if (ByteOrder == BigEndian) {
51 return (ptr[4]<<24) + (ptr[5]<<16) + (ptr[6]<<8) + ptr[7];
52 } else {
53 return (ptr[3]<<24) + (ptr[2]<<16) + (ptr[1]<<8) + ptr[0];
54 }
55 }
56 -inline void setWord1(double *x, ULong l)
57 +inline void setWord1(NEEDS_VOLATILE double *x, ULong l)
58 {
59 - uchar *ptr = (uchar *)x;
60 + NEEDS_VOLATILE uchar *ptr = reinterpret_cast<uchar NEEDS_VOLATILE *>(x);
61 if (ByteOrder == BigEndian) {
62 ptr[4] = (uchar)(l>>24);
63 ptr[5] = (uchar)(l>>16);
64 @@ -5679,11 +5685,11 @@
65 #ifdef Q_OS_LINUX
66 fesetenv(&envp);
67 #endif
68 -
69 +
70 return s;
71 }
73 -static char *_qdtoa( double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp)
74 +static char *_qdtoa( NEEDS_VOLATILE double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp)
75 {
76 /*
77 Arguments ndigits, decpt, sign are similar to those