Re: crashed odbc in CVS

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: crashed odbc in CVS
Date: 2000-06-08 17:09:03
Message-ID: 200006081709.NAA13420@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yes, that is it. I move the PG_BINARY includes to misc.h. Seem like a
better place for them.

>
> On Thu, 8 Jun 2000, Bruce Momjian wrote:
>
> > Oops. I thought that code included postgres.h. I have added a define
> > to psqlodbc.h. I added:
> >
> > #ifdef WIN32
> > #define PG_BINARY O_BINARY
> > #define PG_BINARY_R "rb"
> > #define PG_BINARY_W "wb"
> > #else
> > #define PG_BINARY 0
> > #define PG_BINARY_R "r"
> > #define PG_BINARY_W "w"
> > #endif
> >
> > Can you give it a try?
>
> Yes, you are right --- bug is in psqlodbc.h, but it is to in 'ggps.c'.
> In this file is not included "psqlodbc.h".
>
> The patch is attached.
>
> Right?
>
> Karel
>
Content-Description:

> diff -r -B -C2 odbc.org/gpps.c odbc/gpps.c
> *** odbc.org/gpps.c Thu Jun 8 12:05:35 2000
> --- odbc/gpps.c Thu Jun 8 18:50:33 2000
> ***************
> *** 29,32 ****
> --- 29,33 ----
> #include "gpps.h"
> #include "misc.h"
> + #include "psqlodbc.h"
>
> #ifndef TRUE
> diff -r -B -C2 odbc.org/psqlodbc.h odbc/psqlodbc.h
> *** odbc.org/psqlodbc.h Thu Jun 8 12:05:36 2000
> --- odbc/psqlodbc.h Thu Jun 8 18:48:22 2000
> ***************
> *** 167,170 ****
> --- 167,181 ----
> #define PG_NUMERIC_MAX_SCALE 1000
>
> + #ifdef WIN32
> + #define PG_BINARY O_BINARY
> + #define PG_BINARY_R "rb"
> + #define PG_BINARY_W "wb"
> + #else
> + #define PG_BINARY 0
> + #define PG_BINARY_R "r"
> + #define PG_BINARY_W "w"
> + #endif
> +
> +
> #include "misc.h"
>
>

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2000-06-08 17:09:16 Re: interactive oddity for psql -c "cmd; cmd;"
Previous Message Peter Eisentraut 2000-06-08 17:02:49 Re: [HACKERS] INSTALL/install.sgml file