[cfe-commits] r105985 - /cfe/trunk/lib/Headers/stddef.h

Daniel Dunbar daniel at zuster.org
Tue Jun 15 07:29:19 PDT 2010


On Mon, Jun 14, 2010 at 7:36 PM, Sean Hunt <rideau3 at gmail.com> wrote:
> Author: coppro
> Date: Mon Jun 14 21:36:48 2010
> New Revision: 105985
>
> URL: http://llvm.org/viewvc/llvm-project?rev=105985&view=rev
> Log:
> MinGW requires that wint_t be defined in stddef.h. In order to accomodate, we
> won't define it unless specifically requested via the use of __need_wint_t.

Who is setting __need_wint_t? I'm not really sure this is something
that belongs in our stddef.h.

 - Daniel

>
> Modified:
>    cfe/trunk/lib/Headers/stddef.h
>
> Modified: cfe/trunk/lib/Headers/stddef.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/stddef.h?rev=105985&r1=105984&r2=105985&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Headers/stddef.h (original)
> +++ cfe/trunk/lib/Headers/stddef.h Mon Jun 14 21:36:48 2010
> @@ -45,6 +45,13 @@
>  #define NULL ((void*)0)
>  #endif
>
> +// Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
> +// __WINT_TYPE__ directly; accomodate both by requiring __need_wint_t
> +#if defined(__need_wint_t) && !defined(_WINT_T)
> +#define _WINT_T
> +typedef __WINT_TYPE__ wint_t;
> +#endif
> +
>  #define offsetof(t, d) __builtin_offsetof(t, d)
>
>  #endif /* __STDDEF_H */
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>




More information about the cfe-commits mailing list