+2009-01-16 Bruno Haible <bruno@clisp.org>
+
+ * m4/printf.m4 (gl_SNPRINTF_SIZE1, gl_VSNPRINTF_ZEROSIZE_C99): Use an
+ array initializer syntax that also works in C++ mode.
+ Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
+
2009-01-16 Jim Meyering <meyering@redhat.com>
poll: suppress a warning
-# printf.m4 serial 26
+# printf.m4 serial 27
dnl Copyright (C) 2003, 2007-2009 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
#include <stdio.h>
int main()
{
- static char buf[8] = "DEADBEEF";
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
snprintf (buf, 1, "%d", 12345);
return buf[1] != 'E';
}],
dnl #include <stdio.h>
dnl int main()
dnl {
-dnl static char buf[8] = "DEADBEEF";
+dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
dnl snprintf (buf, 0, "%d", 12345);
dnl return buf[0] != 'D';
dnl }
dnl }
dnl int main()
dnl {
-dnl static char buf[8] = "DEADBEEF";
+dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
dnl my_snprintf (buf, 0, "%d", 12345);
dnl return buf[0] != 'D';
dnl }
}
int main()
{
- static char buf[8] = "DEADBEEF";
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
my_snprintf (buf, 0, "%d", 12345);
return buf[0] != 'D';
}],