This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: solaris iostream long long support
- To: libstdc++ at gcc dot gnu dot org
- Subject: Re: solaris iostream long long support
- From: Nathan Myers <ncm at nospam dot cantrip dot org>
- Date: Wed, 26 Sep 2001 22:35:17 -0700
- References: <Pine.LNX.4.31.0109261907530.1073-100000@tisiphone.pab>
- Reply-To: libstdc++ at gcc dot gnu dot org
On Wed, Sep 26, 2001 at 07:08:50PM -0700, Peter A. Bigot wrote:
> libstdc++-v3 configure silently turns off --enable-long-long if full c99
> support is not present, even if strtoll and strtoul are available. On
> Solaris7 and Solaris8, there is something missing (I think in the math
> library) that disables C99, thereby also disabling long-long even though all
> that's needed for that is strto{u,}ll, both of which are available.
>
> In this situation, g++ -v still indicates that long-long is enabled, but
> libstdc++-v3/config.h does not define _GLIBCPP_USE_LONG_LONG, and any
> attempt to use iostream operators on long long data objects fails to
> compile. This change happened late in the 3.0 pre-release series, and is
> still present in 3.0.1; long long iostream support still worked in at least
> one of the April or May pre-releases.
When you run configure, it looks for wcstol() and _Exit(), and
not finding them, turns off C99 support. Failing that, it turns
off long long support too.
The easiest way to fix 3.0.1 for a Solaris build is to comment out
lines 3562 to 3564 of libstdc++-v3/configure. In general, long long
support probably should depend directly on the specific library
support features needed, or (better) not depend on any underlying
library support. There's really no need to use the C library for
something as basic as formatting and parsing a long long value.
Nathan Myers
ncm at cantrip dot org