On Fri, May 28, 2010 at 1:12 PM, Howard Hinnant <[email protected]> wrote:
> On May 28, 2010, at 4:10 PM, Eli Friedman wrote:
>
>> On Fri, May 28, 2010 at 11:04 AM, Howard Hinnant <[email protected]> wrote:
>>> Author: hhinnant
>>> Date: Fri May 28 13:04:31 2010
>>> New Revision: 104982
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=104982&view=rev
>>> Log:
>>> Fixed [support.types].  <cstddef> wasn't definining NULL or offsetof.
>>>
>>> Modified:
>>>    libcxx/trunk/include/cstddef
>>>
>>> Modified: libcxx/trunk/include/cstddef
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/cstddef?rev=104982&r1=104981&r2=104982&view=diff
>>> ==============================================================================
>>> --- libcxx/trunk/include/cstddef (original)
>>> +++ libcxx/trunk/include/cstddef Fri May 28 13:04:31 2010
>>> @@ -34,9 +34,11 @@
>>>  */
>>>
>>>  #include <__config>
>>> +#define __need_NULL
>>>  #define __need_ptrdiff_t
>>>  #define __need_size_t
>>>  #include <stddef.h>
>>> +#include <stddef.h>
>>
>> Umm, what?
>
> <chuckle> I know, I know.  On Mac OS the first trip through <stddef.h> 
> doesn't define offsetof.  Or said differently, offsetof doesn't get defined 
> if any of __need_* are defined.  The first trip creates the desired macros 
> and #undefines the request.  The second trip creates offsetof. <shrug>

Why not get rid of the __need_ defines and just include stddef.h once?

-Eli

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to