aboutsummaryrefslogtreecommitdiffstats
path: root/databases/mysql-connector-odbc
diff options
context:
space:
mode:
authorbmah <bmah@FreeBSD.org>2002-03-02 05:32:07 +0800
committerbmah <bmah@FreeBSD.org>2002-03-02 05:32:07 +0800
commit01f758a1a53927e04dd74f85c80374530da7ca4a (patch)
treef44438c3adc4fc3cead0ae44b214a1bdb6fd59e8 /databases/mysql-connector-odbc
parent868e3136973bd51625543fd39fead64705a14094 (diff)
downloadfreebsd-ports-gnome-01f758a1a53927e04dd74f85c80374530da7ca4a.tar.gz
freebsd-ports-gnome-01f758a1a53927e04dd74f85c80374530da7ca4a.tar.zst
freebsd-ports-gnome-01f758a1a53927e04dd74f85c80374530da7ca4a.zip
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/mysql-connector-odbc')
-rw-r--r--databases/mysql-connector-odbc/Makefile8
-rw-r--r--databases/mysql-connector-odbc/files/patch-info.c34
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;