+#define FALSE 0 /**< no. */
+#define TRUE 1 /**< yes. */
+
+/*
+ * Wrapper around strftime() or strftime_l()
+ * depending upon how our build is configured.
+ *
+ * s String target buffer
+ * max Maximum size of string target buffer
+ * format strftime() format
+ * tm Input date/time
+ */
+size_t wc_strftime(char *s, size_t max, const char *format, const struct tm *tm)
+{
+
+#ifdef ENABLE_NLS
+#ifdef HAVE_USELOCALE
+ if (wc_locales[WC->selected_language] == NULL) {
+ return strftime(s, max, format, tm);
+ }
+ else {
+ return strftime_l(s, max, format, tm, wc_locales[WC->selected_language]);
+ }
+#else
+ return strftime(s, max, format, tm);
+#endif
+#else
+ return strftime(s, max, format, tm);
+#endif
+}