strftime.c 420 B

123456789101112131415161718192021
  1. /*
  2. * strftime.c
  3. * Portable strftime implementation. Uses GNU's strftime().
  4. *
  5. */
  6. #include "src/common.h"
  7. #include "strftime.h"
  8. #ifndef HAVE_STRFTIME
  9. # undef emacs
  10. # undef _LIBC
  11. # define strftime egg_strftime
  12. # include "gnu_strftime.c"
  13. #else /* HAVE_STRFTIME */
  14. size_t my_strftime(char *s, size_t max, const char *fmt, const struct tm *tm) {
  15. return strftime(s, max, fmt, tm);
  16. }
  17. #endif /* !HAVE_STRFTIME */