This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mbstate_t and EOF in sys/_types.h for Cygwin.


On Mon, 2002-09-16 at 10:22, Kazuhiro Fujieda wrote:
> Why are mbstate_t and EOF defined as the following in
> sys/_types.h for only Cygwin?
> 
> #ifdef __CYGWIN__
> # ifndef MBSTATE_T
> #  define MBSTATE_T
> typedef _mbstate_t mbstate_t;
> # endif /* MBSTATE_T */
> # define WEOF (0xffffffffu)
> #endif /* __CYGWIN__ */
> 
> `mbstate_t' and WEOF are standardized in ISO C.  I can't
> understand why such standard definitions are defined in
> sys/_types.h.
> 

This was done as a temporary hack to get around build conflicts arising
from the fact that cygwin provides its own wchar.h.

Now that newlib provides a wchar.h, cygwin should use it, and a
sys/wchar.h within newlib for its specific wchar requirements.

Tom

> BTW, MBSTATE_T is a incorrect macro name.  ISO C requires
> implementation-specific macro names to begin with a underscore.
> ____
>   | AIST      Kazuhiro Fujieda <fujieda@jaist.ac.jp>
>   | HOKURIKU  Center for Information Science
> o_/ 1990      Japan Advanced Institute of Science and Technology
> 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]