diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-10-15 18:49:40 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-10-15 18:49:40 +0000 |
commit | 1e2779117de142a2cd65f990357527a5937db008 (patch) | |
tree | 97b42f3ffce82d2327299ca22f64c5836f612098 | |
parent | 394925b60dad238c3eb5f9b21b282b3d116bec62 (diff) | |
download | postgresql-1e2779117de142a2cd65f990357527a5937db008.tar.gz postgresql-1e2779117de142a2cd65f990357527a5937db008.zip |
Fix some portability problems (get it to compile, at least, on HP's cc)
-rw-r--r-- | contrib/dbase/dbf2pg.c | 22 | ||||
-rw-r--r-- | contrib/dblink/dblink.c | 2 |
2 files changed, 11 insertions, 13 deletions
diff --git a/contrib/dbase/dbf2pg.c b/contrib/dbase/dbf2pg.c index 53c0314afb5..c87c743e096 100644 --- a/contrib/dbase/dbf2pg.c +++ b/contrib/dbase/dbf2pg.c @@ -5,14 +5,12 @@ oktober 1996: merged sources of dbf2msql.c and dbf2pg.c oktober 1997: removed msql support */ -#define HAVE_TERMIOS_H -#define HAVE_ICONV_H +#include "postgres_fe.h" + +#define HAVE_ICONV_H /* should be somewhere else */ -#include <stdio.h> #include <fcntl.h> -#include <stdlib.h> #include <unistd.h> -#include <string.h> #include <ctype.h> #ifdef HAVE_TERMIOS_H #include <termios.h> @@ -21,13 +19,14 @@ #include <iconv.h> #endif -#include <libpq-fe.h> +#include "libpq-fe.h" #include "dbf.h" int verbose = 0, upper = 0, lower = 0, create = 0, fieldlow = 0; int del = 0; unsigned int begin = 0, end = 0; unsigned int t_block = 0; + #ifdef HAVE_ICONV_H char *charset_from=NULL; char *charset_to="ISO-8859-1"; @@ -158,12 +157,11 @@ int check_table(PGconn *conn, char *table) { } void usage(void){ - printf("\ -dbf2pg -usage: dbf2pg [-u | -l] [-h hostname] [-W] [-U username] - [-B transaction_size] [-F charset_from [-T charset_to]] - [-s oldname=newname[,oldname=newname[...]]] [-d dbase] - [-t table] [-c | -D] [-f] [-v[v]] dbf-file\n"); + printf("dbf2pg\n" +"usage: dbf2pg [-u | -l] [-h hostname] [-W] [-U username]\n" +" [-B transaction_size] [-F charset_from [-T charset_to]]\n" +" [-s oldname=newname[,oldname=newname[...]]] [-d dbase]\n" +" [-t table] [-c | -D] [-f] [-v[v]] dbf-file\n"); } /* patch submitted by Jeffrey Y. Sue <jysue@aloha.net> */ diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c index d457a76cbf9..e858cfd0ba2 100644 --- a/contrib/dblink/dblink.c +++ b/contrib/dblink/dblink.c @@ -111,7 +111,7 @@ dblink(PG_FUNCTION_ARGS) results->res = res; res = NULL; - (dblink_results *) fcinfo->flinfo->fn_extra = results; + fcinfo->flinfo->fn_extra = (void *) results; results = NULL; results = fcinfo->flinfo->fn_extra; |