From 39223036869eaca2ef721f7affefa050005ccd75 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Thu, 8 Sep 2011 09:01:04 +0200 Subject: Correct OCI version detection macros --- odb/oracle/statement.cxx | 13 ++++++------- 1 file 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 -#if OCI_MAJOR_VERSION >= 11 && OCI_MINOR_VERSION >= 2 -# define ODB_ORACLE_USE_64_BIT_ID -#endif - #include // object_not_persistent #include @@ -237,7 +233,8 @@ namespace odb bind& b (*reinterpret_cast (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; -- cgit v1.1