Re: Compile fail, alpha5 & gcc 4.3.3 in elog.c

From: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Compile fail, alpha5 & gcc 4.3.3 in elog.c
Date: 2010-04-02 07:25:14
Message-ID: 20100402162514.9776.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Josh Berkus <josh(at)agliodbs(dot)com> wrote:

> Ok, this issue seems to be specific to some versions of gcc. Note that
> in testing this nobody enabled any special compile or environment
> variables of any kind, so if there's a -Werror where it shouldn't be,
> it's in our code.

Hi, cygwin also has -Werror in default, and build was failed with a warning:

$ uname -a
CYGWIN_NT-5.1 <name> 1.7.2(0.225/5/3) 2010-03-24 21:12 i686 Cygwin

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement
-Wendif-labels -fno-strict-aliasing -fwrapv -Werror -DDEF_PGPORT=5432 -I../../.
./src/interfaces/libpq -I../../../src/include -c -o pg_ctl.o pg_ctl.c
pg_ctl.c: In function `pgwin32_CommandLine':
pg_ctl.c:1083: warning: `cygwin_conv_to_full_win32_path' is deprecated (declared
at /usr/include/sys/cygwin.h:52)
make[3]: *** [pg_ctl.o] Error 1

Any objections for the following fix?

Index: src/bin/pg_ctl/pg_ctl.c
===================================================================
--- src/bin/pg_ctl/pg_ctl.c (HEAD)
+++ src/bin/pg_ctl/pg_ctl.c (fixed)
@@ -1080,7 +1080,7 @@

#ifdef __CYGWIN__
/* need to convert to windows path */
- cygwin_conv_to_full_win32_path(cmdLine, buf);
+ cygwin_conv_path(CCP_POSIX_TO_WIN_A, cmdLine, buf, sizeof(buf));
strcpy(cmdLine, buf);
#endif

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-04-02 08:48:33 Re: Compile fail, alpha5 & gcc 4.3.3 in elog.c
Previous Message Takahiro Itagaki 2010-04-02 06:39:42 Re: xmlconcat (was 9.0 release notes done)