[issue5999] compile error on HP-UX 11.22 ia64 - 'mbstate_t' is used as a type, but has not been defined as a type
Sridhar Ratnakumar
report at bugs.python.org
Tue Jun 30 00:47:04 CEST 2009
Sridhar Ratnakumar <sridharr at activestate.com> added the comment:
Hello Martin,
My apologies for responding so late.
[Martin] Also, please confirm a few things: a. configure has detected
that your system has mbrtowc (...)
# Yes, as can be seen in the attached config.log
[Martin] (...) b. configure's analysis is correct, i.e. your system has
mbrtowc indeed.
# Yes, `mbrtowc` is present as the following C programs compiles and
runs successfully:
#include <wchar.h>
int main()
{
printf("Init\n");
mbrtowc(NULL, "", 1, NULL);
}
[Martin] does your system provide the mbstate_t type? if so, what
header file needs to be included?
`mbstate_t` seems to exist in /usr/include/wchar.h .. however,
including <wchar.h> does not seem to work:
bash-2.04$ cc +DD64 -Ae -D_REENTRANT +Z --version
cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]
bash-2.04$ cat test.c
#include <wchar.h>
int main()
{
mbstate_t foo;
printf("Init\n");
mbrtowc(NULL, "", 1, NULL);
}
bash-2.04$ cc test.c -o test
Error 419: "test.c", line 6 # 'mbstate_t' is used as a type, but has
not been defined as a type.
mbstate_t foo;
^^^^^^^^^
bash-2.04$ aCC test.c -o test
Error 403: "test.c", line 8 # Undeclared variable 'mbrtowc'. Perhaps
'mbtowc' as in "int mbtowc(wchar_t *,const char *,unsigned long)" ["/
usr/include/stdlib.h", line 169] was intended.
mbrtowc(NULL, "", 1, NULL);
^^^^^^^
cf. http://www.mail-archive.com/lftp-devel@uniyar.ac.ru/msg00602.html
----------
Added file: http://bugs.python.org/file14397/config.log
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5999>
_______________________________________
More information about the Python-bugs-list
mailing list