[cfe-dev] checker 0.195 fails on Mac (can't find 'stdint.h')

Daniel Dunbar daniel at zuster.org
Mon May 11 18:16:15 PDT 2009


On Mon, May 11, 2009 at 11:33 AM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Mon, May 11, 2009 at 11:18 AM, Daniel Dunbar <daniel at zuster.org> wrote:
>> On Mon, May 11, 2009 at 11:12 AM, Chris Lattner <clattner at apple.com> wrote:
>>>
>>> On May 9, 2009, at 6:10 PM, Daniel Dunbar wrote:
>>>
>>>> This is fallout from
>>>>  http://llvm.org/viewvc/llvm-project?view=rev&revision=70806
>>>> but I'm not sure of the right fix. As a temporary workaround, changing
>>>> --
>>>> +#if __STDC_HOSTED__
>>>> --
>>>> to
>>>> --
>>>> +#if 0
>>>> --
>>>> in clang's stdint.h should work.
>>>
>>> Eli, this is fallout from your patch, do you have an idea for a better
>>> solution?
>>
>> I think Eli's solution is fine, but we probably need an additional
>> define for whether the platform has its own stdint.h to fall back to,
>> so that we can change the #if test to something like
>> --
>> #if __STDC_HOSTED__ && __SYS_PROVIDES_STDINT__
>> --
>>
>> However, I don't exactly know what the problem Gary is seeing is; I am
>> just guessing that it is that the iPhone SDK does not include
>> stdint.h?
>>
>> Does this seem workable?
>
> Yes, that seems like the right solution; as far as I can tell, Darwin
> doesn't normally provide a system stdint.h.  I'm a little surprised it
> took nearly a week for anyone to notice, though; is there some
> commonly installed package that provides stdint.h anyway?

Darwin does have a /usr/include/stdint.h, but I think the iPhone SDK
may not, and builds may use -isysroot. I haven't verified this guess
yet though...

 - Daniel




More information about the cfe-dev mailing list