Commit c0c6ce29 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

some gcc4 portability patches, including a serious aliasing bug exposed in

* 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.
Daniel
parent 7f3efa97
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
......
......@@ -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__ */
......@@ -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
......
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