[v3] Handle different versions of Solaris 8 <iso/math_iso.h>, <iso/stdlib_iso.h>

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Fri Aug 26 12:46:00 GMT 2011


All my testing of the __cplusplus 199711L patches had been on Solaris
8+/x86.  During last weekend's bootstrap on the whole range of systems
(Solaris 8 to 11, SPARC and x86), it turned out that there are possible
variations of <iso/math_iso.h> and <iso/stdlib_iso.h> between Solaris 8
FCS and patches, so we cannot statically configure which overloads are
present, but need autoconf checks for that.

The situation is as follows:

* Solaris 8 FCS shipped rev. 1.1 of <iso/math_iso.h> which only had
  double std::abs(double).  Later, in patches 111721-04 (SPARC) and
  112757-01 (x86), rev. 1.3 whas shipped that has everything that's also
  present in Solaris 9 and up.

* Similarly, Solaris 8 FCS has rev. 1.1 of <iso/stdlib_iso.h> without
  any overloads.  Patches 109607-02 (SPARC) and 109608-02 (x86) added
  long std::abs(long) and ldiv_t div(lng, long) in rev. 1.3.

Since <bits/os_defines.h> is included before configure results,
configure needs to define the affected
__CORRECT_ISO_CPP_MATH_H_PROTO[12] and __CORRECT_ISO_CPP_STDLIB_H_PROTO
directly.  The following patch does just that.

Bootstrapped without regressions on x86_64-unknown-linux-gnu and
i386-pc-solaris2.11, bootstraps on i386-pc-solaris2.8 (with the old
rev. 1.1 headers) and sparc-sun-solaris2.8 (with the the rev. 1.3
headers) are still in progress, but I've verified that the
__CORRECT_ISO_CPP_* macros are all defined correctly..  Since errors in
previous versions of the patch manifested themselves in build failures
immediately, I'm pretty certain that there are no errors.

Ok for mainline if bootstraps pass?

Thanks.
        Rainer


2011-08-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* acinclude.m4 (GLIBCXX_CHECK_MATH_PROTO)
	(GLIBCXX_CHECK_STDLIB_PROTO): New tests.
	* configure.ac (GLIBCXX_CHECK_MATH_PROTO)
	(GLIBCXX_CHECK_STDLIB_PROTO): Call them.
	* configure: Regenerate.
	* config.h.in: Regenerate.
	* config/os/solaris/solaris2.8/os_defines.h
	(__CORRECT_ISO_CPP_MATH_H_PROTO2): Don't define.
	* config/os/solaris/solaris2.9: Remove.
	* configure.host (solaris2.8): Merge with ...
	(solaris2.9, solaris2.1[0-9]): ... this.
	Always use os/solaris/solaris2.8.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sol8-v3-math_iso.patch
Type: text/x-patch
Size: 5180 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20110826/8e54af5f/attachment.bin>
-------------- next part --------------

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


More information about the Libstdc++ mailing list