This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Whoops. The Windows build is going to need to know that this symbol is
[perl5.git] / perlvars.h
... / ...
CommitLineData
1/* perlvars.h
2 *
3 * Copyright (C) 1999, 2000, 2001, 2002, by Larry Wall and others
4 *
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
7 *
8 */
9
10/****************/
11/* Truly global */
12/****************/
13
14/* Don't forget to re-run embed.pl to propagate changes! */
15
16/* This file describes the "global" variables used by perl
17 * This used to be in perl.h directly but we want to abstract out into
18 * distinct files which are per-thread, per-interpreter or really global,
19 * and how they're initialized.
20 *
21 * The 'G' prefix is only needed for vars that need appropriate #defines
22 * generated in embed*.h. Such symbols are also used to generate
23 * the appropriate export list for win32. */
24
25/* global state */
26PERLVAR(Gcurinterp, PerlInterpreter *)
27 /* currently running interpreter
28 * (initial parent interpreter under
29 * useithreads) */
30#if defined(USE_ITHREADS)
31PERLVAR(Gthr_key, perl_key) /* key to retrieve per-thread struct */
32#endif
33
34/* constants (these are not literals to facilitate pointer comparisons)
35 * (PERLVARISC really does create variables, despite its looks) */
36PERLVARISC(GYes, "1")
37PERLVARISC(GNo, "")
38PERLVARISC(Ghexdigit, "0123456789abcdef0123456789ABCDEF")
39PERLVARISC(Gpatleave, "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}")
40
41/* XXX does anyone even use this? */
42PERLVARI(Gdo_undump, bool, FALSE) /* -u or dump seen? */
43
44#if defined(MYMALLOC) && defined(USE_ITHREADS)
45PERLVAR(Gmalloc_mutex, perl_mutex) /* Mutex for malloc */
46#endif
47
48#if defined(USE_ITHREADS)
49PERLVAR(Gop_mutex, perl_mutex) /* Mutex for op refcounting */
50#endif
51
52#ifdef USE_ITHREADS
53PERLVAR(Gdollarzero_mutex, perl_mutex) /* Modifying $0 */
54#endif
55
56/* This is constant on most architectures, a global on OS/2 */
57PERLVARI(Gsh_path, const char *, SH_PATH)/* full path of shell */
58
59#ifndef PERL_MICRO
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)
63#endif
64
65/* Restricted hashes placeholder value.
66 * The contents are never used, only the address. */
67PERLVAR(Gsv_placeholder, SV)
68
69#ifndef PERL_MICRO
70PERLVARI(Gcsighandlerp, Sighandler_t, Perl_csighandler) /* Pointer to C-level sighandler */
71#endif
72
73#ifndef PERL_USE_SAFE_PUTENV
74PERLVARI(Guse_safe_putenv, int, 1)
75#endif
76
77#ifdef USE_PERLIO
78PERLVARA(Gperlio_fd_refcnt, 2048, int) /* PERLIO_MAX_REFCOUNTABLE_FD */
79PERLVARI(Gperlio_debug_fd, int, 0) /* the fd to write perlio debug into, 0 means not set yet */
80#endif
81
82#ifdef HAS_MMAP
83PERLVARI(Gmmap_page_size, IV, 0)
84#endif
85
86#if defined(FAKE_PERSISTENT_SIGNAL_HANDLERS)||defined(FAKE_DEFAULT_SIGNAL_HANDLERS)
87PERLVARI(Gsig_handlers_initted, int, 0)
88#endif
89#ifdef FAKE_PERSISTENT_SIGNAL_HANDLERS
90PERLVARA(Gsig_ignoring, SIG_SIZE, int) /* which signals we are ignoring */
91#endif
92#ifdef FAKE_DEFAULT_SIGNAL_HANDLERS
93PERLVARA(Gsig_defaulting, SIG_SIZE, int)
94#endif
95
96#ifndef PERL_IMPLICIT_CONTEXT
97PERLVAR(Gsig_sv, SV*)
98#endif
99
100/* XXX signals are process-wide anyway, so we
101 * ignore the implications of this for threading */
102#ifndef HAS_SIGACTION
103PERLVARI(Gsig_trapped, int, 0)
104#endif
105
106#ifdef DEBUGGING
107PERLVAR(Gwatch_pvx, char*)
108#endif
109
110#ifdef PERL_GLOBAL_STRUCT
111PERLVAR(Gppaddr, Perl_ppaddr_t*) /* or opcode.h */
112PERLVAR(Gcheck, Perl_check_t *) /* or opcode.h */
113PERLVARA(Gfold_locale, 256, unsigned char) /* or perl.h */
114#endif
115
116#ifdef PERL_NEED_APPCTX
117PERLVAR(Gappctx, void*) /* the application context */
118#endif
119
120PERLVAR(Gop_sequence, HV*) /* dump.c */
121PERLVARI(Gop_seq, UV, 0) /* dump.c */
122
123#if defined(HAS_TIMES) && defined(PERL_NEED_TIMESBASE)
124PERLVAR(Gtimesbase, struct tms)
125#endif
126
127