summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--include/libxml/hash.h7
-rw-r--r--libxml.h2
-rw-r--r--libxml.spec.in13
4 files changed, 15 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index efa9ab6d..2219c98e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Mar 10 10:20:23 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/hash.h libxml.h libxml.spec.in: some gcc4 portability
+ patches, including a serious aliasing bug exposed in s390
+ when trying to convert data pointer to code pointer.
+
Mon Mar 7 18:34:00 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* xmlschemas.c: Tiny restructuring of the validation start-up
diff --git a/include/libxml/hash.h b/include/libxml/hash.h
index efc29a71..7fe4be75 100644
--- a/include/libxml/hash.h
+++ b/include/libxml/hash.h
@@ -48,8 +48,13 @@ extern "C" {
* function pointer without encountering a warning from
* gcc
*
+ * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
+ * This macro violated ISO C aliasing rules (gcc4 on s390 broke)
+ * so it is disabled now
*/
-#define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
+
+#define XML_CAST_FPTR(fptr) fptr
+
/*
* function types:
diff --git a/libxml.h b/libxml.h
index e9974620..89ec5955 100644
--- a/libxml.h
+++ b/libxml.h
@@ -54,9 +54,11 @@ void __xmlLoaderErr(void *ctx, const char *msg, const char *filename);
#ifdef __GNUC__
#ifdef PIC
#ifdef linux
+#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
#include "elfgcchack.h"
#endif
#endif
#endif
#endif
+#endif
#endif /* ! __XML_LIBXML_H__ */
diff --git a/libxml.spec.in b/libxml.spec.in
index f9823df4..b4f37616 100644
--- a/libxml.spec.in
+++ b/libxml.spec.in
@@ -65,22 +65,11 @@ at parse time or later once the document has been modified.
# initial test spec. This really doesn't work okay for most tests done.
#
GCC_VERSION=`gcc --version | grep "^gcc" | awk '{ print $3 }' | sed 's+\([0-9]\)\.\([0-9]\)\..*+\1\2+'`
-#if [ $GCC_VERSION -eq 32 ]
-#then
-# PROF_GEN='-fprofile-arcs'
-# PROF_USE='-fbranch-probabilities'
-#else if [ $GCC_VERSION -eq 33 ]
-#then
-# PROF_GEN='-fprofile-arcs'
-# PROF_USE='-fbranch-probabilities -ftracer'
-#else
-if [ $GCC_VERSION -ge 34 ]
+if [ $GCC_VERSION -eq 34 ]
then
PROF_GEN='-fprofile-generate'
PROF_USE='-fprofile-use'
fi
-#fi
-#fi
if [ "$PROF_GEN" != "" ]
then