summaryrefslogtreecommitdiff
path: root/src/bin/pg_ctl
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-11-17 17:46:24 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-11-17 17:46:24 +0000
commit5d72ef83fd437f8d4f4310d6118c6debbbd48e19 (patch)
treefda41b2ec6f79f915aa8105c1da2dc19af772a28 /src/bin/pg_ctl
parentede8f4e311fc24b45abdaa856c5afeb8238da78b (diff)
downloadpostgresql-5d72ef83fd437f8d4f4310d6118c6debbbd48e19.tar.gz
Miscellaneous Cygwin build fixes from Reini Urban.
Diffstat (limited to 'src/bin/pg_ctl')
-rw-r--r--src/bin/pg_ctl/pg_ctl.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index b5379ae0e7..426c705eb6 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -4,7 +4,7 @@
*
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.46 2004/11/17 16:34:42 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.47 2004/11/17 17:46:12 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,6 +22,7 @@
#include "getopt_long.h"
#if defined(__CYGWIN__)
+#include <sys/cygwin.h>
#include <windows.h>
/* Cygwin defines WIN32 in windows.h, but we don't want it. */
#undef WIN32
@@ -820,6 +821,9 @@ pgwin32_CommandLine(bool registration)
{
static char cmdLine[MAXPGPATH];
int ret;
+#ifdef __CYGWIN__
+ char buf[MAXPGPATH];
+#endif
if (registration)
{
@@ -840,6 +844,12 @@ pgwin32_CommandLine(bool registration)
}
}
+#ifdef __CYGWIN__
+ /* need to convert to windows path */
+ cygwin_conv_to_full_win32_path(cmdLine, buf);
+ strcpy(cmdLine, buf);
+#endif
+
if (registration)
{
if (strcasecmp(cmdLine + strlen(cmdLine) - 4, ".exe"))