SOURCES: quake3-strict-aliasing.patch - one more fix
sparky
sparky at pld-linux.org
Fri Oct 24 18:22:27 CEST 2008
Author: sparky Date: Fri Oct 24 16:22:27 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- one more fix
---- Files affected:
SOURCES:
quake3-strict-aliasing.patch (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SOURCES/quake3-strict-aliasing.patch
diff -u SOURCES/quake3-strict-aliasing.patch:1.1 SOURCES/quake3-strict-aliasing.patch:1.2
--- SOURCES/quake3-strict-aliasing.patch:1.1 Fri Oct 24 17:58:39 2008
+++ SOURCES/quake3-strict-aliasing.patch Fri Oct 24 18:22:22 2008
@@ -1,20 +1,45 @@
-Index: code/qcommon/msg.c
+Index: code/qcommon/q_math.c
===================================================================
---- code/qcommon/msg.c (revision 1474)
-+++ code/qcommon/msg.c (working copy)
-@@ -546,6 +546,11 @@
+--- code/qcommon/q_math.c (revision 1474)
++++ code/qcommon/q_math.c (working copy)
+@@ -519,9 +519,13 @@
+ }
+
+ float Q_fabs( float f ) {
+- int tmp = * ( int * ) &f;
+- tmp &= 0x7FFFFFFF;
+- return * ( float * ) &tmp;
++ union {
++ float f;
++ int i;
++ } fi;
++ fi.f = f;
++ fi.i &= 0x7FFFFFFF;
++ return fi.f;
+ }
+ #endif
+
+Index: code/qcommon/qcommon.h
+===================================================================
+--- code/qcommon/qcommon.h (revision 1474)
++++ code/qcommon/qcommon.h (working copy)
+@@ -111,6 +111,11 @@
- #define LOG(x) if( cl_shownet->integer == 4 ) { Com_Printf("%s ", x ); };
+ void MSG_ReportChangeVectors_f( void );
+typedef union {
+ float f;
+ int i;
+} fi_conv;
+
- void MSG_WriteDelta( msg_t *msg, int oldV, int newV, int bits ) {
- if ( oldV == newV ) {
- MSG_WriteBits( msg, 0, 1 );
-@@ -563,20 +568,22 @@
+ //============================================================================
+
+ /*
+Index: code/qcommon/msg.c
+===================================================================
+--- code/qcommon/msg.c (revision 1474)
++++ code/qcommon/msg.c (working copy)
+@@ -563,20 +563,22 @@
}
void MSG_WriteDeltaFloat( msg_t *msg, float oldV, float newV ) {
@@ -41,7 +66,7 @@
}
return oldV;
}
-@@ -617,20 +624,22 @@
+@@ -617,20 +619,22 @@
}
void MSG_WriteDeltaKeyFloat( msg_t *msg, int key, float oldV, float newV ) {
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/quake3-strict-aliasing.patch?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list