(add): Use it to avoid adding 0 to a FILE *. FILE can be
an incomplete type, so you can't add 0 to it. Problem reported
by Eelco Dolstra for dietlibc.
+2006-10-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ * lib/strftime.c (advance): New macro.
+ (add): Use it to avoid adding 0 to a FILE *. FILE can be
+ an incomplete type, so you can't add 0 to it. Problem reported
+ by Eelco Dolstra for dietlibc.
+
2006-10-18 Jim Meyering <jim@meyering.net>
* lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
# define memset_zero(P, Len) (memset (P, '0', Len), (P) += (Len))
#endif
+#if FPRINTFTIME
+# define advance(P, N)
+#else
+# define advance(P, N) ((P) += (N))
+#endif
+
#define add(n, f) \
do \
{ \
memset_space (p, _delta); \
} \
f; \
- p += FPRINTFTIME ? 0 : _n; \
+ advance (p, _n); \
} \
i += _incr; \
} while (0)