1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Removed support for ODBCRouter

This commit is contained in:
Kalle Sommer Nielsen
2017-07-28 10:31:48 +02:00
parent 87192f0fab
commit 398be731e6
5 changed files with 2 additions and 76 deletions

1
NEWS
View File

@@ -21,6 +21,7 @@ PHP NEWS
on Windows). (Nikita)
- ODBC:
. Removed support for ODBCRouter. (Kalle)
. Removed support for Birdstep. (Kalle)
- phar:

View File

@@ -60,6 +60,7 @@ Core:
. Set default transfer mode to binary
ODBC:
. Support for ODBCRouter has been removed.
. Support for Birdstep has been removed.
========================================

View File

@@ -219,28 +219,6 @@ You need to source your DB2 environment before running PHP configure:
fi
fi
if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH(ODBCRouter,,
[ --with-ODBCRouter[=DIR] Include ODBCRouter.com support [/usr]])
AC_MSG_CHECKING(for ODBCRouter.com support)
if test "$PHP_ODBCROUTER" != "no"; then
if test "$PHP_ODBCROUTER" = "yes"; then
PHP_ODBCROUTER=/usr
fi
ODBC_INCDIR=$PHP_ODBCROUTER/include
ODBC_LIBDIR=$PHP_ODBCROUTER/lib
ODBC_LFLAGS=-L$ODBC_LIBDIR
ODBC_INCLUDE=-I$ODBC_INCDIR
ODBC_LIBS=-lodbcsdk
ODBC_TYPE=ODBCRouter
AC_DEFINE(HAVE_ODBC_ROUTER,1,[ ])
AC_MSG_RESULT([$ext_output])
else
AC_MSG_RESULT(no)
fi
fi
if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH(empress,,
[ --with-empress[=DIR] Include Empress support [\$EMPRESSPATH]

View File

@@ -2443,45 +2443,6 @@ int odbc_sqlconnect(odbc_connection **conn, char *db, char *uid, char *pwd, int
SQLSetConnectOption((*conn)->hdbc, SQL_TRANSLATE_OPTION,
SQL_SOLID_XLATOPT_NOCNV);
#endif
#ifdef HAVE_ODBC_ROUTER
{
#define CONNSTRSIZE 2048
char *lpszConnStr = emalloc(CONNSTRSIZE);
if (lpszConnStr && db) {
short cbszConnStr;
if (strstr(db, ";")) {
/* the caller has apparently passed a connection-string */
if (strstr(db, "uid") || strstr(db, "UID")) {
uid = NULL;
}
if (strstr(db, "pwd") || strstr(db, "PWD")) {
pwd = NULL;
}
strlcpy( lpszConnStr, db, CONNSTRSIZE);
}
else {
strcpy(lpszConnStr, "DSN=");
strlcat(lpszConnStr, db, CONNSTRSIZE);
}
if (uid) {
if (uid[0]) {
strlcat(lpszConnStr, ";UID=", CONNSTRSIZE);
strlcat(lpszConnStr, uid, CONNSTRSIZE);
strlcat(lpszConnStr, ";", CONNSTRSIZE);
}
if (pwd) {
if (pwd[0]) {
strlcat(lpszConnStr, "PWD=", CONNSTRSIZE);
strlcat(lpszConnStr, pwd, CONNSTRSIZE);
strlcat(lpszConnStr, ";", CONNSTRSIZE);
}
}
}
rc = SQLDriverConnect((*conn)->hdbc, NULL, lpszConnStr, SQL_NTS, lpszConnStr, CONNSTRSIZE, &cbszConnStr, SQL_DRIVER_NOPROMPT);
efree(lpszConnStr);
}
}
#else
#ifdef HAVE_OPENLINK
{
char dsnbuf[1024];
@@ -2535,7 +2496,6 @@ int odbc_sqlconnect(odbc_connection **conn, char *db, char *uid, char *pwd, int
#else
rc = SQLConnect((*conn)->hdbc, db, SQL_NTS, uid, SQL_NTS, pwd, SQL_NTS);
#endif
#endif
#endif
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
odbc_sql_error(*conn, SQL_NULL_HSTMT, "SQLConnect");

View File

@@ -121,20 +121,6 @@ PHP_FUNCTION(solid_fetch_prev);
#include <sqlext.h>
#define HAVE_SQL_EXTENDED_FETCH 1
#elif defined(HAVE_ODBC_ROUTER) /* ODBCRouter.com */
#ifdef CHAR
#undef CHAR
#endif
#ifdef SQLCHAR
#undef SQLCHAR
#endif
#define ODBC_TYPE "ODBCRouter"
#include <odbcsdk.h>
#undef HAVE_SQL_EXTENDED_FETCH
#elif defined(HAVE_OPENLINK) /* OpenLink ODBC drivers */
#define ODBC_TYPE "Openlink"