On 20/02/16 08:36 -0700, Orion Poplawski wrote:
On 02/19/2016 08:24 PM, Jonathan Wakely wrote:
On 20/02/16 02:07 +0000, Jonathan Wakely wrote:
The next problem is that gnulib defines:

inline int signbit (float f) { return _gl_cxx_signbitf (f); } inline
int signbit (double d) { return _gl_cxx_signbitd (d); } inline int
signbit (long double l) { return _gl_cxx_signbitl (l); }

GCC 6 provides a standard-conforming <math.h> which defines the same
signbit overloads (as required by C++11 and C++14).  So the gnulib
header is incompatible with any conforming C++11 implementation.


Here's a patch for Octave which hacks around the above problem in
gnulib and then fixes Octave to include gnulib headers explicitly,
instead of assuming they'll get found by GCC's std::lib.

I haven't waited for octave to finish building (it's after 3am here)
but if other files fail just #include <libgnu/math.h> or #include
<libgnu/stdlib.h> and it should work.

The gnulib change is a hack, a proper fix would only skip the signbit
overloads for __cplusplus >= 201103L, but would also make sure to
#undef signbit if there's an earlier #define signbit 1. Maybe that
should be done by defining @GNULIB_SIGNBIT@ to something different.

Jonathan - Thank you for all your help with this.

No problem. I knew my changes to make GCC's <math.h> and <stdlib.h>
more strictly conforming would cause some problems, because the bugs I
fixed had been there for years and years. It was inevitable that some
packages would have local workarounds for the bugs, which would need
to be removed once the GCC headers got fixed.
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Reply via email to