bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gawk mbstate_t problem on hppa2.0w-hp-hpux11.11


From: Stepan Kasal
Subject: Re: gawk mbstate_t problem on hppa2.0w-hp-hpux11.11
Date: Tue, 9 Dec 2003 12:16:20 +0100
User-agent: Mutt/1.4.1i

Hello,

On Sat, Dec 06, 2003 at 01:09:19PM -0500, Michael Elizabeth Chastain wrote:
> I'm building gawk 3.1.3 on hppa2.0w-hp-hpux11.11 with gcc 3.3.2.
> The build fails due to an undefined type mbstate_t.

> +#if defined(__hpux__)
> +#include <sys/_mbstate_t.h>
> +#endif

>   http://www.mail-archive.com/address@hidden/msg09546.html

Yeah, I've written this post.  But a long discussion followed.

Including the header is not clean solution.  What if a future version of
HPUX will remove it.  gawk wouldn't bulid then.

We've also discussed defining _XOPEN_SOURCE=500 or defining
_INCLUDE__STDC_A1_SOURCE.
But again, manipulating an undocumented define (_INCLUDE__STDC_A1_SOURCE)
might be hazardeous.   _XOPEN_SOURCE is documented, in theory, but in
real life it often breaks something.

So I was convinced that none of these hacks qualifies for inclusion into
the main tree.  They can be mentioned in README.d/README.hpux though.
(Please note that this statement is only my opinion, and I'm not the
gawk maintainer.)

>   AC_TYPE_MBSTATE_T -- more info

Please see also AC_FUNC_MBRTOWC.
If we use it (insetad of the generic check), it also checks for mbstate_t.
If mbstate_t is not declared by wchar.h, HAVE_MBRTOWC is not defined.

The net result would be that on broken platforms (like hpux), multibyte
support would be switched off.

So this is my opinion how things should be solved in future versions
of gawk.

Have a nice day,
        Stepan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]