From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: pgsql-hackers@postgresql.org
Cc: Marco Atzeri <marco.atzeri@gmail.com>
Subject: Re: [COMMITTERS] pgsql: Blind attempt at a Cygwin fix
Date: Fri, 8 Jan 2016 12:39:02 -0300
Message-ID: <20160108153902.GA589413@alvherre.pgsql> (raw)
In-Reply-To: <20160108151331.GA584390@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Alvaro Herrera wrote:
> Tom Lane wrote:
> > Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > > Blind attempt at a Cygwin fix
> >
> > According to
> > http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=brolga&dt=2016-01-08%2014%3A51%3A27
> >
> > brolga now tries to compile win32security.c, which it evidently was not
> > doing before, but the compile blows up; looks like it is missing #include
> > calls (which must exist in other places where this code lives ...)
>
> Obviously this wasn't the best idea ever. Andrew suggests on IM to
> revert this on Cygwin to just do the "isatty" check as originally.
Here's a proposed patch. Thoughts?
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackersAttachments:Revert-Blind-attempt-at-a-Cygwin-fix.patch (text/x-diff, 1.8K) download
From af7989c37cb8a1d647e6ce7d01857491b42b01b5 Mon Sep 17 00:00:00 2001
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Fri, 8 Jan 2016 12:36:18 -0300
Subject: [PATCH] Revert "Blind attempt at a Cygwin fix"
This reverts commit e9282e953205a2f3125fc8d1052bc01cb77cd2a3, which blew
up in a pretty spectacular way. Introduce the original code while we
search for a real fix.
---
configure | 6 ------
configure.in | 1 -
src/bin/pg_ctl/pg_ctl.c | 9 +++++++++
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/configure b/configureindex ab213a1..3dd1b15 100755--- a/configure+++ b/configure@@ -13075,12 +13075,6 @@ if test "$PORTNAME" = "cygwin"; then
;;
esac
- case " $LIBOBJS " in- *" win32security.$ac_objext "* ) ;;- *) LIBOBJS="$LIBOBJS win32security.$ac_objext"- ;;-esac-
fi
ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
diff --git a/configure.in b/configure.inindex 41402df..9398482 100644--- a/configure.in+++ b/configure.in@@ -1596,7 +1596,6 @@ fi
# Cygwin needs only a bit of that
if test "$PORTNAME" = "cygwin"; then
AC_LIBOBJ(dirmod)
- AC_LIBOBJ(win32security)
fi
AC_CHECK_DECLS([sys_siglist], [], [],
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.cindex 28d3cf2..919d764 100644--- a/src/bin/pg_ctl/pg_ctl.c+++ b/src/bin/pg_ctl/pg_ctl.c@@ -212,6 +212,15 @@ write_stderr(const char *fmt,...)
vfprintf(stderr, fmt, ap);
#else
+/*+ * On Cygwin, we don't yet have a reliable mechanism to detect when+ * we're being run as a service, so fall back to the old (and broken)+ * stderr test.+ */+#ifdef __CYGWIN__+#define pgwin32_is_service() (isatty(fileno(stderr)))+#endif+
/*
* On Win32, we print to stderr if running on a console, or write to
* eventlog if running as a service
--
2.1.4
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, michael.paquier@gmail.com, pgsql-hackers@postgresql.org, marco.atzeri@gmail.com
Subject: Re: [COMMITTERS] pgsql: Blind attempt at a Cygwin fix
In-Reply-To: <20160108153902.GA589413@alvherre.pgsql>
References: <20160108151331.GA584390@alvherre.pgsql> <20160108153902.GA589413@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox