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

Ruben Van Boxem vanboxem.ruben at gmail.com
Fri Sep 23 00:12:58 PDT 2011


Op 23 sep. 2011 04:35 schreef "Ahmed Charles" <ahmedcharles at gmail.com> het
volgende:
>
> Note: msvcrt.dll is not a msvc shipped and supported dll, despite its
> name. It's a windows implementation detail, essentially. The shipped
> and supported msvc dlls are all msvcrt*.dll where * is a version
> number, like 80 for 2005.

Every MinGW app links to the OS-provided msvcrt.dll by default. It had been
like this since the beginning, and it works well. You can explicitly link
the numbered versions too, though. Of course it's 'supported' (it's a core
part of the OS) and it's been shipped with Windows since every version after
98.

The exported API does change from Windows version to Windows version. Libc++
cannot explicitly link to a predefined version, as this would limit the
binary's compatibility.

Ruben

>
> And the only way to ensure that the dlls are there is to ship them.
> From: Aaron Ballman
> Sent: Thursday, September 22, 2011 12:29 PM
> To: vanboxem.ruben at gmail.com
> Cc: cfe-dev Developers
> Subject: Re: [cfe-dev] [PATCH] Libc++ Windows fixes
> 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
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110923/992efb43/attachment.html>


More information about the cfe-dev mailing list