Closed
Description
Bugzilla Link | 7955 |
Resolution | FIXED |
Resolved on | Oct 18, 2010 23:16 |
Version | trunk |
OS | Windows XP |
Blocks | llvm/llvm-bugzilla-archive#8390 |
Reporter | LLVM Bugzilla Contributor |
CC | @asl |
Extended Description
Greetings,
in order to function properly with other MinGW headers, it should be possible to include Clang's stddef.h more than once bypassing the __STDDEF_H include guard.
For example stdio.h includes stddef.h with __need_wint_t to define wint_t, and it may fail if stddef.h has been included before without __need_wint_t defined.
I've solved this issue by moving the whole block defining wint_t outside the __STDDEF_H include guard. It should not have any side effects.
BTW, the comment "Some C libraries expect to see a wint_t here. Others (notably MinGW) will use WINT_TYPE directly" is misleading: at least the current MinGW does expect wint_t in stddef.h.
Thanks,
Salvo