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

Howard Hinnant hhinnant at apple.com
Thu Jun 30 13:57:01 PDT 2011


On Jun 28, 2011, at 3:15 PM, Ruben Van Boxem wrote:

> This is a larger patch with a bit more changes. I added a
> win32/support.h/cpp to add any missing functionality. For now that's
> only a simple enum and a simple vasprintf implementation.
> 
> Note that to get as far as this, with the current _STD macro problem
> (because it is used internally in the MS headers), you need to add a
> temporary workaround #define in the problematic file. That does not
> have to be committed!

I'll just change _STD to _VSTD (versioned std).  Is _VSTD already taken on windows?

> 
> The cerrno macro's are from Boost, so "yes, they are correct", and
> "no, there are no license restrictions whatsoever". The _strto*_l
> functions are available on Windows msvcrt version 7. That's the
> default somewhere Vista/7-ish, so those aren't available on XP. I
> believe the Linux locale patch also takes into consideration providing
> a Windows alternative with little or no modification.

These constants appear to me to be public knowledge (i.e. no copyright issues).

> 
> I'm quite sure the win32/support.h/cpp isn't the nicest solution,
> please do as you wish, there just needs to be a central place to add
> missing fundamental functionality. Perhaps a larger splitting of OS
> dependent functionality might be appropriate in the future.
> 
> As of with this patch (which includes the _STD clash workaround, I am
> now stranded at the catopen call in __locale, which as a little
> googling shows is very non-Windows-ish, and perhaps needs a lot more
> than just extra constants, #defines and #includes.
> 
> I would be pleased if anyone would commit at least the part of it they like :)

Let me commit the _STD -> _VSTD first, and then create a new patch using that.

Howard




More information about the cfe-dev mailing list