Re: Complier warnings on mingw gcc 4.5.0

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Complier warnings on mingw gcc 4.5.0
Дата
Msg-id 4D0958A2.40905@dunslane.net
обсуждение исходный текст
Ответ на Re: Complier warnings on mingw gcc 4.5.0  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Complier warnings on mingw gcc 4.5.0  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On 12/15/2010 06:42 PM, Tom Lane wrote:
> 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.
>
>             

I downloaded 

<http://softlayer.dl.sourceforge.net/project/mingw/MinGW/BaseSystem/RuntimeLibrary/MinGW-RT/mingwrt-3.18/mingwrt-3.18-mingw32-src.tar.gz>

which is allegedly the source for the latest released runtime.

The section you cite is indeed in my system's getopt.h.

cheers

andrew


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Complier warnings on mingw gcc 4.5.0
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Complier warnings on mingw gcc 4.5.0