cvs: php4 /main php_reentrancy.h reentrancy.c
| From: | David Reid | Date: | Mon, 04 Nov 2002 21:20:53 +0000 |
| Subject: | cvs: php4 /main php_reentrancy.h reentrancy.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-15801@lists.php.net to get a copy of this message | ||
dreid Mon Nov 4 16:20:53 2002 EDT
Modified files:
/php4/main php_reentrancy.h reentrancy.c
Log:
Work around a daft mistake in the beos headers...
Index: php4/main/php_reentrancy.h
diff -u php4/main/php_reentrancy.h:1.16 php4/main/php_reentrancy.h:1.17
--- php4/main/php_reentrancy.h:1.16 Thu Feb 28 03:27:04 2002
+++ php4/main/php_reentrancy.h Mon Nov 4 16:20:52 2002
@@ -88,7 +88,7 @@
#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
Index: php4/main/reentrancy.c
diff -u php4/main/reentrancy.c:1.34 php4/main/reentrancy.c:1.35
--- php4/main/reentrancy.c:1.34 Wed Sep 11 05:30:01 2002
+++ php4/main/reentrancy.c Mon Nov 4 16:20:52 2002
@@ -164,6 +164,18 @@
#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,