Albert Chin wrote: > I missed another > platform where this is a problem, IRIX. Using the same gnulib-tool > invocation as on HP-UX: > $ ./gnulib-tool --create-testdir --dir=t arpa_inet crypto/md5 \ > environ filemode fnmatch fnmatch-gnu getdate gettext glob human \ > iconv_open inet_pton lstat mbswidth memmem mktime modechange poll \ > regex socklen strcase strftime strptime strtok_r vsnprintf \ > vsnprintf-posix wcwidth > $ cd t > $ ./configure > $ gmake > ... > cc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -c -o getdate.o getdate.c > cc-1020 cc: ERROR File = ./wchar.h, Line = 258 > The identifier "mbstate_t" is undefined. > > extern size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps); > ^ > > cc-3425 cc: WARNING File = /usr/include/internal/wchar_core.h, Line = 425 > pragma usage is incorrect as it expects a function or variable name > > #pragma optional wcrtomb > ^ > > 1 error detected in the compilation of "getdate.c". > gmake[2]: *** [getdate.o] Error 2 > > $ cd gllib > $ cc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -E getdate.c | \ > grep mbstate_t | head -2 > extern size_t rpl_wcrtomb (char *s, wchar_t wc, mbstate_t *ps); > typedef char mbstate_t;
Thanks for reporting this. Can you send me the complete output of "cc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -E getdate.c", please, together with a copy of the system include files that are involved? (Private mail is ok in this case.) I don't reproduce the problem on IRIX 6.5, therefore I have to rely on your input. > How about adding something like "|| (defined __sgi && defined > _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)" to your patch? That may or may not be the right fix. Let's analyze it first. Bruno