diff options
author | Tom Lane | 2004-09-14 03:28:28 +0000 |
---|---|---|
committer | Tom Lane | 2004-09-14 03:28:28 +0000 |
commit | c06c1c0d16485eb614dabd0e8527a9b89bfc82b6 (patch) | |
tree | 7c6b09e4ca9d088b14db992df1b57617fded0e79 | |
parent | 26bb35bcf3ad80e9ee249dd1a2fb6db2f090a6b7 (diff) |
Fix contrib/dbase to compile under Win32. Laurent Ballester
-rw-r--r-- | contrib/dbase/dbf.h | 3 | ||||
-rw-r--r-- | contrib/dbase/dbf2pg.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/contrib/dbase/dbf.h b/contrib/dbase/dbf.h index 254e8d19e9..5c882fc7a8 100644 --- a/contrib/dbase/dbf.h +++ b/contrib/dbase/dbf.h @@ -8,6 +8,9 @@ #ifndef _DBF_H #define _DBF_H +#ifdef _WIN32 +#include <gmon.h> /* we need it to define u_char type */ +#endif #include <sys/types.h> /********************************************************************** diff --git a/contrib/dbase/dbf2pg.c b/contrib/dbase/dbf2pg.c index 9a1f89ea1f..52561cf247 100644 --- a/contrib/dbase/dbf2pg.c +++ b/contrib/dbase/dbf2pg.c @@ -57,7 +57,7 @@ void do_create(PGconn *, char *, dbhead *); void do_inserts(PGconn *, char *, dbhead *); int check_table(PGconn *, char *); -char *Escape(char *); +char *Escape_db(char *); #ifdef HAVE_ICONV_H char *convert_charset(char *string); @@ -110,7 +110,7 @@ strtolower(char *string) /* FIXME: should this check for overflow? */ char * -Escape(char *string) +Escape_db(char *string) { char *foo, *bar; @@ -466,7 +466,7 @@ do_inserts(PGconn *conn, char *table, dbhead * dbh) if (charset_from) foo = convert_charset(foo); #endif - foo = Escape(foo); + foo = Escape_db(foo); /* handle the date first - liuk */ if (fields[h].db_type == 'D') |