Skip to content

Commit c2f5d08

Browse files
author
Hiroshi Inoue
committed
Fix a lot of compile errors on unix.
Fix '\\' handling for bytea type.
1 parent 1852951 commit c2f5d08

File tree

9 files changed

+252
-222
lines changed

9 files changed

+252
-222
lines changed

src/interfaces/odbc/GNUmakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# GNUMakefile for psqlodbc (Postgres ODBC driver)
44
#
5-
# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile,v 1.16 2001/05/11 01:46:33 momjian Exp $
5+
# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile,v 1.17 2001/08/21 05:21:09 inoue Exp $
66
#
77
#-------------------------------------------------------------------------
88

@@ -21,7 +21,7 @@ override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -DHAVE_CONFIG_H -DODBCINSTDIR='"$(o
2121
OBJS = info.o bind.o columninfo.o connection.o convert.o drvconn.o \
2222
environ.o execute.o lobj.o misc.o options.o \
2323
pgtypes.o psqlodbc.o qresult.o results.o socket.o parse.o statement.o \
24-
gpps.o tuple.o tuplelist.o dlg_specific.o $(OBJX)
24+
gpps.o tuple.o tuplelist.o dlg_specific.o odbcapi.o $(OBJX)
2525

2626
ifdef MULTIBYTE
2727
OBJS += multibyte.o

src/interfaces/odbc/convert.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,8 +1969,16 @@ convert_from_pgbinary(unsigned char *value, unsigned char *rgbValue, int cbValue
19691969
{
19701970
if (value[i] == '\\')
19711971
{
1972-
rgbValue[o] = conv_from_octal(&value[i]);
1973-
i += 4;
1972+
if (value[i + 1] == '\\')
1973+
{
1974+
rgbValue[o] = value[i];
1975+
i += 2;
1976+
}
1977+
else
1978+
{
1979+
rgbValue[o] = conv_from_octal(&value[i]);
1980+
i += 4;
1981+
}
19741982
}
19751983
else
19761984
rgbValue[o] = value[i++];

src/interfaces/odbc/info.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,6 @@ PGAPI_GetInfo(
682682
break;
683683

684684
default:
685-
return PGAPI_GetInfo30(hdbc, fInfoType, rgbInfoValue, cbInfoValueMax,pcbInfoValue);
686685
/* unrecognized key */
687686
conn->errormsg = "Unrecognized key passed to PGAPI_GetInfo.";
688687
conn->errornumber = CONN_NOT_IMPLEMENTED_ERROR;

src/interfaces/odbc/isql.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ typedef signed short RETCODE;
2626
#define SQL_API EXPORT CALLBACK
2727
#endif
2828

29-
#define ODBCVER 0x0250
29+
/*#define ODBCVER 0x0250 */
3030

3131
#define SQL_MAX_MESSAGE_LENGTH 512
3232
#define SQL_MAX_DSN_LENGTH 32

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy