#endif
/* Use the reentrant APIs like localtime_r and getpwent_r */
-#if defined(USE_THREADS) && defined(USE_ITHREADS) && !defined(USE_REENTRANT_API)
+/* Win32 has naturally threadsafe libraries, no need to use any _r variants. */
+#if defined(USE_ITHREADS) && !defined(USE_REENTRANT_API) && !defined(WIN32)
# define USE_REENTRANT_API
#endif
-/* Win32 has naturally threadsafe libraries,
- * no need to use any _r variants. */
-#ifdef USE_REENTRANT_API
-# ifdef 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.
*/
/* flags in PL_exit_flags for nature of exit() */
#define PERL_EXIT_EXPECTED 0x01
+#define PERL_EXIT_DESTRUCT_END 0x02 /* Run END in perl_destruct */
#ifndef MEMBER_TO_FPTR
# define MEMBER_TO_FPTR(name) name