Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aHIT7-0001Jd-DF for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jan 2016 21:51:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aHIT6-0001xs-Bp for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jan 2016 21:51:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aHIRm-0000TE-MA for pgsql-hackers@postgresql.org; Thu, 07 Jan 2016 21:50:18 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aHIRj-0004P8-Gs for pgsql-hackers@postgresql.org; Thu, 07 Jan 2016 21:50:17 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.104.53.52]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 043A7401347 for ; Thu, 7 Jan 2016 13:50:12 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 864DE288; Thu, 7 Jan 2016 18:50:09 -0300 (CLT) Date: Thu, 7 Jan 2016 18:50:09 -0300 From: Alvaro Herrera To: pgsql-hackers@postgresql.org Subject: Re: Re: [COMMITTERS] pgsql: Windows: Make pg_ctl reliably detect service status Message-ID: <20160107215009.GA500188@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160107201648.GA464681@alvherre.pgsql> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Alvaro Herrera wrote: > Alvaro Herrera wrote: > > Alvaro Herrera wrote: > > > Windows: Make pg_ctl reliably detect service status > > > > > > pg_ctl is using isatty() to verify whether the process is running in a > > > terminal, and if not it sends its output to Windows' Event Log ... which > > > does the wrong thing when the output has been redirected to a pipe, as > > > reported in bug #13592. > > > > This broke the mingw port. Looking. > > A bit of grepping appears to say that I ought to patch configure.in to > add > AC_LIBOBJ(win32security) > around line 1580 and rerun autoconf, but this seems completely at odds > with the documented use of AC_LIBOBJS. Is this black magic? I confirmed that adding that line makes the new file get compiled. I also noticed these warnings when compiling it: In file included from /usr/lib/gcc/x86_64-w64-mingw32/4.9-win32/include/stdarg.h:1:0, from /pgsql/source/master/src/include/c.h:85, from /pgsql/source/master/src/include/postgres_fe.h:25, from /pgsql/source/master/src/port/win32security.c:17: /pgsql/source/master/src/port/win32security.c: In function ‘log_error’: /pgsql/source/master/src/port/win32security.c:37:11: warning: passing argument 1 of ‘__builtin_va_start’ from incompatible pointer type va_start(fmt, ap); ^ /pgsql/source/master/src/port/win32security.c:37:11: note: expected ‘char **’ but argument is of type ‘const char **’ /pgsql/source/master/src/port/win32security.c:37:2: warning: second parameter of ‘va_start’ not last named argument [-Wvarargs] va_start(fmt, ap); ^ -- Á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-hackers