Commit 215e967a authored by Davi Arnaut's avatar Davi Arnaut

Use a guard macro to prevent the inclusion of system headers

when checking the ABI with the C Preprocessor. Also, add the
new hearders to the cmake based ABI check.

cmake/abi_check.cmake:
  Add headers which were added to the autotools ABI check.
  Remove trailing spaces.
include/mysql/client_plugin.h:
  Guard the inclusion of system headers.
parent e760a4d8
...@@ -263,6 +263,8 @@ test-full-qa: ...@@ -263,6 +263,8 @@ test-full-qa:
# #
# Headers which need to be checked for abi/api compatibility. # Headers which need to be checked for abi/api compatibility.
# #
# Attention: do not forget to also add to cmake/abi_check.cmake
#
API_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin_audit.h \ API_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin_audit.h \
$(top_srcdir)/include/mysql/plugin_ftparser.h \ $(top_srcdir)/include/mysql/plugin_ftparser.h \
......
...@@ -27,12 +27,14 @@ IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_NAME MATCHES "Linux") ...@@ -27,12 +27,14 @@ IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_NAME MATCHES "Linux")
ELSE() ELSE()
SET(COMPILER ${CMAKE_C_COMPILER}) SET(COMPILER ${CMAKE_C_COMPILER})
ENDIF() ENDIF()
SET(API_PREPROCESSOR_HEADER SET(API_PREPROCESSOR_HEADER
${CMAKE_SOURCE_DIR}/include/mysql/plugin_audit.h ${CMAKE_SOURCE_DIR}/include/mysql/plugin_audit.h
${CMAKE_SOURCE_DIR}/include/mysql/plugin_ftparser.h ${CMAKE_SOURCE_DIR}/include/mysql/plugin_ftparser.h
${CMAKE_SOURCE_DIR}/include/mysql.h ${CMAKE_SOURCE_DIR}/include/mysql.h
${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v1.h ${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v1.h
${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v2.h ${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v2.h
${CMAKE_SOURCE_DIR}/include/mysql/client_plugin.h
${CMAKE_SOURCE_DIR}/include/mysql/plugin_auth.h
) )
ADD_CUSTOM_TARGET(abi_check ALL ADD_CUSTOM_TARGET(abi_check ALL
......
...@@ -23,8 +23,10 @@ ...@@ -23,8 +23,10 @@
*/ */
#define MYSQL_CLIENT_PLUGIN_INCLUDED #define MYSQL_CLIENT_PLUGIN_INCLUDED
#ifndef MYSQL_ABI_CHECK
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
#endif
/* known plugin types */ /* known plugin types */
#define MYSQL_CLIENT_reserved1 0 #define MYSQL_CLIENT_reserved1 0
......
#include <stdarg.h>
#include <stdlib.h>
struct st_mysql_client_plugin struct st_mysql_client_plugin
{ {
int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(); int (*options)(const char *option, const void *); int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(); int (*options)(const char *option, const void *);
......
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