Commit 70822d52 authored by Davi Arnaut's avatar Davi Arnaut

Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5

           due to GCC preprocessor change

Addendum for trunk: do not include system header when checking
the ABI.
parent 182599dd
#include <mysql/services.h> #include <mysql/services.h>
#include <mysql/service_my_snprintf.h> #include <mysql/service_my_snprintf.h>
#include <stdarg.h>
#include <stdlib.h>
extern struct my_snprintf_service_st { extern struct my_snprintf_service_st {
size_t (*my_snprintf_type)(char*, size_t, const char*, ...); size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list); size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
...@@ -9,7 +7,6 @@ extern struct my_snprintf_service_st { ...@@ -9,7 +7,6 @@ extern struct my_snprintf_service_st {
size_t my_snprintf(char* to, size_t n, const char* fmt, ...); size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap); size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
#include <mysql/service_thd_alloc.h> #include <mysql/service_thd_alloc.h>
#include <stdlib.h>
struct st_mysql_lex_string struct st_mysql_lex_string
{ {
char *str; char *str;
......
...@@ -70,8 +70,11 @@ ...@@ -70,8 +70,11 @@
extern "C" { extern "C" {
#endif #endif
#ifndef MYSQL_ABI_CHECK
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
#endif
extern struct my_snprintf_service_st { extern struct my_snprintf_service_st {
size_t (*my_snprintf_type)(char*, size_t, const char*, ...); size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list); size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
......
...@@ -27,7 +27,9 @@ ...@@ -27,7 +27,9 @@
allocations - they are better served with my_malloc. allocations - they are better served with my_malloc.
*/ */
#ifndef MYSQL_ABI_CHECK
#include <stdlib.h> #include <stdlib.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
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