Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e27791

Browse files
committed
Fix some portability problems (get it to compile, at least, on HP's cc)
1 parent394925b commit1e27791

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

‎contrib/dbase/dbf2pg.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
oktober 1996: merged sources of dbf2msql.c and dbf2pg.c
66
oktober 1997: removed msql support
77
*/
8-
#defineHAVE_TERMIOS_H
9-
#defineHAVE_ICONV_H
8+
#include"postgres_fe.h"
9+
10+
#defineHAVE_ICONV_H/* should be somewhere else */
1011

11-
#include<stdio.h>
1212
#include<fcntl.h>
13-
#include<stdlib.h>
1413
#include<unistd.h>
15-
#include<string.h>
1614
#include<ctype.h>
1715
#ifdefHAVE_TERMIOS_H
1816
#include<termios.h>
@@ -21,13 +19,14 @@
2119
#include<iconv.h>
2220
#endif
2321

24-
#include<libpq-fe.h>
22+
#include"libpq-fe.h"
2523
#include"dbf.h"
2624

2725
intverbose=0,upper=0,lower=0,create=0,fieldlow=0;
2826
intdel=0;
2927
unsignedintbegin=0,end=0;
3028
unsignedintt_block=0;
29+
3130
#ifdefHAVE_ICONV_H
3231
char*charset_from=NULL;
3332
char*charset_to="ISO-8859-1";
@@ -158,12 +157,11 @@ int check_table(PGconn *conn, char *table) {
158157
}
159158

160159
voidusage(void){
161-
printf("\
162-
dbf2pg
163-
usage:dbf2pg [-u |-l] [-hhostname] [-W] [-Uusername]
164-
[-Btransaction_size] [-Fcharset_from [-Tcharset_to]]
165-
[-soldname=newname[,oldname=newname[...]]] [-ddbase]
166-
[-ttable] [-c |-D] [-f] [-v[v]]dbf-file\n");
160+
printf("dbf2pg\n"
161+
"usage: dbf2pg [-u | -l] [-h hostname] [-W] [-U username]\n"
162+
" [-B transaction_size] [-F charset_from [-T charset_to]]\n"
163+
" [-s oldname=newname[,oldname=newname[...]]] [-d dbase]\n"
164+
" [-t table] [-c | -D] [-f] [-v[v]] dbf-file\n");
167165
}
168166

169167
/* patch submitted by Jeffrey Y. Sue <jysue@aloha.net> */

‎contrib/dblink/dblink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ dblink(PG_FUNCTION_ARGS)
111111
results->res=res;
112112
res=NULL;
113113

114-
(dblink_results*)fcinfo->flinfo->fn_extra=results;
114+
fcinfo->flinfo->fn_extra= (void*)results;
115115

116116
results=NULL;
117117
results=fcinfo->flinfo->fn_extra;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp