diff options
author | Arthur Bergman <arthur@contiller.se> | 2001-08-16 18:01:54 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-17 01:49:12 +0000 |
commit | 2ed46c510b148e10cfdfa30b4a887b45b5ac877b (patch) | |
tree | 313a615d3b71932b8130295488485d469e4914cd /op.h | |
parent | a2669cfc51cc893fd816b89b712e8fa8035e1831 (diff) | |
download | perl-2ed46c510b148e10cfdfa30b4a887b45b5ac877b.tar.gz |
*time_r again
Message-ID: <00ca01c1265c$0175f940$21000a0a@vogw2kdev>
p4raw-id: //depot/perl@11695
Diffstat (limited to 'op.h')
-rw-r--r-- | op.h | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -464,7 +464,21 @@ struct loop { 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) +#define gmtime(a) (gmtime_r(a,PL_reentrant_buffer->tmbuff && PL_reentrant_buffer->tmbuff) + +#if defined(__hpux) && defined(__ux_version) && __ux_version <= 1020 + +/* HP-UX 10.20 returns 0 on success, what it returns on failure is hidden + in the fog somewhere, possibly -1 which means the following should do + the right thing - 20010816 sky */ + +#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) +#endif /* HP-UX 10.20 */ + #endif |