diff options
| author | David Reid <dreid@php.net> | 2002-11-04 21:20:52 +0000 |
|---|---|---|
| committer | David Reid <dreid@php.net> | 2002-11-04 21:20:52 +0000 |
| commit | 464d8ca5c1650975e7181a42998fcf8e9d8147f3 (patch) | |
| tree | 4e7fa2c6e7e1761d1ea2f5709b8b40ca9973427f | |
| parent | 7dd124803cfbc92b40aa3fb11093e9f7bd4f951e (diff) | |
| download | php-git-464d8ca5c1650975e7181a42998fcf8e9d8147f3.tar.gz | |
Work around a daft mistake in the beos headers...
| -rw-r--r-- | main/php_reentrancy.h | 2 | ||||
| -rw-r--r-- | main/reentrancy.c | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/main/php_reentrancy.h b/main/php_reentrancy.h index 2908283fae..a016d331cf 100644 --- a/main/php_reentrancy.h +++ b/main/php_reentrancy.h @@ -88,7 +88,7 @@ char *asctime_r(const struct tm *tm, char *buf); #endif -#if !defined(HAVE_GMTIME_R) && defined(HAVE_GMTIME) +#if !defined(HAVE_GMTIME_R) && defined(HAVE_GMTIME) || defined(__BEOS__) #define PHP_NEED_REENTRANCY 1 PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm); #else diff --git a/main/reentrancy.c b/main/reentrancy.c index 73e3b8eb8d..27e94a70a0 100644 --- a/main/reentrancy.c +++ b/main/reentrancy.c @@ -164,6 +164,18 @@ PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm) #endif /* NETWARE */ +#if defined(__BEOS__) + +PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm) +{ + /* Modified according to LibC definition */ + if (((struct tm*)gmtime_r(timep, p_tm)) == p_tm) + return (p_tm); + return (NULL); +} + +#endif /* BEOS */ + #if !defined(HAVE_POSIX_READDIR_R) PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry, |
