From: Jarkko Hietaniemi Date: Sun, 12 Aug 2001 16:55:31 +0000 (+0000) Subject: On ithreads default to use_reentrant except on naturally X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3d62afa2fe4f633de972ecfb12ef158a84f558f8;p=p5sagit%2Fp5-mst-13.2.git On ithreads default to use_reentrant except on naturally threadsafe platforms. p4raw-id: //depot/perl@11645 --- diff --git a/perl.h b/perl.h index cba24be..d224709 100644 --- a/perl.h +++ b/perl.h @@ -438,6 +438,19 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # endif #endif +/* Use the reentrant APIs like localtime_r and getpwent_r */ +#if defined(USE_THREADS) && defined(USE_ITHREADS) && !defined(USE_REENTRANT) +# define USE_REENTRANT +#endif + +/* Tru64/Digital UNIX/DEC OSF/1 and Win32 have naturally + * threadsafe libraries, no need to use any _r variants. */ +#ifdef USE_REENTRANT_API +# if (defined(__osf__) && defined(__alpha)) || defined(WIN32) +# undef USE_REEENTRANT_API +# endif +#endif + /* HP-UX 10.X CMA (Common Multithreaded Architecure) insists that pthread.h must be included before all other header files. */ @@ -4016,8 +4029,6 @@ extern void moncontrol(int); HAS_STRUCT_MSGHDR HAS_STRUCT_CMSGHDR - USE_REENTRANT_API - HAS_NL_LANGINFO so that Configure picks them up. */