mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
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.
This commit is contained in:
parent
a7dc817904
commit
e2599d9f75
4 changed files with 8 additions and 4 deletions
|
@ -263,6 +263,8 @@ test-full-qa:
|
|||
#
|
||||
# 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 \
|
||||
$(top_srcdir)/include/mysql/plugin_ftparser.h \
|
||||
|
|
|
@ -33,6 +33,8 @@ IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|||
${CMAKE_SOURCE_DIR}/include/mysql.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/client_plugin.h
|
||||
${CMAKE_SOURCE_DIR}/include/mysql/plugin_auth.h
|
||||
)
|
||||
|
||||
ADD_CUSTOM_TARGET(abi_check ALL
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
*/
|
||||
#define MYSQL_CLIENT_PLUGIN_INCLUDED
|
||||
|
||||
#ifndef MYSQL_ABI_CHECK
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
/* known plugin types */
|
||||
#define MYSQL_CLIENT_reserved1 0
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
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 *);
|
||||
|
|
Loading…
Reference in a new issue