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

Commiteb4d9f4

Browse files
committed
Do not refer to stdin in static variable initializer ...
apparently some systems choke on that :-(.
1 parentc8cc45b commiteb4d9f4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎src/bin/psql/psql.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.177 1999/05/03 19:10:08 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.178 1999/05/12 23:26:03 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -149,7 +149,7 @@ typedef struct _psqlSettings
149149
* of passing them around through many function parameter lists seems
150150
* worse.
151151
*/
152-
staticFILE*cur_cmd_source=stdin;/* current source of command input */
152+
staticFILE*cur_cmd_source=NULL;/* current source of command input */
153153
staticboolcur_cmd_interactive= false;/* is it an interactive source? */
154154

155155

@@ -2817,6 +2817,12 @@ main(int argc, char **argv)
28172817
char*home=NULL;/* Used to store $HOME */
28182818
char*version=NULL;/* PostgreSQL version */
28192819

2820+
/* initialize cur_cmd_source in case we do not use MainLoop ...
2821+
* some systems fail if we try to use a static initializer for this :-(
2822+
*/
2823+
cur_cmd_source=stdin;
2824+
cur_cmd_interactive= false;
2825+
28202826
MemSet(&settings,0,sizeofsettings);
28212827
settings.opt.align=1;
28222828
settings.opt.header=1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp