diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-09-08 09:01:04 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-09-08 09:01:04 +0200 |
commit | 39223036869eaca2ef721f7affefa050005ccd75 (patch) | |
tree | 4cb56d6b5e96f3285c778493299ebd725d9ac42f | |
parent | 37e0c8b73068fc3c16201502c5b8dbee2b8e7605 (diff) |
Correct OCI version detection macros
-rw-r--r-- | odb/oracle/statement.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/odb/oracle/statement.cxx b/odb/oracle/statement.cxx index d69a409..64b5a7a 100644 --- a/odb/oracle/statement.cxx +++ b/odb/oracle/statement.cxx @@ -5,10 +5,6 @@ #include <oci.h> -#if OCI_MAJOR_VERSION >= 11 && OCI_MINOR_VERSION >= 2 -# define ODB_ORACLE_USE_64_BIT_ID -#endif - #include <odb/exceptions.hxx> // object_not_persistent #include <odb/oracle/statement.hxx> @@ -237,7 +233,8 @@ namespace odb bind& b (*reinterpret_cast<bind*> (context)); -#ifdef ODB_ORACLE_USE_64_BIT_ID +#if (OCI_MAJOR_VERSION == 11 && OCI_MINOR_VERSION >=2) \ + || OCI_MAJOR_VERSION > 11 *buffer = &b.id.value_64; **len = sizeof (unsigned long long); #else @@ -274,7 +271,8 @@ namespace odb conn_.error_handle (), data.count, 0, -#ifdef ODB_ORACLE_USE_64_BIT_ID +#if (OCI_MAJOR_VERSION == 11 && OCI_MINOR_VERSION >=2) \ + || OCI_MAJOR_VERSION > 11 sizeof (unsigned long long), #else sizeof (unsigned int), @@ -334,7 +332,8 @@ namespace odb unsigned long long insert_statement:: id () { -#ifdef ODB_ORACLE_USE_64_BIT_ID +#if (OCI_MAJOR_VERSION == 11 && OCI_MINOR_VERSION >=2) \ + || OCI_MAJOR_VERSION > 11 return id_bind_.id.value_64; #else return id_bind_.id.value_32; |