1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

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
This commit is contained in:
Daniel Veillard
2005-03-10 09:22:07 +00:00
parent 7f3efa9756
commit c0c6ce2918
4 changed files with 15 additions and 13 deletions

View File

@@ -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

View File

@@ -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:

View File

@@ -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__ */

View File

@@ -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