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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: C++ interface build on FreeBSD 4.2 broken?
Date: 2001-01-20 16:36:59
Message-ID: 1648.980008619@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-01-20 18:14:23 Re: C++ interface build on FreeBSD 4.2 broken?
Previous Message Patrick Welche 2001-01-20 16:08:29 Re: test/locale broken