diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-03-06 16:33:07 +0100 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-03-06 16:33:25 +0100 |
commit | cad422afb7a4dcd7592c502641b41a832703e536 (patch) | |
tree | aeabe11ef20dd4763f983dd4fc59f76f5cee7e62 | |
parent | ea66024d4da38a619f44c941b65e6a28b74214b9 (diff) |
Adding libmariadb module for internal mariadb (work in progress)
Change-Id: If2cf9ff21120e29a149903e8eab849d97fa0c2c9
-rw-r--r-- | Makefile.fetch | 1 | ||||
-rw-r--r-- | RepositoryExternal.mk | 38 | ||||
-rw-r--r-- | RepositoryModule_host.mk | 1 | ||||
-rw-r--r-- | config_host.mk.in | 7 | ||||
-rw-r--r-- | configure.ac | 62 | ||||
-rw-r--r-- | download.lst | 1 | ||||
-rw-r--r-- | libmariadb/ExternalPackage_libmariadb.mk | 51 | ||||
-rw-r--r-- | libmariadb/Module_libmariadb.mk | 22 | ||||
-rw-r--r-- | libmariadb/StaticLibrary_mariadb.mk | 117 | ||||
-rw-r--r-- | libmariadb/UnpackedTarball_mariadb.mk | 17 | ||||
-rw-r--r-- | libmariadb/my_config.h | 277 | ||||
-rw-r--r-- | libmariadb/mysql_version.h | 24 | ||||
-rw-r--r-- | libmariadb/prj/build.lst | 2 | ||||
-rw-r--r-- | mysqlc/Library_mysqlc.mk | 2 | ||||
-rw-r--r-- | mysqlcppconn/Library_mysqlcppconn.mk | 6 |
15 files changed, 574 insertions, 54 deletions
diff --git a/Makefile.fetch b/Makefile.fetch index e7d406d8466f..edcad4a988ef 100644 --- a/Makefile.fetch +++ b/Makefile.fetch @@ -94,6 +94,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR) $(call fetch_Optional,CURL,$(CURL_TARBALL)) \ $(call fetch_Optional,EPM,$(EPM_TARBALL)) \ $(call fetch_Optional,EXPAT,$(EXPAT_TARBALL)) \ + $(call fetch_Optional,MARIADB,$(MARIADB_TARBALL)) \ $(call fetch_Optional,MORE_FONTS,$(FONT_DEJAVU_TARBALL)) \ $(call fetch_Optional,MORE_FONTS,$(FONT_GENTIUM_TARBALL)) \ $(call fetch_Optional,MORE_FONTS,$(FONT_LIBERATION_NARROW_TARBALL)) \ diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 869e17936efd..2e36e94e4881 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -38,6 +38,39 @@ # External headers +ifeq ($(SYSTEM_MARIADB),YES) + +define gb_LinkTarget__use_mariadb +$(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + $(MARIADB_CFLAGS) \ +) +$(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS)) + +endef +gb_ExternalProject__use_mariadb := + +else # !SYSTEM_MARIADB + +$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \ + mariadblib \ +)) + +define gb_LinkTarget__use_mariadb +$(call gb_LinkTarget_use_static_libraries,$(1),\ + mariadblib \ +) + +endef +define gb_ExternalProject__use_mariadb +$(call gb_ExternalProject_use_package,$(1),libmariadb_inc) +$(call gb_ExternalProject_use_static_libraries,$(1),mariadblib) + +endef + +endif # SYSTEM_MARIADB + + ifeq ($(SYSTEM_MESA_HEADERS),YES) gb_LinkTarget__use_mesa_headers := @@ -192,11 +225,11 @@ $(call gb_LinkTarget_add_defs,$(1),\ ) $(call gb_LinkTarget_add_libs,$(1),\ - $(MARIADB_LIB) \ + $(MARIADB_LIBS) \ ) $(call gb_LinkTarget_set_include,$(1),\ - $(MARIADB_INC) \ + $(MARIADB_CFLAGS) \ $$(INCLUDE) \ ) endef @@ -206,7 +239,6 @@ else define gb_LinkTarget__use_mysql $(call gb_LinkTarget_set_include,$(1),\ - -I$(LIBMARIADB_PATH)/mariadbclient/include \ $$(INCLUDE) \ ) diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk index 8050e46caebd..40773ba247d5 100644 --- a/RepositoryModule_host.mk +++ b/RepositoryModule_host.mk @@ -127,6 +127,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\ lotuswordpro \ $(call gb_Helper_optional,LPSOLVE,lpsolve) \ $(call gb_Helper_optional,DESKTOP,l10ntools) \ + $(call gb_Helper_optional,MARIADB,libmariadb) \ MathMLDTD \ $(call gb_Helper_optional,MDDS,mdds) \ Mesa \ diff --git a/config_host.mk.in b/config_host.mk.in index cd0fc3735e9d..cf5447997363 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -296,8 +296,6 @@ export LIBLANGTAG_CFLAGS=$(gb_SPACE)@LIBLANGTAG_CFLAGS@ export LIBLANGTAG_LIBS=$(gb_SPACE)@LIBLANGTAG_LIBS@ export LIBLAYOUT_JAR=@LIBLAYOUT_JAR@ export LIBLOADER_JAR=@LIBLOADER_JAR@ -export LIBMARIADB=@LIBMARIADB@ -export LIBMARIADB_PATH=@LIBMARIADB_PATH@ export LIBMGR_X64_BINARY=@LIBMGR_X64_BINARY@ export LIBO_THIS_YEAR=@LIBO_THIS_YEAR@ export LIBO_VERSION_MAJOR=@LIBO_VERSION_MAJOR@ @@ -328,9 +326,8 @@ export MANDIR=@MANDIR@ export MARIADBC_MAJOR=@MARIADBC_MAJOR@ export MARIADBC_MICRO=@MARIADBC_MICRO@ export MARIADBC_MINOR=@MARIADBC_MINOR@ -export MARIADB_DEFINES=@MARIADB_DEFINES@ -export MARIADB_INC=@MARIADB_INC@ -export MARIADB_LIB=@MARIADB_LIB@ +export MARIADB_CFLAGS=$(gb_SPACE)@MARIADB_CFLAGS@ +export MARIADB_LIBS=$(gb_SPACE)@MARIADB_LIBS@ export MD5SUM=@MD5SUM@ export MDDS_CPPFLAGS=$(gb_SPACE)@MDDS_CPPFLAGS@ export MERGELIBS=@MERGELIBS@ diff --git a/configure.ac b/configure.ac index 9533c3da20d8..26ec6cf86c1d 100644 --- a/configure.ac +++ b/configure.ac @@ -1300,21 +1300,11 @@ AC_ARG_WITH(system-apache-commons, AC_ARG_WITH(system-mariadb, AS_HELP_STRING([--with-system-mariadb], - [Use MariaDB libraries already on system, for building the MySQL Connector/LibreOffice + [Use MariaDB libraries already on system, for building the MariaDB Connector/LibreOffice extension. If the mariadb_config executable is not in PATH, use MARIADBCONFIG to point to it.]),, [with_system_mariadb="$with_system_libs"]) -AC_ARG_WITH(libmariadb-path, - AS_HELP_STRING([--with-libmariadb-path], - [Use Connector/C (libmariadb) installation for building the MariaDB/MySQL - Connector/LibreOffice extension.]) - [ - Usage: --with-libmariadb-path=<absolute path to - your Connector/C installation> - ], -,) - AC_ARG_WITH(system-mysql-cppconn, AS_HELP_STRING([--with-system-mysql-cppconn], [Use MySQL C++ Connector libraries already on system.]),, @@ -7544,7 +7534,7 @@ if test "x$enable_ext_mariadb_connector" = "xyes" -a "x$enable_extension_integra ENABLE_MARIADBC=YES MARIADBC_MAJOR=1 MARIADBC_MINOR=0 - MARIADBC_MICRO=1 + MARIADBC_MICRO=0 BUILD_TYPE="$BUILD_TYPE MARIADBC" else AC_MSG_RESULT([no]) @@ -7560,14 +7550,14 @@ if test "$ENABLE_MARIADBC" = "YES"; then SCPDEFS="$SCPDEFS -DWITH_EXTENSION_MARIADBC" dnl =================================================================== - dnl Check for system MySQL + dnl Check for system MariaDB dnl =================================================================== - AC_MSG_CHECKING([for MySQL prerequisites]) + AC_MSG_CHECKING([which MariaDB to use]) if test "$with_system_mariadb" = "yes"; then - AC_MSG_RESULT([external MySQL]) + AC_MSG_RESULT([external]) SYSTEM_MARIADB=YES AC_PATH_PROG( MARIADBCONFIG, mariadb_config) - AC_MSG_CHECKING([MySQL version]) + AC_MSG_CHECKING([MariaDB version]) MARIADB_VERSION=`$MARIADBCONFIG --version` MARIADB_MAJOR=`$MARIADBCONFIG --version | cut -d"." -f1` if test "$MARIADB_MAJOR" -ge "5"; then @@ -7575,39 +7565,21 @@ if test "$ENABLE_MARIADBC" = "YES"; then else AC_MSG_ERROR([too old, use 5.0.x or 5.1.x]) fi - AC_MSG_CHECKING([for MySQL Client library]) - MARIADB_INC=`$MARIADBCONFIG --include` - MARIADB_LIB=`$MARIADBCONFIG --libs` - MARIADB_DEFINES=`$MARIADBCONFIG --cflags | $SED -e s,$MARIADB_INC,,` - AC_MSG_RESULT([includes $MARIADB_INC, libraries $MARIADB_LIB]) + AC_MSG_CHECKING([for MariaDB Client library]) + MARIADB_CFLAGS=`$MARIADBCONFIG --cflags` + MARIADB_LIBS=`$MARIADBCONFIG --libs` + AC_MSG_RESULT([includes $MARIADB_CFLAGS, libraries $MARIADB_LIBS]) else + AC_MSG_RESULT([internal]) SYSTEM_MARIADB=NO - if test -n "$with_libmariadb_path"; then - AC_MSG_RESULT([external Connector/C (libmariadb)]) - LIBMARIADB=libmariadb.so - if test "$_os" = "Darwin"; then - LIBMARIADB=libmariadb.dylib - elif test "$_os" = "WINNT"; then - LIBMARIADB=libmariadb.dll - fi - AC_MSG_CHECKING([for $LIBMARIADB]) - if test -e "$with_libmariadb_path/lib/$LIBMARIADB"; then - AC_MSG_RESULT([found.]) - PathFormat "$with_libmariadb_path" - LIBMARIADB_PATH="$formatted_path" - else - AC_MSG_ERROR([not found. Please specify proper path in --with-libmariadb-path.]) - fi - else - AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmariadb-path]) - fi + MARIADB_CFLAGS="-I${WORKDIR}/UnpackedTarball/mariadb/include" + MARIADB_LIBS="-L${OUTDIR}/lib -lmariadblib" + BUILD_TYPE="$BUILD_TYPE MARIADB" fi + AC_SUBST(SYSTEM_MARIADB) - AC_SUBST(MARIADB_INC) - AC_SUBST(MARIADB_LIB) - AC_SUBST(MARIADB_DEFINES) - AC_SUBST(LIBMARIADB) - AC_SUBST(LIBMARIADB_PATH) + AC_SUBST(MARIADB_CFLAGS) + AC_SUBST(MARIADB_LIBS) AC_LANG_PUSH([C++]) dnl =================================================================== diff --git a/download.lst b/download.lst index df2993455dc7..aaa735f30475 100644 --- a/download.lst +++ b/download.lst @@ -58,6 +58,7 @@ export LIBXMLSEC_TARBALL := 1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar. export LIBXML_TARBALL := 7740a8ec23878a2f50120e1faa2730f2-libxml2-2.7.6.tar.gz export LIBXSLT_TARBALL := e61d0364a30146aaa3001296f853b2b9-libxslt-1.1.26.tar.gz export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz +export MARIADB_TARBALL := 05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2 export MDDS_TARBALL := 9f9e15966b5624834157fe3d748312bc-mdds_0.6.1.tar.bz2 export MYSQLCPPCONN_TARBALL := 0981bda6548a8c8233ffce2b6e4b2a23-mysql-connector-c++-1.1.0.tar.gz export MYTHES_TARBALL := 46e92b68e31e858512b680b3b61dc4c1-mythes-1.2.3.tar.gz diff --git a/libmariadb/ExternalPackage_libmariadb.mk b/libmariadb/ExternalPackage_libmariadb.mk new file mode 100644 index 000000000000..29b907f38c1f --- /dev/null +++ b/libmariadb/ExternalPackage_libmariadb.mk @@ -0,0 +1,51 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,libmariadb_inc,mariadb)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,libmariadb_inc,inc/external/libmariadb,\ + include/config-win.h \ + include/dbug.h \ + include/errmsg.h \ + include/getopt.h \ + include/global.h \ + include/hash.h \ + include/m_ctype.h \ + include/m_string.h \ + include/my_alarm.h \ + include/my_base.h \ + include/my_dir.h \ + include/my_global.h \ + include/my_list.h \ + include/my_net.h \ + include/my_no_pthread.h \ + include/my_pthread.h \ + include/my_secure.h \ + include/mysql_com.h \ + include/mysqld_error.h \ + include/mysql.h \ + include/mysql_io.h \ + include/mysql_mm.h \ + include/mysql_priv.h \ + include/mysql_wireprotocol.h \ + include/my_stmt.h \ + include/mysys_err.h \ + include/my_sys.h \ + include/sha1.h \ + include/thr_alarm.h \ + include/violite.h \ +)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,libmariadb_inc,inc/external/libmariadb/mysql,\ + include/mysql/client_plugin.h \ + include/mysql/plugin_auth_common.h \ + include/mysql/plugin_auth.h \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/libmariadb/Module_libmariadb.mk b/libmariadb/Module_libmariadb.mk new file mode 100644 index 000000000000..667d55d88212 --- /dev/null +++ b/libmariadb/Module_libmariadb.mk @@ -0,0 +1,22 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,libmariadb)) + +ifeq ($(SYSTEM_MARIADB),NO) + +$(eval $(call gb_Module_add_targets,libmariadb,\ + ExternalPackage_libmariadb \ + StaticLibrary_mariadb \ + UnpackedTarball_mariadb \ +)) + +endif + +# vim: set noet sw=4 ts=4: diff --git a/libmariadb/StaticLibrary_mariadb.mk b/libmariadb/StaticLibrary_mariadb.mk new file mode 100644 index 000000000000..3a22433a81ff --- /dev/null +++ b/libmariadb/StaticLibrary_mariadb.mk @@ -0,0 +1,117 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_StaticLibrary_StaticLibrary,mariadblib)) + +$(eval $(call gb_StaticLibrary_set_warnings_not_errors,mariadblib)) + +$(eval $(call gb_StaticLibrary_use_unpacked,mariadblib,mariadb)) + +$(eval $(call gb_StaticLibrary_use_package,mariadblib,libmariadb_inc)) + +$(eval $(call gb_StaticLibrary_set_generated_c_suffix,mariadblib,c)) + +$(eval $(call gb_StaticLibrary_set_include,mariadblib,\ + $$(INCLUDE) \ + -I$(call gb_UnpackedTarball_get_dir,mariadb)/include \ +)) + +$(eval $(call gb_StaticLibrary_add_defs,mariadblib,\ + -DTHREAD \ +)) + +$(eval $(call gb_StaticLibrary_add_generated_cobjects,mariadblib,\ + UnpackedTarball/mariadb/libmysql/array \ + UnpackedTarball/mariadb/libmysql/bchange \ + UnpackedTarball/mariadb/libmysql/bmove \ + UnpackedTarball/mariadb/libmysql/bmove_upp \ + UnpackedTarball/mariadb/libmysql/charset \ + UnpackedTarball/mariadb/libmysql/client_plugin \ + UnpackedTarball/mariadb/libmysql/dbug \ + UnpackedTarball/mariadb/libmysql/default \ + UnpackedTarball/mariadb/libmysql/errmsg \ + UnpackedTarball/mariadb/libmysql/errors \ + UnpackedTarball/mariadb/libmysql/getopt \ + UnpackedTarball/mariadb/libmysql/getopt1 \ + UnpackedTarball/mariadb/libmysql/get_password \ + UnpackedTarball/mariadb/libmysql/int2str \ + UnpackedTarball/mariadb/libmysql/is_prefix \ + UnpackedTarball/mariadb/libmysql/libmysql \ + UnpackedTarball/mariadb/libmysql/list \ + UnpackedTarball/mariadb/libmysql/llstr \ + UnpackedTarball/mariadb/libmysql/longlong2str \ + UnpackedTarball/mariadb/libmysql/mf_dirname \ + UnpackedTarball/mariadb/libmysql/mf_fn_ext \ + UnpackedTarball/mariadb/libmysql/mf_format \ + UnpackedTarball/mariadb/libmysql/mf_loadpath \ + UnpackedTarball/mariadb/libmysql/mf_pack \ + UnpackedTarball/mariadb/libmysql/mf_path \ + UnpackedTarball/mariadb/libmysql/mf_tempfile \ + UnpackedTarball/mariadb/libmysql/mf_unixpath \ + UnpackedTarball/mariadb/libmysql/mf_wcomp \ + UnpackedTarball/mariadb/libmysql/mulalloc \ + UnpackedTarball/mariadb/libmysql/my_alloc \ + UnpackedTarball/mariadb/libmysql/my_auth \ + UnpackedTarball/mariadb/libmysql/my_charset \ + UnpackedTarball/mariadb/libmysql/my_compress \ + UnpackedTarball/mariadb/libmysql/my_create \ + UnpackedTarball/mariadb/libmysql/my_delete \ + UnpackedTarball/mariadb/libmysql/my_div \ + UnpackedTarball/mariadb/libmysql/my_error \ + UnpackedTarball/mariadb/libmysql/my_fopen \ + UnpackedTarball/mariadb/libmysql/my_fstream \ + UnpackedTarball/mariadb/libmysql/my_gethostbyname \ + UnpackedTarball/mariadb/libmysql/my_getwd \ + UnpackedTarball/mariadb/libmysql/my_init \ + UnpackedTarball/mariadb/libmysql/my_lib \ + UnpackedTarball/mariadb/libmysql/my_loaddata \ + UnpackedTarball/mariadb/libmysql/my_malloc \ + UnpackedTarball/mariadb/libmysql/my_messnc \ + UnpackedTarball/mariadb/libmysql/my_net \ + UnpackedTarball/mariadb/libmysql/my_once \ + UnpackedTarball/mariadb/libmysql/my_open \ + UnpackedTarball/mariadb/libmysql/my_port \ + UnpackedTarball/mariadb/libmysql/my_pthread \ + UnpackedTarball/mariadb/libmysql/my_read \ + UnpackedTarball/mariadb/libmysql/my_realloc \ + UnpackedTarball/mariadb/libmysql/my_secure \ + UnpackedTarball/mariadb/libmysql/my_seek \ + UnpackedTarball/mariadb/libmysql/my_static \ + UnpackedTarball/mariadb/libmysql/my_stmt \ + UnpackedTarball/mariadb/libmysql/my_stmt_codec \ + UnpackedTarball/mariadb/libmysql/my_symlink \ + UnpackedTarball/mariadb/libmysql/my_thr_init \ + UnpackedTarball/mariadb/libmysql/my_vsnprintf \ + UnpackedTarball/mariadb/libmysql/my_write \ + UnpackedTarball/mariadb/libmysql/net \ + UnpackedTarball/mariadb/libmysql/password \ + UnpackedTarball/mariadb/libmysql/safemalloc \ + UnpackedTarball/mariadb/libmysql/sha1 \ + UnpackedTarball/mariadb/libmysql/str2int \ + UnpackedTarball/mariadb/libmysql/strcend \ + UnpackedTarball/mariadb/libmysql/strcont \ + UnpackedTarball/mariadb/libmysql/strend \ + UnpackedTarball/mariadb/libmysql/strfill \ + UnpackedTarball/mariadb/libmysql/string \ + UnpackedTarball/mariadb/libmysql/strinstr \ + UnpackedTarball/mariadb/libmysql/strmake \ + UnpackedTarball/mariadb/libmysql/strmov \ + UnpackedTarball/mariadb/libmysql/strnlen \ + UnpackedTarball/mariadb/libmysql/strnmov \ + UnpackedTarball/mariadb/libmysql/strto \ + UnpackedTarball/mariadb/libmysql/strtoll \ + UnpackedTarball/mariadb/libmysql/strtoull \ + UnpackedTarball/mariadb/libmysql/strxmov \ + UnpackedTarball/mariadb/libmysql/strxnmov \ + UnpackedTarball/mariadb/libmysql/thr_mutex \ + UnpackedTarball/mariadb/libmysql/typelib \ + UnpackedTarball/mariadb/libmysql/violite \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/libmariadb/UnpackedTarball_mariadb.mk b/libmariadb/UnpackedTarball_mariadb.mk new file mode 100644 index 000000000000..75ed7c622098 --- /dev/null +++ b/libmariadb/UnpackedTarball_mariadb.mk @@ -0,0 +1,17 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,mariadb)) + +$(eval $(call gb_UnpackedTarball_set_tarball,mariadb,$(MARIADB_TARBALL))) + +$(eval $(call gb_UnpackedTarball_add_file,mariadb,include/my_config.h,libmariadb/my_config.h)) +$(eval $(call gb_UnpackedTarball_add_file,mariadb,include/mysql_version.h,libmariadb/mysql_version.h)) + +# vim: set noet sw=4 ts=4: diff --git a/libmariadb/my_config.h b/libmariadb/my_config.h new file mode 100644 index 000000000000..bdf86b334ddb --- /dev/null +++ b/libmariadb/my_config.h @@ -0,0 +1,277 @@ + +#define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1 + +/* + * Include file constants (processed in LibmysqlIncludeFiles.txt 1 + */ +#define HAVE_ALLOCA_H 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_CRYPT_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_DLFCN_H 1 +#define HAVE_EXECINFO_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_FENV_H 1 +#define HAVE_FLOAT_H 1 +/* #undef HAVE_FPU_CONTROL_H */ +#define HAVE_GRP_H 1 +/* #undef HAVE_IEEEFP_H */ +#define HAVE_LIMITS_H 1 +#define HAVE_MALLOC_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_PATHS_H 1 +#define HAVE_PWD_H 1 +#define HAVE_SCHED_H 1 +/* #undef HAVE_SELECT_H */ +#define HAVE_STDDEF_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STRINGS_H 1 +/* #undef HAVE_SYNCH_H */ +/* #undef HAVE_SYS_FPU_H */ +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_IPC_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_PRCTL_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SHM_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_STAT_H 1 +/* #undef HAVE_SYS_STREAM_H */ +#define HAVE_SYS_TIMEB_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_UN_H 1 +/* #undef HAVE_SYSENT_H */ +#define HAVE_TERMIO_H 1 +#define HAVE_TERMIOS_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_UTIME_H 1 + +/* + * function definitions - processed in LibmysqlFunctions.txt + */ +#define HAVE_ACCESS 1 +/* #undef HAVE_AIOWAIT */ +#define HAVE_ALARM 1 +/* #undef HAVE_ALLOCA */ +#define HAVE_BCMP 1 +/* #undef HAVE_BFILL */ +/* #undef HAVE_BMOVE */ +#define HAVE_BZERO 1 +/* #undef HAVE_CLOCK_GETTIME */ +/* #undef HAVE_COMPRESS */ +/* #undef HAVE_CRYPT */ +#define HAVE_DLERROR 1 +#define HAVE_DLOPEN 1 +#define HAVE_FCHMOD 1 +#define HAVE_FCNTL 1 +/* #undef HAVE_FCONVERT */ +#define HAVE_FDATASYNC 1 +/* #undef HAVE_FESETROUND */ +#define HAVE_FINITE 1 +#define HAVE_FSEEKO 1 +#define HAVE_FSYNC 1 +#define HAVE_GETADDRINFO 1 +#define HAVE_GETCWD 1 +#define HAVE_GETHOSTBYADDR_R 1 +#define HAVE_GETHOSTBYNAME_R 1 +/* #undef HAVE_GETHRTIME */ +#define HAVE_GETNAMEINFO 1 +#define HAVE_GETPAGESIZE 1 +#define HAVE_GETPASS 1 +/* #undef HAVE_GETPASSPHRASE */ +#define HAVE_GETPWNAM 1 +#define HAVE_GETPWUID 1 +#define HAVE_GETRLIMIT 1 +#define HAVE_GETRUSAGE 1 +#define HAVE_GETWD 1 +#define HAVE_GMTIME_R 1 +#define HAVE_INITGROUPS 1 +#define HAVE_LDIV 1 +#define HAVE_LOCALTIME_R 1 +/* #undef HAVE_LOG2 */ +#define HAVE_LONGJMP 1 +#define HAVE_LSTAT 1 +#define HAVE_MADVISE 1 +#define HAVE_MALLINFO 1 +#define HAVE_MEMALIGN 1 +#define HAVE_MEMCPY 1 +#define HAVE_MEMMOVE 1 +#define HAVE_MKSTEMP 1 +#define HAVE_MLOCK 1 +#define HAVE_MLOCKALL 1 +#define HAVE_MMAP 1 +#define HAVE_MMAP64 1 +#define HAVE_PERROR 1 +#define HAVE_POLL 1 +#define HAVE_PREAD 1 +/* #undef HAVE_PTHREAD_ATTR_CREATE */ +/* #undef HAVE_PTHREAD_ATTR_GETSTACKSIZE */ +/* #undef HAVE_PTHREAD_ATTR_SETPRIO */ +#define HAVE_PTHREAD_ATTR_SETSCHEDPARAM 1 +#define HAVE_PTHREAD_ATTR_SETSCOPE 1 +/* #undef HAVE_PTHREAD_ATTR_SETSTACKSIZE */ +/* #undef HAVE_PTHREAD_CONDATTR_CREATE */ +/* #undef HAVE_PTHREAD_INIT */ +/* #undef HAVE_PTHREAD_KEY_DELETE */ +/* #undef HAVE_PTHREAD_KILL */ +/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK */ +/* #undef HAVE_PTHREAD_SETPRIO_NP */ +#define HAVE_PTHREAD_SETSCHEDPARAM 1 +/* #undef HAVE_PTHREAD_SIGMASK */ +/* #undef HAVE_PTHREAD_THREADMASK */ +/* #undef HAVE_PTHREAD_YIELD_NP */ +#define HAVE_READDIR_R 1 +#define HAVE_READLINK 1 +#define HAVE_REALPATH 1 +#define HAVE_RENAME 1 +#define HAVE_SCHED_YIELD 1 +#define HAVE_SELECT 1 +/* #undef HAVE_SETFD */ +/* #undef HAVE_SETFILEPOINTER */ +#define HAVE_SIGNAL 1 +#define HAVE_SIGACTION 1 +/* #undef HAVE_SIGTHREADMASK */ +#define HAVE_SIGWAIT 1 +#define HAVE_SLEEP 1 +#define HAVE_SNPRINTF 1 +#define HAVE_STPCPY 1 +#define HAVE_STRERROR 1 +/* #undef HAVE_STRLCPY */ +#define HAVE_STRNLEN 1 +#define HAVE_STRPBRK 1 +#define HAVE_STRSEP 1 +#define HAVE_STRSTR 1 +#define HAVE_STRTOK_R 1 +#define HAVE_STRTOL 1 +#define HAVE_STRTOLL 1 +#define HAVE_STRTOUL 1 +#define HAVE_STRTOULL 1 +/* #undef HAVE_TELL */ +/* #undef HAVE_THR_SETCONCURRENCY */ +/* #undef HAVE_THR_YIELD */ +#define HAVE_VASPRINTF 1 +#define HAVE_VSNPRINTF 1 + +/* + * types and sizes + */ +/* Types we may use */ +#define SIZEOF_CHAR 1 +#if SIZEOF_CHAR +# define HAVE_CHAR 1 +#endif + +#define SIZEOF_CHARP 8 +#if SIZEOF_CHARP +# define HAVE_CHARP 1 +#endif + +#define SIZEOF_SHORT 2 +#if SIZEOF_SHORT +# define HAVE_SHORT 1 +#endif + +#define SIZEOF_INT 4 +#if SIZEOF_INT +# define HAVE_INT 1 +#endif + +#define SIZEOF_LONG 8 +#if SIZEOF_LONG +# define HAVE_LONG 1 +#endif + +#define SIZEOF_LONG_LONG 8 +#if SIZEOF_LONG_LONG +# define HAVE_LONG_LONG 1 +#endif + +#define SIZEOF_OFF_T 8 +#if SIZEOF_OFF_T +# define HAVE_OFF_T 1 +#endif + +#define SIZEOF_SIGSET_T 128 +#if SIZEOF_SIGSET_T +# define HAVE_SIGSET_T 1 +#endif + +#define SIZEOF_SIZE_T 8 +#if SIZEOF_SIZE_T +# define HAVE_SIZE_T 1 +#endif + +/* #undef SIZEOF_UCHAR */ +#if SIZEOF_UCHAR +# define HAVE_UCHAR 1 +#endif + +#define SIZEOF_UINT 4 +#if SIZEOF_UINT +# define HAVE_UINT 1 +#endif + +#define SIZEOF_ULONG 8 +#if SIZEOF_ULONG +# define HAVE_ULONG 1 +#endif + +/* #undef SIZEOF_INT8 */ +#if SIZEOF_INT8 +# define HAVE_INT8 1 +#endif +/* #undef SIZEOF_UINT8 */ +#if SIZEOF_UINT8 +# define HAVE_UINT8 1 +#endif + +/* #undef SIZEOF_INT16 */ +#if SIZEOF_INT16 +# define HAVE_INT16 1 +#endif +/* #undef SIZEOF_UINT16 */ +#if SIZEOF_UINT16 +# define HAVE_UINT16 1 +#endif + +/* #undef SIZEOF_INT32 */ +#if SIZEOF_INT32 +# define HAVE_INT32 1 +#endif +/* #undef SIZEOF_UINT32 */ +#if SIZEOF_UINT32 +# define HAVE_UINT32 1 +#endif +/* #undef SIZEOF_U_INT32_T */ +#if SIZEOF_U_INT32_T +# define HAVE_U_INT32_T 1 +#endif + +/* #undef SIZEOF_INT64 */ +#if SIZEOF_INT64 +# define HAVE_INT64 1 +#endif +/* #undef SIZEOF_UINT64 */ +#if SIZEOF_UINT64 +# define HAVE_UINT64 1 +#endif + +/* #undef SIZEOF_SOCKLEN_T */ +#if SIZEOF_SOCKLEN_T +# define HAVE_SOCKLEN_T 1 +#endif + +#define SOCKET_SIZE_TYPE socklen_t + +#define RETSIGTYPE void +#define RETQSORTTYPE void + +/* + * various other defines + */ +/* #undef HAVE_THREADS */ +#define SHAREDIR "share" +#define DEFAULT_CHARSET_HOME "/usr/local" diff --git a/libmariadb/mysql_version.h b/libmariadb/mysql_version.h new file mode 100644 index 000000000000..26120a9ec10a --- /dev/null +++ b/libmariadb/mysql_version.h @@ -0,0 +1,24 @@ +/* Copyright Abandoned 1996, 1999, 2001 MySQL AB + This file is public domain and comes with NO WARRANTY of any kind */ + +/* Version numbers for protocol & mysqld */ + +#ifdef _CUSTOMCONFIG_ +#include <custom_conf.h> +#else +#define PROTOCOL_VERSION 10 +#define MYSQL_CLIENT_VERSION "5.3.2" +#define MYSQL_SERVER_VERSION "5.3.2" +#define MYSQL_SERVER_SUFFIX "" +#define FRM_VER +#define MYSQL_VERSION_ID 50302 +#define MYSQL_PORT 3306 +#define MYSQL_UNIX_ADDR "/tmp/mysql.sock" +#define MYSQL_CONFIG_NAME "my" + +/* mysqld compile time options */ +#ifndef MYSQL_CHARSET +#define MYSQL_CHARSET "" +#endif +#endif + diff --git a/libmariadb/prj/build.lst b/libmariadb/prj/build.lst new file mode 100644 index 000000000000..3725a39e229a --- /dev/null +++ b/libmariadb/prj/build.lst @@ -0,0 +1,2 @@ +lmdb libmariadb : soltools NULL +lmdb libmariadb\prj nmake - all lmdb_libmariadb NULL diff --git a/mysqlc/Library_mysqlc.mk b/mysqlc/Library_mysqlc.mk index ab6e5457def7..635838e28101 100644 --- a/mysqlc/Library_mysqlc.mk +++ b/mysqlc/Library_mysqlc.mk @@ -17,6 +17,7 @@ $(eval $(call gb_Library_use_externals,mysqlc,\ boost_headers \ mysql \ mysqlcppconn \ + mariadb \ )) ifeq ($(SYSTEM_MYSQL_CPPCONN),NO) @@ -41,7 +42,6 @@ $(eval $(call gb_Library_add_defs,mysqlc,\ -DMYSQLC_VERSION_MAJOR=$(MYSQLC_MAJOR) \ -DMYSQLC_VERSION_MINOR=$(MYSQLC_MINOR) \ -DMYSQLC_VERSION_MICRO=$(MYSQLC_MICRO) \ - $(if $(filter NO,$(SYSTEM_MARIADB)),-DMYSQL_LIB=\"$(LIBMARIADB)\") \ $(if $(filter NO,$(SYSTEM_MYSQL_CPPCONN)),\ -DCPPCONN_LIB=\"$(call gb_Library_get_runtime_filename,mysqlcppconn)\") \ )) diff --git a/mysqlcppconn/Library_mysqlcppconn.mk b/mysqlcppconn/Library_mysqlcppconn.mk index ccb121d407dc..6f52a26b7209 100644 --- a/mysqlcppconn/Library_mysqlcppconn.mk +++ b/mysqlcppconn/Library_mysqlcppconn.mk @@ -19,6 +19,7 @@ $(eval $(call gb_Library_use_packages,mysqlcppconn,\ $(eval $(call gb_Library_use_externals,mysqlcppconn, \ mysql \ boost_headers \ + mariadb \ )) ifneq ($(OS)$(COM),WNTMSC) @@ -47,6 +48,11 @@ $(eval $(call gb_Library_add_defs,mysqlcppconn,\ -D_SCL_SECURE_NO_WARNINGS ) \ )) +$(eval $(call gb_Library_set_include,mysqlcppconn,\ + $$(INCLUDE) \ + $(MARIADB_CFLAGS) \ +)) + $(eval $(call gb_Library_add_generated_exception_objects,mysqlcppconn,\ UnpackedTarball/mysqlcppconn/driver/mysql_art_resultset \ UnpackedTarball/mysqlcppconn/driver/mysql_art_rset_metadata \ |