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

Kazuhiro Fujieda fujieda@jaist.ac.jp
Mon Sep 16 07:22:00 GMT 2002


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.

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



More information about the Newlib mailing list