lib/sanitizer_common/sanitizer_win_defs.h defineds WINAPI, which is also defined by standard Windows headers. Redefining it causes warnings during compilation. This change causes us to only define WINAPI if it is not already defined, which avoids the warnings.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Instead of defining WINAPI ourselves? I would be happy with that. Would you like me to make that change?
Comment Actions
Yea it seems like the more correct thing to do, at least to me. Not sure if someone disagrees though.
Comment Actions
Yes. Technically it's considered an implementation detail of the windows api, so yous houldn't include it directly. But the value of WINAPI is also an implementation detail.
Comment Actions
Including minwindef.h makes the compiler very unhappy, complaining about a lot of undefined types and identifiers. I guess if we wanted to include something, we would have to include something much larger. I think there is a good argument to be made to just define the one macro we care about here. Ok to ship as-is?