*time_r fixes
Arthur Bergman [Thu, 16 Aug 2001 14:22:27 +0000 (16:22 +0200)]
Message-ID: <00b901c1264e$1cbe6970$21000a0a@vogw2kdev>

p4raw-id: //depot/perl@11690

op.h

diff --git a/op.h b/op.h
index e92b1d8..e55d546 100644 (file)
--- a/op.h
+++ b/op.h
@@ -464,7 +464,7 @@ struct loop {
 typedef struct {
   struct tm* tmbuff;
 } REBUF;
-#define localtime(a)       localtime_r(a,PL_reentrant_buffer->tmbuff)
-#define gmtime(a)          gmtime_r(a,PL_reentrant_buffer->tmbuff)
+#define localtime(a)       (localtime_r(a,PL_reentrant_buffer->tmbuff) && PL_reentrant_buffer->tmbuff)
+#define gmtime(a)          (gmtime_r(a,PL_reentrant_buffer->tmbuff) && PL_reentrant_buffer->tmbuff)
 #endif