Re: Complier warnings on mingw gcc 4.5.0

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Complier warnings on mingw gcc 4.5.0
Date: 2010-12-15 21:26:26
Message-ID: 11749.1292448386@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On my Fedora box, man 3 getopt says this:

> A program that scans multiple argument vectors, or rescans the same
> vector more than once, and wants to make use of GNU extensions such
> as '+' and '-' at the start of optstring, or changes the value of
> POSIXLY_CORRECT between scans, must reinitialize getopt() by
> resetting optind to 0, rather than the traditional value of 1.
> (Resetting to 0 forces the invocation of an internal initialization
> routine that rechecks POSIXLY_CORRECT and checks for GNU extensions
> in optstring.)

Hmm, mine says the same, but it's not entirely clear how to parse the
AND and OR conditions there. The fact that it works on Fedora suggests
to me that the "multiple vectors" case is somehow ANDed with one of the
other conditions. Anyway seems like the next step is to compare the
Fedora getopt code with mingw's ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-12-15 21:35:34 Re: mvcc & DML on the same row
Previous Message Andrew Dunstan 2010-12-15 21:20:06 Re: Complier warnings on mingw gcc 4.5.0