Add a #ifdef _THREAD_SAFE around ctime_r

This commit is contained in:
phk 1998-04-20 10:09:37 +00:00
parent 70fabc443b
commit 90a1b69b83

View File

@ -1345,6 +1345,7 @@ const time_t * const timep;
return asctime(localtime(timep));
}
#ifdef _THREAD_SAFE
char *
ctime_r(timep, buf)
const time_t * const timep;
@ -1353,6 +1354,7 @@ char *buf;
struct tm tm;
return asctime_r(localtime_r(timep, &tm), buf);
}
#endif
/*
** Adapted from code provided by Robert Elz, who writes: