diff --git a/src/interfaces/odbc/gpps.c b/src/interfaces/odbc/gpps.c index 936e1aebe6dc73fca639d5a369bf33cdfd3dd119..55a8deba8d565f58428486cfc1db0942eade4b24 100644 --- a/src/interfaces/odbc/gpps.c +++ b/src/interfaces/odbc/gpps.c @@ -26,7 +26,7 @@ #include <sys/types.h> #include <string.h> -#include "psqlodbc.h" +#include "misc.h" #include "gpps.h" #ifndef TRUE diff --git a/src/interfaces/odbc/misc.h b/src/interfaces/odbc/misc.h index 23875813fa4cd72204153925b85702e2cd09e281..ebe56ea9d80bf429b3682991216f7d03c00e9fc3 100644 --- a/src/interfaces/odbc/misc.h +++ b/src/interfaces/odbc/misc.h @@ -76,6 +76,17 @@ #define DIRSEPARATOR "\\" #endif +#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 + + void remove_newlines(char *string); char *strncpy_null(char *dst, const char *src, int len); char *trim(char *string); diff --git a/src/interfaces/odbc/psqlodbc.h b/src/interfaces/odbc/psqlodbc.h index ff90903dfe41563444fc1c664f85966db5feb7fb..5386075df6ee84199f7e2eb2054325b8c1eb8cb8 100644 --- a/src/interfaces/odbc/psqlodbc.h +++ b/src/interfaces/odbc/psqlodbc.h @@ -49,16 +49,6 @@ typedef UInt4 Oid; #define DRIVER_FILE_NAME "libpsqlodbc.so" #endif -#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 - /* Limits */ #ifdef WIN32 #define BLCKSZ 4096