[cfe-commits] [PATCH] 7571: stddef.h and wint_t

Jay Foad jay.foad at gmail.com
Sat Jul 10 12:42:01 PDT 2010

>> 1. to define wint_t
>> 2. to declare all the stuff that the standard says stddef.h should declare
> What requires it to have this behavior?

Glibc's wctype.h tries to get wint_t defined by including stddef.h:


   3 /* We try to get wint_t from <stddef.h>, but not all GCC versions define it
   4    there.  So define it ourselves if it remains undefined.  */
   5 # define __need_wint_t
   6 # include <stddef.h>
   7 # ifndef _WINT_T
   8 /* Integral type unchanged by default argument promotions that can
   9    hold any value corresponding to members of the extended character
  10    set, as well as at least one value that does not correspond to any
  11    member of the extended character set.  */
  12 #  define _WINT_T
  13 typedef unsigned int wint_t;
  14 # endif

I'm not an expert on these issues. Most of what I know comes from
reading the comments on bug 6691. I'd be very happy to hear from
someone who knows more about it.


More information about the cfe-commits mailing list