aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-02-08 14:35:28 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-02-08 14:35:28 +0200
commit903869c797d4365678c928111f818a783fe2bd78 (patch)
tree40d4fb95bdcd130aaea40e87c06c37469c67ec5a
parentab8d0180ba3dcaa1e143a3cbad7be0ce6a846493 (diff)
Use ODB_DATABASE_* macros in headers compiled by ODB
On Windows DATABASE_* macros are defined by the project, not via a header.
-rw-r--r--common/bulk/test.hxx4
-rw-r--r--common/view/basics/test.hxx10
2 files changed, 6 insertions, 8 deletions
diff --git a/common/bulk/test.hxx b/common/bulk/test.hxx
index 1e7ce52..e390e52 100644
--- a/common/bulk/test.hxx
+++ b/common/bulk/test.hxx
@@ -5,7 +5,7 @@
#ifndef TEST_HXX
#define TEST_HXX
-#include <common/config.hxx> // HAVE_CXX11, DATABASE_*
+#include <common/config.hxx> // HAVE_CXX11
#include <string>
#include <memory> // std::auto_ptr, std::unique_ptr
@@ -213,7 +213,7 @@ namespace test7
// Test SQL Server optimistic concurrency with ROWVERSION.
//
-#ifdef DATABASE_MSSQL
+#ifdef ODB_DATABASE_MSSQL
#pragma db namespace table("t8_")
namespace test8
{
diff --git a/common/view/basics/test.hxx b/common/view/basics/test.hxx
index 87c4d76..fbe90ee 100644
--- a/common/view/basics/test.hxx
+++ b/common/view/basics/test.hxx
@@ -5,8 +5,6 @@
#ifndef TEST_HXX
#define TEST_HXX
-#include <common/config.hxx> // DATABASE_*
-
#include <string>
#include <vector>
#include <cstddef> // std::size_t
@@ -546,7 +544,7 @@ namespace test2
odb::nullable<int> id2;
};
-#if !defined(DATABASE_SQLITE) && !defined(DATABASE_COMMON)
+#if !defined(ODB_DATABASE_SQLITE) && !defined(ODB_DATABASE_COMMON)
#pragma db view object(obj2 = o2) object(obj1 = o1 right: o2::n == o1::n)
struct vright
@@ -557,9 +555,9 @@ namespace test2
#endif
-#if !defined(DATABASE_MYSQL) && \
- !defined(DATABASE_SQLITE) && \
- !defined(DATABASE_COMMON)
+#if !defined(ODB_DATABASE_MYSQL) && \
+ !defined(ODB_DATABASE_SQLITE) && \
+ !defined(ODB_DATABASE_COMMON)
#pragma db view object(obj1 = o1) object(obj2 = o2 full: o1::n == o2::n)
struct vfull