/* Charset conversion.
- Copyright (C) 2001-2006 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software; you can redistribute it and/or modify
/* Determine the length we need. */
{
size_t count = 0;
- char tmpbuf[tmpbufsize];
+ /* The alignment is needed when converting e.g. to glibc's WCHAR_T or
+ libiconv's UCS-4-INTERNAL encoding. */
+ union { unsigned int align; char buf[tmpbufsize]; } tmp;
+# define tmpbuf tmp.buf
const char *inptr = src;
size_t insize = srclen;
}
# endif
length = count;
+# undef tmpbuf
}
if (length == 0)