[cfe-dev] [PATCH] Libc++ Windows fixes

Aaron Ballman aaron at aaronballman.com
Thu Sep 22 12:26:35 PDT 2011


On Thu, Sep 22, 2011 at 2:08 PM, Ruben Van Boxem
<vanboxem.ruben at gmail.com> wrote:
> 2011/9/22 Aaron Ballman <aaron at aaronballman.com>
>>
>> On Thu, Sep 22, 2011 at 10:33 AM, Ruben Van Boxem
>> <vanboxem.ruben at gmail.com> wrote:
>> > 2011/6/30 Ruben Van Boxem <vanboxem.ruben at gmail.com>
>> > - include/__config/type_traits: add a define
>> > _LIBCXX_HAS_FEATURE_IS_BASE_OF
>> > for MSVC and GCC, which both have this, but not __has_feature, which is
>> > Clang-only. Modify <type_traits> accordingly.
>>
>> I noticed that you're testing _MSC_VER 1400, which is VS 2005.
>> However, I couldn't find any documentation of is_base_of for anything
>> before Visual Studio 2008 (_MSC_VER 1500).  Unfortunately, I don't
>> have VS 2005 to test for sure, but this may require a second look.  Or
>> I could be wrong.  ;-)
>
> MSVS2005 page detailing __is_base_of. the 2003 page doesn't have this page,
> so I assume it does not support it.
> http://msdn.microsoft.com/en-us/library/ms177194%28v=vs.80%29.aspx

I stand corrected.  When I was looking at the page for the feature,
for some reason the "Other Versions" menu only listed VS 2008 and VS
2010 for me.

>> > All this should work for both MinGW(-w64)/GCC and Microsoft/MSVC
>> > headers/libraries. Note the *_l functions are only available on recent
>> > Windows versions, which should be good enough for now. Especially the
>> > locale
>> > stuff (up till now!) should work for more than only plain "C" locale.
>>
>> It's more dependent on the MSVCRT version on the system than the OS.
>> I've seen the _l versions of the APIs with VS 2005, and the claimed
>> support (assuming the proper redist is installed) is as far back as
>> Windows 95.
>
> Ok, good to know. After checking MSDN again, I did find all these functions
> in VS2005 doc pages, so that could mean XP has decent support (if kept up to
> date). I never understood how Windows, msvcrt.dll and the redistributable
> packages worked...

It's of a bit strange world.  The basic rule of thumb that never fails
is: assume there's never any MS CRT installed, and have your installer
include the DLLs or merge modules that come with the VC++ install in
the redist directory.  But you can't really rely on any specific CRT
being installed.  For instance, I'm on Win7 ultimate, and I've got
CRTs for 2010 and 2003 but not 2008 or 2005.  :-/

~Aaron




More information about the cfe-dev mailing list