[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mbsinit() not defined
From: |
Stepan Kasal |
Subject: |
mbsinit() not defined |
Date: |
Mon, 31 May 2004 20:24:22 +0200 |
User-agent: |
Mutt/1.4.1i |
Hello,
On Mon, May 31, 2004 at 06:58:01PM +0400, Ilya N. Golubev wrote:
> Version: 2.5
> System: i586-pc-sco3.2v5.0.2
>
> Some buggy libc's have `mbrtowc', but not `mbsinit' (violate Amendment
> 1 of ISO C90?). It appears that this is because `mbstate_t' value is
> never used by `mbrtowc' (`mbstate_t' is `char', just to shut
> compiler).
I beleive that the default on such a system should be to compile a package
without multibyte support. Current autoconf tries to achieve this.
The AC_FUNC_MBRTOWC macro checks not only for mbrtowc() but also for
mbstate_t. Perhaps it should also check for mbsinit().
It isn't clear from your message who defined `mbstate_t' to `char' in
order to shut up the compiler. You or the system library?
In other words, if the configure script tried to compile and link the
following program, what happens?
/* add some headers and defines, perhaps */
#include <wchar.h>
int main ()
{
wchar_t wc;
char const s[] = "";
size_t n = 1;
mbstate_t state;
return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
}
(The program is taken from autoconf CVS on savannah.)
Please try the above program and mail me the results.
Thank you in advance for your cooperation,
Stepan Kasal