Bruno Haible <br...@clisp.org> writes: >> Also, your proposed patch only touched the C89 tests; what about C99? > > Indeed. The mbstate_t type and mbsinit etc. functions were not part of > C89 + appendices, they were introduced in C99. Therefore, the > -D_XOPEN_SOURCE=500 option should better be added to the detection of flags > for C99, not C89. (But be careful to use it only for HP-UX! On other systems, > this flag is very likely to cause damage.)
mbstate_t and mbsinit() were introduced in Normative Amendment 1 to C89, which was released around 1995. Some compilers support NA1 features in C89 mode. GCC has C89, C95, and C99 modes: `c89' `iso9899:1990' Support all ISO C90 programs (certain GNU extensions that conflict with ISO C90 are disabled). Same as `-ansi' for C code. `iso9899:199409' ISO C90 as modified in amendment 1. `c99' `c9x' `iso9899:1999' `iso9899:199x' ISO C99. Note that this standard is not yet fully supported; see `http://gcc.gnu.org/gcc-4.3/c99status.html' for more information. The names `c9x' and `iso9899:199x' are deprecated. There is some information about C95 here: http://www.lysator.liu.se/c/na1.html -- "But hey, the fact that I have better taste than anybody else in the universe is just something I have to live with. It's not easy being me." --Linus Torvalds