mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
Update source code to Byron's v6.30.0250 sources plus minor cleanup
to get rid of unused variables. Get clean compile on Linux (Thomas and Gerald). Implement autoconf/configure for standalone builds and use the existing autoconf/configure system when in the Postgres source tree. Code tests and functions with ApplixWare-4.4.1beta on a Linux box. Changes should be backward compatible with WIN32 but still needs testing.
This commit is contained in:
@ -14,12 +14,12 @@
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "psqlodbc.h"
|
||||
|
||||
#ifdef HAVE_IODBC
|
||||
#ifndef WIN32
|
||||
#include "iodbc.h"
|
||||
#include "isql.h"
|
||||
#include "isqlext.h"
|
||||
@ -43,9 +43,11 @@ RETCODE SQL_API SQLSetConnectOption(
|
||||
UWORD fOption,
|
||||
UDWORD vParam)
|
||||
{
|
||||
char *func="SQLSetConnectOption";
|
||||
static char *func="SQLSetConnectOption";
|
||||
ConnectionClass *conn = (ConnectionClass *) hdbc;
|
||||
|
||||
mylog("%s: entering...\n", func);
|
||||
|
||||
if ( ! conn) {
|
||||
CC_log_error(func, "", NULL);
|
||||
return SQL_INVALID_HANDLE;
|
||||
@ -101,7 +103,7 @@ ConnectionClass *conn = (ConnectionClass *) hdbc;
|
||||
char option[64];
|
||||
conn->errormsg = "Driver does not support setting this connect option";
|
||||
conn->errornumber = CONN_UNSUPPORTED_OPTION;
|
||||
sprintf(option, "fOption=%d, vParam=%d", fOption, vParam);
|
||||
sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam);
|
||||
CC_log_error(func, option, conn);
|
||||
return SQL_ERROR;
|
||||
}
|
||||
@ -118,9 +120,11 @@ RETCODE SQL_API SQLGetConnectOption(
|
||||
UWORD fOption,
|
||||
PTR pvParam)
|
||||
{
|
||||
char *func="SQLGetConnectOption";
|
||||
static char *func="SQLGetConnectOption";
|
||||
ConnectionClass *conn = (ConnectionClass *) hdbc;
|
||||
|
||||
mylog("%s: entering...\n", func);
|
||||
|
||||
if (! conn) {
|
||||
CC_log_error(func, "", NULL);
|
||||
return SQL_INVALID_HANDLE;
|
||||
@ -162,10 +166,12 @@ RETCODE SQL_API SQLSetStmtOption(
|
||||
UWORD fOption,
|
||||
UDWORD vParam)
|
||||
{
|
||||
char *func="SQLSetStmtOption";
|
||||
static char *func="SQLSetStmtOption";
|
||||
StatementClass *stmt = (StatementClass *) hstmt;
|
||||
char changed = FALSE;
|
||||
|
||||
mylog("%s: entering...\n", func);
|
||||
|
||||
// thought we could fake Access out by just returning SQL_SUCCESS
|
||||
// all the time, but it tries to set a huge value for SQL_MAX_LENGTH
|
||||
// and expects the driver to reduce it to the real value
|
||||
@ -260,7 +266,7 @@ char changed = FALSE;
|
||||
char option[64];
|
||||
stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR;
|
||||
stmt->errormsg = "Driver does not support setting this statement option";
|
||||
sprintf(option, "fOption=%d, vParam=%d", fOption, vParam);
|
||||
sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam);
|
||||
SC_log_error(func, option, stmt);
|
||||
return SQL_ERROR;
|
||||
}
|
||||
@ -283,9 +289,11 @@ RETCODE SQL_API SQLGetStmtOption(
|
||||
UWORD fOption,
|
||||
PTR pvParam)
|
||||
{
|
||||
char *func="SQLGetStmtOption";
|
||||
static char *func="SQLGetStmtOption";
|
||||
StatementClass *stmt = (StatementClass *) hstmt;
|
||||
|
||||
mylog("%s: entering...\n", func);
|
||||
|
||||
// thought we could fake Access out by just returning SQL_SUCCESS
|
||||
// all the time, but it tries to set a huge value for SQL_MAX_LENGTH
|
||||
// and expects the driver to reduce it to the real value
|
||||
|
Reference in New Issue
Block a user