+
+#ifdef emacs
+# define my_strftime emacs_strftimeu
+# define ut_argument , ut
+# define ut_argument_spec int ut;
+# define ut_argument_spec_iso , int ut
+#else
+# define my_strftime strftime
+# define ut_argument
+# define ut_argument_spec
+# define ut_argument_spec_iso
+/* We don't have this information in general. */
+# define ut 0
+#endif
+
+#if !defined _LIBC && HAVE_TZNAME && HAVE_TZSET
+ /* Solaris 2.5 tzset sometimes modifies the storage returned by localtime.
+ Work around this bug by copying *tp before it might be munged. */
+ size_t _strftime_copytm __P ((char *, size_t, const char *,
+ const struct tm * ut_argument_spec_iso));
+ size_t
+ my_strftime (s, maxsize, format, tp ut_argument)
+ char *s;
+ size_t maxsize;
+ const char *format;
+ const struct tm *tp;
+ ut_argument_spec
+ {
+ struct tm tmcopy;
+ tmcopy = *tp;
+ return _strftime_copytm (s, maxsize, format, &tmcopy ut_argument);
+ }
+# undef my_strftime
+# define my_strftime(S, Maxsize, Format, Tp) \
+ _strftime_copytm (S, Maxsize, Format, Tp)
+#endif
+
+