X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrftime.c;h=cfd41adbee8ba1a6c94d4a570df30e7ff70d3aca;hb=f35893155a31779fb14ba7da078eacd97254939e;hp=b6695342a2b43db4e8cd4c24de064922e7d1d0cf;hpb=29e59276fc2d28fcbede9bad652e0e648d33fc5f;p=gnulib.git diff --git a/lib/strftime.c b/lib/strftime.c index b6695342a..cfd41adbe 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -84,10 +84,6 @@ extern char *tzname[2]; #endif -#if !__STDC__ -#define const -#endif - /* Types of padding for numbers in date and time. */ enum padding { @@ -108,7 +104,13 @@ static char const * const months[] = /* Add character C to STRING and increment LENGTH, unless LENGTH would exceed MAX. */ -#define add_char(c) (length + 1 <= max) && (string[length++] = (c)) +#define add_char(c) \ + do \ + { \ + if (length + 1 <= max) \ + string[length++] = (c); \ + } \ + while (0) /* Add a 2 digit number to STRING, padding if specified. Return the number of characters added, up to MAX. */