3 * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
4 * by Larry Wall and others
6 * You may distribute under the terms of either the GNU General Public
7 * License or the Artistic License, as specified in the README file.
15 /* Don't forget to re-run embed.pl to propagate changes! */
17 /* This file describes the "global" variables used by perl
18 * This used to be in perl.h directly but we want to abstract out into
19 * distinct files which are per-thread, per-interpreter or really global,
20 * and how they're initialized.
22 * The 'G' prefix is only needed for vars that need appropriate #defines
23 * generated in embed*.h. Such symbols are also used to generate
24 * the appropriate export list for win32. */
27 PERLVAR(Gcurinterp, PerlInterpreter *)
28 /* currently running interpreter
29 * (initial parent interpreter under
31 #if defined(USE_5005THREADS) || defined(USE_ITHREADS)
32 PERLVAR(Gthr_key, perl_key) /* key to retrieve per-thread struct */
35 /* constants (these are not literals to facilitate pointer comparisons) */
36 PERLVARIC(GYes, char *, "1")
37 PERLVARIC(GNo, char *, "")
38 PERLVARIC(Ghexdigit, char *, "0123456789abcdef0123456789ABCDEF")
39 PERLVARIC(Gpatleave, char *, "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}")
41 /* XXX does anyone even use this? */
42 PERLVARI(Gdo_undump, bool, FALSE) /* -u or dump seen? */
44 #if defined(MYMALLOC) && (defined(USE_5005THREADS) || defined(USE_ITHREADS))
45 PERLVAR(Gmalloc_mutex, perl_mutex) /* Mutex for malloc */
48 #if defined(USE_ITHREADS)
49 PERLVAR(Gop_mutex, perl_mutex) /* Mutex for op refcounting */
52 #if defined(USE_5005THREADS) || defined(USE_ITHREADS)
53 PERLVAR(Gdollarzero_mutex, perl_mutex) /* Modifying $0 */
56 /* This is constant on most architectures, a global on OS/2 */
57 PERLVARI(Gsh_path, const char *, SH_PATH)/* full path of shell */
60 /* If Perl has to ignore SIGPFE, this is its saved state.
61 * See perl.h macros PERL_FPU_INIT and PERL_FPU_{PRE,POST}_EXEC. */
62 PERLVAR(Gsigfpe_saved, Sighandler_t)
65 /* Restricted hashes placeholder value.
66 * The contents are never used, only the address. */
67 PERLVAR(Gsv_placeholder, SV)
70 # if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
71 PERLVARI(Gcsighandlerp, Sighandler_t, Perl_csighandler_va) /* Pointer to C-level sighandler */
73 PERLVARI(Gcsighandlerp, Sighandler_t, Perl_csighandler) /* Pointer to C-level sighandler */
77 #ifndef PERL_USE_SAFE_PUTENV
78 PERLVARI(Guse_safe_putenv, int, 1)