diff options
author | Sascha Schumann <sas@php.net> | 2000-03-03 16:10:38 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2000-03-03 16:10:38 +0000 |
commit | 3bfe29fddbdd2817889a25bbec89fd8c7caa0db0 (patch) | |
tree | 7817149d0d639705db119690d88a09babf570005 /main/reentrancy.c | |
parent | b053e6422fee27acae2fc5888890525bbc6a2298 (diff) | |
download | php-git-3bfe29fddbdd2817889a25bbec89fd8c7caa0db0.tar.gz |
Support HP-UX 10.x non-standard time-related reentrant functions
Diffstat (limited to 'main/reentrancy.c')
-rw-r--r-- | main/reentrancy.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/main/reentrancy.c b/main/reentrancy.c index f02522f720..c1d1e7400b 100644 --- a/main/reentrancy.c +++ b/main/reentrancy.c @@ -46,7 +46,42 @@ static MUTEX_T reentrant_locks[NUMBER_OF_LOCKS]; #endif +#if defined(PHP_HPUX_TIME_R) +PHPAPI struct tm *localtime_r(const time_t *const timep, struct tm *p_tm) +{ +#undef localtime_r + if (localtime_r(timep, p_tm) == 0) + return (p_tm); + return (NULL); +} + +PHPAPI char *ctime_r(const time_t *clock, char *buf) +{ +#undef ctime_r + if (ctime_r(clock, buf, 26) != -1) + return (buf); + return (NULL); +} + +PHPAPI char *asctime_r(const struct tm *tm, char *buf) +{ +#undef asctime_r + if (asctime_r(tm, buf, 26) != -1) + return (buf); + return (NULL); +} + +PHPAPI struct tm *gmtime_r(const time_t *const timep, struct tm *p_tm) +{ +#undef gmtime_r + if (gmtime_r(timep, p_tm) == 0) + return (p_tm); + return (NULL); +} + +#endif + #if !defined(HAVE_LOCALTIME_R) && defined(HAVE_LOCALTIME) PHPAPI struct tm *localtime_r(const time_t *const timep, struct tm *p_tm) |