From 0f00acbca40c056dcbba89423ac88dd819d222d9 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 5 Dec 2023 13:47:20 +0300 Subject: Release version 8.0.15+12 Define HAVE_STRLCAT on Linux if GNU libc is 2.38 or newer. Fix link order so that libraries are linked after all object files. Switch to using -pthread instead of -D_REENTRANT/-lpthread in buildfiles and bump build2 version requirement to 0.15.0. Use legal{} target type for legal documentation (LICENSE, etc). --- TODO | 5 ++--- libmysqlclient/.gitignore | 1 + libmysqlclient/buildfile | 2 +- libmysqlclient/manifest | 6 +++--- libmysqlclient/mysql/buildfile | 11 ++++++----- libmysqlclient/mysql/my_config.h | 13 ++++++++++++- 6 files changed, 25 insertions(+), 13 deletions(-) diff --git a/TODO b/TODO index da80960..abba7e5 100644 --- a/TODO +++ b/TODO @@ -2,6 +2,5 @@ On the revision: On the release: -- Use legal{} target type for legal documentation (LICENSE, AUTHORS, etc). - - Note that this requires bumping build2 version requirement to 0.13.0. + Note that here we record items that require bumping build2 version + requirement to the latest released version of the toolchain. diff --git a/libmysqlclient/.gitignore b/libmysqlclient/.gitignore index 6435b97..1c363a0 100644 --- a/libmysqlclient/.gitignore +++ b/libmysqlclient/.gitignore @@ -12,6 +12,7 @@ *.pcm *.ifc *.so +*.dylib *.dll *.a *.lib diff --git a/libmysqlclient/buildfile b/libmysqlclient/buildfile index 53e3e39..fc7acee 100644 --- a/libmysqlclient/buildfile +++ b/libmysqlclient/buildfile @@ -1,7 +1,7 @@ # file : buildfile # license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file -./: {*/ -build/} doc{LICENSE INSTALL README} manifest +./: {*/ -build/} doc{INSTALL README} legal{LICENSE} manifest # Don't install tests or the INSTALL file. # diff --git a/libmysqlclient/manifest b/libmysqlclient/manifest index 00bbf30..0707937 100644 --- a/libmysqlclient/manifest +++ b/libmysqlclient/manifest @@ -3,7 +3,7 @@ name: libmysqlclient # Note: remember to update doc-url below! # -version: 8.0.15+11 +version: 8.0.15+12 project: mysql summary: MySQL C API client library @@ -21,8 +21,8 @@ builds: all builds: -wasm builds: -( +windows &gcc ) ; MinGW GCC is not supported. builds: -static ; Implementation uses C++ and requires special linking steps. -depends: * build2 >= 0.12.0 -depends: * bpkg >= 0.12.0 +depends: * build2 >= 0.15.0 +depends: * bpkg >= 0.15.0 depends: libz ^1.2.1100 depends: libcrypto ^1.1.1 depends: libssl ^1.1.1 diff --git a/libmysqlclient/mysql/buildfile b/libmysqlclient/mysql/buildfile index db02d19..a21aef2 100644 --- a/libmysqlclient/mysql/buildfile +++ b/libmysqlclient/mysql/buildfile @@ -37,8 +37,7 @@ lib{mysqlclient}: {h c }{* -version -config} \ sql/auth/{ hxx }{* } \ sql/auth/{ cxx}{password sha2_password_common} \ sql-common/{ hxx cxx}{* } \ - libmysql/{ hxx cxx}{* -*test*} \ - $imp_libs + libmysql/{ hxx cxx}{* -*test*} lib{mysqlclient}: mysys/cxx{posix_timers}: include = $linux lib{mysqlclient}: mysys/cxx{kqueue_timers}: include = ($bsd || $macos) @@ -47,6 +46,8 @@ lib{mysqlclient}: mysys/{ cxx}{$mysys_win32} \ vio/{ cxx}{$vio_win32 } \ libmysql/authentication_win/{hxx cxx}{* }: include = $windows +lib{mysqlclient}: $imp_libs + libs{mysqlclient}: def{libmysql_exports}: include = $windows # Makes sense to distribute READMEs for the bundled libraries. Note that their @@ -230,14 +231,14 @@ switch $tclass, $tsys # cc.loptions += -Wl,--no-undefined - cc.libs += -ldl -lpthread -lm -lrt + cc.libs += -ldl -lm -lrt -pthread } case 'bsd' - cc.libs += -lexecinfo -lpthread -lm + cc.libs += -lexecinfo -lm -pthread default - cc.libs += -ldl -lpthread -lm + cc.libs += -ldl -lm -pthread } # Export options. diff --git a/libmysqlclient/mysql/my_config.h b/libmysqlclient/mysql/my_config.h index e13079b..be16fe6 100644 --- a/libmysqlclient/mysql/my_config.h +++ b/libmysqlclient/mysql/my_config.h @@ -117,6 +117,18 @@ #undef HAVE_ULONG /* + * GNU libc added strlcpy() and strlcat() in version 2.38 (in anticipation + * of their addition to POSIX). + */ +#if defined(__FreeBSD__) || \ + defined(__APPLE__) || \ + (defined(__GLIBC__) && \ + defined(__GLIBC_MINOR__) && \ + (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 38)) +# define HAVE_STRLCAT 1 +#endif + +/* * Specific for Linux. */ #ifdef __linux__ @@ -181,7 +193,6 @@ # define HAVE_KQUEUE_TIMERS 1 # define HAVE_SOCKADDR_IN_SIN_LEN 1 # define HAVE_SOCKADDR_IN6_SIN6_LEN 1 -# define HAVE_STRLCAT 1 #endif /* -- cgit v1.1