diff options
125 files changed, 538 insertions, 1748 deletions
@@ -62,7 +62,7 @@ bdep config link @mysql @host bdep init @sqlite -d libodb -d libodb-sqlite -d odb-tests ?sys:libsqlite3 bdep init @pgsql -d libodb -d libodb-pgsql -d odb-tests ?sys:libpq { @host }+ ?sys:psql/* -bdep init @mysql -d libodb -d libodb-mysql -d odb-tests ?sys:libmysqlclient { @host }+ ?sys:mysql-clent/* +bdep init @mysql -d libodb -d libodb-mysql -d odb-tests ?sys:libmysqlclient { @host }+ ?sys:mysql-client/* ``` You can also create a target configuration for testing multi-database @@ -96,11 +96,10 @@ b install: ../odb-install/odb/ ``` Note that if building manually (that is, without `bdep`) and in-source, then -the checked out `libodb/odb/version-build2.hxx` and -`libodb-*/odb/*/version-build2.hxx` files will be overwritten during the build -but these changes should be ignored. To do this automatically, run: +the checked out `odb/odb/version.hxx`, `libodb/odb/version.hxx`, and +`libodb-*/odb/*/version.hxx` files will be overwritten during the build but +these changes should be ignored. To do this automatically, run: ``` -git update-index --assume-unchanged \ - libodb/odb/version-build2.hxx libodb-*/odb/*/version-build2.hxx +git update-index --assume-unchanged odb/odb/version.hxx libodb/odb/version.hxx libodb-*/odb/*/version.hxx ``` diff --git a/libodb-boost/odb/boost/buildfile b/libodb-boost/odb/boost/buildfile index 751b56e..b8dd6d1 100644 --- a/libodb-boost/odb/boost/buildfile +++ b/libodb-boost/odb/boost/buildfile @@ -20,17 +20,16 @@ import int_libs = libodb%lib{odb} imp_libs = - lib{odb-boost}: {hxx ixx txx cxx}{** -version-build2} {hxx}{version-build2} \ - details/build2/{h}{*} \ - options{**} ../options{boost} \ - $imp_libs $int_libs + lib{odb-boost}: {hxx ixx txx cxx}{** -version} hxx{version} \ + options{**} ../options{boost} \ + $imp_libs $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) @@ -47,7 +46,7 @@ # Build options. # - cxx.poptions =+ "-I$out_root" "-I$src_root" -DLIBODB_BOOST_BUILD2 + cxx.poptions =+ "-I$out_root" "-I$src_root" obja{*}: cxx.poptions += -DLIBODB_BOOST_STATIC_BUILD objs{*}: cxx.poptions += -DLIBODB_BOOST_SHARED_BUILD @@ -56,38 +55,11 @@ # lib{odb-boost}: { - cxx.export.poptions = "-I$out_root" "-I$src_root" -DLIBODB_BOOST_BUILD2 + cxx.export.poptions = "-I$out_root" "-I$src_root" cxx.export.libs = $int_libs } liba{odb-boost}: cxx.export.poptions += -DLIBODB_BOOST_STATIC libs{odb-boost}: cxx.export.poptions += -DLIBODB_BOOST_SHARED - - # Installation tweaks. - # - install_include = [dir_path] include/odb/boost/ - - # We want these to be picked up whether LIBODB_BOOST_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-boost/odb/boost/details/build2/config-stub.h b/libodb-boost/odb/boost/details/build2/config-stub.h deleted file mode 100644 index 6f5f461..0000000 --- a/libodb-boost/odb/boost/details/build2/config-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/boost/details/build2/config-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/boost/details/config.h> diff --git a/libodb-boost/odb/boost/details/build2/config-vc-stub.h b/libodb-boost/odb/boost/details/build2/config-vc-stub.h deleted file mode 100644 index c6650f3..0000000 --- a/libodb-boost/odb/boost/details/build2/config-vc-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/boost/details/build2/config-vc-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/boost/details/config-vc.h> diff --git a/libodb-boost/odb/boost/details/build2/config-vc.h b/libodb-boost/odb/boost/details/build2/config-vc.h deleted file mode 100644 index 5cdff2b..0000000 --- a/libodb-boost/odb/boost/details/build2/config-vc.h +++ /dev/null @@ -1,15 +0,0 @@ -/* file : odb/boost/details/build2/config-vc.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Configuration file for Windows/VC++ for the build2 build. */ - -#ifndef ODB_BOOST_DETAILS_CONFIG_VC_H -#define ODB_BOOST_DETAILS_CONFIG_VC_H - -/* Define LIBODB_BOOST_BUILD2 for the installed case. */ -#ifndef LIBODB_BOOST_BUILD2 -# define LIBODB_BOOST_BUILD2 -#endif - -#endif /* ODB_BOOST_DETAILS_CONFIG_VC_H */ diff --git a/libodb-boost/odb/boost/details/build2/config.h b/libodb-boost/odb/boost/details/build2/config.h deleted file mode 100644 index ea24ba3..0000000 --- a/libodb-boost/odb/boost/details/build2/config.h +++ /dev/null @@ -1,17 +0,0 @@ -/* file : odb/boost/details/build2/config.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Static configuration file for the build2 build. The installed case - (when LIBODB_BOOST_BUILD2 is not necessarily defined) is the only - reason we have it. */ - -#ifndef ODB_BOOST_DETAILS_CONFIG_H -#define ODB_BOOST_DETAILS_CONFIG_H - -/* Define LIBODB_BOOST_BUILD2 for the installed case. */ -#ifndef LIBODB_BOOST_BUILD2 -# define LIBODB_BOOST_BUILD2 -#endif - -#endif /* ODB_BOOST_DETAILS_CONFIG_H */ diff --git a/libodb-boost/odb/boost/details/config-vc.h b/libodb-boost/odb/boost/details/config-vc.h deleted file mode 100644 index 687a1e1..0000000 --- a/libodb-boost/odb/boost/details/config-vc.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/boost/details/config-vc.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Dummy configuration file for Windows/VC++. */ diff --git a/libodb-boost/odb/boost/details/config.h.in b/libodb-boost/odb/boost/details/config.h.in deleted file mode 100644 index 3cfc3aa..0000000 --- a/libodb-boost/odb/boost/details/config.h.in +++ /dev/null @@ -1,12 +0,0 @@ -/* file : odb/boost/details/config.h.in - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* This file is automatically processed by configure. */ - -#ifndef ODB_BOOST_DETAILS_CONFIG_H -#define ODB_BOOST_DETAILS_CONFIG_H - -#undef LIBODB_BOOST_STATIC_LIB - -#endif /* ODB_BOOST_DETAILS_CONFIG_H */ diff --git a/libodb-boost/odb/boost/details/config.hxx b/libodb-boost/odb/boost/details/config.hxx index f0fe850..d5ddef8 100644 --- a/libodb-boost/odb/boost/details/config.hxx +++ b/libodb-boost/odb/boost/details/config.hxx @@ -7,13 +7,7 @@ // no pre #ifdef ODB_COMPILER -# define LIBODB_BOOST_STATIC_LIB -#elif !defined(LIBODB_BOOST_BUILD2) -# ifdef _MSC_VER -# include <odb/boost/details/config-vc.h> -# else -# include <odb/boost/details/config.h> -# endif +# define LIBODB_BOOST_STATIC #endif // no post diff --git a/libodb-boost/odb/boost/details/export.hxx b/libodb-boost/odb/boost/details/export.hxx index cb3b219..fa4e53c 100644 --- a/libodb-boost/odb/boost/details/export.hxx +++ b/libodb-boost/odb/boost/details/export.hxx @@ -6,7 +6,7 @@ #include <odb/pre.hxx> -#include <odb/boost/details/config.hxx> +#include <odb/boost/details/config.hxx> // LIBODB_BOOST_STATIC if ODB_COMPILER // Normally we don't export class templates (but do complete specializations), // inline functions, and classes with only inline member functions. Exporting @@ -16,8 +16,6 @@ // used before their inline definition. The workaround is to reorder code. In // the end it's all trial and error. -#ifdef LIBODB_BOOST_BUILD2 - #if defined(LIBODB_BOOST_STATIC) // Using static. # define LIBODB_BOOST_EXPORT #elif defined(LIBODB_BOOST_STATIC_BUILD) // Building static. @@ -43,36 +41,6 @@ # define LIBODB_BOOST_EXPORT // Using static or shared. #endif -#else // LIBODB_BOOST_BUILD2 - -#ifdef LIBODB_BOOST_STATIC_LIB -# define LIBODB_BOOST_EXPORT -#else -# ifdef _WIN32 -# ifdef _MSC_VER -# ifdef LIBODB_BOOST_DYNAMIC_LIB -# define LIBODB_BOOST_EXPORT __declspec(dllexport) -# else -# define LIBODB_BOOST_EXPORT __declspec(dllimport) -# endif -# else -# ifdef LIBODB_BOOST_DYNAMIC_LIB -# ifdef DLL_EXPORT -# define LIBODB_BOOST_EXPORT __declspec(dllexport) -# else -# define LIBODB_BOOST_EXPORT -# endif -# else -# define LIBODB_BOOST_EXPORT __declspec(dllimport) -# endif -# endif -# else -# define LIBODB_BOOST_EXPORT -# endif -#endif - -#endif // LIBODB_BOOST_BUILD2 - #include <odb/post.hxx> #endif // ODB_BOOST_DETAILS_EXPORT_HXX diff --git a/libodb-boost/odb/boost/version-build2-stub.hxx b/libodb-boost/odb/boost/version-build2-stub.hxx deleted file mode 100644 index e29f23c..0000000 --- a/libodb-boost/odb/boost/version-build2-stub.hxx +++ /dev/null @@ -1,4 +0,0 @@ -// file : odb/boost/version-build2-stub.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#include <odb/boost/version.hxx> diff --git a/libodb-boost/odb/boost/version-build2.hxx b/libodb-boost/odb/boost/version-build2.hxx deleted file mode 100644 index e69de29..0000000 --- a/libodb-boost/odb/boost/version-build2.hxx +++ /dev/null diff --git a/libodb-boost/odb/boost/version.hxx b/libodb-boost/odb/boost/version.hxx index c46e21a..e69de29 100644 --- a/libodb-boost/odb/boost/version.hxx +++ b/libodb-boost/odb/boost/version.hxx @@ -1,55 +0,0 @@ -// file : odb/boost/version.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifdef LIBODB_BOOST_BUILD2 -# include <odb/boost/version-build2.hxx> -#else - -#ifndef ODB_BOOST_VERSION_HXX -#define ODB_BOOST_VERSION_HXX - -#include <odb/pre.hxx> - -#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 - -// ODB Boost interface version: odb interface version plus the Boost interface -// version. -// -#define ODB_BOOST_VERSION 2047600 -#define ODB_BOOST_VERSION_STR "2.5.0-b.26" - -// libodb-boost version: odb interface version plus the bugfix version. Note -// that LIBODB_BOOST_VERSION is always greater or equal to ODB_BOOST_VERSION -// since if the Boost interface virsion is incremented then the bugfix version -// must be incremented as well. -// -#define LIBODB_BOOST_VERSION 2049976 -#define LIBODB_BOOST_VERSION_STR "2.5.0-b.26" - -#include <odb/post.hxx> - -#endif // ODB_BOOST_VERSION_HXX -#endif // LIBODB_BOOST_BUILD2 diff --git a/libodb-boost/odb/boost/version-build2.hxx.in b/libodb-boost/odb/boost/version.hxx.in index 37a1ffc..15aed4e 100644 --- a/libodb-boost/odb/boost/version-build2.hxx.in +++ b/libodb-boost/odb/boost/version.hxx.in @@ -1,13 +1,9 @@ -// file : odb/boost/version-build2.hxx.in +// file : odb/boost/version.hxx.in // license : GNU GPL v2; see accompanying LICENSE file #ifndef LIBODB_BOOST_VERSION // Note: using the version macro itself. -// @@ TODO: need to derive automatically (it is also hardcoded in *.options). -// -#define ODB_BOOST_VERSION 2047600 - -// The numeric version format is AAAAABBBBBCCCCCDDDE where: +// New numeric version format is AAAAABBBBBCCCCCDDDE where: // // AAAAA - major version number // BBBBB - minor version number @@ -26,7 +22,7 @@ // 3.0.0-b.2 0000299999999995020 // 2.2.0-a.1.z 0000200001999990011 // -#define LIBODB_BOOST_VERSION $libodb_boost.version.project_number$ULL +#define LIBODB_BOOST_VERSION_FULL $libodb_boost.version.project_number$ULL #define LIBODB_BOOST_VERSION_STR "$libodb_boost.version.project$" #define LIBODB_BOOST_VERSION_ID "$libodb_boost.version.project_id$" @@ -41,6 +37,38 @@ #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 +// + +// ODB Boost interface version: odb interface version plus the Boost interface +// version. +// +// NOTE: also hardcoded in *.options. +// +#define ODB_BOOST_VERSION 2047600 +#define ODB_BOOST_VERSION_STR "2.5.0-b.26" + +// libodb-boost version: odb interface version plus the bugfix version. Note +// that LIBODB_BOOST_VERSION is always greater or equal to ODB_BOOST_VERSION +// since if the Boost interface virsion is incremented then the bugfix version +// must be incremented as well. +// +#define LIBODB_BOOST_VERSION 2049976 #endif // LIBODB_BOOST_VERSION diff --git a/libodb-mssql/odb/mssql/buildfile b/libodb-mssql/odb/mssql/buildfile index 5a99ebc..a2b838f 100644 --- a/libodb-mssql/odb/mssql/buildfile +++ b/libodb-mssql/odb/mssql/buildfile @@ -14,17 +14,16 @@ imp_libs = if ($cc.target.class != 'windows') import imp_libs = libunixodbc%lib{odbc} -lib{odb-mssql}: {hxx ixx txx cxx}{* -version-build2} {hxx}{version-build2} \ - details/{hxx ixx txx cxx}{* -options} \ - details/build2/{h}{*} \ +lib{odb-mssql}: {hxx ixx txx cxx}{* -version} {hxx}{version} \ + details/{hxx ixx txx cxx}{* -options} \ $imp_libs $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) @@ -32,7 +31,7 @@ hxx{version-build2}: # Build options. # -cxx.poptions =+ "-I$out_root" "-I$src_root" -DLIBODB_MSSQL_BUILD2 +cxx.poptions =+ "-I$out_root" "-I$src_root" obja{*}: cxx.poptions += -DLIBODB_MSSQL_STATIC_BUILD objs{*}: cxx.poptions += -DLIBODB_MSSQL_SHARED_BUILD @@ -44,7 +43,7 @@ if ($cc.target.class == 'windows') # lib{odb-mssql}: { - cxx.export.poptions = "-I$out_root" "-I$src_root" -DLIBODB_MSSQL_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/mssql/ install = $install_include install.subdirs = true } - -# We want these to be picked up whether LIBODB_MSSQL_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-mssql/odb/mssql/details/build2/config-stub.h b/libodb-mssql/odb/mssql/details/build2/config-stub.h deleted file mode 100644 index e402d2f..0000000 --- a/libodb-mssql/odb/mssql/details/build2/config-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/mssql/details/build2/config-stub.h - * license : ODB NCUEL; see accompanying LICENSE file - */ - -#include <odb/mssql/details/config.h> diff --git a/libodb-mssql/odb/mssql/details/build2/config-vc-stub.h b/libodb-mssql/odb/mssql/details/build2/config-vc-stub.h deleted file mode 100644 index 36ae27f..0000000 --- a/libodb-mssql/odb/mssql/details/build2/config-vc-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/mssql/details/build2/config-vc-stub.h - * license : ODB NCUEL; see accompanying LICENSE file - */ - -#include <odb/mssql/details/config-vc.h> diff --git a/libodb-mssql/odb/mssql/details/build2/config-vc.h b/libodb-mssql/odb/mssql/details/build2/config-vc.h deleted file mode 100644 index 1489d09..0000000 --- a/libodb-mssql/odb/mssql/details/build2/config-vc.h +++ /dev/null @@ -1,15 +0,0 @@ -/* file : odb/mssql/details/build2/config-vc.h - * license : ODB NCUEL; see accompanying LICENSE file - */ - -/* Configuration file for Windows/VC++ for the build2 build. */ - -#ifndef ODB_MSSQL_DETAILS_CONFIG_VC_H -#define ODB_MSSQL_DETAILS_CONFIG_VC_H - -/* Define LIBODB_MSSQL_BUILD2 for the installed case. */ -#ifndef LIBODB_MSSQL_BUILD2 -# define LIBODB_MSSQL_BUILD2 -#endif - -#endif /* ODB_MSSQL_DETAILS_CONFIG_VC_H */ diff --git a/libodb-mssql/odb/mssql/details/build2/config.h b/libodb-mssql/odb/mssql/details/build2/config.h deleted file mode 100644 index de736e2..0000000 --- a/libodb-mssql/odb/mssql/details/build2/config.h +++ /dev/null @@ -1,17 +0,0 @@ -/* file : odb/mssql/details/build2/config.h - * license : ODB NCUEL; see accompanying LICENSE file - */ - -/* Static configuration file for the build2 build. The installed case - (when LIBODB_MSSQL_BUILD2 is not necessarily defined) is the only - reason we have it. */ - -#ifndef ODB_MSSQL_DETAILS_CONFIG_H -#define ODB_MSSQL_DETAILS_CONFIG_H - -/* Define LIBODB_MSSQL_BUILD2 for the installed case. */ -#ifndef LIBODB_MSSQL_BUILD2 -# define LIBODB_MSSQL_BUILD2 -#endif - -#endif /* ODB_MSSQL_DETAILS_CONFIG_H */ diff --git a/libodb-mssql/odb/mssql/details/config-vc.h b/libodb-mssql/odb/mssql/details/config-vc.h deleted file mode 100644 index e93b86b..0000000 --- a/libodb-mssql/odb/mssql/details/config-vc.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/mssql/details/config-vc.h - * license : ODB NCUEL; see accompanying LICENSE file - */ - -/* Dummy configuration file for Windows/VC++. */ diff --git a/libodb-mssql/odb/mssql/details/config.h.in b/libodb-mssql/odb/mssql/details/config.h.in deleted file mode 100644 index 9ddb75a..0000000 --- a/libodb-mssql/odb/mssql/details/config.h.in +++ /dev/null @@ -1,12 +0,0 @@ -/* file : odb/mssql/details/config.h.in - * license : ODB NCUEL; see accompanying LICENSE file - */ - -/* This file is automatically processed by configure. */ - -#ifndef ODB_MSSQL_DETAILS_CONFIG_H -#define ODB_MSSQL_DETAILS_CONFIG_H - -#undef LIBODB_MSSQL_STATIC_LIB - -#endif /* ODB_MSSQL_DETAILS_CONFIG_H */ diff --git a/libodb-mssql/odb/mssql/details/config.hxx b/libodb-mssql/odb/mssql/details/config.hxx index ff2a5af..1459f2f 100644 --- a/libodb-mssql/odb/mssql/details/config.hxx +++ b/libodb-mssql/odb/mssql/details/config.hxx @@ -8,12 +8,6 @@ #ifdef ODB_COMPILER # error libodb-mssql header included in odb-compiled header -#elif !defined(LIBODB_MSSQL_BUILD2) -# ifdef _MSC_VER -# include <odb/mssql/details/config-vc.h> -# else -# include <odb/mssql/details/config.h> -# endif #endif // no post diff --git a/libodb-mssql/odb/mssql/details/export.hxx b/libodb-mssql/odb/mssql/details/export.hxx index 94e762b..cd74078 100644 --- a/libodb-mssql/odb/mssql/details/export.hxx +++ b/libodb-mssql/odb/mssql/details/export.hxx @@ -6,7 +6,11 @@ #include <odb/pre.hxx> -#include <odb/mssql/details/config.hxx> +// Note: do this check directly instead of including config.hxx. +// +#ifdef ODB_COMPILER +# error libodb-mssql 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_MSSQL_BUILD2 - #if defined(LIBODB_MSSQL_STATIC) // Using static. # define LIBODB_MSSQL_EXPORT #elif defined(LIBODB_MSSQL_STATIC_BUILD) // Building static. @@ -43,36 +45,6 @@ # define LIBODB_MSSQL_EXPORT // Using static or shared. #endif -#else // LIBODB_MSSQL_BUILD2 - -#ifdef LIBODB_MSSQL_STATIC_LIB -# define LIBODB_MSSQL_EXPORT -#else -# ifdef _WIN32 -# ifdef _MSC_VER -# ifdef LIBODB_MSSQL_DYNAMIC_LIB -# define LIBODB_MSSQL_EXPORT __declspec(dllexport) -# else -# define LIBODB_MSSQL_EXPORT __declspec(dllimport) -# endif -# else -# ifdef LIBODB_MSSQL_DYNAMIC_LIB -# ifdef DLL_EXPORT -# define LIBODB_MSSQL_EXPORT __declspec(dllexport) -# else -# define LIBODB_MSSQL_EXPORT -# endif -# else -# define LIBODB_MSSQL_EXPORT __declspec(dllimport) -# endif -# endif -# else -# define LIBODB_MSSQL_EXPORT -# endif -#endif - -#endif // LIBODB_MSSQL_BUILD2 - #include <odb/post.hxx> #endif // ODB_MSSQL_DETAILS_EXPORT_HXX diff --git a/libodb-mssql/odb/mssql/version-build2-stub.hxx b/libodb-mssql/odb/mssql/version-build2-stub.hxx deleted file mode 100644 index 969ab3c..0000000 --- a/libodb-mssql/odb/mssql/version-build2-stub.hxx +++ /dev/null @@ -1,4 +0,0 @@ -// file : odb/mssql/version-build2-stub.hxx -// license : ODB NCUEL; see accompanying LICENSE file - -#include <odb/mssql/version.hxx> diff --git a/libodb-mssql/odb/mssql/version-build2.hxx b/libodb-mssql/odb/mssql/version-build2.hxx deleted file mode 100644 index e69de29..0000000 --- a/libodb-mssql/odb/mssql/version-build2.hxx +++ /dev/null diff --git a/libodb-mssql/odb/mssql/version.hxx b/libodb-mssql/odb/mssql/version.hxx index 5b6cc56..e69de29 100644 --- a/libodb-mssql/odb/mssql/version.hxx +++ b/libodb-mssql/odb/mssql/version.hxx @@ -1,48 +0,0 @@ -// file : odb/mssql/version.hxx -// license : ODB NCUEL; see accompanying LICENSE file - -#ifdef LIBODB_MSSQL_BUILD2 -# include <odb/mssql/version-build2.hxx> -#else - -#ifndef ODB_MSSQL_VERSION_HXX -#define ODB_MSSQL_VERSION_HXX - -#include <odb/pre.hxx> - -#include <odb/mssql/details/config.hxx> -#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 - -// libodb-mssql version: odb interface version plus the bugfix -// version. -// -#define LIBODB_MSSQL_VERSION 2049976 -#define LIBODB_MSSQL_VERSION_STR "2.5.0-b.26" - -#include <odb/post.hxx> - -#endif // ODB_MSSQL_VERSION_HXX -#endif // LIBODB_MSSQL_BUILD2 diff --git a/libodb-mssql/odb/mssql/version-build2.hxx.in b/libodb-mssql/odb/mssql/version.hxx.in index 9f57dfe..02a404f 100644 --- a/libodb-mssql/odb/mssql/version-build2.hxx.in +++ b/libodb-mssql/odb/mssql/version.hxx.in @@ -1,9 +1,9 @@ -// file : odb/mssql/version-build2.hxx.in +// file : odb/mssql/version.hxx.in // license : ODB NCUEL; see accompanying LICENSE file #ifndef LIBODB_MSSQL_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_MSSQL_VERSION $libodb_mssql.version.project_number$ULL +#define LIBODB_MSSQL_VERSION_FULL $libodb_mssql.version.project_number$ULL #define LIBODB_MSSQL_VERSION_STR "$libodb_mssql.version.project$" #define LIBODB_MSSQL_VERSION_ID "$libodb_mssql.version.project_id$" @@ -37,6 +37,24 @@ #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_MSSQL_VERSION 2049976 #endif // LIBODB_MSSQL_VERSION diff --git a/libodb-mysql/manifest b/libodb-mysql/manifest index 865ec62..e0b04f7 100644 --- a/libodb-mysql/manifest +++ b/libodb-mysql/manifest @@ -30,7 +30,6 @@ tests: odb-tests == $ \ builds: all builds: -wasm -builds: -( +windows &gcc ) ; MinGW GCC is not supported by libmysqlclient. build-auxiliary: *-mysql_* default-build-config: \ @@ -47,7 +46,6 @@ default-build-config: # multi-builds: all multi-builds: -wasm -multi-builds: -( +windows &gcc ) ; MinGW GCC is not supported by libmysqlclient. multi-builds: -( +windows -gcc ) multi-builds: &gcc multi-builds: &gcc-5+ @@ -70,7 +68,6 @@ multi-build-config: # custom-builds: latest custom-builds: -wasm -custom-builds: -( +windows &gcc ) ; MinGW GCC is not supported by libmysqlclient. custom-builds: -static ; Implementation uses plugins and requires -fPIC. #custom-build-bot: -- see below. custom-build-config: @@ -89,7 +86,6 @@ custom-build-config: # custom-multi-builds: latest custom-multi-builds: -wasm -custom-multi-builds: -( +windows &gcc ) ; MinGW GCC is not supported by libmysqlclient. custom-multi-builds: -static ; Implementation uses plugins and requires -fPIC. #custom-multi-build-bot: -- see below. custom-multi-build-config: 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 diff --git a/libodb-oracle/odb/oracle/buildfile b/libodb-oracle/odb/oracle/buildfile index c1cb778..8f6716a 100644 --- a/libodb-oracle/odb/oracle/buildfile +++ b/libodb-oracle/odb/oracle/buildfile @@ -13,17 +13,16 @@ if ($cc.target.class != 'windows') else import imp_libs = liboci%lib{oci} -lib{odb-oracle}: {hxx ixx txx cxx}{* -version-build2} {hxx}{version-build2} \ - details/{hxx ixx txx cxx}{* -options} \ - details/build2/{h}{*} \ +lib{odb-oracle}: {hxx ixx txx cxx}{* -version} {hxx}{version} \ + details/{hxx ixx txx cxx}{* -options} \ $imp_libs $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) @@ -31,7 +30,7 @@ hxx{version-build2}: # Build options. # -cxx.poptions =+ "-I$out_root" "-I$src_root" -DLIBODB_ORACLE_BUILD2 +cxx.poptions =+ "-I$out_root" "-I$src_root" obja{*}: cxx.poptions += -DLIBODB_ORACLE_STATIC_BUILD objs{*}: cxx.poptions += -DLIBODB_ORACLE_SHARED_BUILD @@ -40,7 +39,7 @@ objs{*}: cxx.poptions += -DLIBODB_ORACLE_SHARED_BUILD # lib{odb-oracle}: { - cxx.export.poptions = "-I$out_root" "-I$src_root" -DLIBODB_ORACLE_BUILD2 + cxx.export.poptions = "-I$out_root" "-I$src_root" cxx.export.libs = $int_libs } @@ -137,25 +136,3 @@ install_include = [dir_path] include/odb/oracle/ install = $install_include install.subdirs = true } - -# We want these to be picked up whether LIBODB_ORACLE_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-oracle/odb/oracle/details/build2/config-stub.h b/libodb-oracle/odb/oracle/details/build2/config-stub.h deleted file mode 100644 index 2159951..0000000 --- a/libodb-oracle/odb/oracle/details/build2/config-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/oracle/details/build2/config-stub.h - * license : ODB NCUEL; see accompanying LICENSE file - */ - -#include <odb/oracle/details/config.h> diff --git a/libodb-oracle/odb/oracle/details/build2/config-vc-stub.h b/libodb-oracle/odb/oracle/details/build2/config-vc-stub.h deleted file mode 100644 index 697da2e..0000000 --- a/libodb-oracle/odb/oracle/details/build2/config-vc-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/oracle/details/build2/config-vc-stub.h - * license : ODB NCUEL; see accompanying LICENSE file - */ - -#include <odb/oracle/details/config-vc.h> diff --git a/libodb-oracle/odb/oracle/details/build2/config-vc.h b/libodb-oracle/odb/oracle/details/build2/config-vc.h deleted file mode 100644 index 8b9dbdd..0000000 --- a/libodb-oracle/odb/oracle/details/build2/config-vc.h +++ /dev/null @@ -1,15 +0,0 @@ -/* file : odb/oracle/details/build2/config-vc.h - * license : ODB NCUEL; see accompanying LICENSE file - */ - -/* Configuration file for Windows/VC++ for the build2 build. */ - -#ifndef ODB_ORACLE_DETAILS_CONFIG_VC_H -#define ODB_ORACLE_DETAILS_CONFIG_VC_H - -/* Define LIBODB_ORACLE_BUILD2 for the installed case. */ -#ifndef LIBODB_ORACLE_BUILD2 -# define LIBODB_ORACLE_BUILD2 -#endif - -#endif /* ODB_ORACLE_DETAILS_CONFIG_VC_H */ diff --git a/libodb-oracle/odb/oracle/details/build2/config.h b/libodb-oracle/odb/oracle/details/build2/config.h deleted file mode 100644 index 017c1ba..0000000 --- a/libodb-oracle/odb/oracle/details/build2/config.h +++ /dev/null @@ -1,17 +0,0 @@ -/* file : odb/oracle/details/build2/config.h - * license : ODB NCUEL; see accompanying LICENSE file - */ - -/* Static configuration file for the build2 build. The installed case - (when LIBODB_ORACLE_BUILD2 is not necessarily defined) is the only - reason we have it. */ - -#ifndef ODB_ORACLE_DETAILS_CONFIG_H -#define ODB_ORACLE_DETAILS_CONFIG_H - -/* Define LIBODB_ORACLE_BUILD2 for the installed case. */ -#ifndef LIBODB_ORACLE_BUILD2 -# define LIBODB_ORACLE_BUILD2 -#endif - -#endif /* ODB_ORACLE_DETAILS_CONFIG_H */ diff --git a/libodb-oracle/odb/oracle/details/config-vc.h b/libodb-oracle/odb/oracle/details/config-vc.h deleted file mode 100644 index 8036f07..0000000 --- a/libodb-oracle/odb/oracle/details/config-vc.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/oracle/details/config-vc.h - * license : ODB NCUEL; see accompanying LICENSE file - */ - -/* Dummy configuration file for Windows/VC++. */ diff --git a/libodb-oracle/odb/oracle/details/config.h.in b/libodb-oracle/odb/oracle/details/config.h.in deleted file mode 100644 index 3624466..0000000 --- a/libodb-oracle/odb/oracle/details/config.h.in +++ /dev/null @@ -1,12 +0,0 @@ -/* file : odb/oracle/details/config.h.in - * license : ODB NCUEL; see accompanying LICENSE file - */ - -/* This file is automatically processed by configure. */ - -#ifndef ODB_ORACLE_DETAILS_CONFIG_H -#define ODB_ORACLE_DETAILS_CONFIG_H - -#undef LIBODB_ORACLE_STATIC_LIB - -#endif /* ODB_ORACLE_DETAILS_CONFIG_H */ diff --git a/libodb-oracle/odb/oracle/details/config.hxx b/libodb-oracle/odb/oracle/details/config.hxx index 89f715b..a9330a4 100644 --- a/libodb-oracle/odb/oracle/details/config.hxx +++ b/libodb-oracle/odb/oracle/details/config.hxx @@ -8,12 +8,6 @@ #ifdef ODB_COMPILER # error libodb-oracle header included in odb-compiled header -#elif !defined(LIBODB_ORACLE_BUILD2) -# ifdef _MSC_VER -# include <odb/oracle/details/config-vc.h> -# else -# include <odb/oracle/details/config.h> -# endif #endif // no post diff --git a/libodb-oracle/odb/oracle/details/export.hxx b/libodb-oracle/odb/oracle/details/export.hxx index 7a7aea5..788948a 100644 --- a/libodb-oracle/odb/oracle/details/export.hxx +++ b/libodb-oracle/odb/oracle/details/export.hxx @@ -6,7 +6,11 @@ #include <odb/pre.hxx> -#include <odb/oracle/details/config.hxx> +// Note: do this check directly instead of including config.hxx. +// +#ifdef ODB_COMPILER +# error libodb-oracle 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_ORACLE_BUILD2 - #if defined(LIBODB_ORACLE_STATIC) // Using static. # define LIBODB_ORACLE_EXPORT #elif defined(LIBODB_ORACLE_STATIC_BUILD) // Building static. @@ -43,36 +45,6 @@ # define LIBODB_ORACLE_EXPORT // Using static or shared. #endif -#else // LIBODB_ORACLE_BUILD2 - -#ifdef LIBODB_ORACLE_STATIC_LIB -# define LIBODB_ORACLE_EXPORT -#else -# ifdef _WIN32 -# ifdef _MSC_VER -# ifdef LIBODB_ORACLE_DYNAMIC_LIB -# define LIBODB_ORACLE_EXPORT __declspec(dllexport) -# else -# define LIBODB_ORACLE_EXPORT __declspec(dllimport) -# endif -# else -# ifdef LIBODB_ORACLE_DYNAMIC_LIB -# ifdef DLL_EXPORT -# define LIBODB_ORACLE_EXPORT __declspec(dllexport) -# else -# define LIBODB_ORACLE_EXPORT -# endif -# else -# define LIBODB_ORACLE_EXPORT __declspec(dllimport) -# endif -# endif -# else -# define LIBODB_ORACLE_EXPORT -# endif -#endif - -#endif // LIBODB_ORACLE_BUILD2 - #include <odb/post.hxx> #endif // ODB_ORACLE_DETAILS_EXPORT_HXX diff --git a/libodb-oracle/odb/oracle/version-build2-stub.hxx b/libodb-oracle/odb/oracle/version-build2-stub.hxx deleted file mode 100644 index d7da05c..0000000 --- a/libodb-oracle/odb/oracle/version-build2-stub.hxx +++ /dev/null @@ -1,4 +0,0 @@ -// file : odb/oracle/version-build2-stub.hxx -// license : ODB NCUEL; see accompanying LICENSE file - -#include <odb/oracle/version.hxx> diff --git a/libodb-oracle/odb/oracle/version-build2.hxx b/libodb-oracle/odb/oracle/version-build2.hxx deleted file mode 100644 index e69de29..0000000 --- a/libodb-oracle/odb/oracle/version-build2.hxx +++ /dev/null diff --git a/libodb-oracle/odb/oracle/version.hxx b/libodb-oracle/odb/oracle/version.hxx index 1523172..e69de29 100644 --- a/libodb-oracle/odb/oracle/version.hxx +++ b/libodb-oracle/odb/oracle/version.hxx @@ -1,48 +0,0 @@ -// file : odb/oracle/version.hxx -// license : ODB NCUEL; see accompanying LICENSE file - -#ifdef LIBODB_ORACLE_BUILD2 -# include <odb/oracle/version-build2.hxx> -#else - -#ifndef ODB_ORACLE_VERSION_HXX -#define ODB_ORACLE_VERSION_HXX - -#include <odb/pre.hxx> - -#include <odb/oracle/details/config.hxx> -#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 - -// libodb-oracle version: odb interface version plus the bugfix -// version. -// -#define LIBODB_ORACLE_VERSION 2049976 -#define LIBODB_ORACLE_VERSION_STR "2.5.0-b.26" - -#include <odb/post.hxx> - -#endif // ODB_ORACLE_VERSION_HXX -#endif // LIBODB_ORACLE_BUILD2 diff --git a/libodb-oracle/odb/oracle/version-build2.hxx.in b/libodb-oracle/odb/oracle/version.hxx.in index 6006a0e..c13ce47 100644 --- a/libodb-oracle/odb/oracle/version-build2.hxx.in +++ b/libodb-oracle/odb/oracle/version.hxx.in @@ -1,9 +1,9 @@ -// file : odb/oracle/version-build2.hxx.in +// file : odb/oracle/version.hxx.in // license : ODB NCUEL; see accompanying LICENSE file #ifndef LIBODB_ORACLE_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_ORACLE_VERSION $libodb_oracle.version.project_number$ULL +#define LIBODB_ORACLE_VERSION_FULL $libodb_oracle.version.project_number$ULL #define LIBODB_ORACLE_VERSION_STR "$libodb_oracle.version.project$" #define LIBODB_ORACLE_VERSION_ID "$libodb_oracle.version.project_id$" @@ -37,6 +37,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_ORACLE_VERSION 2049976 #endif // LIBODB_ORACLE_VERSION diff --git a/libodb-pgsql/odb/pgsql/buildfile b/libodb-pgsql/odb/pgsql/buildfile index f1d05b6..57d38f0 100644 --- a/libodb-pgsql/odb/pgsql/buildfile +++ b/libodb-pgsql/odb/pgsql/buildfile @@ -7,17 +7,16 @@ cli{*}: extension = cli import int_libs = libodb%lib{odb} import imp_libs = libpq%lib{pq} -lib{odb-pgsql}: {hxx ixx txx cxx}{* -version-build2} {hxx}{version-build2} \ - details/{hxx ixx txx cxx}{* -options} \ - details/build2/{h}{*} \ +lib{odb-pgsql}: {hxx ixx txx cxx}{* -version} {hxx}{version} \ + details/{hxx ixx txx cxx}{* -options} \ $imp_libs $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) @@ -25,7 +24,7 @@ hxx{version-build2}: # Build options. # -cxx.poptions =+ "-I$out_root" "-I$src_root" -DLIBODB_PGSQL_BUILD2 +cxx.poptions =+ "-I$out_root" "-I$src_root" obja{*}: cxx.poptions += -DLIBODB_PGSQL_STATIC_BUILD objs{*}: cxx.poptions += -DLIBODB_PGSQL_SHARED_BUILD @@ -34,7 +33,7 @@ objs{*}: cxx.poptions += -DLIBODB_PGSQL_SHARED_BUILD # lib{odb-pgsql}: { - cxx.export.poptions = "-I$out_root" "-I$src_root" -DLIBODB_PGSQL_BUILD2 + cxx.export.poptions = "-I$out_root" "-I$src_root" cxx.export.libs = $int_libs } @@ -131,25 +130,3 @@ install_include = [dir_path] include/odb/pgsql/ install = $install_include install.subdirs = true } - -# We want these to be picked up whether LIBODB_PGSQL_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-pgsql/odb/pgsql/details/build2/config-stub.h b/libodb-pgsql/odb/pgsql/details/build2/config-stub.h deleted file mode 100644 index 00c5940..0000000 --- a/libodb-pgsql/odb/pgsql/details/build2/config-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/pgsql/details/build2/config-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/pgsql/details/config.h> diff --git a/libodb-pgsql/odb/pgsql/details/build2/config-vc-stub.h b/libodb-pgsql/odb/pgsql/details/build2/config-vc-stub.h deleted file mode 100644 index 473cd96..0000000 --- a/libodb-pgsql/odb/pgsql/details/build2/config-vc-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/pgsql/details/build2/config-vc-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/pgsql/details/config-vc.h> diff --git a/libodb-pgsql/odb/pgsql/details/build2/config-vc.h b/libodb-pgsql/odb/pgsql/details/build2/config-vc.h deleted file mode 100644 index e9d9ade..0000000 --- a/libodb-pgsql/odb/pgsql/details/build2/config-vc.h +++ /dev/null @@ -1,15 +0,0 @@ -/* file : odb/pgsql/details/build2/config-vc.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Configuration file for Windows/VC++ for the build2 build. */ - -#ifndef ODB_PGSQL_DETAILS_CONFIG_VC_H -#define ODB_PGSQL_DETAILS_CONFIG_VC_H - -/* Define LIBODB_PGSQL_BUILD2 for the installed case. */ -#ifndef LIBODB_PGSQL_BUILD2 -# define LIBODB_PGSQL_BUILD2 -#endif - -#endif /* ODB_PGSQL_DETAILS_CONFIG_VC_H */ diff --git a/libodb-pgsql/odb/pgsql/details/build2/config.h b/libodb-pgsql/odb/pgsql/details/build2/config.h deleted file mode 100644 index b2a81b5..0000000 --- a/libodb-pgsql/odb/pgsql/details/build2/config.h +++ /dev/null @@ -1,17 +0,0 @@ -/* file : odb/pgsql/details/build2/config.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Static configuration file for the build2 build. The installed case - (when LIBODB_PGSQL_BUILD2 is not necessarily defined) is the only - reason we have it. */ - -#ifndef ODB_PGSQL_DETAILS_CONFIG_H -#define ODB_PGSQL_DETAILS_CONFIG_H - -/* Define LIBODB_PGSQL_BUILD2 for the installed case. */ -#ifndef LIBODB_PGSQL_BUILD2 -# define LIBODB_PGSQL_BUILD2 -#endif - -#endif /* ODB_PGSQL_DETAILS_CONFIG_H */ diff --git a/libodb-pgsql/odb/pgsql/details/config-vc.h b/libodb-pgsql/odb/pgsql/details/config-vc.h deleted file mode 100644 index 77a0be5..0000000 --- a/libodb-pgsql/odb/pgsql/details/config-vc.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/pgsql/details/config-vc.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Dummy configuration file for Windows/VC++. */ diff --git a/libodb-pgsql/odb/pgsql/details/config.h.in b/libodb-pgsql/odb/pgsql/details/config.h.in deleted file mode 100644 index 889023c..0000000 --- a/libodb-pgsql/odb/pgsql/details/config.h.in +++ /dev/null @@ -1,12 +0,0 @@ -/* file : odb/pgsql/details/config.h.in - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* This file is automatically processed by configure. */ - -#ifndef ODB_PGSQL_DETAILS_CONFIG_H -#define ODB_PGSQL_DETAILS_CONFIG_H - -#undef LIBODB_PGSQL_STATIC_LIB - -#endif /* ODB_PGSQL_DETAILS_CONFIG_H */ diff --git a/libodb-pgsql/odb/pgsql/details/config.hxx b/libodb-pgsql/odb/pgsql/details/config.hxx index 1340622..5bed468 100644 --- a/libodb-pgsql/odb/pgsql/details/config.hxx +++ b/libodb-pgsql/odb/pgsql/details/config.hxx @@ -8,12 +8,6 @@ #ifdef ODB_COMPILER # error libodb-pgsql header included in odb-compiled header -#elif !defined(LIBODB_PGSQL_BUILD2) -# ifdef _MSC_VER -# include <odb/pgsql/details/config-vc.h> -# else -# include <odb/pgsql/details/config.h> -# endif #endif // no post diff --git a/libodb-pgsql/odb/pgsql/details/export.hxx b/libodb-pgsql/odb/pgsql/details/export.hxx index 81ff6a0..73adc43 100644 --- a/libodb-pgsql/odb/pgsql/details/export.hxx +++ b/libodb-pgsql/odb/pgsql/details/export.hxx @@ -6,7 +6,11 @@ #include <odb/pre.hxx> -#include <odb/pgsql/details/config.hxx> +// Note: do this check directly instead of including config.hxx. +// +#ifdef ODB_COMPILER +# error libodb-pgsql 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_PGSQL_BUILD2 - #if defined(LIBODB_PGSQL_STATIC) // Using static. # define LIBODB_PGSQL_EXPORT #elif defined(LIBODB_PGSQL_STATIC_BUILD) // Building static. @@ -43,36 +45,6 @@ # define LIBODB_PGSQL_EXPORT // Using static or shared. #endif -#else // LIBODB_PGSQL_BUILD2 - -#ifdef LIBODB_PGSQL_STATIC_LIB -# define LIBODB_PGSQL_EXPORT -#else -# ifdef _WIN32 -# ifdef _MSC_VER -# ifdef LIBODB_PGSQL_DYNAMIC_LIB -# define LIBODB_PGSQL_EXPORT __declspec(dllexport) -# else -# define LIBODB_PGSQL_EXPORT __declspec(dllimport) -# endif -# else -# ifdef LIBODB_PGSQL_DYNAMIC_LIB -# ifdef DLL_EXPORT -# define LIBODB_PGSQL_EXPORT __declspec(dllexport) -# else -# define LIBODB_PGSQL_EXPORT -# endif -# else -# define LIBODB_PGSQL_EXPORT __declspec(dllimport) -# endif -# endif -# else -# define LIBODB_PGSQL_EXPORT -# endif -#endif - -#endif // LIBODB_PGSQL_BUILD2 - #include <odb/post.hxx> #endif // ODB_PGSQL_DETAILS_EXPORT_HXX diff --git a/libodb-pgsql/odb/pgsql/version-build2-stub.hxx b/libodb-pgsql/odb/pgsql/version-build2-stub.hxx deleted file mode 100644 index a99b093..0000000 --- a/libodb-pgsql/odb/pgsql/version-build2-stub.hxx +++ /dev/null @@ -1,4 +0,0 @@ -// file : odb/pgsql/version-build2-stub.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#include <odb/pgsql/version.hxx> diff --git a/libodb-pgsql/odb/pgsql/version-build2.hxx b/libodb-pgsql/odb/pgsql/version-build2.hxx deleted file mode 100644 index e69de29..0000000 --- a/libodb-pgsql/odb/pgsql/version-build2.hxx +++ /dev/null diff --git a/libodb-pgsql/odb/pgsql/version.hxx b/libodb-pgsql/odb/pgsql/version.hxx index e050de4..e69de29 100644 --- a/libodb-pgsql/odb/pgsql/version.hxx +++ b/libodb-pgsql/odb/pgsql/version.hxx @@ -1,48 +0,0 @@ -// file : odb/pgsql/version.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifdef LIBODB_PGSQL_BUILD2 -# include <odb/pgsql/version-build2.hxx> -#else - -#ifndef ODB_PGSQL_VERSION_HXX -#define ODB_PGSQL_VERSION_HXX - -#include <odb/pre.hxx> - -#include <odb/pgsql/details/config.hxx> -#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 - -// libodb-pgsql version: odb interface version plus the bugfix -// version. -// -#define LIBODB_PGSQL_VERSION 2049976 -#define LIBODB_PGSQL_VERSION_STR "2.5.0-b.26" - -#include <odb/post.hxx> - -#endif // ODB_PGSQL_VERSION_HXX -#endif // LIBODB_PGSQL_BUILD2 diff --git a/libodb-pgsql/odb/pgsql/version-build2.hxx.in b/libodb-pgsql/odb/pgsql/version.hxx.in index ed4396b..db8b152 100644 --- a/libodb-pgsql/odb/pgsql/version-build2.hxx.in +++ b/libodb-pgsql/odb/pgsql/version.hxx.in @@ -1,9 +1,9 @@ -// file : odb/pgsql/version-build2.hxx.in +// file : odb/pgsql/version.hxx.in // license : GNU GPL v2; see accompanying LICENSE file #ifndef LIBODB_PGSQL_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_PGSQL_VERSION $libodb_pgsql.version.project_number$ULL +#define LIBODB_PGSQL_VERSION_FULL $libodb_pgsql.version.project_number$ULL #define LIBODB_PGSQL_VERSION_STR "$libodb_pgsql.version.project$" #define LIBODB_PGSQL_VERSION_ID "$libodb_pgsql.version.project_id$" @@ -37,6 +37,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_PGSQL_VERSION 2049976 #endif // LIBODB_PGSQL_VERSION diff --git a/libodb-qt/odb/qt/buildfile b/libodb-qt/odb/qt/buildfile index 63e6c95..7fb051b 100644 --- a/libodb-qt/odb/qt/buildfile +++ b/libodb-qt/odb/qt/buildfile @@ -20,17 +20,16 @@ import int_libs = libodb%lib{odb} imp_libs = - lib{odb-qt}: {hxx ixx txx cxx}{** -version-build2} {hxx}{version-build2} \ - details/build2/{h}{*} \ - options{**} ../options{qt} \ - $imp_libs $int_libs + lib{odb-qt}: {hxx ixx txx cxx}{** -version} {hxx}{version} \ + options{**} ../options{qt} \ + $imp_libs $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) @@ -38,7 +37,7 @@ # Build options. # - cxx.poptions =+ "-I$out_root" "-I$src_root" -DLIBODB_QT_BUILD2 + cxx.poptions =+ "-I$out_root" "-I$src_root" obja{*}: cxx.poptions += -DLIBODB_QT_STATIC_BUILD objs{*}: cxx.poptions += -DLIBODB_QT_SHARED_BUILD @@ -47,7 +46,7 @@ # lib{odb-qt}: { - cxx.export.poptions = "-I$out_root" "-I$src_root" -DLIBODB_QT_BUILD2 + cxx.export.poptions = "-I$out_root" "-I$src_root" cxx.export.libs = $int_libs } @@ -62,32 +61,5 @@ lib{odb-qt}: bin.lib.version = @"-$version.project_id" else lib{odb-qt}: bin.lib.version = @"-$version.major.$version.minor" - - # Installation tweaks. - # - install_include = [dir_path] include/odb/qt/ - - # We want these to be picked up whether LIBODB_QT_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-qt/odb/qt/details/build2/config-stub.h b/libodb-qt/odb/qt/details/build2/config-stub.h deleted file mode 100644 index fbb2971..0000000 --- a/libodb-qt/odb/qt/details/build2/config-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/qt/details/build2/config-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/qt/details/config.h> diff --git a/libodb-qt/odb/qt/details/build2/config-vc-stub.h b/libodb-qt/odb/qt/details/build2/config-vc-stub.h deleted file mode 100644 index e6a412d..0000000 --- a/libodb-qt/odb/qt/details/build2/config-vc-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/qt/details/build2/config-vc-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/qt/details/config-vc.h> diff --git a/libodb-qt/odb/qt/details/build2/config-vc.h b/libodb-qt/odb/qt/details/build2/config-vc.h deleted file mode 100644 index 36113ce..0000000 --- a/libodb-qt/odb/qt/details/build2/config-vc.h +++ /dev/null @@ -1,15 +0,0 @@ -/* file : odb/qt/details/build2/config-vc.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Configuration file for Windows/VC++ for the build2 build. */ - -#ifndef ODB_QT_DETAILS_CONFIG_VC_H -#define ODB_QT_DETAILS_CONFIG_VC_H - -/* Define LIBODB_QT_BUILD2 for the installed case. */ -#ifndef LIBODB_QT_BUILD2 -# define LIBODB_QT_BUILD2 -#endif - -#endif /* ODB_QT_DETAILS_CONFIG_VC_H */ diff --git a/libodb-qt/odb/qt/details/build2/config.h b/libodb-qt/odb/qt/details/build2/config.h deleted file mode 100644 index 12d168f..0000000 --- a/libodb-qt/odb/qt/details/build2/config.h +++ /dev/null @@ -1,17 +0,0 @@ -/* file : odb/qt/details/build2/config.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Static configuration file for the build2 build. The installed case - (when LIBODB_QT_BUILD2 is not necessarily defined) is the only - reason we have it. */ - -#ifndef ODB_QT_DETAILS_CONFIG_H -#define ODB_QT_DETAILS_CONFIG_H - -/* Define LIBODB_QT_BUILD2 for the installed case. */ -#ifndef LIBODB_QT_BUILD2 -# define LIBODB_QT_BUILD2 -#endif - -#endif /* ODB_QT_DETAILS_CONFIG_H */ diff --git a/libodb-qt/odb/qt/details/config-vc.h b/libodb-qt/odb/qt/details/config-vc.h deleted file mode 100644 index 6718a07..0000000 --- a/libodb-qt/odb/qt/details/config-vc.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/qt/details/config-vc.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Dummy configuration file for Windows/VC++. */ diff --git a/libodb-qt/odb/qt/details/config.h.in b/libodb-qt/odb/qt/details/config.h.in deleted file mode 100644 index a0c3989..0000000 --- a/libodb-qt/odb/qt/details/config.h.in +++ /dev/null @@ -1,12 +0,0 @@ -/* file : odb/qt/details/config.h.in - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* This file is automatically processed by configure. */ - -#ifndef ODB_QT_DETAILS_CONFIG_H -#define ODB_QT_DETAILS_CONFIG_H - -#undef LIBODB_QT_STATIC_LIB - -#endif /* ODB_QT_DETAILS_CONFIG_H */ diff --git a/libodb-qt/odb/qt/details/config.hxx b/libodb-qt/odb/qt/details/config.hxx index 9077380..01a4eb5 100644 --- a/libodb-qt/odb/qt/details/config.hxx +++ b/libodb-qt/odb/qt/details/config.hxx @@ -24,13 +24,7 @@ # define __PIC__ # endif # endif -# define LIBODB_QT_STATIC_LIB -#elif !defined(LIBODB_QT_BUILD2) -# ifdef _MSC_VER -# include <odb/qt/details/config-vc.h> -# else -# include <odb/qt/details/config.h> -# endif +# define LIBODB_QT_STATIC #endif // no post diff --git a/libodb-qt/odb/qt/details/export.hxx b/libodb-qt/odb/qt/details/export.hxx index 4c0097f..f38d0ee 100644 --- a/libodb-qt/odb/qt/details/export.hxx +++ b/libodb-qt/odb/qt/details/export.hxx @@ -6,7 +6,7 @@ #include <odb/pre.hxx> -#include <odb/qt/details/config.hxx> +#include <odb/qt/details/config.hxx> // LIBODB_QT_STATIC if ODB_COMPILER // Normally we don't export class templates (but do complete specializations), // inline functions, and classes with only inline member functions. Exporting @@ -16,8 +16,6 @@ // used before their inline definition. The workaround is to reorder code. In // the end it's all trial and error. -#ifdef LIBODB_QT_BUILD2 - #if defined(LIBODB_QT_STATIC) // Using static. # define LIBODB_QT_EXPORT #elif defined(LIBODB_QT_STATIC_BUILD) // Building static. @@ -43,36 +41,6 @@ # define LIBODB_QT_EXPORT // Using static or shared. #endif -#else // LIBODB_QT_BUILD2 - -#ifdef LIBODB_QT_STATIC_LIB -# define LIBODB_QT_EXPORT -#else -# ifdef _WIN32 -# ifdef _MSC_VER -# ifdef LIBODB_QT_DYNAMIC_LIB -# define LIBODB_QT_EXPORT __declspec(dllexport) -# else -# define LIBODB_QT_EXPORT __declspec(dllimport) -# endif -# else -# ifdef LIBODB_QT_DYNAMIC_LIB -# ifdef DLL_EXPORT -# define LIBODB_QT_EXPORT __declspec(dllexport) -# else -# define LIBODB_QT_EXPORT -# endif -# else -# define LIBODB_QT_EXPORT __declspec(dllimport) -# endif -# endif -# else -# define LIBODB_QT_EXPORT -# endif -#endif - -#endif // LIBODB_QT_BUILD2 - #include <odb/post.hxx> #endif // ODB_QT_DETAILS_EXPORT_HXX diff --git a/libodb-qt/odb/qt/version-build2-stub.hxx b/libodb-qt/odb/qt/version-build2-stub.hxx deleted file mode 100644 index b00d1de..0000000 --- a/libodb-qt/odb/qt/version-build2-stub.hxx +++ /dev/null @@ -1,4 +0,0 @@ -// file : odb/qt/version-build2-stub.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#include <odb/qt/version.hxx> diff --git a/libodb-qt/odb/qt/version-build2.hxx b/libodb-qt/odb/qt/version-build2.hxx deleted file mode 100644 index e69de29..0000000 --- a/libodb-qt/odb/qt/version-build2.hxx +++ /dev/null diff --git a/libodb-qt/odb/qt/version.hxx b/libodb-qt/odb/qt/version.hxx index 4f9510a..e69de29 100644 --- a/libodb-qt/odb/qt/version.hxx +++ b/libodb-qt/odb/qt/version.hxx @@ -1,55 +0,0 @@ -// file : odb/qt/version.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifdef LIBODB_QT_BUILD2 -# include <odb/qt/version-build2.hxx> -#else - -#ifndef ODB_QT_VERSION_HXX -#define ODB_QT_VERSION_HXX - -#include <odb/pre.hxx> - -#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 - -// ODB Qt interface version: odb interface version plus the Qt interface -// version. -// -#define ODB_QT_VERSION 2047600 -#define ODB_QT_VERSION_STR "2.5.0-b.26" - -// libodb-qt version: odb interface version plus the bugfix version. Note -// that LIBODB_QT_VERSION is always greater or equal to ODB_QT_VERSION -// since if the Qt interface virsion is incremented then the bugfix version -// must be incremented as well. -// -#define LIBODB_QT_VERSION 2049976 -#define LIBODB_QT_VERSION_STR "2.5.0-b.26" - -#include <odb/post.hxx> - -#endif // ODB_QT_VERSION_HXX -#endif // LIBODB_QT_BUILD2 diff --git a/libodb-qt/odb/qt/version-build2.hxx.in b/libodb-qt/odb/qt/version.hxx.in index 51f1191..c7ce430 100644 --- a/libodb-qt/odb/qt/version-build2.hxx.in +++ b/libodb-qt/odb/qt/version.hxx.in @@ -1,13 +1,9 @@ -// file : odb/qt/version-build2.hxx.in +// file : odb/qt/version.hxx.in // license : GNU GPL v2; see accompanying LICENSE file #ifndef LIBODB_QT_VERSION // Note: using the version macro itself. -// @@ TODO: need to derive automatically (it is also hardcoded in *.options). -// -#define ODB_QT_VERSION 2047600 - -// The numeric version format is AAAAABBBBBCCCCCDDDE where: +// New numeric version format is AAAAABBBBBCCCCCDDDE where: // // AAAAA - major version number // BBBBB - minor version number @@ -26,7 +22,7 @@ // 3.0.0-b.2 0000299999999995020 // 2.2.0-a.1.z 0000200001999990011 // -#define LIBODB_QT_VERSION $libodb_qt.version.project_number$ULL +#define LIBODB_QT_VERSION_FULL $libodb_qt.version.project_number$ULL #define LIBODB_QT_VERSION_STR "$libodb_qt.version.project$" #define LIBODB_QT_VERSION_ID "$libodb_qt.version.project_id$" @@ -43,4 +39,37 @@ $libodb.check(LIBODB_VERSION, 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 +// + +// ODB Qt interface version: odb interface version plus the Qt interface +// version. +// +// NOTE: also hardcoded in *.options. +// +#define ODB_QT_VERSION 2047600 +#define ODB_QT_VERSION_STR "2.5.0-b.26" + +// libodb-qt version: odb interface version plus the bugfix version. Note +// that LIBODB_QT_VERSION is always greater or equal to ODB_QT_VERSION +// since if the Qt interface virsion is incremented then the bugfix version +// must be incremented as well. +// +#define LIBODB_QT_VERSION 2049976 + #endif // LIBODB_QT_VERSION diff --git a/libodb-sqlite/odb/sqlite/buildfile b/libodb-sqlite/odb/sqlite/buildfile index d2a6656..69d2425 100644 --- a/libodb-sqlite/odb/sqlite/buildfile +++ b/libodb-sqlite/odb/sqlite/buildfile @@ -7,17 +7,16 @@ cli{*}: extension = cli import int_libs = libodb%lib{odb} import int_libs += libsqlite3%lib{sqlite3} -lib{odb-sqlite}: {hxx ixx txx cxx}{* -version-build2} {hxx}{version-build2} \ - details/{hxx ixx txx cxx}{* -options} \ - details/build2/{h}{*} \ +lib{odb-sqlite}: {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) @@ -25,7 +24,7 @@ hxx{version-build2}: # Build options. # -cxx.poptions =+ "-I$out_root" "-I$src_root" -DLIBODB_SQLITE_BUILD2 +cxx.poptions =+ "-I$out_root" "-I$src_root" obja{*}: cxx.poptions += -DLIBODB_SQLITE_STATIC_BUILD objs{*}: cxx.poptions += -DLIBODB_SQLITE_SHARED_BUILD @@ -34,7 +33,7 @@ objs{*}: cxx.poptions += -DLIBODB_SQLITE_SHARED_BUILD # lib{odb-sqlite}: { - cxx.export.poptions = "-I$out_root" "-I$src_root" -DLIBODB_SQLITE_BUILD2 + cxx.export.poptions = "-I$out_root" "-I$src_root" cxx.export.libs = $int_libs } @@ -131,25 +130,3 @@ install_include = [dir_path] include/odb/sqlite/ install = $install_include install.subdirs = true } - -# We want these to be picked up whether LIBODB_SQLITE_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-sqlite/odb/sqlite/details/build2/config-stub.h b/libodb-sqlite/odb/sqlite/details/build2/config-stub.h deleted file mode 100644 index 34ba8ff..0000000 --- a/libodb-sqlite/odb/sqlite/details/build2/config-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/sqlite/details/build2/config-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/sqlite/details/config.h> diff --git a/libodb-sqlite/odb/sqlite/details/build2/config-vc-stub.h b/libodb-sqlite/odb/sqlite/details/build2/config-vc-stub.h deleted file mode 100644 index 70e3e93..0000000 --- a/libodb-sqlite/odb/sqlite/details/build2/config-vc-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/sqlite/details/build2/config-vc-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/sqlite/details/config-vc.h> diff --git a/libodb-sqlite/odb/sqlite/details/build2/config-vc.h b/libodb-sqlite/odb/sqlite/details/build2/config-vc.h deleted file mode 100644 index 75ce442..0000000 --- a/libodb-sqlite/odb/sqlite/details/build2/config-vc.h +++ /dev/null @@ -1,15 +0,0 @@ -/* file : odb/sqlite/details/build2/config-vc.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Configuration file for Windows/VC++ for the build2 build. */ - -#ifndef ODB_SQLITE_DETAILS_CONFIG_VC_H -#define ODB_SQLITE_DETAILS_CONFIG_VC_H - -/* Define LIBODB_SQLITE_BUILD2 for the installed case. */ -#ifndef LIBODB_SQLITE_BUILD2 -# define LIBODB_SQLITE_BUILD2 -#endif - -#endif /* ODB_SQLITE_DETAILS_CONFIG_VC_H */ diff --git a/libodb-sqlite/odb/sqlite/details/build2/config.h b/libodb-sqlite/odb/sqlite/details/build2/config.h deleted file mode 100644 index b4a1a1f..0000000 --- a/libodb-sqlite/odb/sqlite/details/build2/config.h +++ /dev/null @@ -1,17 +0,0 @@ -/* file : odb/sqlite/details/build2/config.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Static configuration file for the build2 build. The installed case - (when LIBODB_SQLITE_BUILD2 is not necessarily defined) is the only - reason we have it. */ - -#ifndef ODB_SQLITE_DETAILS_CONFIG_H -#define ODB_SQLITE_DETAILS_CONFIG_H - -/* Define LIBODB_SQLITE_BUILD2 for the installed case. */ -#ifndef LIBODB_SQLITE_BUILD2 -# define LIBODB_SQLITE_BUILD2 -#endif - -#endif /* ODB_SQLITE_DETAILS_CONFIG_H */ diff --git a/libodb-sqlite/odb/sqlite/details/config-vc.h b/libodb-sqlite/odb/sqlite/details/config-vc.h deleted file mode 100644 index f42c2a0..0000000 --- a/libodb-sqlite/odb/sqlite/details/config-vc.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/sqlite/details/config-vc.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Dummy configuration file for Windows/VC++. */ diff --git a/libodb-sqlite/odb/sqlite/details/config.h.in b/libodb-sqlite/odb/sqlite/details/config.h.in deleted file mode 100644 index a223ecb..0000000 --- a/libodb-sqlite/odb/sqlite/details/config.h.in +++ /dev/null @@ -1,14 +0,0 @@ -/* file : odb/sqlite/details/config.h.in - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* This file is automatically processed by configure. */ - -#ifndef ODB_SQLITE_DETAILS_CONFIG_H -#define ODB_SQLITE_DETAILS_CONFIG_H - -#undef LIBODB_SQLITE_STATIC_LIB -#undef LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY -#undef LIBODB_SQLITE_HAVE_COLUMN_METADATA - -#endif /* ODB_SQLITE_DETAILS_CONFIG_H */ diff --git a/libodb-sqlite/odb/sqlite/details/config.hxx b/libodb-sqlite/odb/sqlite/details/config.hxx index 4f1c5ce..98f4bca 100644 --- a/libodb-sqlite/odb/sqlite/details/config.hxx +++ b/libodb-sqlite/odb/sqlite/details/config.hxx @@ -8,26 +8,16 @@ #ifdef ODB_COMPILER # error libodb-sqlite header included in odb-compiled header -#elif !defined(LIBODB_SQLITE_BUILD2) -# ifdef _MSC_VER -# include <odb/sqlite/details/config-vc.h> -# else -# include <odb/sqlite/details/config.h> -# endif #endif -// LIBODB_SQLITE_BUILD2 macro can be defined either by the buildfile or by the -// included odb/sqlite/details/config*.h (see above). -// -#ifdef LIBODB_SQLITE_BUILD2 -# include <sqlite3.h> +#include <sqlite3.h> -# if SQLITE_VERSION_NUMBER >= 3006012 -# define LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY 1 -# endif -# define LIBODB_SQLITE_HAVE_COLUMN_METADATA 1 +#if SQLITE_VERSION_NUMBER >= 3006012 +# define LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY 1 #endif +#define LIBODB_SQLITE_HAVE_COLUMN_METADATA 1 + // no post #endif // ODB_SQLITE_DETAILS_CONFIG_HXX diff --git a/libodb-sqlite/odb/sqlite/details/export.hxx b/libodb-sqlite/odb/sqlite/details/export.hxx index c0903ae..639db2a 100644 --- a/libodb-sqlite/odb/sqlite/details/export.hxx +++ b/libodb-sqlite/odb/sqlite/details/export.hxx @@ -6,14 +6,10 @@ #include <odb/pre.hxx> +// Note: do this check directly instead of including config.hxx. +// #ifdef ODB_COMPILER # error libodb-sqlite header included in odb-compiled header -#elif !defined(LIBODB_SQLITE_BUILD2) -# ifdef _MSC_VER -# include <odb/sqlite/details/config-vc.h> -# else -# include <odb/sqlite/details/config.h> -# endif #endif // Normally we don't export class templates (but do complete specializations), @@ -24,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_SQLITE_BUILD2 - #if defined(LIBODB_SQLITE_STATIC) // Using static. # define LIBODB_SQLITE_EXPORT #elif defined(LIBODB_SQLITE_STATIC_BUILD) // Building static. @@ -51,36 +45,6 @@ # define LIBODB_SQLITE_EXPORT // Using static or shared. #endif -#else // LIBODB_SQLITE_BUILD2 - -#ifdef LIBODB_SQLITE_STATIC_LIB -# define LIBODB_SQLITE_EXPORT -#else -# ifdef _WIN32 -# ifdef _MSC_VER -# ifdef LIBODB_SQLITE_DYNAMIC_LIB -# define LIBODB_SQLITE_EXPORT __declspec(dllexport) -# else -# define LIBODB_SQLITE_EXPORT __declspec(dllimport) -# endif -# else -# ifdef LIBODB_SQLITE_DYNAMIC_LIB -# ifdef DLL_EXPORT -# define LIBODB_SQLITE_EXPORT __declspec(dllexport) -# else -# define LIBODB_SQLITE_EXPORT -# endif -# else -# define LIBODB_SQLITE_EXPORT __declspec(dllimport) -# endif -# endif -# else -# define LIBODB_SQLITE_EXPORT -# endif -#endif - -#endif // LIBODB_SQLITE_BUILD2 - #include <odb/post.hxx> #endif // ODB_SQLITE_DETAILS_EXPORT_HXX diff --git a/libodb-sqlite/odb/sqlite/version-build2-stub.hxx b/libodb-sqlite/odb/sqlite/version-build2-stub.hxx deleted file mode 100644 index a6bb4d0..0000000 --- a/libodb-sqlite/odb/sqlite/version-build2-stub.hxx +++ /dev/null @@ -1,4 +0,0 @@ -// file : odb/sqlite/version-build2-stub.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#include <odb/sqlite/version.hxx> diff --git a/libodb-sqlite/odb/sqlite/version-build2.hxx b/libodb-sqlite/odb/sqlite/version-build2.hxx deleted file mode 100644 index e69de29..0000000 --- a/libodb-sqlite/odb/sqlite/version-build2.hxx +++ /dev/null diff --git a/libodb-sqlite/odb/sqlite/version.hxx b/libodb-sqlite/odb/sqlite/version.hxx index ad468de..e69de29 100644 --- a/libodb-sqlite/odb/sqlite/version.hxx +++ b/libodb-sqlite/odb/sqlite/version.hxx @@ -1,47 +0,0 @@ -// file : odb/sqlite/version.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifdef LIBODB_SQLITE_BUILD2 -# include <odb/sqlite/version-build2.hxx> -#else - -#ifndef ODB_SQLITE_VERSION_HXX -#define ODB_SQLITE_VERSION_HXX - -#include <odb/pre.hxx> - -#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 - -// libodb-sqlite version: odb interface version plus the bugfix -// version. -// -#define LIBODB_SQLITE_VERSION 2049976 -#define LIBODB_SQLITE_VERSION_STR "2.5.0-b.26" - -#include <odb/post.hxx> - -#endif // ODB_SQLITE_VERSION_HXX -#endif // LIBODB_SQLITE_BUILD2 diff --git a/libodb-sqlite/odb/sqlite/version-build2.hxx.in b/libodb-sqlite/odb/sqlite/version.hxx.in index 50fef2d..c100d57 100644 --- a/libodb-sqlite/odb/sqlite/version-build2.hxx.in +++ b/libodb-sqlite/odb/sqlite/version.hxx.in @@ -1,9 +1,9 @@ -// file : odb/sqlite/version-build2.hxx.in +// file : odb/sqlite/version.hxx.in // license : GNU GPL v2; see accompanying LICENSE file #ifndef LIBODB_SQLITE_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_SQLITE_VERSION $libodb_sqlite.version.project_number$ULL +#define LIBODB_SQLITE_VERSION_FULL $libodb_sqlite.version.project_number$ULL #define LIBODB_SQLITE_VERSION_STR "$libodb_sqlite.version.project$" #define LIBODB_SQLITE_VERSION_ID "$libodb_sqlite.version.project_id$" @@ -37,6 +37,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_SQLITE_VERSION 2049976 #endif // LIBODB_SQLITE_VERSION diff --git a/libodb/manifest b/libodb/manifest index 860def0..725fc16 100644 --- a/libodb/manifest +++ b/libodb/manifest @@ -37,7 +37,6 @@ default-build-config: # multi-builds: all multi-builds: -wasm ; Not supported by libodb-{mysql,pgsql}. -multi-builds: -( +windows &gcc ) ; Not supported by libodb-mysql. multi-builds: -( +windows -gcc ) multi-builds: &gcc multi-builds: &gcc-5+ @@ -78,8 +77,7 @@ custom-build-config: # Complements the multi configuration (see odb-tests for background). # custom-multi-builds: latest -custom-multi-builds: -wasm ; Not supported by libodb-{mysql,pgsql}. -custom-multi-builds: -( +windows &gcc ) ; Not supported by libodb-mysql. +custom-multi-builds: -wasm ; Not supported by libodb-{mysql,pgsql}. custom-multi-builds: -static ; Implementation uses plugins and requires -fPIC. custom-multi-build-auxiliary-mysql: *-mysql_* custom-multi-build-auxiliary-pgsql: *-postgresql_* diff --git a/libodb/odb/buildfile b/libodb/odb/buildfile index ec95e94..903893f 100644 --- a/libodb/odb/buildfile +++ b/libodb/odb/buildfile @@ -1,21 +1,21 @@ # file : odb/buildfile # license : GNU GPL v2; see accompanying LICENSE file -lib{odb}: {hxx ixx txx cxx}{* -version-build2} \ - {hxx}{version-build2} \ - details/{hxx ixx txx}{*} \ - details/{cxx}{* -condition -lock -mutex} \ - details/build2/{h}{*} \ - details/meta/{hxx}{*} \ -details/shared-ptr/{hxx ixx txx cxx}{*} \ +lib{odb}: {hxx ixx txx cxx}{* -version} \ + {hxx}{version} \ + details/{hxx ixx txx}{*} \ + details/{cxx}{* -condition -lock -mutex} \ + details/{h}{*} \ + details/meta/{hxx}{*} \ +details/shared-ptr/{hxx ixx txx cxx}{*} \ details/win32/{hxx}{windows} # 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) @@ -23,14 +23,14 @@ hxx{version-build2}: # Build options. # -cxx.poptions =+ "-I$out_root" "-I$src_root" -DLIBODB_BUILD2 +cxx.poptions =+ "-I$out_root" "-I$src_root" obja{*}: cxx.poptions += -DLIBODB_STATIC_BUILD objs{*}: cxx.poptions += -DLIBODB_SHARED_BUILD # Export options. # -lib{odb}: cxx.export.poptions = "-I$out_root" "-I$src_root" -DLIBODB_BUILD2 +lib{odb}: cxx.export.poptions = "-I$out_root" "-I$src_root" liba{odb}: cxx.export.poptions += -DLIBODB_STATIC libs{odb}: cxx.export.poptions += -DLIBODB_SHARED @@ -49,7 +49,7 @@ else # install_include = [dir_path] include/odb/ -{hxx ixx txx}{*}: +{h hxx ixx txx}{*}: { install = $install_include install.subdirs = true @@ -58,24 +58,10 @@ install_include = [dir_path] include/odb/ if ($cxx.target.class != "windows") details/win32/*: install = false -# We want these to be picked up whether LIBODB_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/ +details/ { - 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 - } + if ($cxx.target.system != 'win32-msvc') + h{config-vc}@./: install = false else - { - h{config}@./: install = $install_include/details/ - h{config-stub}@./: install = $install_include/details/build2/config.h - } + h{config}@./: install = false } diff --git a/libodb/odb/details/build2/config-stub.h b/libodb/odb/details/build2/config-stub.h deleted file mode 100644 index 83ea927..0000000 --- a/libodb/odb/details/build2/config-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/details/build2/config-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/details/config.h> diff --git a/libodb/odb/details/build2/config-vc-stub.h b/libodb/odb/details/build2/config-vc-stub.h deleted file mode 100644 index e440e70..0000000 --- a/libodb/odb/details/build2/config-vc-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/details/build2/config-vc-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/details/config-vc.h> diff --git a/libodb/odb/details/build2/config-vc.h b/libodb/odb/details/build2/config-vc.h deleted file mode 100644 index 77ce106..0000000 --- a/libodb/odb/details/build2/config-vc.h +++ /dev/null @@ -1,23 +0,0 @@ -/* file : odb/details/build2/config-vc.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Configuration file for Windows/VC++ for the build2 build. */ - -#ifndef ODB_DETAILS_CONFIG_VC_H -#define ODB_DETAILS_CONFIG_VC_H - -/* Define LIBODB_BUILD2 for the installed case. */ -#ifndef LIBODB_BUILD2 -# define LIBODB_BUILD2 -#endif - -#ifndef ODB_THREADS_NONE -# if _MSC_VER >= 1900 -# define ODB_THREADS_CXX11 -# else -# error Unsupoprted MSVC version (no thread_local) -# endif -#endif - -#endif /* ODB_DETAILS_CONFIG_VC_H */ diff --git a/libodb/odb/details/build2/config.h b/libodb/odb/details/build2/config.h deleted file mode 100644 index ba434f4..0000000 --- a/libodb/odb/details/build2/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* file : odb/details/build2/config.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Static configuration file for the build2 build. */ - -#ifndef ODB_DETAILS_CONFIG_H -#define ODB_DETAILS_CONFIG_H - -/* Define LIBODB_BUILD2 for the installed case. */ -#ifndef LIBODB_BUILD2 -# define LIBODB_BUILD2 -#endif - -#ifndef ODB_THREADS_NONE -# define ODB_THREADS_CXX11 -#endif - -#endif /* ODB_DETAILS_CONFIG_H */ diff --git a/libodb/odb/details/config-vc.h b/libodb/odb/details/config-vc.h index b1e38b2..7c4def0 100644 --- a/libodb/odb/details/config-vc.h +++ b/libodb/odb/details/config-vc.h @@ -2,12 +2,22 @@ * license : GNU GPL v2; see accompanying LICENSE file */ -/* Configuration file for Windows/VC++. */ +/* Configuration file for Windows/VC++ for the build2 build. + * + * Note that currently we only support ODB_THREADS_NONE and ODB_THREADS_CXX11 + * but could also support the _WIN32 variant with a bit of effort. + * + */ #ifndef ODB_DETAILS_CONFIG_VC_H #define ODB_DETAILS_CONFIG_VC_H -#define ODB_THREADS_WIN32 -#define ODB_THREADS_TLS_DECLSPEC +#ifndef ODB_THREADS_NONE +# if _MSC_VER >= 1900 +# define ODB_THREADS_CXX11 +# else +# error Unsupoprted MSVC version (no thread_local) +# endif +#endif #endif /* ODB_DETAILS_CONFIG_VC_H */ diff --git a/libodb/odb/details/config.h b/libodb/odb/details/config.h new file mode 100644 index 0000000..4ad9a8d --- /dev/null +++ b/libodb/odb/details/config.h @@ -0,0 +1,18 @@ +/* file : odb/details/config.h + * license : GNU GPL v2; see accompanying LICENSE file + */ + +/* Static configuration file for build2 build. + * + * Note that currently we only support ODB_THREADS_NONE and ODB_THREADS_CXX11 + * but could also support the _POSIX and _WIN32 variants with a bit of effort. + */ + +#ifndef ODB_DETAILS_CONFIG_H +#define ODB_DETAILS_CONFIG_H + +#ifndef ODB_THREADS_NONE +# define ODB_THREADS_CXX11 +#endif + +#endif /* ODB_DETAILS_CONFIG_H */ diff --git a/libodb/odb/details/config.h.in b/libodb/odb/details/config.h.in deleted file mode 100644 index 2396606..0000000 --- a/libodb/odb/details/config.h.in +++ /dev/null @@ -1,18 +0,0 @@ -/* file : odb/details/config.h.in - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* This file is automatically processed by configure. */ - -#ifndef ODB_DETAILS_CONFIG_H -#define ODB_DETAILS_CONFIG_H - -#undef ODB_THREADS_NONE -#undef ODB_THREADS_POSIX -#undef ODB_THREADS_WIN32 -#undef ODB_THREADS_TLS_KEYWORD -#undef ODB_THREADS_TLS_DECLSPEC - -#undef LIBODB_STATIC_LIB - -#endif /* ODB_DETAILS_CONFIG_H */ diff --git a/libodb/odb/details/config.hxx b/libodb/odb/details/config.hxx index a42dd69..3168109 100644 --- a/libodb/odb/details/config.hxx +++ b/libodb/odb/details/config.hxx @@ -62,13 +62,7 @@ // #ifdef ODB_COMPILER # define ODB_THREADS_NONE -# define LIBODB_STATIC_LIB -#elif defined(LIBODB_BUILD2) -# if defined(_MSC_VER) -# include <odb/details/build2/config-vc.h> -# else -# include <odb/details/build2/config.h> -# endif +# define LIBODB_STATIC #elif defined(_MSC_VER) # include <odb/details/config-vc.h> #else diff --git a/libodb/odb/details/export.hxx b/libodb/odb/details/export.hxx index 80fe342..2ddc104 100644 --- a/libodb/odb/details/export.hxx +++ b/libodb/odb/details/export.hxx @@ -6,7 +6,7 @@ #include <odb/pre.hxx> -#include <odb/details/config.hxx> +#include <odb/details/config.hxx> // LIBODB_STATIC if ODB_COMPILER // Normally we don't export class templates (but do complete specializations), // inline functions, and classes with only inline member functions. Exporting @@ -16,8 +16,6 @@ // used before their inline definition. The workaround is to reorder code. In // the end it's all trial and error. -#ifdef LIBODB_BUILD2 - #if defined(LIBODB_STATIC) // Using static. # define LIBODB_EXPORT #elif defined(LIBODB_STATIC_BUILD) // Building static. @@ -43,36 +41,6 @@ # define LIBODB_EXPORT // Using static or shared. #endif -#else // LIBODB_BUILD2 - -#ifdef LIBODB_STATIC_LIB -# define LIBODB_EXPORT -#else -# ifdef _WIN32 -# ifdef _MSC_VER -# ifdef LIBODB_DYNAMIC_LIB -# define LIBODB_EXPORT __declspec(dllexport) -# else -# define LIBODB_EXPORT __declspec(dllimport) -# endif -# else -# ifdef LIBODB_DYNAMIC_LIB -# ifdef DLL_EXPORT -# define LIBODB_EXPORT __declspec(dllexport) -# else -# define LIBODB_EXPORT -# endif -# else -# define LIBODB_EXPORT __declspec(dllimport) -# endif -# endif -# else -# define LIBODB_EXPORT -# endif -#endif - -#endif // LIBODB_BUILD2 - #include <odb/post.hxx> #endif // ODB_DETAILS_EXPORT_HXX diff --git a/libodb/odb/details/win32/dll.cxx b/libodb/odb/details/win32/dll.cxx index 49b660c..3f674ba 100644 --- a/libodb/odb/details/win32/dll.cxx +++ b/libodb/odb/details/win32/dll.cxx @@ -1,12 +1,9 @@ // file : odb/details/win32/dll.cxx // license : GNU GPL v2; see accompanying LICENSE file -// If we are building a static library from VC++ (LIBODB_STATIC_LIB) or -// a static library from automake (!DLL_EXPORT), then omit DllMain. -// +// If we are building a static library then omit DllMain. -#if (defined(_MSC_VER) && defined(LIBODB_DYNAMIC_LIB)) || \ - (!defined(_MSC_VER) && defined(DLL_EXPORT)) +#ifdef LIBODB_SHARED_BUILD #include <odb/details/win32/windows.hxx> #include <odb/details/win32/init.hxx> diff --git a/libodb/odb/query-dynamic.hxx b/libodb/odb/query-dynamic.hxx index cd0ce05..8c4edae 100644 --- a/libodb/odb/query-dynamic.hxx +++ b/libodb/odb/query-dynamic.hxx @@ -361,10 +361,6 @@ namespace odb void* param_factory; }; - template <typename T> - const T& - type_instance (); - // This class template has to remain POD since we rely on it being // 0-initialized before any dynamic initialization takes place in // any other translation unit. @@ -892,7 +888,8 @@ namespace odb { // We can compare columns only if we can compare their C++ types. // - (void) (sizeof (type_instance<T> () == type_instance<T2> ())); + (void) (sizeof (decay_traits<T>::instance () == + decay_traits<T2>::instance ())); query_base q (native_info); q.append (c.native_info); @@ -906,7 +903,8 @@ namespace odb { // We can compare columns only if we can compare their C++ types. // - (void) (sizeof (type_instance<T> () != type_instance<T2> ())); + (void) (sizeof (decay_traits<T>::instance () != + decay_traits<T2>::instance ())); query_base q (native_info); q.append (c.native_info); @@ -920,7 +918,8 @@ namespace odb { // We can compare columns only if we can compare their C++ types. // - (void) (sizeof (type_instance<T> () < type_instance<T2> ())); + (void) (sizeof (decay_traits<T>::instance () < + decay_traits<T2>::instance ())); query_base q (native_info); q.append (c.native_info); @@ -934,7 +933,8 @@ namespace odb { // We can compare columns only if we can compare their C++ types. // - (void) (sizeof (type_instance<T> () > type_instance<T2> ())); + (void) (sizeof (decay_traits<T>::instance () > + decay_traits<T2>::instance ())); query_base q (native_info); q.append (c.native_info); @@ -948,7 +948,8 @@ namespace odb { // We can compare columns only if we can compare their C++ types. // - (void) (sizeof (type_instance<T> () <= type_instance<T2> ())); + (void) (sizeof (decay_traits<T>::instance () <= + decay_traits<T2>::instance ())); query_base q (native_info); q.append (c.native_info); @@ -962,7 +963,8 @@ namespace odb { // We can compare columns only if we can compare their C++ types. // - (void) (sizeof (type_instance<T> () >= type_instance<T2> ())); + (void) (sizeof (decay_traits<T>::instance () >= + decay_traits<T2>::instance ())); query_base q (native_info); q.append (c.native_info); diff --git a/libodb/odb/version-build2-stub.hxx b/libodb/odb/version-build2-stub.hxx deleted file mode 100644 index f4c7937..0000000 --- a/libodb/odb/version-build2-stub.hxx +++ /dev/null @@ -1,4 +0,0 @@ -// file : odb/version-build2-stub.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#include <odb/version.hxx> diff --git a/libodb/odb/version-build2.hxx b/libodb/odb/version-build2.hxx deleted file mode 100644 index e69de29..0000000 --- a/libodb/odb/version-build2.hxx +++ /dev/null diff --git a/libodb/odb/version.hxx b/libodb/odb/version.hxx index 4961e1a..e69de29 100644 --- a/libodb/odb/version.hxx +++ b/libodb/odb/version.hxx @@ -1,43 +0,0 @@ -// file : odb/version.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifdef LIBODB_BUILD2 -# include <odb/version-build2.hxx> -#else - -#ifndef ODB_VERSION_HXX -#define ODB_VERSION_HXX - -#include <odb/pre.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 -// - -// ODB interface version: minor, major, and alpha/beta versions. -// -#define ODB_VERSION 20476 -#define ODB_VERSION_STR "2.5-b.26" - -// libodb version: interface version plus the bugfix version. -// -#define LIBODB_VERSION 2049976 -#define LIBODB_VERSION_STR "2.5.0-b.26" - -#include <odb/post.hxx> - -#endif // ODB_VERSION_HXX -#endif // LIBODB_BUILD2 diff --git a/libodb/odb/version-build2.hxx.in b/libodb/odb/version.hxx.in index 3672585..178c8cc 100644 --- a/libodb/odb/version-build2.hxx.in +++ b/libodb/odb/version.hxx.in @@ -1,13 +1,9 @@ -// file : odb/version-build2.hxx.in +// file : odb/version.hxx.in // license : GNU GPL v2; see accompanying LICENSE file #ifndef LIBODB_VERSION // Note: using the version macro itself. -// For the ODB compiler (temporary). -// -#define ODB_VERSION 20476 - -// The numeric version format is AAAAABBBBBCCCCCDDDE where: +// New numeric version format is AAAAABBBBBCCCCCDDDE where: // // AAAAA - major version number // BBBBB - minor version number @@ -26,7 +22,7 @@ // 3.0.0-b.2 0000299999999995020 // 2.2.0-a.1.z 0000200001999990011 // -#define LIBODB_VERSION $libodb.version.project_number$ULL +#define LIBODB_VERSION_FULL $libodb.version.project_number$ULL #define LIBODB_VERSION_STR "$libodb.version.project$" #define LIBODB_VERSION_ID "$libodb.version.project_id$" @@ -39,4 +35,31 @@ #define LIBODB_SNAPSHOT $libodb.version.snapshot_sn$ULL #define LIBODB_SNAPSHOT_ID "$libodb.version.snapshot_id$" + +// 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 +// + +// ODB interface version: minor, major, and alpha/beta versions. +// +#define ODB_VERSION 20476 +#define ODB_VERSION_STR "2.5-b.26" + +// libodb version: interface version plus the bugfix version. +// +#define LIBODB_VERSION 2049976 + #endif // LIBODB_VERSION diff --git a/odb-tests/build/root.build b/odb-tests/build/root.build index 27552ac..41f0556 100644 --- a/odb-tests/build/root.build +++ b/odb-tests/build/root.build @@ -176,24 +176,6 @@ if! $skeleton } } - # @@ BUILD2 Clang issues the following warnings while compile the - # odb-generated headers: - # - # In file included from odb-tests/common/view/olv/test1-odb-sqlite.cxx:10: - # odb-tests/common/view/olv/test1-odb-sqlite.hxx:68:80: warning: instantiation of variable 'odb::query_columns<test1::object1, odb::id_common, odb::access::object_traits_impl< ::test1::object1, id_common>>::id' required here, but no definition is available [-Wundefined-var-template] - # 68 | id (query_columns< ::test1::object1, id_common, typename A::common_traits >::id, - # | ^ - # odb-tests/common/view/olv/test1-odb.hxx:91:21: note: forward declaration of template entity is here - # 91 | static id_type_ id; - # | ^ - # odb-tests/common/view/olv/test1-odb-sqlite.hxx:68:80: note: add an explicit instantiation declaration to suppress this warning if 'odb::query_columns<test1::object1, odb::id_common, odb::access::object_traits_impl< ::test1::object1, id_common>>::id' is explicitly instantiated in another translation unit - # 68 | id (query_columns< ::test1::object1, id_common, typename A::common_traits >::id, - # - # Note: -Wno-undefined-var-template is temporarily added to suppress them. - # - if ($cxx.id.type == 'clang') - cxx.coptions += -Wno-undefined-var-template - # Import odb that we are testing. # import! [metadata] odb = odb%exe{odb} diff --git a/odb-tests/common/circular/buildfile b/odb-tests/common/circular/buildfile new file mode 100644 index 0000000..2e793b9 --- /dev/null +++ b/odb-tests/common/circular/buildfile @@ -0,0 +1,9 @@ +# file : common/circular/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +./: {*/ -multiple/} + +# We cannot support this case in multi-database support since we need to +# generate extern template involving classes that participate in the cycle. +# +./: multiple/: include = (!$multi) diff --git a/odb-tests/common/query/array/driver.cxx b/odb-tests/common/query/array/driver.cxx index 9327751..43d91f2 100644 --- a/odb-tests/common/query/array/driver.cxx +++ b/odb-tests/common/query/array/driver.cxx @@ -143,27 +143,7 @@ main (int argc, char* argv[]) assert (size (db->query<object> ("s = " + query::_ref (s))) == 1); #endif - // @@ BUILD2 Ends up with the following warning, but strangely only in the - // multi-database mode: - // - // In file included from odb/odb-tests/common/query/array/test-odb.hxx:31, - // from odb/odb-tests/common/query/array/driver.cxx:20: - // odb/libodb/odb/query-dynamic.hxx: In instantiation of ‘odb::query_base odb::query_column<T>::operator==(const odb::query_column<T2>&) const [with T2 = char [17]; T = char [17]]’: - // odb/odb-tests/common/query/array/driver.cxx:144:7: required from here - // odb/libodb/odb/query-dynamic.hxx:895:43: error: comparison between two arrays is deprecated in C++20 [-Werror=array-compare] - // 895 | (void) (sizeof (type_instance<T> () == type_instance<T2> ())); - // | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ - // odb/libodb/odb/query-dynamic.hxx:895:43: note: use unary ‘+’ which decays operands to pointers or ‘&‘indirect_ref’ not supported by dump_decl<declaration error>[0] == &‘indirect_ref’ not supported by dump_decl<declaration error>[0]’ to compare the addresses - // - // Looks like compile-time assertion. Doesn't make much sense for - // arrays since compares pointers to objects rather than objects. - // Should we somehow suppress the assertion for arrays or similar? - // - // Note: temporarily ifndef-ed. - // -#ifndef MULTI_DATABASE assert (size (db->query<object> (query::s == query::s1)) == 3); -#endif // std::array // diff --git a/odb-tests/common/view/basics/buildfile b/odb-tests/common/view/basics/buildfile index d9738a4..2cccab2 100644 --- a/odb-tests/common/view/basics/buildfile +++ b/odb-tests/common/view/basics/buildfile @@ -35,6 +35,9 @@ odb_options = --table-prefix t_view_b_ \ --generate-query \ --generate-prepared +if $multi + odb_options += -DMULTI_DATABASE + cxx.poptions =+ "-I$out_base" "-I$src_base" # Testscript's run-time prerequisites. diff --git a/odb-tests/common/view/basics/driver.cxx b/odb-tests/common/view/basics/driver.cxx index e2f611a..419b29d 100644 --- a/odb-tests/common/view/basics/driver.cxx +++ b/odb-tests/common/view/basics/driver.cxx @@ -721,12 +721,7 @@ main (int argc, char* argv[]) t.commit (); } - // @@ BUILD2 Also disable for DATABASE_MYSQL and DATABASE_PGSQL (see - // vright definition for details). - // -#if !defined(DATABASE_MYSQL) && \ - !defined(DATABASE_SQLITE) && \ - !defined(DATABASE_PGSQL) +#if !defined(DATABASE_SQLITE) && !defined(MULTI_DATABASE) { typedef odb::query<vright> query; typedef odb::result<vright> result; @@ -743,12 +738,9 @@ main (int argc, char* argv[]) } #endif - // @@ BUILD2 Also disable for DATABASE_PGSQL (see vfull definition for - // details). - // -#if !defined(DATABASE_MYSQL) && \ - !defined(DATABASE_SQLITE) && \ - !defined(DATABASE_PGSQL) +#if !defined(DATABASE_SQLITE) && \ + !defined(DATABASE_MYSQL) && \ + !defined(MULTI_DATABASE) { typedef odb::query<vfull> query; typedef odb::result<vfull> result; diff --git a/odb-tests/common/view/basics/test.hxx b/odb-tests/common/view/basics/test.hxx index 130bcd4..25c502b 100644 --- a/odb-tests/common/view/basics/test.hxx +++ b/odb-tests/common/view/basics/test.hxx @@ -543,18 +543,7 @@ namespace test2 odb::nullable<int> id2; }; - // @@ BUILD2 Also disable for ODB_DATABASE_MYSQL and ODB_DATABASE_PGSQL, - // otherwise we end up with the following error: - // - // test-odb-mysql.hxx:3202:20: error: invalid use of incomplete type ‘class odb::access::view_traits<test2::vright>’ - // 3202 | public access::view_traits< ::test2::vright > - // | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // -//#if !defined(ODB_DATABASE_SQLITE) && !defined(ODB_DATABASE_COMMON) -#if !defined(ODB_DATABASE_MYSQL) && \ - !defined(ODB_DATABASE_SQLITE) && \ - !defined(ODB_DATABASE_PGSQL) && \ - !defined(ODB_DATABASE_COMMON) +#if !defined(ODB_DATABASE_SQLITE) && !defined(MULTI_DATABASE) #pragma db view object(obj2 = o2) object(obj1 = o1 right: o2::n == o1::n) struct vright @@ -565,22 +554,9 @@ namespace test2 #endif - // @@ BUILD2 Also disable for ODB_DATABASE_PGSQL, otherwise we end up with the - // following error: - // - // test-odb-pgsql.hxx:3325:20: error: invalid use of incomplete type ‘class odb::access::view_traits<test2::vfull>’ - // 3325 | public access::view_traits< ::test2::vfull > - // | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // -/* -#if !defined(ODB_DATABASE_MYSQL) && \ - !defined(ODB_DATABASE_SQLITE) && \ - !defined(ODB_DATABASE_COMMON) -*/ -#if !defined(ODB_DATABASE_MYSQL) && \ +#if !defined(ODB_DATABASE_MYSQL) && \ !defined(ODB_DATABASE_SQLITE) && \ - !defined(ODB_DATABASE_PGSQL) && \ - !defined(ODB_DATABASE_COMMON) + !defined(MULTI_DATABASE) #pragma db view object(obj1 = o1) object(obj2 = o2 full: o1::n == o2::n) struct vfull diff --git a/odb-tests/common/view/olv/driver.cxx b/odb-tests/common/view/olv/driver.cxx index c08015e..77cf76e 100644 --- a/odb-tests/common/view/olv/driver.cxx +++ b/odb-tests/common/view/olv/driver.cxx @@ -367,15 +367,7 @@ main (int argc, char* argv[]) transaction t (db->begin ()); session s; view2 v (db->query_value<view2> ()); - - // @@ BUILD2 As of cl 19.29.30136 (VS 2019 16.11.5) v.o2.o1 points to - // the address of o1 member of the object being returned by - // query_value<view2>() which v is a copy of, and thus the - // original assertion fails. Note that changing `view2 v` to - // `const view2& v` doesn't help. - // - //assert (v.o1.n == 123 && v.o2.s == "abc" && v.o2.o1 == &v.o1); - assert (v.o1.n == 123 && v.o2.s == "abc"); + assert (v.o1.n == 123 && v.o2.s == "abc" && v.o2.o1 == &v.o1); t.commit (); } diff --git a/odb-tests/common/view/olv/test4.hxx b/odb-tests/common/view/olv/test4.hxx index f2af5fd..4d8b804 100644 --- a/odb-tests/common/view/olv/test4.hxx +++ b/odb-tests/common/view/olv/test4.hxx @@ -6,6 +6,7 @@ #include <string> #include <memory> // shared_ptr +#include <cassert> #include <odb/core.hxx> @@ -90,6 +91,17 @@ namespace test4 object1 o1; object2 o2; + + view2 () {} + view2 (const view2& v) + : o1 (v.o1), o2 (v.o2) + { + if (v.o2.o1 != 0) + { + assert (v.o2.o1 == &v.o1); + o2.o1 = &o1; + } + } }; #pragma db view object(object1) object(object2) transient @@ -102,6 +114,17 @@ namespace test4 object1 o1; object2 o2; bool o2_null; + + view2a () {} + view2a (const view2a& v) + : o1 (v.o1), o2 (v.o2) + { + if (v.o2.o1 != 0) + { + assert (v.o2.o1 == &v.o1); + o2.o1 = &o1; + } + } }; // Test loading into raw pointer with non-raw object pointer. diff --git a/odb/odb/buildfile b/odb/odb/buildfile index 34a6329..96eb95f 100644 --- a/odb/odb/buildfile +++ b/odb/odb/buildfile @@ -78,7 +78,19 @@ switch $cxx.target.system plugin{odb}: cxx.loptions += -undefined dynamic_lookup } -libus{odb}: {hxx ixx txx cxx}{** -odb -options -pregenerated/**} $libs +libus{odb}: {hxx ixx txx cxx}{** -odb -version -options -pregenerated/**} \ + hxx{version} $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}: in{version} $src_root/manifest +hxx{version}: +{ + dist = true + clean = ($src_root != $out_root) +} # Build options. # @@ -86,7 +98,6 @@ libus{odb}: {hxx ixx txx cxx}{** -odb -options -pregenerated/**} $libs # cxx.poptions += "-I$plugin_dir/include" cxx.poptions += "-DODB_GXX_NAME=\"$regex.replace($gxx_name, '\\', '\\\\')\"" -cxx.poptions += -DODB_BUILD2 # @@ TMP while supporting other build systems. ## Consumption build ($develop == false). # diff --git a/odb/odb/common-query.cxx b/odb/odb/common-query.cxx index 517c92c..0b5d063 100644 --- a/odb/odb/common-query.cxx +++ b/odb/odb/common-query.cxx @@ -1031,14 +1031,30 @@ traverse (type& c) { // If we have the extern symbol, generate extern template declarations. // - if (!ext.empty ()) + // Without a declaration of explicit template instantiation Clang issues + // -Wundefined-var-template. Note that extern template is only available + // since C++11 and this only appears to be an issue in dynamic multi- + // database support for id_common. + // + // Note also that this break our support for multi-file circular + // dependencies (see odb-tests/common/circule/multiple/). + // + if (!ext.empty () || + (multi_dynamic && + db == database::common && + options.std () >= cxx_version::cxx11)) { bool has_ptr (has_a (c, test_pointer | exclude_base)); bool reuse_abst (abstract (c) && !polymorphic (c)); if (has_ptr || !reuse_abst) { - os << "#ifdef " << ext << endl + const string& guard ( + !ext.empty () + ? ext + : make_guard ("ODB_" + db.string () + "_QUERY_COLUMNS_DEF")); + + os << (!ext.empty () ? "#ifdef " : "#ifndef ") << guard << endl << endl; if (has_ptr) @@ -1055,7 +1071,7 @@ traverse (type& c) if (!reuse_abst) generate_inst (c); - os << "#endif // " << ext << endl + os << "#endif // " << guard << endl << endl; } } @@ -1128,7 +1144,7 @@ generate_inst (type& c) string const& type (class_fq_name (c)); // Explicit template instantiations. Here is what we need to - // instantiate + // instantiate: // // 1. Reuse inheritance bases all the way to the ultimate base. // Unlike poly inheritance, reuse inheritance uses the table @@ -1216,14 +1232,25 @@ generate_decl (type& c) // Do it before query_columns since the inheritance will trigger // instantiation and we won't be able to change visibility (GCC). // - if (obj_count != 0 && multi_dynamic && !ext.empty ()) + // See query_columns_type::traverse() for background. + // + if (obj_count != 0 && multi_dynamic && + (!ext.empty () || + (multi_dynamic && + db == database::common && + options.std () >= cxx_version::cxx11))) { - os << "#ifdef " << ext << endl + const string& guard ( + !ext.empty () + ? ext + : make_guard ("ODB_" + db.string () + "_QUERY_COLUMNS_DEF")); + + os << (!ext.empty () ? "#ifdef " : "#ifndef ") << guard << endl << endl; generate_inst (c); - os << "#endif // " << ext << endl + os << "#endif // " << guard << endl << endl; } diff --git a/odb/odb/context.cxx b/odb/odb/context.cxx index 13fc1b3..f678e64 100644 --- a/odb/odb/context.cxx +++ b/odb/odb/context.cxx @@ -2961,8 +2961,13 @@ strlit (string const& str) void context:: inst_header (bool decl, bool omit_exp) { - if (decl && !ext.empty ()) - os << ext << " "; + if (decl) + { + if (!ext.empty ()) + os << ext << " "; + else + os << "extern "; + } os << "template struct"; diff --git a/odb/odb/generator.cxx b/odb/odb/generator.cxx index ec0fefe..6348234 100644 --- a/odb/odb/generator.cxx +++ b/odb/odb/generator.cxx @@ -15,13 +15,8 @@ #include <libcutl/compiler/cxx-indenter.hxx> #include <libcutl/compiler/sloc-counter.hxx> -#ifdef ODB_BUILD2 #include <libstudxml/parser.hxx> #include <libstudxml/serializer.hxx> -#else -#include <libcutl/xml/parser.hxx> -#include <libcutl/xml/serializer.hxx> -#endif #include <odb/version.hxx> #include <odb/context.hxx> @@ -520,11 +515,12 @@ generate (options const& ops, "// Begin prologue.\n//", "//\n// End prologue."); - // Version check. + // Version check (see similar check in odb.cxx for background). // hxx << "#include <odb/version.hxx>" << endl << endl - << "#if (ODB_VERSION != " << ODB_VERSION << "UL)" << endl + << "#if LIBODB_VERSION_FULL != " << ODB_COMPILER_VERSION << "ULL || \\" << endl + << " LIBODB_SNAPSHOT != " << ODB_COMPILER_SNAPSHOT << "ULL" << endl << "#error ODB runtime version mismatch" << endl << "#endif" << endl << endl; diff --git a/odb/odb/header.cxx b/odb/odb/header.cxx index fad28b3..dacdd1d 100644 --- a/odb/odb/header.cxx +++ b/odb/odb/header.cxx @@ -777,7 +777,9 @@ namespace header << "#include <odb/wrapper-traits.hxx>" << endl << "#include <odb/pointer-traits.hxx>" << endl; -#ifndef ODB_BUILD2 + // @@ TMP: drop after 2.5.0. + // +#if 0 if (ctx.options.std () == cxx_version::cxx98) { // In case of a boost TR1 implementation, we cannot distinguish diff --git a/odb/odb/odb.cxx b/odb/odb/odb.cxx index 39079ea..2f2a75d 100644 --- a/odb/odb/odb.cxx +++ b/odb/odb/odb.cxx @@ -539,7 +539,6 @@ main (int argc, char* argv[]) if (plugin.empty ()) return 1; // Diagnostics has already been issued. -#ifdef ODB_BUILD2 #ifdef _WIN32 // Here is the problem: since the plugin is loaded by GCC (cc1plus.exe // to be precise), the DLL assembly magic we have for executables won't @@ -575,7 +574,6 @@ main (int argc, char* argv[]) _putenv (v.c_str ()); } #endif -#endif args[7] = "-fplugin=" + plugin.string (); } @@ -622,8 +620,8 @@ main (int argc, char* argv[]) o << "# build2 buildfile odb" << endl << "export.metadata = 1 odb" << endl << "odb.name = [string] odb" << endl - << "odb.version = [string] '" << ODB_COMPILER_VERSION_STR << '\'' << endl - << "odb.checksum = [string] '" << ODB_COMPILER_VERSION_STR << '\'' << endl + << "odb.version = [string] '" << ODB_COMPILER_VERSION_FULL << '\'' << endl + << "odb.checksum = [string] '" << ODB_COMPILER_VERSION_FULL << '\'' << endl << "odb.environment = [strings] CPATH CPLUS_INCLUDE_PATH GCC_EXEC_PREFIX COMPILER_PATH" << endl; return 0; @@ -636,13 +634,9 @@ main (int argc, char* argv[]) ostream& o (cout); o << "ODB object-relational mapping (ORM) compiler for C++ " - ODB_COMPILER_VERSION_STR << endl; - -#ifdef ODB_BUILD2 - o << "Copyright (c) " << ODB_COPYRIGHT << "." << endl; -#endif - - o << "This is free software; see the source for copying conditions. " + ODB_COMPILER_VERSION_STR << endl + << "Copyright (c) " << ODB_COPYRIGHT << "." << endl + << "This is free software; see the source for copying conditions. " << "There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS " << "FOR A PARTICULAR PURPOSE." << endl; @@ -742,7 +736,7 @@ main (int argc, char* argv[]) { ostringstream ostr; - ostr << ODB_COMPILER_VERSION; + ostr << ODB_COMPILER_VERSION_OLD; args.push_back ("-DODB_COMPILER_VERSION=" + ostr.str ()); } @@ -957,9 +951,14 @@ main (int argc, char* argv[]) // Make sure ODB compiler and libodb versions are compatible. // + // Note that the snapshot comparision is only necessary of the + // version is a pre-release but having it always won't hurt (it + // will be 0 for final versions). + // os << "#include <odb/version.hxx>" << endl << endl - << "#if ODB_VERSION != " << ODB_VERSION << endl + << "#if LIBODB_VERSION_FULL != " << ODB_COMPILER_VERSION << "ULL" + " || LIBODB_SNAPSHOT != " << ODB_COMPILER_SNAPSHOT << "ULL" << endl << "# error incompatible ODB compiler and runtime " << "versions" << endl << "#endif" << endl @@ -1165,7 +1164,8 @@ main (int argc, char* argv[]) // TR1 wrapper/pointer traits. // -#ifndef ODB_BUILD2 + // @@ TMP: drop after 2.5.0. +#if 0 if (ops.std () == cxx_version::cxx98) os << endl << "#ifndef BOOST_TR1_MEMORY_HPP_INCLUDED" << endl @@ -1610,16 +1610,14 @@ plugin_path (path const& drv, // bug in the extension stripping code. So for now we use the .so extension // everywhere (see also buildfile if changing this). // -//#elif defined(__APPLE__) && defined(ODB_BUILD2) +//#elif defined(__APPLE__) // char const plugin_ext[] = ".dylib"; #else char const plugin_ext[] = ".so"; #endif // Figure out the plugin base name which is just the driver name (but - // without the .exe extension on Windows). If the driver name starts with - // 'lt-', then we are running through the libtool script. Strip this prefix - // -- the shared object should be in the same directory. + // without the .exe extension on Windows). // #ifdef _WIN32 string b (drv.leaf ().base ().string ()); @@ -1627,10 +1625,6 @@ plugin_path (path const& drv, string b (drv.leaf ().string ()); #endif - bool lt (b.size () > 3 && b[0] == 'l' && b[1] == 't' && b[2] == '-'); - if (lt) - b = string (b, 3, string::npos); - path dp (driver_path (drv)); if (dp.empty ()) @@ -1642,19 +1636,7 @@ plugin_path (path const& drv, dp = dp.directory (); struct stat info; - // Regardless of whether we were given a plugin path, first try - // the current directory for the .la file. This will make sure - // running ODB from the build directory works as expected. - // - // @@ BUILD2: not going to work for build2 build. - // - path pp (dp / path (b + ".la")); - if (stat (pp.string ().c_str (), &info) == 0) - { - pp = dp / path (".libs") / path (b + ".so"); - if (stat (pp.string ().c_str (), &info) == 0) - return pp; - } + path pp; #ifdef ODB_GCC_PLUGIN_DIR // Plugin should be installed into the GCC default plugin directory. @@ -1663,9 +1645,9 @@ plugin_path (path const& drv, // was only added in GCC 4.6 so in order to support 4.5 we will have to // emulate it ourselves. // - if (!lt) + //@@ TMP: drop this after 2.5.0 since we no longer support GCC < 5. + // { - //@@ BUILD2: if/when dropping old GCC should just get rid of this. #if 1 // First get the default GCC plugin directory. // @@ -1715,10 +1697,8 @@ plugin_path (path const& drv, #endif } #elif defined (ODB_PLUGIN_PATH) - // If we were given a plugin path, use that unless we are running - // via libtool. + // If we were given a plugin path, use that. // - if (!lt) { string rp (ODB_PLUGIN_PATH); if (!rp.empty ()) diff --git a/odb/odb/semantics/relational/elements.hxx b/odb/odb/semantics/relational/elements.hxx index 06ec552..4036942 100644 --- a/odb/odb/semantics/relational/elements.hxx +++ b/odb/odb/semantics/relational/elements.hxx @@ -14,14 +14,8 @@ #include <libcutl/container/pointer-iterator.hxx> #include <libcutl/compiler/context.hxx> -#ifdef ODB_BUILD2 #include <libstudxml/parser.hxx> #include <libstudxml/serializer.hxx> -#else -#include <libcutl/xml/parser.hxx> -#include <libcutl/xml/serializer.hxx> -namespace cutl {namespace xml {typedef parser content;}} -#endif #include <odb/semantics/relational/name.hxx> diff --git a/odb/odb/version.hxx b/odb/odb/version.hxx index 4ad389a..e69de29 100644 --- a/odb/odb/version.hxx +++ b/odb/odb/version.hxx @@ -1,37 +0,0 @@ -// file : odb/version.hxx -// license : GNU GPL v3; see accompanying LICENSE file - -#ifndef ODB_VERSION_HXX -#define 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 -// - -// ODB interface version: minor, major, and alpha/beta versions. -// -#define ODB_VERSION 20476 -#define ODB_VERSION_STR "2.5-b.26" - -// ODB compiler version: interface version plus the bugfix version. -// -// NOTE: remember to update metadata to full version when switching to -// version.hxx.in. -// -#define ODB_COMPILER_VERSION 2049976 -#define ODB_COMPILER_VERSION_STR "2.5.0-b.26" - -#endif // ODB_VERSION_HXX diff --git a/odb/odb/version.hxx.in b/odb/odb/version.hxx.in new file mode 100644 index 0000000..a131c03 --- /dev/null +++ b/odb/odb/version.hxx.in @@ -0,0 +1,50 @@ +// file : odb/version.hxx.in +// license : GNU GPL v3; see accompanying LICENSE file + +#ifndef ODB_COMPILER_VERSION // Note: using the version macro itself. + +// New numeric version format is AAAAABBBBBCCCCCDDDE where: +// +// AAAAA - major version number +// BBBBB - minor version number +// CCCCC - bugfix version number +// DDD - alpha / beta (DDD + 500) version number +// E - final (0) / snapshot (1) +// +// When DDDE is not 0, 1 is subtracted from AAAAABBBBBCCCCC. For example: +// +// Version AAAAABBBBBCCCCCDDDE +// +// 0.1.0 0000000001000000000 +// 0.1.2 0000000001000020000 +// 1.2.3 0000100002000030000 +// 2.2.0-a.1 0000200001999990010 +// 3.0.0-b.2 0000299999999995020 +// 2.2.0-a.1.z 0000200001999990011 +// +#define ODB_COMPILER_VERSION $odb.version.project_number$ULL +#define ODB_COMPILER_VERSION_STR "$odb.version.project$" +#define ODB_COMPILER_VERSION_ID "$odb.version.project_id$" +#define ODB_COMPILER_VERSION_FULL "$odb.version$" + +#define ODB_COMPILER_SNAPSHOT $odb.version.snapshot_sn$ULL + +// 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 ODB_COMPILER_VERSION_OLD 2049976 + +#endif // ODB_COMPILER_VERSION |