diff options
Diffstat (limited to 'libodb')
-rw-r--r-- | libodb/manifest | 4 | ||||
-rw-r--r-- | libodb/odb/buildfile | 46 | ||||
-rw-r--r-- | libodb/odb/details/build2/config-stub.h | 5 | ||||
-rw-r--r-- | libodb/odb/details/build2/config-vc-stub.h | 5 | ||||
-rw-r--r-- | libodb/odb/details/build2/config-vc.h | 23 | ||||
-rw-r--r-- | libodb/odb/details/build2/config.h | 19 | ||||
-rw-r--r-- | libodb/odb/details/config-vc.h | 16 | ||||
-rw-r--r-- | libodb/odb/details/config.h | 18 | ||||
-rw-r--r-- | libodb/odb/details/config.h.in | 18 | ||||
-rw-r--r-- | libodb/odb/details/config.hxx | 8 | ||||
-rw-r--r-- | libodb/odb/details/export.hxx | 34 | ||||
-rw-r--r-- | libodb/odb/details/win32/dll.cxx | 7 | ||||
-rw-r--r-- | libodb/odb/query-dynamic.hxx | 22 | ||||
-rw-r--r-- | libodb/odb/version-build2-stub.hxx | 4 | ||||
-rw-r--r-- | libodb/odb/version-build2.hxx | 0 | ||||
-rw-r--r-- | libodb/odb/version.hxx | 43 | ||||
-rw-r--r-- | libodb/odb/version.hxx.in (renamed from libodb/odb/version-build2.hxx.in) | 37 |
17 files changed, 94 insertions, 215 deletions
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 |