summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan2013-01-25 16:39:17 +0000
committerAndrew Dunstan2013-01-25 16:39:17 +0000
commitecfbbfc0ef70f2b6b8744e2da3ec54fd7ef8c357 (patch)
tree6bbb2b103b7f8817a5c754e8159c4c629b6eb175
parent6121539aca2c797b8a9a78bb642ed060a9209d8e (diff)
Unbreak 9.0 and 9.1 pg_upgrade.
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.
-rw-r--r--contrib/pg_upgrade/pg_upgrade.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/contrib/pg_upgrade/pg_upgrade.h b/contrib/pg_upgrade/pg_upgrade.h
index 3c3ca6daf6a..83d3e6cfb54 100644
--- a/contrib/pg_upgrade/pg_upgrade.h
+++ b/contrib/pg_upgrade/pg_upgrade.h
@@ -54,6 +54,17 @@
#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 CLUSTERNAME(cluster) ((cluster) == CLUSTER_OLD ? "old" : "new")
#define atooid(x) ((Oid) strtoul((x), NULL, 10))