Re: crashed odbc in CVS

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: crashed odbc in CVS
Дата
Msg-id 200006081709.NAA13420@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: crashed odbc in CVS  (Karel Zak <zakkr@zf.jcu.cz>)
Список 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@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: interactive oddity for psql -c "cmd; cmd;"
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: INSTALL/install.sgml file