http://llvm.org/bugs/show_bug.cgi?id=7955

           Summary: Clang's stddef.h, wint_t and MinGW headers
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: Headers
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to