diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | include/libxml/hash.h | 7 | ||||
-rw-r--r-- | libxml.h | 2 | ||||
-rw-r--r-- | libxml.spec.in | 13 |
4 files changed, 15 insertions, 13 deletions
@@ -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: @@ -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 |