summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2001-08-17 07:11:24 +0000
committerArtur Bergman <sky@nanisky.com>2001-08-17 07:11:24 +0000
commit6e126ccdf64222c0f9ab183255cb53a8589a1e63 (patch)
tree1623f8193cd54051bf8f9b0c28174b4a86fa96b7 /op.h
parent31d77e546f9eed28b984703264e32f2200f7aa8b (diff)
downloadperl-6e126ccdf64222c0f9ab183255cb53a8589a1e63.tar.gz
Fixed macros for localtime_r under USE_REENTRANT_API, also fixed for HP-UX 10.20
Thanks to Tom Hospel for pointing out my error. p4raw-id: //depot/perl@11703
Diffstat (limited to 'op.h')
-rw-r--r--op.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/op.h b/op.h
index 0b4d555f1e..dbfaced5fb 100644
--- a/op.h
+++ b/op.h
@@ -465,8 +465,8 @@ typedef struct {
struct tm* tmbuff;
} REBUF;
-#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)
+#define localtime(a) (localtime_r((a),PL_reentrant_buffer->tmbuff) ? PL_reentrant_buffer->tmbuff : NULL)
+#define gmtime(a) (gmtime_r((a),PL_reentrant_buffer->tmbuff) ? PL_reentrant_buffer->tmbuff : NULL)
#if defined(__hpux) && defined(__ux_version) && __ux_version <= 1020
@@ -476,8 +476,8 @@ typedef struct {
#undef localtime
#undef gmtime
-#define localtime(a) ((localtime_r(a,PL_reentrant_buffer->tmbuff)+1) && PL_reentrant_buffer->tmbuff)
-#define gmtime(a) ((gmtime_r(a,PL_reentrant_buffer->tmbuff)+1) && PL_reentrant_buffer->tmbuff)
+#define localtime(a) ((localtime_r((a),PL_reentrant_buffer->tmbuff) == 0) ? PL_reentrant_buffer->tmbuff : NULL)
+#define gmtime(a) ((gmtime_r((a),PL_reentrant_buffer->tmbuff) == 0) ? PL_reentrant_buffer->tmbuff : NULL)
#endif /* HP-UX 10.20 */
#endif