/* XXX This next guard can disappear if the sources are revised
to use USE_5005THREADS throughout. -- A.D 1/6/2000
*/
-#if defined(USE_ITHREADS) && defined(USE_THREADS)
-# include "error: USE_ITHREADS and USE_THREADS are incompatible"
+#if defined(USE_ITHREADS) && defined(USE_5005THREADS)
+# include "error: USE_ITHREADS and USE_5005THREADS are incompatible"
#endif
/* See L<perlguts/"The Perl API"> for detailed notes on
# endif
#endif
-#ifdef USE_THREADS
+#ifdef USE_5005THREADS
# ifndef PERL_IMPLICIT_CONTEXT
# define PERL_IMPLICIT_CONTEXT
# endif
#else /* !PERL_OBJECT */
#ifdef PERL_IMPLICIT_CONTEXT
-# ifdef USE_THREADS
+# ifdef USE_5005THREADS
struct perl_thread;
# define pTHX register struct perl_thread *thr
# define aTHX thr
#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.
*/
-#if (defined(USE_THREADS) || defined(USE_ITHREADS)) \
+#if (defined(USE_5005THREADS) || defined(USE_ITHREADS)) \
&& defined(PTHREAD_H_FIRST) && defined(I_PTHREAD)
# include <pthread.h>
#endif
# define INCLUDE_PROTOTYPES /* for <socks.h> */
# define PERL_SOCKS_NEED_PROTOTYPES
# endif
-# ifdef USE_THREADS
+# ifdef USE_5005THREADS
# define PERL_USE_THREADS /* store our value */
-# undef USE_THREADS
+# undef USE_5005THREADS
# endif
# include <socks.h>
-# ifdef USE_THREADS
-# undef USE_THREADS /* socks.h does this on its own */
+# ifdef USE_5005THREADS
+# undef USE_5005THREADS /* socks.h does this on its own */
# endif
# ifdef PERL_USE_THREADS
-# define USE_THREADS /* restore our value */
+# define USE_5005THREADS /* restore our value */
# undef PERL_USE_THREADS
# endif
# ifdef PERL_SOCKS_NEED_PROTOTYPES /* keep cpp space clean */
# define SETERRNO(errcode,vmserrcode) (errno = (errcode))
#endif
-#ifdef USE_THREADS
+#ifdef USE_5005THREADS
# define ERRSV (thr->errsv)
# define DEFSV THREADSV(0)
# define SAVE_DEFSV save_threadsv(0)
# define ERRSV GvSV(PL_errgv)
# define DEFSV GvSV(PL_defgv)
# define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv))
-#endif /* USE_THREADS */
+#endif /* USE_5005THREADS */
#define ERRHV GvHV(PL_errgv) /* XXX unused, here for compatibility */
#endif
/*
- * USE_THREADS needs to be after unixish.h as <pthread.h> includes
+ * USE_5005THREADS needs to be after unixish.h as <pthread.h> includes
* <sys/signal.h> which defines NSIG - which will stop inclusion of <signal.h>
* this results in many functions being undeclared which bothers C++
* May make sense to have threads after "*ish.h" anyway
*/
-#if defined(USE_THREADS) || defined(USE_ITHREADS)
-# if defined(USE_THREADS)
+#if defined(USE_5005THREADS) || defined(USE_ITHREADS)
+# if defined(USE_5005THREADS)
/* pending resolution of licensing issues, we avoid the erstwhile
* atomic.h everywhere */
# define EMULATE_ATOMIC_REFCOUNTS
# endif /* WIN32 */
# endif /* FAKE_THREADS */
#endif /* NETWARE */
-#endif /* USE_THREADS || USE_ITHREADS */
+#endif /* USE_5005THREADS || USE_ITHREADS */
#ifdef WIN32
# include "win32.h"
#endif
#if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_GET_THX)
-# ifdef USE_THREADS
+# ifdef USE_5005THREADS
# define PERL_GET_THX ((struct perl_thread *)PERL_GET_CONTEXT)
# else
# ifdef MULTIPLICITY
};
#endif
-#ifdef USE_THREADS
+#ifdef USE_5005THREADS
#define ARGSproto struct perl_thread *thr
#else
#define ARGSproto
-#endif /* USE_THREADS */
+#endif /* USE_5005THREADS */
typedef I32 (*filter_t) (pTHXo_ int, SV *, int);
# define DEBUG_X(a) DEBUG__(DEBUG_X_TEST, a)
# define DEBUG_D(a) DEBUG__(DEBUG_D_TEST, a)
-# ifdef USE_THREADS
+# ifdef USE_5005THREADS
# define DEBUG_S(a) DEBUG__(DEBUG_S_TEST, a)
# else
# define DEBUG_S(a)
want_vtbl_collxfrm,
want_vtbl_amagic,
want_vtbl_amagicelem,
-#ifdef USE_THREADS
+#ifdef USE_5005THREADS
want_vtbl_mutex,
#endif
want_vtbl_regdata,
*/
struct interpreter {
-# ifndef USE_THREADS
+# ifndef USE_5005THREADS
# include "thrdvar.h"
# endif
# include "intrpvar.h"
};
#endif /* MULTIPLICITY || PERL_OBJECT */
-#ifdef USE_THREADS
+#ifdef USE_5005THREADS
/* If we have threads define a struct with all the variables
* that have to be per-thread
*/
#if !defined(MULTIPLICITY) && !defined(PERL_OBJECT)
START_EXTERN_C
# include "intrpvar.h"
-# ifndef USE_THREADS
+# ifndef USE_5005THREADS
# include "thrdvar.h"
# endif
END_EXTERN_C
EXT MGVTBL PL_vtbl_uvar = {MEMBER_TO_FPTR(Perl_magic_getuvar),
MEMBER_TO_FPTR(Perl_magic_setuvar),
0, 0, 0};
-#ifdef USE_THREADS
+#ifdef USE_5005THREADS
EXT MGVTBL PL_vtbl_mutex = {0, 0, 0, 0, MEMBER_TO_FPTR(Perl_magic_mutexfree)};
-#endif /* USE_THREADS */
+#endif /* USE_5005THREADS */
EXT MGVTBL PL_vtbl_defelem = {MEMBER_TO_FPTR(Perl_magic_getdefelem),MEMBER_TO_FPTR(Perl_magic_setdefelem),
0, 0, 0};
EXT MGVTBL PL_vtbl_uvar;
EXT MGVTBL PL_vtbl_ovrld;
-#ifdef USE_THREADS
+#ifdef USE_5005THREADS
EXT MGVTBL PL_vtbl_mutex;
-#endif /* USE_THREADS */
+#endif /* USE_5005THREADS */
EXT MGVTBL PL_vtbl_defelem;
EXT MGVTBL PL_vtbl_regexp;