Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5
due to GCC preprocessor change The problem is that newer GCC versions treats missing headers as fatal errors. The solution is to use a guard macro to prevent the inclusion of system headers when checking the ABI with the C Preprocessor. Reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15638 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44836
This commit is contained in:
parent
17b9155f00
commit
d676c3ff0e
@ -314,7 +314,7 @@ abi_check_all: $(TEST_PREPROCESSOR_HEADER)
|
|||||||
do_abi_check:
|
do_abi_check:
|
||||||
set -ex; \
|
set -ex; \
|
||||||
for file in $(abi_headers); do \
|
for file in $(abi_headers); do \
|
||||||
@CC@ -E -nostdinc -dI \
|
@CC@ -E -nostdinc -dI -DMYSQL_ABI_CHECK \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/include/mysql \
|
-I$(top_srcdir)/include/mysql \
|
||||||
-I$(top_srcdir)/sql \
|
-I$(top_srcdir)/sql \
|
||||||
|
11
configure.in
11
configure.in
@ -444,16 +444,7 @@ if test "$GCC" != "yes" || expr "$CC" : ".*icc.*"
|
|||||||
then
|
then
|
||||||
ABI_CHECK=""
|
ABI_CHECK=""
|
||||||
else
|
else
|
||||||
# Workaround GCC >= 4.5 - See Bug#52514
|
ABI_CHECK="abi_check"
|
||||||
case `$CC -dumpversion` in
|
|
||||||
[[4-9]].[[5-9]]*)
|
|
||||||
AC_MSG_WARN([ABI check disabled (GCC >= 4.5)])
|
|
||||||
ABI_CHECK=""
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
ABI_CHECK="abi_check"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(ABI_CHECK)
|
AC_SUBST(ABI_CHECK)
|
||||||
|
@ -44,7 +44,9 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _global_h /* If not standard header */
|
#ifndef _global_h /* If not standard header */
|
||||||
|
#ifndef MYSQL_ABI_CHECK
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
#ifdef __LCC__
|
#ifdef __LCC__
|
||||||
#include <winsock2.h> /* For windows */
|
#include <winsock2.h> /* For windows */
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include <sys/types.h>
|
|
||||||
typedef char my_bool;
|
typedef char my_bool;
|
||||||
typedef int my_socket;
|
typedef int my_socket;
|
||||||
#include "mysql_version.h"
|
#include "mysql_version.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user