Commit fc564686 authored by Tom Lane's avatar Tom Lane

Fix contrib/dbase to compile under Win32. Laurent Ballester

parent 296fb57b
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
#ifndef _DBF_H #ifndef _DBF_H
#define _DBF_H #define _DBF_H
#ifdef _WIN32
#include <gmon.h> /* we need it to define u_char type */
#endif
#include <sys/types.h> #include <sys/types.h>
/********************************************************************** /**********************************************************************
......
...@@ -57,7 +57,7 @@ void do_create(PGconn *, char *, dbhead *); ...@@ -57,7 +57,7 @@ void do_create(PGconn *, char *, dbhead *);
void do_inserts(PGconn *, char *, dbhead *); void do_inserts(PGconn *, char *, dbhead *);
int check_table(PGconn *, char *); int check_table(PGconn *, char *);
char *Escape(char *); char *Escape_db(char *);
#ifdef HAVE_ICONV_H #ifdef HAVE_ICONV_H
char *convert_charset(char *string); char *convert_charset(char *string);
...@@ -110,7 +110,7 @@ strtolower(char *string) ...@@ -110,7 +110,7 @@ strtolower(char *string)
/* FIXME: should this check for overflow? */ /* FIXME: should this check for overflow? */
char * char *
Escape(char *string) Escape_db(char *string)
{ {
char *foo, char *foo,
*bar; *bar;
...@@ -466,7 +466,7 @@ do_inserts(PGconn *conn, char *table, dbhead * dbh) ...@@ -466,7 +466,7 @@ do_inserts(PGconn *conn, char *table, dbhead * dbh)
if (charset_from) if (charset_from)
foo = convert_charset(foo); foo = convert_charset(foo);
#endif #endif
foo = Escape(foo); foo = Escape_db(foo);
/* handle the date first - liuk */ /* handle the date first - liuk */
if (fields[h].db_type == 'D') if (fields[h].db_type == 'D')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment