diff options
| author | Sascha Schumann <sas@php.net> | 2001-05-20 21:29:55 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 2001-05-20 21:29:55 +0000 |
| commit | ff5a9de31d886f6b052eedaad28f39a878ec55b4 (patch) | |
| tree | 7204010e804527cc27aa9a56a17e15457ac21c4f /main/reentrancy.c | |
| parent | 7dfce52fdc73147b783b50e2ef3ff9944b84f02c (diff) | |
| download | php-git-ff5a9de31d886f6b052eedaad28f39a878ec55b4.tar.gz | |
Support for IRIX-style asctime_r/ctime_r.
Diffstat (limited to 'main/reentrancy.c')
| -rw-r--r-- | main/reentrancy.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/main/reentrancy.c b/main/reentrancy.c index a6a7cc563a..d4049ee77d 100644 --- a/main/reentrancy.c +++ b/main/reentrancy.c @@ -56,6 +56,27 @@ static MUTEX_T reentrant_locks[NUMBER_OF_LOCKS]; #endif +#if defined(PHP_IRIX_TIME_R) + +#define HAVE_CTIME_R 1 +#define HAVE_ASCTIME_R 1 + +PHPAPI char *php_ctime_r(const time_t *clock, char *buf) +{ + if (ctime_r(clock, buf, 26) == buf) + return (buf); + return (NULL); +} + +PHPAPI char *php_asctime_r(const struct tm *tm, char *buf) +{ + if (asctime_r(tm, buf, 26) == buf) + return (buf); + return (NULL); +} + +#endif + #if defined(PHP_HPUX_TIME_R) #define HAVE_LOCALTIME_R 1 |
