Bug #2265
Updated by c.turner1 almost 13 years ago
Was attempting to fix the lang/racket port and discovered a coredump in the autoconf tests -
this coredumps (-HEAD from ~1mo ago / i386 / gcc44):
#include <wchar.h>
int main() {
mbstate_t state;
char *src = "X";
mbsrtowcs(0, &src, 0, &state);
return 0;
}
whereas this (or passing NULL instead of &state), does not:
#include <wchar.h>
#include <strings.h>
int main() {
mbstate_t state;
bzero(&state, sizeof(mbstate_t));
char *src = "X";
mbsrtowcs(0, &src, 0, &state);
return 0;
}
As I understand it - posix specifies that this should EINVAL as
it is an 'invalid conversion state'
http://pubs.opengroup.org/onlinepubs/009604599/functions/mbsrtowcs.html
that being said, I'm not particularly versed in these routines, in which
case, the test case is likely bad, or perhaps this is unspecified in posix.
comments welcome in reguards to these various factors.
I seem to recall some murmurings about updating citrus at some point -
perhaps this issue is resolved upstream there / could be tackled then.
for now, I'll be hacking the configure script and proceeding with the pkg
Cheers,
- Chris