diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-05-12 23:26:03 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-05-12 23:26:03 +0000 |
commit | eb4d9f45efdf6e80fb44209b59131391683e6275 (patch) | |
tree | b0ee2c5efd177f40a9dc78f55de715a26daffbff /src | |
parent | c8cc45b2f369adeba8b033cea5b41fbc5eb4dcfe (diff) | |
download | postgresql-eb4d9f45efdf6e80fb44209b59131391683e6275.tar.gz postgresql-eb4d9f45efdf6e80fb44209b59131391683e6275.zip |
Do not refer to stdin in static variable initializer ...
apparently some systems choke on that :-(.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/psql.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c index 6644da87ea8..4b1b5b00b76 100644 --- a/src/bin/psql/psql.c +++ b/src/bin/psql/psql.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.177 1999/05/03 19:10:08 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.178 1999/05/12 23:26:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -149,7 +149,7 @@ typedef struct _psqlSettings * of passing them around through many function parameter lists seems * worse. */ -static FILE * cur_cmd_source = stdin; /* current source of command input */ +static FILE * cur_cmd_source = NULL; /* current source of command input */ static bool cur_cmd_interactive = false; /* is it an interactive source? */ @@ -2817,6 +2817,12 @@ main(int argc, char **argv) char *home = NULL; /* Used to store $HOME */ char *version = NULL; /* PostgreSQL version */ + /* initialize cur_cmd_source in case we do not use MainLoop ... + * some systems fail if we try to use a static initializer for this :-( + */ + cur_cmd_source = stdin; + cur_cmd_interactive = false; + MemSet(&settings, 0, sizeof settings); settings.opt.align = 1; settings.opt.header = 1; |