Hi David,

>> >> Presumably it could also be tested on GNU/Linux and Solaris, since
>> >> they implement the POSIX 2008 APIs needed.
>> >
>> > I'll give the patch a whirl on Solaris.  However, we will need to
>> > distinguish between 11.3 (which is XPG6 only) and 11.4 (which support
>> > XPG7).
>>
>> as almost expected, a build on Solaris 11.4 failed miserably due to the
>> use of the various BSD extensions (localeconv_l, mbstowcs_l, strtod_l,
>> strtof_l, strtold_l, wcsftime_l), whose use or fallback implementations
>> are currently guarded by _AIX.  Should those be used in a directory
>> supposed to conform to POSIX.1-2008 at all?  OTOH, almost duplicating
>> the code into a separate bsd (or whatever, it's certainly not only
>> DragonflyBSD) directory for this sole reason would be a shame.
>
> Hi, Rainer
>
> Thanks for testing.
>
> I agree that #ifdef's are not the correct approach, but, if you enable
> the fallbacks for Solaris, does everything then work?  Are those
> fallbacks portable and we solely need a better mechanism to enable
> them on platforms that require them?

it mostly compiles, with two caveats:

* c_locale.h needs to include <cstdlib> for declarations of strtod and
  friends.

* Solaris <locale.h> only declares the int_p_cs_precedes etc. members of
  struct lconv for C99+, but not for C++11+, as it should.  I'll file a
  bug for that, but for now one can work around the issue by defining
  _LCONV_C99 before including <locale> in monetary_members.cc.

With those changes, I can at least build libstdc++ with
--enable-clocale=ieee_1003.1-2008.  Bootstrap still running, though.

        Rainer

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

Reply via email to