asctime_r.c 255 B

12345678910111213141516
  1. #include <time.h>
  2. #include <errno.h>
  3. extern void __asctime();
  4. char *asctime_r(__const struct tm *timeptr, char *buf)
  5. {
  6. if (timeptr == NULL || buf == NULL) {
  7. __set_errno (EINVAL);
  8. return NULL;
  9. }
  10. __asctime(buf, timeptr);
  11. return buf;
  12. }