diff options
author | Bruce A. Mah <bmah@FreeBSD.org> | 2002-03-01 21:32:07 +0000 |
---|---|---|
committer | Bruce A. Mah <bmah@FreeBSD.org> | 2002-03-01 21:32:07 +0000 |
commit | 1ee8f4b1e9ea44f94e2a270ba6280e6c30196ee3 (patch) | |
tree | 898742326ef84d5b713c8d25eb0a7077c239e5b4 /databases/mysql-connector-odbc | |
parent | 609aa9c847d5c28c026d24cc240b09a32c672131 (diff) | |
download | ports-1ee8f4b1e9ea44f94e2a270ba6280e6c30196ee3.tar.gz ports-1ee8f4b1e9ea44f94e2a270ba6280e6c30196ee3.zip |
Notes
Diffstat (limited to 'databases/mysql-connector-odbc')
-rw-r--r-- | databases/mysql-connector-odbc/Makefile | 8 | ||||
-rw-r--r-- | databases/mysql-connector-odbc/files/patch-info.c | 34 |
2 files changed, 42 insertions, 0 deletions
diff --git a/databases/mysql-connector-odbc/Makefile b/databases/mysql-connector-odbc/Makefile index 3995532fb655..7ec968d8cee5 100644 --- a/databases/mysql-connector-odbc/Makefile +++ b/databases/mysql-connector-odbc/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/mysql-connector-odbc/files/patch-info.c b/databases/mysql-connector-odbc/files/patch-info.c new file mode 100644 index 000000000000..8ab380fab4d7 --- /dev/null +++ b/databases/mysql-connector-odbc/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; |