Index: port/sprompt.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/port/sprompt.c,v retrieving revision 1.12 diff -c -r1.12 sprompt.c *** port/sprompt.c 15 Oct 2005 02:49:51 -0000 1.12 --- port/sprompt.c 28 Feb 2006 19:38:43 -0000 *************** *** 40,47 **** { int length; char *destination; ! FILE *termin, ! *termout; #ifdef HAVE_TERMIOS_H struct termios t_orig, --- 40,47 ---- { int length; char *destination; ! FILE *termin = NULL, ! *termout = NULL; #ifdef HAVE_TERMIOS_H struct termios t_orig, *************** *** 62,70 **** --- 62,75 ---- /* * Do not try to collapse these into one "w+" mode file. Doesn't work on * some platforms (eg, HPUX 10.20). + * + * Win32 doesn't have ttys, but there might be a directory with that name. + * Avoid using files there. */ + #ifndef WIN32 termin = fopen("/dev/tty", "r"); termout = fopen("/dev/tty", "w"); + #endif if (!termin || !termout) { if (termin)