mkstemps, mkostemps: new modules
[gnulib.git] / lib / strftime.c
index 4467415..7d64c15 100644 (file)
@@ -199,6 +199,8 @@ extern char *tzname[];
 #if FPRINTFTIME
 # define cpy(n, s) \
     add ((n),                                                                \
+     do                                                                              \
+       {                                                                     \
         if (to_lowcase)                                                      \
           fwrite_lowcase (p, (s), _n);                                       \
         else if (to_uppcase)                                                 \
@@ -211,8 +213,11 @@ extern char *tzname[];
                is intended to be consistent with the one from ISO C,         \
                which permits failure due to ENOMEM *without* setting the     \
                stream's error indicator.  */                                 \
-            ignore_value (fwrite ((s), _n, 1, p)))                           \
-          }
+            ignore_value (fwrite ((s), _n, 1, p));                           \
+          }                                                                  \
+       }                                                                     \
+     while (0)                                                               \
+    )
 #else
 # define cpy(n, s)                                                           \
     add ((n),                                                                \