Browse Source

Work around a daft mistake in the beos headers...

experimental/threaded
David Reid 24 years ago
parent
commit
464d8ca5c1
  1. 2
      main/php_reentrancy.h
  2. 12
      main/reentrancy.c

2
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

12
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,

Loading…
Cancel
Save