Re: Complier warnings on mingw gcc 4.5.0 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Complier warnings on mingw gcc 4.5.0
Date
Msg-id 13768.1292456532@sss.pgh.pa.us
Whole thread Raw
In response to Re: Complier warnings on mingw gcc 4.5.0  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Complier warnings on mingw gcc 4.5.0  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Mingw code attached.

Hm, where did you get this?  Because it does have optreset, albeit in a
gratuitously ABI-incompatible fashion:

> #ifdef _BSD_SOURCE
> /*
>  * BSD adds the non-standard `optreset' feature, for reinitialisation
>  * of `getopt' parsing.  We support this feature, for applications which
>  * proclaim their BSD heritage, before including this header; however,
>  * to maintain portability, developers are advised to avoid it.
>  */
> # define optreset  __mingw_optreset
>
> extern int optreset;
> #endif

However, I pulled down the allegedly current mingw source tarball from
sourceforge, and what I found in it is an older version that has *not*
got that change.  The CVS tree there doesn't seem to have it either.
So I'm disinclined to want to rely on setting _BSD_SOURCE, as I first
thought might be the answer --- it looks to me like only some versions
of mingw will respond to that.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fix for seg picksplit function
Next
From: Andrew Dunstan
Date:
Subject: Re: Complier warnings on mingw gcc 4.5.0