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
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"