]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Unbreak 9.0 and 9.1 pg_upgrade.
authorAndrew Dunstan <andrew@dunslane.net>
Fri, 25 Jan 2013 16:39:45 +0000 (11:39 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Fri, 25 Jan 2013 16:39:45 +0000 (11:39 -0500)
These were broken by my recent backpatch of
the simple prompt fix. These older versions
used DEVTTY, so import the definition from
psql's command.c.

contrib/pg_upgrade/pg_upgrade.h

index 51a04473a645d43078cd36b3a00deb3ca563c29b..0b3a83b9ef3ff2288b34ceb829841e5ff30ec7d3 100644 (file)
 #define EXE_EXT                                ".exe"
 #endif
 
+#if defined(WIN32) && !defined(__CYGWIN__)
+
+               /*
+                * XXX This does not work for all terminal environments or for output
+                * containing non-ASCII characters; see comments in simple_prompt().
+                */
+#define DEVTTY "con"
+#else
+#define DEVTTY "/dev/tty"
+#endif
+
 #define CLUSTER_NAME(cluster)  ((cluster) == &old_cluster ? "old" : \
                                                                 (cluster) == &new_cluster ? "new" : "none")