]> granicus.if.org Git - php/commitdiff
Work around a daft mistake in the beos headers...
authorDavid Reid <dreid@php.net>
Mon, 4 Nov 2002 21:20:52 +0000 (21:20 +0000)
committerDavid Reid <dreid@php.net>
Mon, 4 Nov 2002 21:20:52 +0000 (21:20 +0000)
main/php_reentrancy.h
main/reentrancy.c

index 2908283faef771e963a3ef795d6c2f6f8572328d..a016d331cfbfc20d1e9a8d4b78a897bb6145fd12 100644 (file)
@@ -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
index 73e3b8eb8d516aa25d260c9feb6358512a8970d2..27e94a70a0a59b81e50767fdf1f18c439f3c9d8c 100644 (file)
@@ -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,