From 14681a6608367c4de09d5c5eee399fd808ea6812 Mon Sep 17 00:00:00 2001 From: Max Khon Date: Tue, 27 Jan 2009 05:07:23 +0000 Subject: - Fix ODBCINT64 and UODBCINT64 definitions in unixodbc_conf.h Patch is taken from unixODBC CVS repository. Approved by: MAINTAINER --- databases/unixODBC/Makefile | 1 + databases/unixODBC/files/patch-exe-odbc-config.c | 19 ++++++++++++ databases/unixODBC/files/patch-include-sqltypes.h | 35 +++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 databases/unixODBC/files/patch-exe-odbc-config.c create mode 100644 databases/unixODBC/files/patch-include-sqltypes.h (limited to 'databases/unixODBC') diff --git a/databases/unixODBC/Makefile b/databases/unixODBC/Makefile index 2cecb7ece17c..802feffad4ab 100644 --- a/databases/unixODBC/Makefile +++ b/databases/unixODBC/Makefile @@ -7,6 +7,7 @@ PORTNAME= unixODBC PORTVERSION= 2.2.14 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= http://www.unixodbc.org/ diff --git a/databases/unixODBC/files/patch-exe-odbc-config.c b/databases/unixODBC/files/patch-exe-odbc-config.c new file mode 100644 index 000000000000..686da5ebaaae --- /dev/null +++ b/databases/unixODBC/files/patch-exe-odbc-config.c @@ -0,0 +1,19 @@ +--- exe/odbc-config.c.orig 2008/05/20 13:43:47 1.7 ++++ exe/odbc-config.c 2008/11/27 13:44:43 1.8 +@@ -66,12 +66,12 @@ + printf( "#ifndef HAVE_LONG_LONG\n #define HAVE_LONG_LONG\n#endif\n" ); + #endif + +-#ifdef ODBCINT64 +- printf( "#ifndef ODBCINT64\n #define ODBCINT64\n#endif\n" ); ++#ifdef ODBCINT64_TYPE ++ printf( "#ifndef ODBCINT64\n #define ODBCINT64 %s\n#endif\n", ODBCINT64_TYPE ); + #endif + +-#ifdef UODBCINT64 +- printf( "#ifndef UODBCINT64\n #define UODBCINT64\n#endif\n" ); ++#ifdef UODBCINT64_TYPE ++ printf( "#ifndef UODBCINT64\n #define UODBCINT64 %s\n#endif\n", UODBCINT64_TYPE ); + #endif + + #ifdef DISABLE_INI_CACHING diff --git a/databases/unixODBC/files/patch-include-sqltypes.h b/databases/unixODBC/files/patch-include-sqltypes.h new file mode 100644 index 000000000000..80b0bdfe07a5 --- /dev/null +++ b/databases/unixODBC/files/patch-include-sqltypes.h @@ -0,0 +1,35 @@ +--- include/sqltypes.h.orig 2008/10/31 16:22:18 1.26 ++++ include/sqltypes.h 2008/11/27 13:44:43 1.27 +@@ -49,7 +49,7 @@ + */ + + #ifndef SIZEOF_LONG_INT +-#include ++#include "unixodbc_conf.h" + #endif + + #ifndef SIZEOF_LONG_INT +@@ -371,10 +371,14 @@ + # if (SIZEOF_LONG_INT == 8) + # define ODBCINT64 long + # define UODBCINT64 unsigned long ++# define ODBCINT64_TYPE "long" ++# define UODBCINT64_TYPE "unsigned long" + # else + # ifdef HAVE_LONG_LONG + # define ODBCINT64 long long + # define UODBCINT64 unsigned long long ++# define ODBCINT64_TYPE "long long" ++# define UODBCINT64_TYPE "unsigned long long" + # else + /* + * may fail in some cases, but what else can we do ? +@@ -391,6 +395,8 @@ + }; + # define ODBCINT64 struct __bigint_struct + # define UODBCINT64 struct __bigint_struct_u ++# define ODBCINT64_TYPE "struct __bigint_struct" ++# define UODBCINT64_TYPE "struct __bigint_struct_u" + # endif + # endif + #endif -- cgit v1.2.3