Skip to content

Commit

Permalink
Rollback the code that wasn't needed and fixed the real problem of th…
Browse files Browse the repository at this point in the history
…e configure script missing checking the size of void*

git-svn-id: https://code.crt.realtors.org/svn/odbcretsdrv/ezrets/trunk@1392 fe7ac059-47f5-0310-8599-d0339b4e125c
  • Loading branch information
Keith T. Garner committed Jan 18, 2011
1 parent 872ba21 commit 5a2208b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ if test -n "$GCC"; then
fi

dnl AC_PROG_LIBTOOL
AC_CHECK_SIZEOF(void*)
AC_CHECK_SIZEOF(long)
AC_CHECK_TYPES(long long)
AC_CHECK_PROG(my_have_perl, perl, yes, no)
Expand Down
6 changes: 2 additions & 4 deletions project/driver/src/RetsENV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@
#include "EzLogger.h"
#include "StreamEzLogger.h"
#include "str_stream.h"
#include <boost/cast.hpp>

/* Double casts such as:
* foo = (SQLINTEGER) (SQLLEN) Value
* is a pattern I found in the iodbc source for circumstances like
* we have in this file (and the others.)
*/

namespace b = boost;
using namespace odbcrets;

RetsENV::RetsENV() : AbstractHandle(), mOdbcVersion(3)
Expand Down Expand Up @@ -135,11 +133,11 @@ SQLRETURN RetsENV::SQLSetEnvAttr(SQLINTEGER Attribute, SQLPOINTER Value,
switch (Attribute)
{
case SQL_ATTR_ODBC_VERSION:
mOdbcVersion = b::numeric_cast<SQLINTEGER>(reinterpret_cast<SQLLEN>(Value));
mOdbcVersion = (SQLINTEGER) (SQLLEN) Value;
break;

case SQL_ATTR_OUTPUT_NTS:
if (b::numeric_cast<SQLINTEGER>(reinterpret_cast<SQLLEN>(Value)) == SQL_TRUE)
if ((SQLINTEGER) (SQLLEN) Value == SQL_TRUE)
{
break;
}
Expand Down

0 comments on commit 5a2208b

Please sign in to comment.