| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| X-Spam-Score: | -0.972 |
| Message-ID: | <464D68D5.1080306@sh.cvut.cz> |
| Date: | Fri, 18 May 2007 10:50:29 +0200 |
| From: | =?ISO-8859-1?Q?V=E1clav_Haisman?= <v DOT haisman AT sh DOT cvut DOT cz> |
| User-Agent: | Thunderbird 2.0.0.0 (Windows/20070326) |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: _GLIBCXX_USE_C99 not working? |
| References: | <464CBBD5 DOT 4040709 AT t-online DOT de> |
| In-Reply-To: | <464CBBD5.4040709@t-online.de> |
| X-IsSubscribed: | yes |
| Reply-To: | cygwin AT cygwin DOT com |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
--------------enig1FB9FDA834165598BDB11AC5
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Christian Franke wrote:
> Defining _GLIBCXX_USE_C99 does not work with current Cygwin C++ includes.
>=20
> Testcase:
>=20
> #define _GLIBCXX_USE_C99 1 // need std::llabs()
>=20
> #include <cstdlib>
>=20
> long long f(long long x)
> {
> return std::llabs(x);
> }
>=20
>=20
> Compile fails with:
>=20
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdlib:181:
> error: `::strtold' has not been declared
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdlib:200:
> error: `__gnu_cxx::strtold' has not been declared
>=20
>=20
> The function strtold() does actually not exist in stdlib.h
> and the corresponding _GLIBCXX_HAVE_STRTOLD in
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/c++conf=
ig.h
>=20
> is not set.
>=20
> But "using ::strtold" exists in the "#if _GLIBCXX_USE_C99" part of
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdlib
>=20
> Workaround: delete the two "using ::strtold" lines from cstdlib.
>=20
> Christian
Look into the cstdlib header. You will find that llabs(long long) and
abs(long long) are in the __gnu_cxx namespace there. It is because long
long is not C++ standard type.
--
Vaclav Haisman
--------------enig1FB9FDA834165598BDB11AC5
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQEVAwUBRk1o3UNOZDESBK8FAQjhBgf/e/C8qhbvgMQlr/FEDFJCI0vP50idxa44
FZ9t7GBYxP6sRVzqHiVYgtniwFWh4UsJ1HSkGXVn+bdCljSMnxrCZtvZttueBnh/
Y00uwTFOPn/BgMJzRO2Qza70Y7eJydJNtJDMCz7chapa3eBmG/2kFTyP/SZgZ8LU
4+cic/V3MAUGl+aL7UIPK/VVANlp6G1dQNmcbC2sJGePGHXt7teOMuCuBiKoDRxx
zE6A2/BdW2/bvy/9WkS7s2hKITlE5GgDooliS7wInIWeNGgA0F4CdVyHxdDmdm2+
GSyge2K7Tqr6UvgKspHuUd8pPdzp5CTMbb2eWgh/m+KsHLVXEYPIQA==
=UleH
-----END PGP SIGNATURE-----
--------------enig1FB9FDA834165598BDB11AC5--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |