|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * 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 $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -149,7 +149,7 @@ typedef struct _psqlSettings
|
149 | 149 | * of passing them around through many function parameter lists seems
|
150 | 150 | * worse.
|
151 | 151 | */
|
152 |
| -staticFILE*cur_cmd_source=stdin;/* current source of command input */ |
| 152 | +staticFILE*cur_cmd_source=NULL;/* current source of command input */ |
153 | 153 | staticboolcur_cmd_interactive= false;/* is it an interactive source? */
|
154 | 154 |
|
155 | 155 |
|
@@ -2817,6 +2817,12 @@ main(int argc, char **argv)
|
2817 | 2817 | char*home=NULL;/* Used to store $HOME */
|
2818 | 2818 | char*version=NULL;/* PostgreSQL version */
|
2819 | 2819 |
|
| 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 | + |
2820 | 2826 | MemSet(&settings,0,sizeofsettings);
|
2821 | 2827 | settings.opt.align=1;
|
2822 | 2828 | settings.opt.header=1;
|
|