+2007-01-10 Bruno Haible <bruno@clisp.org>
+
+ * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
+
2007-01-12 Eric Blake <ebb9@byu.net>
Provide a robust <wchar.h>. Further simplifications are now
/* 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)