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