This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
[perl5.git] / perlvars.h
CommitLineData
eb1102fc
NIS
1/* perlvars.h
2 *
ae53e38e
JC
3 * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
4 * by Larry Wall and others
eb1102fc
NIS
5 *
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.
8 *
9 */
10
49f531da
NIS
11/****************/
12/* Truly global */
13/****************/
14
cb68f92d
GS
15/* Don't forget to re-run embed.pl to propagate changes! */
16
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.
21 *
22 * The 'G' prefix is only needed for vars that need appropriate #defines
22c35a8c 23 * generated in embed*.h. Such symbols are also used to generate
14dd3ad8 24 * the appropriate export list for win32. */
cb68f92d 25
49f531da 26/* global state */
cb68f92d 27PERLVAR(Gcurinterp, PerlInterpreter *)
43165c05 28 /* currently running interpreter
ba869deb
GS
29 * (initial parent interpreter under
30 * useithreads) */
4d1ff10f 31#if defined(USE_5005THREADS) || defined(USE_ITHREADS)
ba869deb
GS
32PERLVAR(Gthr_key, perl_key) /* key to retrieve per-thread struct */
33#endif
a0ed51b3 34
3fe35a81 35/* constants (these are not literals to facilitate pointer comparisons) */
3fe6f2dc
MB
36PERLVARIC(GYes, char *, "1")
37PERLVARIC(GNo, char *, "")
e3fdf988 38PERLVARIC(Ghexdigit, char *, "0123456789abcdef0123456789ABCDEF")
3fe6f2dc 39PERLVARIC(Gpatleave, char *, "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}")
43165c05
GS
40
41/* XXX does anyone even use this? */
42PERLVARI(Gdo_undump, bool, FALSE) /* -u or dump seen? */
b363f7ed 43
4d1ff10f 44#if defined(MYMALLOC) && (defined(USE_5005THREADS) || defined(USE_ITHREADS))
b363f7ed
GS
45PERLVAR(Gmalloc_mutex, perl_mutex) /* Mutex for malloc */
46#endif
534825c4
GS
47
48#if defined(USE_ITHREADS)
49PERLVAR(Gop_mutex, perl_mutex) /* Mutex for op refcounting */
50#endif
60e4ec2e 51
6d943f66
JH
52#if defined(USE_5005THREADS) || defined(USE_ITHREADS)
53PERLVAR(Gdollarzero_mutex, perl_mutex) /* Modifying $0 */
54#endif
55
8257dec7 56/* This is constant on most architectures, a global on OS/2 */
c05e0e2f 57PERLVARI(Gsh_path, const char *, SH_PATH)/* full path of shell */
8257dec7 58
75a5c1c6 59#ifndef PERL_MICRO
629185f5
JH
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. */
62PERLVAR(Gsigfpe_saved, Sighandler_t)
75a5c1c6 63#endif
629185f5 64
961baadf
JH
65/* Restricted hashes placeholder value.
66 * The contents are never used, only the address. */
67PERLVAR(Gsv_placeholder, SV)
68
75a5c1c6 69#ifndef PERL_MICRO
17afd9a0
NC
70# if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
71PERLVARI(Gcsighandlerp, Sighandler_t, Perl_csighandler_va) /* Pointer to C-level sighandler */
72#else
9469442c 73PERLVARI(Gcsighandlerp, Sighandler_t, Perl_csighandler) /* Pointer to C-level sighandler */
17afd9a0 74# endif
75a5c1c6 75#endif
71b97453 76
620ebc51
MS
77#ifndef PERL_USE_SAFE_PUTENV
78PERLVARI(Guse_safe_putenv, int, 1)
79#endif