diff options
author | bmah <bmah@FreeBSD.org> | 2002-03-01 21:32:07 +0000 |
---|---|---|
committer | bmah <bmah@FreeBSD.org> | 2002-03-01 21:32:07 +0000 |
commit | 01f758a1a53927e04dd74f85c80374530da7ca4a (patch) | |
tree | f44438c3adc4fc3cead0ae44b214a1bdb6fd59e8 /databases/myodbc | |
parent | 868e3136973bd51625543fd39fead64705a14094 (diff) | |
download | FreeBSD-ports-01f758a1a53927e04dd74f85c80374530da7ca4a.zip FreeBSD-ports-01f758a1a53927e04dd74f85c80374530da7ca4a.tar.gz |
Add a knob to allow tweaking ODBCVER at port build time. One might
want to set ODBCVER=0x0300 to get long long integer support.
Approved by: "Erik H. Bakke" <ebakke@trolltech.com> (maintainer)
Diffstat (limited to 'databases/myodbc')
-rw-r--r-- | databases/myodbc/Makefile | 8 | ||||
-rw-r--r-- | databases/myodbc/files/patch-info.c | 34 |
2 files changed, 42 insertions, 0 deletions
diff --git a/databases/myodbc/Makefile b/databases/myodbc/Makefile index 3995532..7ec968d 100644 --- a/databases/myodbc/Makefile +++ b/databases/myodbc/Makefile @@ -35,6 +35,14 @@ LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc CONFIGURE_ARGS+= --with-odbc-ini=${LOCALBASE}/etc/libiodbc/odbc.ini .endif +# Allow a new value of ODBCVER to be set at build-time +.if defined(ODBCVER) +post-patch: + cd ${WRKSRC}; \ + ${MV} myodbc.h myodbc.h.orig; \ + ${SED} -e "s/ODBCVER 0x0250/ODBCVER ${ODBCVER}/" < myodbc.h.orig > myodbc.h +.endif + # XXX untested .if defined(STATIC) CONFIGURE_ARGS+= --enable-shared=no \ diff --git a/databases/myodbc/files/patch-info.c b/databases/myodbc/files/patch-info.c new file mode 100644 index 0000000..8ab380f --- /dev/null +++ b/databases/myodbc/files/patch-info.c @@ -0,0 +1,34 @@ +--- info.c.orig Thu Sep 20 02:04:08 2001 ++++ info.c Tue Feb 5 10:57:03 2002 +@@ -171,11 +171,13 @@ + *pcbInfoValue=(SQLSMALLINT) (strmake((char*) rgbInfoValue,"Y",cbInfoValueMax) + - (char*) rgbInfoValue); + break; ++#if (ODBCVER < 0x0300) + #ifdef SQL_MAX_IDENTIFIER_LEN + case SQL_MAX_IDENTIFIER_LEN: + *((SQLUSMALLINT*) rgbInfoValue)=NAME_LEN; + break; + #endif ++#endif + case SQL_CONCAT_NULL_BEHAVIOR: + *((SQLSMALLINT*) rgbInfoValue)=SQL_CB_NULL; + *pcbInfoValue=sizeof(SQLSMALLINT); +@@ -188,7 +190,7 @@ + #ifdef SQL_CURSOR_SENSITIVITY + case SQL_CURSOR_SENSITIVITY: + *((SQLUINTEGER*) rgbInfoValue)=SQL_UNSPECIFIED; +- break ++ break; + #endif + case SQL_DEFAULT_TXN_ISOLATION: + *((long*) rgbInfoValue)= DEFAULT_TXN_ISOLATION; +@@ -411,7 +413,7 @@ + *pcbInfoValue=sizeof(long); + break; + #if (ODBCVER >= 0x0300) +- case SQL_MAX_IDENTIFIER_LENGTH: ++ case SQL_MAX_IDENTIFIER_LEN: + *((long*) rgbInfoValue)=NAME_LEN; + *pcbInfoValue=sizeof(long); + break; |