asctime.c 276 B

123456789101112131415161718
  1. #include <time.h>
  2. #include <errno.h>
  3. extern void __asctime();
  4. char * asctime (__const struct tm *timeptr)
  5. {
  6. static char __time_buf[26];
  7. if (timeptr == NULL) {
  8. __set_errno (EINVAL);
  9. return NULL;
  10. }
  11. __asctime(__time_buf, timeptr);
  12. return __time_buf;
  13. }