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

Csaba Raduly rcsaba at gmail.com
Mon Oct 17 00:19:38 PDT 2011


On Sun, Oct 16, 2011 at 10:34 PM, Ruben Van Boxem  wrote:
> 2011/10/16 Aaron Ballman
>>
>> On Sun, Oct 16, 2011 at 2:26 PM, Ruben Van Boxem wrote:
>> > Fresh patch attached.
>> >
>> > --- include/__config  (revision 141003)
>> > +++ include/__config  (working copy)
>> >
>> > @@ -69,17 +71,45 @@
>> >  # endif
>> >  #endif  // !defined(_LIBCPP_LITTLE_ENDIAN) ||
>> > !defined(_LIBCPP_BIG_ENDIAN)
>> >
>> > -#ifndef _LIBCPP_VISIBILITY_TAG
>> > -#define _LIBCPP_VISIBILITY_TAG 1
>> > +#if _WIN32
>> > +
>> > +// only really useful for a DLL
>> > +#ifdef _LIBCPP_DLL // this should be a compiler builtin define
>> > ideally...
>> > +# ifdef cxx_EXPORTS
>> > +#  define _LIBCPP_HIDDEN
>> > +#  define _LIBCPP_VISIBLE __cdecl(dllexport)
>> > +# else
>> > +#  define _LIBCPP_HIDDEN
>> > +#  define _LIBCPP_VISIBLE __cdecl(dllimport)
>> > +# endif
>> > +#else
>> > +# define _LIBCPP_HIDDEN
>> > +# define _LIBCPP_VISIBLE
>> >  #endif
>>
>> I hadn't noticed this previously, but I'm unfamiliar with being able
>> to use the calling convention in place of __declspec.  Is that
>> documented somewhere on MSDN?
>
> Wow, crap. those two are just too similar. My mistake. Compiler didn't
> complain though. Probably does not do what it should... Fixed patch
> attached. I'll blame it on the fact that today is sunday :/

Did you check what the compiler saw (i.e. the preprocessor output) ?
Maybe it was the last, else, branch.

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds




More information about the cfe-dev mailing list