diff options
Diffstat (limited to 'libodb-mysql/odb/mysql')
-rw-r--r-- | libodb-mysql/odb/mysql/buildfile | 35 | ||||
-rw-r--r-- | libodb-mysql/odb/mysql/details/build2/config-stub.h | 5 | ||||
-rw-r--r-- | libodb-mysql/odb/mysql/details/build2/config-vc-stub.h | 5 | ||||
-rw-r--r-- | libodb-mysql/odb/mysql/details/build2/config-vc.h | 15 | ||||
-rw-r--r-- | libodb-mysql/odb/mysql/details/build2/config.h | 17 | ||||
-rw-r--r-- | libodb-mysql/odb/mysql/details/config.hxx | 19 | ||||
-rw-r--r-- | libodb-mysql/odb/mysql/details/export.hxx | 38 | ||||
-rw-r--r-- | libodb-mysql/odb/mysql/version-build2-stub.hxx | 4 | ||||
-rw-r--r-- | libodb-mysql/odb/mysql/version-build2.hxx | 0 | ||||
-rw-r--r-- | libodb-mysql/odb/mysql/version.hxx | 61 | ||||
-rw-r--r-- | libodb-mysql/odb/mysql/version.hxx.in (renamed from libodb-mysql/odb/mysql/version-build2.hxx.in) | 27 |
11 files changed, 39 insertions, 187 deletions
diff --git a/libodb-mysql/odb/mysql/buildfile b/libodb-mysql/odb/mysql/buildfile index 8fc2358..42e5e88 100644 --- a/libodb-mysql/odb/mysql/buildfile +++ b/libodb-mysql/odb/mysql/buildfile @@ -10,17 +10,16 @@ import int_libs += ($client_lib == 'mysql' \ ? libmysqlclient%lib{mysqlclient} \ : libmariadb%lib{mariadb}) -lib{odb-mysql}: {hxx ixx txx cxx}{* -version-build2} {hxx}{version-build2} \ - details/{hxx ixx txx cxx}{* -options} \ - details/build2/{h}{*} \ +lib{odb-mysql}: {hxx ixx txx cxx}{* -version} {hxx}{version} \ + details/{hxx ixx txx cxx}{* -options} \ $int_libs # Include the generated version header into the distribution (so that we don't # pick up an installed one) and don't remove it when cleaning in src (so that # clean results in a state identical to distributed). # -hxx{version-build2}: in{version-build2} $src_root/manifest -hxx{version-build2}: +hxx{version}: in{version} $src_root/manifest +hxx{version}: { dist = true clean = ($src_root != $out_root) @@ -28,7 +27,7 @@ hxx{version-build2}: # Build options. # -cxx.poptions =+ "-I$out_root" "-I$src_root" -DLIBODB_MYSQL_BUILD2 +cxx.poptions =+ "-I$out_root" "-I$src_root" if ($client_lib == 'mariadb') cxx.poptions += -DLIBODB_MYSQL_MARIADB @@ -40,7 +39,7 @@ objs{*}: cxx.poptions += -DLIBODB_MYSQL_SHARED_BUILD # lib{odb-mysql}: { - cxx.export.poptions = "-I$out_root" "-I$src_root" -DLIBODB_MYSQL_BUILD2 + cxx.export.poptions = "-I$out_root" "-I$src_root" cxx.export.libs = $int_libs } @@ -141,25 +140,3 @@ install_include = [dir_path] include/odb/mysql/ install = $install_include install.subdirs = true } - -# We want these to be picked up whether LIBODB_MYSQL_BUILD2 is defined or not. -# -hxx{version}@./: install = false -hxx{version-build2}: install = $install_include/version.hxx -hxx{version-build2-stub}@./: install = $install_include/version-build2.hxx - -details/build2/ -{ - h{*}: install = false - - if ($cxx.target.system == 'win32-msvc') - { - h{config-vc}@./: install = $install_include/details/ - h{config-vc-stub}@./: install = $install_include/details/build2/config-vc.h - } - else - { - h{config}@./: install = $install_include/details/ - h{config-stub}@./: install = $install_include/details/build2/config.h - } -} diff --git a/libodb-mysql/odb/mysql/details/build2/config-stub.h b/libodb-mysql/odb/mysql/details/build2/config-stub.h deleted file mode 100644 index d9d08eb..0000000 --- a/libodb-mysql/odb/mysql/details/build2/config-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/mysql/details/build2/config-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/mysql/details/config.h> diff --git a/libodb-mysql/odb/mysql/details/build2/config-vc-stub.h b/libodb-mysql/odb/mysql/details/build2/config-vc-stub.h deleted file mode 100644 index e22c7c2..0000000 --- a/libodb-mysql/odb/mysql/details/build2/config-vc-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/mysql/details/build2/config-vc-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/mysql/details/config-vc.h> diff --git a/libodb-mysql/odb/mysql/details/build2/config-vc.h b/libodb-mysql/odb/mysql/details/build2/config-vc.h deleted file mode 100644 index 3adb630..0000000 --- a/libodb-mysql/odb/mysql/details/build2/config-vc.h +++ /dev/null @@ -1,15 +0,0 @@ -/* file : odb/mysql/details/build2/config-vc.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Configuration file for Windows/VC++ for the build2 build. */ - -#ifndef ODB_MYSQL_DETAILS_CONFIG_VC_H -#define ODB_MYSQL_DETAILS_CONFIG_VC_H - -/* Define LIBODB_MYSQL_BUILD2 for the installed case. */ -#ifndef LIBODB_MYSQL_BUILD2 -# define LIBODB_MYSQL_BUILD2 -#endif - -#endif /* ODB_MYSQL_DETAILS_CONFIG_VC_H */ diff --git a/libodb-mysql/odb/mysql/details/build2/config.h b/libodb-mysql/odb/mysql/details/build2/config.h deleted file mode 100644 index ef6a60f..0000000 --- a/libodb-mysql/odb/mysql/details/build2/config.h +++ /dev/null @@ -1,17 +0,0 @@ -/* file : odb/mysql/details/build2/config.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Static configuration file for the build2 build. The installed case - (when LIBODB_MYSQL_BUILD2 is not necessarily defined) is the only - reason we have it. */ - -#ifndef ODB_MYSQL_DETAILS_CONFIG_H -#define ODB_MYSQL_DETAILS_CONFIG_H - -/* Define LIBODB_MYSQL_BUILD2 for the installed case. */ -#ifndef LIBODB_MYSQL_BUILD2 -# define LIBODB_MYSQL_BUILD2 -#endif - -#endif /* ODB_MYSQL_DETAILS_CONFIG_H */ diff --git a/libodb-mysql/odb/mysql/details/config.hxx b/libodb-mysql/odb/mysql/details/config.hxx index eeeee5c..f093e9d 100644 --- a/libodb-mysql/odb/mysql/details/config.hxx +++ b/libodb-mysql/odb/mysql/details/config.hxx @@ -8,23 +8,14 @@ #ifdef ODB_COMPILER # error libodb-mysql header included in odb-compiled header -#elif !defined(LIBODB_MYSQL_BUILD2) -# ifdef _MSC_VER -# include <odb/mysql/details/config-vc.h> -# else -# include <odb/mysql/details/config.h> -# endif #endif -// LIBODB_MYSQL_BUILD2 macro can be defined either by the buildfile or by the -// included odb/mysql/details/config*.h (see above). +// @@ TMP: drop (along with LIBODB_MYSQL_THR_KEY_VISIBLE) after 2.5.0. // -#ifdef LIBODB_MYSQL_BUILD2 -# ifdef LIBODB_MYSQL_INCLUDE_SHORT -# error mysql headers must be included with mysql/ prefix -# elif !defined(LIBODB_MYSQL_INCLUDE_LONG) -# define LIBODB_MYSQL_INCLUDE_LONG 1 -# endif +#ifdef LIBODB_MYSQL_INCLUDE_SHORT +# error mysql headers must be included with mysql/ prefix +#elif !defined(LIBODB_MYSQL_INCLUDE_LONG) +# define LIBODB_MYSQL_INCLUDE_LONG 1 #endif // no post diff --git a/libodb-mysql/odb/mysql/details/export.hxx b/libodb-mysql/odb/mysql/details/export.hxx index e7c3871..817c7a4 100644 --- a/libodb-mysql/odb/mysql/details/export.hxx +++ b/libodb-mysql/odb/mysql/details/export.hxx @@ -6,7 +6,11 @@ #include <odb/pre.hxx> -#include <odb/mysql/details/config.hxx> +// Note: do this check directly instead of including config.hxx. +// +#ifdef ODB_COMPILER +# error libodb-mysql header included in odb-compiled header +#endif // Normally we don't export class templates (but do complete specializations), // inline functions, and classes with only inline member functions. Exporting @@ -16,8 +20,6 @@ // used before their inline definition. The workaround is to reorder code. In // the end it's all trial and error. -#ifdef LIBODB_MYSQL_BUILD2 - #if defined(LIBODB_MYSQL_STATIC) // Using static. # define LIBODB_MYSQL_EXPORT #elif defined(LIBODB_MYSQL_STATIC_BUILD) // Building static. @@ -43,36 +45,6 @@ # define LIBODB_MYSQL_EXPORT // Using static or shared. #endif -#else // LIBODB_MYSQL_BUILD2 - -#ifdef LIBODB_MYSQL_STATIC_LIB -# define LIBODB_MYSQL_EXPORT -#else -# ifdef _WIN32 -# ifdef _MSC_VER -# ifdef LIBODB_MYSQL_DYNAMIC_LIB -# define LIBODB_MYSQL_EXPORT __declspec(dllexport) -# else -# define LIBODB_MYSQL_EXPORT __declspec(dllimport) -# endif -# else -# ifdef LIBODB_MYSQL_DYNAMIC_LIB -# ifdef DLL_EXPORT -# define LIBODB_MYSQL_EXPORT __declspec(dllexport) -# else -# define LIBODB_MYSQL_EXPORT -# endif -# else -# define LIBODB_MYSQL_EXPORT __declspec(dllimport) -# endif -# endif -# else -# define LIBODB_MYSQL_EXPORT -# endif -#endif - -#endif // LIBODB_MYSQL_BUILD2 - #include <odb/post.hxx> #endif // ODB_MYSQL_DETAILS_EXPORT_HXX diff --git a/libodb-mysql/odb/mysql/version-build2-stub.hxx b/libodb-mysql/odb/mysql/version-build2-stub.hxx deleted file mode 100644 index 72bb807..0000000 --- a/libodb-mysql/odb/mysql/version-build2-stub.hxx +++ /dev/null @@ -1,4 +0,0 @@ -// file : odb/mysql/version-build2-stub.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#include <odb/mysql/version.hxx> diff --git a/libodb-mysql/odb/mysql/version-build2.hxx b/libodb-mysql/odb/mysql/version-build2.hxx deleted file mode 100644 index e69de29..0000000 --- a/libodb-mysql/odb/mysql/version-build2.hxx +++ /dev/null diff --git a/libodb-mysql/odb/mysql/version.hxx b/libodb-mysql/odb/mysql/version.hxx index d778a10..e69de29 100644 --- a/libodb-mysql/odb/mysql/version.hxx +++ b/libodb-mysql/odb/mysql/version.hxx @@ -1,61 +0,0 @@ -// file : odb/mysql/version.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifdef LIBODB_MYSQL_BUILD2 -# include <odb/mysql/version-build2.hxx> -#else - -#ifndef ODB_MYSQL_VERSION_HXX -#define ODB_MYSQL_VERSION_HXX - -#include <odb/pre.hxx> - -#include <odb/mysql/details/config.hxx> - -#ifdef LIBODB_MYSQL_INCLUDE_SHORT -# include <mysql_version.h> -#else -# include <mysql/mysql_version.h> -#endif - -#include <odb/version.hxx> - -// Version format is AABBCCDD where -// -// AA - major version number -// BB - minor version number -// CC - bugfix version number -// DD - alpha / beta (DD + 50) version number -// -// When DD is not 00, 1 is subtracted from AABBCC. For example: -// -// Version AABBCCDD -// 2.0.0 02000000 -// 2.1.0 02010000 -// 2.1.1 02010100 -// 2.2.0.a1 02019901 -// 3.0.0.b2 02999952 -// - -// Check that we have compatible ODB version. -// -#if ODB_VERSION != 20476 -# error incompatible odb interface version detected -#endif - -// Check that we have a compatible MySQL version (5.0.3 or later). -// -#if !defined(MYSQL_VERSION_ID) || MYSQL_VERSION_ID < 50003 -# error incompatible MySQL version detected -#endif - -// libodb-mysql version: odb interface version plus the bugfix -// version. -// -#define LIBODB_MYSQL_VERSION 2049976 -#define LIBODB_MYSQL_VERSION_STR "2.5.0-b.26" - -#include <odb/post.hxx> - -#endif // ODB_MYSQL_VERSION_HXX -#endif // LIBODB_MYSQL_BUILD2 diff --git a/libodb-mysql/odb/mysql/version-build2.hxx.in b/libodb-mysql/odb/mysql/version.hxx.in index 3db7601..0526554 100644 --- a/libodb-mysql/odb/mysql/version-build2.hxx.in +++ b/libodb-mysql/odb/mysql/version.hxx.in @@ -1,9 +1,9 @@ -// file : odb/mysql/version-build2.hxx.in +// file : odb/mysql/version.hxx.in // license : GNU GPL v2; see accompanying LICENSE file #ifndef LIBODB_MYSQL_VERSION // Note: using the version macro itself. -// The numeric version format is AAAAABBBBBCCCCCDDDE where: +// New numeric version format is AAAAABBBBBCCCCCDDDE where: // // AAAAA - major version number // BBBBB - minor version number @@ -22,7 +22,7 @@ // 3.0.0-b.2 0000299999999995020 // 2.2.0-a.1.z 0000200001999990011 // -#define LIBODB_MYSQL_VERSION $libodb_mysql.version.project_number$ULL +#define LIBODB_MYSQL_VERSION_FULL $libodb_mysql.version.project_number$ULL #define LIBODB_MYSQL_VERSION_STR "$libodb_mysql.version.project$" #define LIBODB_MYSQL_VERSION_ID "$libodb_mysql.version.project_id$" @@ -57,6 +57,25 @@ #include <odb/version.hxx> -$libodb.check(LIBODB_VERSION, LIBODB_SNAPSHOT)$ +$libodb.check(LIBODB_VERSION_FULL, LIBODB_SNAPSHOT)$ + + +// Old/deprecated numeric version format is AABBCCDD where: +// +// AA - major version number +// BB - minor version number +// CC - bugfix version number +// DD - alpha / beta (DD + 50) version number +// +// When DD is not 00, 1 is subtracted from AABBCC. For example: +// +// Version AABBCCDD +// 2.0.0 02000000 +// 2.1.0 02010000 +// 2.1.1 02010100 +// 2.2.0.a1 02019901 +// 3.0.0.b2 02999952 +// +#define LIBODB_MYSQL_VERSION 2049976 #endif // LIBODB_MYSQL_VERSION |