summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-03-15 16:07:58 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-15 16:07:58 +0000
commit10bc17b68c7666cd045658934ccb75dd788c8972 (patch)
tree0a97f4e9c6e3aa079acc3ca0c75d94be194c1387 /op.h
parent6ab308ee9dcbdd9e40dc1aa7ca450e7f854eb8fe (diff)
downloadperl-10bc17b68c7666cd045658934ccb75dd788c8972.tar.gz
Monster _r patch: try to scan for all known _r variants,
and then use them (under ithreads). May fail in HP-UX, and the op/groups is known to be fickle everywhere. Known to work in Solaris, Linux, Tru64, IRIX, AIX. (Some compiler warnings in AIX since the first arguments of getnetbyaddr and getnetbyadd_r are of different types. Thanks, IBM.) In non-Configure platforms deny the existence of any of the _r thingies. (Also add the recently introduced d_tm_* to places it wasn't already in.) TODO: the suggested glibc buffer growth retry loop in case some entries (at least for: gr*, host*) are big. Forgot win32/config.win64. p4raw-id: //depot/perl@15238
Diffstat (limited to 'op.h')
-rw-r--r--op.h21
1 files changed, 1 insertions, 20 deletions
diff --git a/op.h b/op.h
index da59e441b8..5c6a78ff4c 100644
--- a/op.h
+++ b/op.h
@@ -477,25 +477,6 @@ struct loop {
#define PERL_LOADMOD_IMPORT_OPS 0x4
#ifdef USE_REENTRANT_API
-
-typedef struct {
- struct tm* tmbuf;
-} REENTBUF;
-
-#define localtime(a) (localtime_r((a),PL_reentrant_buffer->tmbuf) ? PL_reentrant_buffer->tmbuf : NULL)
-#define gmtime(a) (gmtime_r((a),PL_reentrant_buffer->tmbuf) ? PL_reentrant_buffer->tmbuf : NULL)
-
-#ifdef OLD_PTHREADS_API
-
-/* 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->tmbuf) == 0) ? PL_reentrant_buffer->tmbuf : NULL)
-#define gmtime(a) ((gmtime_r((a),PL_reentrant_buffer->tmbuf) == 0) ? PL_reentrant_buffer->tmbuf : NULL)
-#endif /* HP-UX 10.20 */
-
+#include "reentr.h"
#endif