Re: C++ interface build on FreeBSD 4.2 broken?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: C++ interface build on FreeBSD 4.2 broken?
Дата
Msg-id 1648.980008619@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: C++ interface build on FreeBSD 4.2 broken?  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: C++ interface build on FreeBSD 4.2 broken?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
>> ../../../src/include/c.h:997: conflicting types for `int sys_nerr'
>> /usr/include/stdio.h:224: previous declaration as `const int sys_nerr'

> C++ apparently doesn't allow this, but C does.  So you have to put #ifndef
> __cplusplus at the appropriate place in c.h.

Er, what will you ifdef exactly, and what are the odds that it will fail
on some other platform?  (On my machine, for example, sys_nerr is
definitely NOT declared const by the system header files, and so adding
a const decoration to our declaration would fail.)

I think our choices are to do a configure test or to stop using sys_nerr
altogether.  At the moment I'm kind of leaning towards the latter.
I suspect machines whose strerror() is without a rangecheck are history,
and even if they're not, it's unproven that we ever pass a bogus errno
to strerror anyway.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: status of 64bit ints? was: Re: Transaction ID wraparound: problem and proposed solution
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: C++ interface build on FreeBSD 4.2 broken?