mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
Fix build with unixODBC 2.2.14: in 2.2.14 signatures of several functions
(SQLExtendedFetch, SQLColAttribute, SQLColAttributeW) were fixed. Approved by: portmgr (marcus)
This commit is contained in:
parent
14681a6608
commit
3f65f803c1
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=226944
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= libodbc++
|
||||
PORTVERSION= 0.2.3
|
||||
PORTREVISION= 6
|
||||
PORTREVISION= 7
|
||||
CATEGORIES= databases devel
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= libodbcxx
|
||||
@ -40,8 +40,6 @@ CONFIGURE_ARGS+= --with-iodbc=${LOCALBASE}
|
||||
.elif defined(WITH_UNIXODBC)
|
||||
LIB_DEPENDS= odbc.1:${PORTSDIR}/databases/unixODBC
|
||||
CONFIGURE_ARGS+= --with-odbc=${LOCALBASE}
|
||||
|
||||
BROKEN= does not compile
|
||||
.endif
|
||||
|
||||
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION}
|
||||
|
@ -8,7 +8,7 @@
|
||||
PORTNAME= mysql-connector-odbc
|
||||
PORTVERSION= 3.51.26
|
||||
DISTVERSIONSUFFIX= r1127
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= ${MASTER_SITE_MYSQL}
|
||||
MASTER_SITE_SUBDIR= Connector-ODBC/3.51
|
||||
@ -45,9 +45,8 @@ WITH_UNIXODBC?= yes
|
||||
.endif
|
||||
|
||||
.if defined(WITH_UNIXODBC)
|
||||
BROKEN= does not compile
|
||||
|
||||
LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
|
||||
BUILD_DEPENDS= unixODBC>=2.2.14_1:${PORTSDIR}/databases/unixODBC
|
||||
CONFIGURE_ARGS+= --with-odbc-ini=${LOCALBASE}/etc/odbc.ini \
|
||||
--with-unixODBC=${LOCALBASE}
|
||||
CFLAGS+= ${PTHREAD_LIBS}
|
||||
|
@ -3,8 +3,9 @@
|
||||
@@ -174,7 +174,7 @@
|
||||
SQLLEN *pcbValue);
|
||||
SQLRETURN SQL_API my_SQLExtendedFetch(SQLHSTMT hstmt, SQLUSMALLINT fFetchType,
|
||||
SQLROWOFFSET irow, SQLULEN *pcrow,
|
||||
- SQLROWOFFSET irow, SQLULEN *pcrow,
|
||||
- SQLUSMALLINT FAR *rgfRowStatus, bool upd_status);
|
||||
+ SQLLEN irow, SQLULEN *pcrow,
|
||||
+ SQLUSMALLINT FAR *rgfRowStatus, my_bool upd_status);
|
||||
SQLRETURN copy_stmt_error(STMT FAR *src, STMT FAR *dst);
|
||||
int unireg_to_c_datatype(MYSQL_FIELD *field);
|
||||
|
@ -1,7 +1,11 @@
|
||||
--- driver/results.c.orig 2008-04-11 01:58:44.000000000 -0800
|
||||
+++ driver/results.c 2009-01-08 11:46:27.000000000 -0900
|
||||
@@ -1248,7 +1248,7 @@
|
||||
SQLROWOFFSET irow,
|
||||
--- driver/results.c.orig 2008-04-11 16:58:44.000000000 +0700
|
||||
+++ driver/results.c 2009-01-27 00:01:01.000000000 +0600
|
||||
@@ -1245,10 +1245,10 @@
|
||||
*/
|
||||
SQLRETURN SQL_API my_SQLExtendedFetch( SQLHSTMT hstmt,
|
||||
SQLUSMALLINT fFetchType,
|
||||
- SQLROWOFFSET irow,
|
||||
+ SQLLEN irow,
|
||||
SQLULEN *pcrow,
|
||||
SQLUSMALLINT FAR *rgfRowStatus,
|
||||
- bool upd_status )
|
||||
@ -9,3 +13,26 @@
|
||||
{
|
||||
ulong rows_to_fetch;
|
||||
long cur_row, max_row;
|
||||
@@ -1511,19 +1511,16 @@
|
||||
|
||||
SQLRETURN SQL_API SQLExtendedFetch( SQLHSTMT hstmt,
|
||||
SQLUSMALLINT fFetchType,
|
||||
- SQLROWOFFSET irow,
|
||||
- SQLROWSETSIZE *pcrow,
|
||||
+ SQLLEN irow,
|
||||
+ SQLULEN *pcrow,
|
||||
SQLUSMALLINT FAR *rgfRowStatus )
|
||||
{
|
||||
SQLRETURN rc;
|
||||
- SQLULEN rows;
|
||||
STMT_OPTIONS *options= &((STMT FAR *)hstmt)->stmt_options;
|
||||
|
||||
options->rowStatusPtr_ex= rgfRowStatus;
|
||||
|
||||
- rc= my_SQLExtendedFetch(hstmt, fFetchType, irow, &rows, rgfRowStatus, 1);
|
||||
- if (pcrow)
|
||||
- *pcrow= (SQLROWSETSIZE)rows;
|
||||
+ rc= my_SQLExtendedFetch(hstmt, fFetchType, irow, pcrow, rgfRowStatus, 1);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
38
databases/mysql-connector-odbc/files/patch-driver_utility.c
Normal file
38
databases/mysql-connector-odbc/files/patch-driver_utility.c
Normal file
@ -0,0 +1,38 @@
|
||||
--- driver/utility.c.orig 2009-01-27 00:14:43.000000000 +0600
|
||||
+++ driver/utility.c 2009-01-27 00:15:46.000000000 +0600
|
||||
@@ -504,11 +504,6 @@
|
||||
|
||||
return field_is_binary ? SQL_BINARY : SQL_CHAR;
|
||||
|
||||
- /*
|
||||
- MYSQL_TYPE_VARCHAR is never actually sent, this just silences
|
||||
- a compiler warning.
|
||||
- */
|
||||
- case MYSQL_TYPE_VARCHAR:
|
||||
case MYSQL_TYPE_VAR_STRING:
|
||||
if (buff)
|
||||
(void)strmov(buff, field_is_binary ? "varbinary" : "varchar");
|
||||
@@ -657,7 +652,6 @@
|
||||
|
||||
case MYSQL_TYPE_ENUM:
|
||||
case MYSQL_TYPE_SET:
|
||||
- case MYSQL_TYPE_VARCHAR:
|
||||
case MYSQL_TYPE_VAR_STRING:
|
||||
case MYSQL_TYPE_STRING:
|
||||
case MYSQL_TYPE_TINY_BLOB:
|
||||
@@ -783,7 +777,6 @@
|
||||
|
||||
case MYSQL_TYPE_ENUM:
|
||||
case MYSQL_TYPE_SET:
|
||||
- case MYSQL_TYPE_VARCHAR:
|
||||
case MYSQL_TYPE_VAR_STRING:
|
||||
case MYSQL_TYPE_STRING:
|
||||
case MYSQL_TYPE_TINY_BLOB:
|
||||
@@ -867,7 +860,6 @@
|
||||
|
||||
case MYSQL_TYPE_ENUM:
|
||||
case MYSQL_TYPE_SET:
|
||||
- case MYSQL_TYPE_VARCHAR:
|
||||
case MYSQL_TYPE_VAR_STRING:
|
||||
case MYSQL_TYPE_STRING:
|
||||
case MYSQL_TYPE_TINY_BLOB:
|
@ -21,6 +21,7 @@
|
||||
|
||||
PORTNAME= postgresql
|
||||
PORTVERSION= 08.03.0400
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= ${MASTER_SITE_PGSQL}
|
||||
MASTER_SITE_SUBDIR= odbc/versions/src
|
||||
@ -43,9 +44,8 @@ WITH_UNIXODBC= yes
|
||||
.if defined(WITH_UNIXODBC)
|
||||
# I.e. even if WITH_IODBC is defined
|
||||
LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
|
||||
BUILD_DEPENDS+= unixODBC>=2.2.14_1:${PORTSDIR}/databases/unixODBC
|
||||
CONFIGURE_ARGS+= --with-unixodbc=${LOCALBASE}
|
||||
|
||||
BROKEN= does not compile
|
||||
.else
|
||||
LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
|
||||
CONFIGURE_ARGS+= --with-iodbc=${LOCALBASE}
|
||||
|
32
databases/postgresql-odbc/files/patch-odbcapi.c
Normal file
32
databases/postgresql-odbc/files/patch-odbcapi.c
Normal file
@ -0,0 +1,32 @@
|
||||
--- odbcapi.c.orig 2009-01-26 23:29:21.000000000 +0600
|
||||
+++ odbcapi.c 2009-01-26 23:30:15.000000000 +0600
|
||||
@@ -1111,11 +1111,7 @@
|
||||
HSTMT hstmt,
|
||||
SQLUSMALLINT fFetchType,
|
||||
SQLLEN irow,
|
||||
-#ifdef WITH_UNIXODBC
|
||||
- SQLROWSETSIZE *pcrow,
|
||||
-#else
|
||||
SQLULEN *pcrow,
|
||||
-#endif /* WITH_UNIXODBC */
|
||||
SQLUSMALLINT *rgfRowStatus)
|
||||
{
|
||||
RETCODE ret;
|
||||
@@ -1125,17 +1121,7 @@
|
||||
ENTER_STMT_CS(stmt);
|
||||
SC_clear_error(stmt);
|
||||
StartRollbackState(stmt);
|
||||
-#ifdef WITH_UNIXODBC
|
||||
- {
|
||||
- SQLULEN retrieved;
|
||||
-
|
||||
- ret = PGAPI_ExtendedFetch(hstmt, fFetchType, irow, &retrieved, rgfRowStatus, 0, SC_get_ARDF(stmt)->size_of_rowset_odbc2);
|
||||
- if (pcrow)
|
||||
- *pcrow = retrieved;
|
||||
- }
|
||||
-#else
|
||||
ret = PGAPI_ExtendedFetch(hstmt, fFetchType, irow, pcrow, rgfRowStatus, 0, SC_get_ARDF(stmt)->size_of_rowset_odbc2);
|
||||
-#endif /* WITH_UNIXODBC */
|
||||
stmt->transition_status = STMT_TRANSITION_EXTENDED_FETCH;
|
||||
ret = DiscardStatementSvp(stmt, ret, FALSE);
|
||||
LEAVE_STMT_CS(stmt);
|
13
databases/postgresql-odbc/files/patch-odbcapi30.c
Normal file
13
databases/postgresql-odbc/files/patch-odbcapi30.c
Normal file
@ -0,0 +1,13 @@
|
||||
--- odbcapi30.c.orig 2009-01-26 23:20:59.000000000 +0600
|
||||
+++ odbcapi30.c 2009-01-26 23:21:47.000000000 +0600
|
||||
@@ -118,9 +118,7 @@
|
||||
SQLPOINTER CharacterAttribute,
|
||||
SQLSMALLINT BufferLength,
|
||||
SQLSMALLINT *StringLength,
|
||||
-#if defined(_WIN64)
|
||||
- SQLLEN *NumericAttribute
|
||||
-#elif defined(WITH_UNIXODBC) || defined(WIN32)
|
||||
+#if defined(WIN32)
|
||||
SQLPOINTER NumericAttribute
|
||||
#else
|
||||
SQLLEN *NumericAttribute
|
11
databases/postgresql-odbc/files/patch-odbcapi30w.c
Normal file
11
databases/postgresql-odbc/files/patch-odbcapi30w.c
Normal file
@ -0,0 +1,11 @@
|
||||
--- odbcapi30w.c.orig 2009-01-26 23:23:19.000000000 +0600
|
||||
+++ odbcapi30w.c 2009-01-26 23:24:07.000000000 +0600
|
||||
@@ -255,7 +255,7 @@
|
||||
SQLPOINTER pCharAttr,
|
||||
SQLSMALLINT cbCharAttrMax,
|
||||
SQLSMALLINT *pcbCharAttr,
|
||||
-#if defined(WITH_UNIXODBC) || (defined(WIN32) && ! defined(_WIN64))
|
||||
+#if defined(WIN32)
|
||||
SQLPOINTER pNumAttr
|
||||
#else
|
||||
SQLLEN *pNumAttr
|
16
databases/postgresql-odbc/files/patch-psqlodbc.h
Normal file
16
databases/postgresql-odbc/files/patch-psqlodbc.h
Normal file
@ -0,0 +1,16 @@
|
||||
--- psqlodbc.h.orig 2008-09-21 22:35:44.000000000 +0700
|
||||
+++ psqlodbc.h 2009-01-26 23:19:02.000000000 +0600
|
||||
@@ -140,13 +140,8 @@
|
||||
#if (SIZEOF_VOID_P == 8)
|
||||
#define FORMAT_INTEGER "%d" /* SQLINTEGER */
|
||||
#define FORMAT_UINTEGER "%u" /* SQLUINTEGER */
|
||||
-#if defined(WITH_UNIXODBC) && !defined(BUILD_REAL_64_BIT_MODE)
|
||||
-#define FORMAT_LEN "%d" /* SQLLEN */
|
||||
-#define FORMAT_ULEN "%u" /* SQLULEN */
|
||||
-#else
|
||||
#define FORMAT_LEN "%ld" /* SQLLEN */
|
||||
#define FORMAT_ULEN "%lu" /* SQLULEN */
|
||||
-#endif /* WITH_UNIXODBC */
|
||||
#else
|
||||
#define FORMAT_LEN "%ld" /* SQLLEN */
|
||||
#define FORMAT_ULEN "%lu" /* SQLULEN */
|
@ -8,7 +8,7 @@
|
||||
|
||||
PORTNAME= qt-${DB}-plugin
|
||||
PORTVERSION= 3.3.8
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= ${MASTER_SITE_QT}
|
||||
DISTNAME= qt-x11-free-${PORTVERSION}
|
||||
@ -25,6 +25,7 @@ BROKEN= does not compile
|
||||
|
||||
LIB_DEPENDS+= odbc:${PORTSDIR}/databases/unixODBC \
|
||||
qt-mt:${PORTSDIR}/x11-toolkits/qt33
|
||||
BUILD_DEPENDS= unixODBC>=2.2.14_1:${PORTSDIR}/databases/unixODBC
|
||||
|
||||
USE_BZIP2= yes
|
||||
PLUGIN= plugins/src/sqldrivers/${DB}
|
||||
|
@ -0,0 +1,21 @@
|
||||
--- src/sql/drivers/odbc/qsql_odbc.cpp.orig 2009-01-26 23:43:41.000000000 +0600
|
||||
+++ src/sql/drivers/odbc/qsql_odbc.cpp 2009-01-26 23:43:53.000000000 +0600
|
||||
@@ -57,18 +57,8 @@
|
||||
#endif
|
||||
|
||||
// newer platform SDKs use SQLLEN instead of SQLINTEGER
|
||||
-#ifdef SQLLEN
|
||||
# define QSQLLEN SQLLEN
|
||||
-#else
|
||||
-# define QSQLLEN SQLINTEGER
|
||||
-#endif
|
||||
-
|
||||
-#ifdef SQLULEN
|
||||
# define QSQLULEN SQLULEN
|
||||
-#else
|
||||
-# define QSQLULEN SQLUINTEGER
|
||||
-#endif
|
||||
-
|
||||
|
||||
static const QSQLLEN COLNAMESIZE = 256;
|
||||
//Map Qt parameter types to ODBC types
|
@ -8,6 +8,7 @@
|
||||
|
||||
PORTNAME= qt4-${DB}-plugin
|
||||
PORTVERSION= ${QT4_VERSION}
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= ${MASTER_SITE_QT}
|
||||
DISTNAME= qt-x11-opensource-src-${PORTVERSION}
|
||||
@ -19,8 +20,7 @@ COMMENT= Qt ODBC database plugin
|
||||
DB= odbc
|
||||
|
||||
LIB_DEPENDS+= odbc:${PORTSDIR}/databases/unixODBC
|
||||
|
||||
BROKEN= does not compile
|
||||
BUILD_DEPENDS= unixODBC>=2.2.14_1:${PORTSDIR}/databases/unixODBC
|
||||
|
||||
USE_QT_VER= 4
|
||||
QT_COMPONENTS= moc_build sql
|
||||
|
@ -0,0 +1,20 @@
|
||||
--- src/sql/drivers/odbc/qsql_odbc.cpp.orig 2009-01-27 00:11:47.000000000 +0600
|
||||
+++ src/sql/drivers/odbc/qsql_odbc.cpp 2009-01-27 00:12:12.000000000 +0600
|
||||
@@ -64,17 +64,8 @@
|
||||
#endif
|
||||
|
||||
// newer platform SDKs use SQLLEN instead of SQLINTEGER
|
||||
-#if defined(SQLLEN) || defined(Q_OS_WIN64)
|
||||
# define QSQLLEN SQLLEN
|
||||
-#else
|
||||
-# define QSQLLEN SQLINTEGER
|
||||
-#endif
|
||||
-
|
||||
-#if defined(SQLULEN) || defined(Q_OS_WIN64)
|
||||
# define QSQLULEN SQLULEN
|
||||
-#else
|
||||
-# define QSQLULEN SQLUINTEGER
|
||||
-#endif
|
||||
|
||||
static const int COLNAMESIZE = 256;
|
||||
//Map Qt parameter types to ODBC types
|
Loading…
Reference in New Issue
Block a user