xref: /openbsd/gnu/usr.bin/perl/globals.c (revision eac174f2)
155745691Smillert /*    globals.c
255745691Smillert  *
3898184e3Ssthen  *    Copyright (C) 1995, 1999, 2000, 2001, 2008 by Larry Wall and others
455745691Smillert  *
555745691Smillert  *    You may distribute under the terms of either the GNU General Public
655745691Smillert  *    License or the Artistic License, as specified in the README file.
755745691Smillert  *
855745691Smillert  */
955745691Smillert 
1055745691Smillert /*
1143003dfeSmillert  * 'For the rest, they shall represent the other Free Peoples of the World:
1243003dfeSmillert  *  Elves, Dwarves, and Men.'                                --Elrond
1343003dfeSmillert  *
1443003dfeSmillert  *     [p.275 of _The Lord of the Rings_, II/iii: "The Ring Goes South"]
1555745691Smillert  */
1655745691Smillert 
175b2d2359Smillert /* This file exists to #include "perl.h" _ONCE_ with
18*eac174f2Safresh1  * PERL_IN_GLOBALS_C defined. That causes various global variables
195b2d2359Smillert  * in perl.h and other files it includes to be _defined_ (and initialized)
205b2d2359Smillert  * rather than just declared.
215b2d2359Smillert */
225b2d2359Smillert 
234a4f25f9Sdownsj #include "INTERN.h"
24c8ca9003Smillert #define PERL_IN_GLOBALS_C
254a4f25f9Sdownsj #include "perl.h"
260a5f61bbSmillert 
27b46d8ef2Safresh1 /* regcomp.h * isn't #included in perl.h, as its only included within a
28b46d8ef2Safresh1  * few specific files such as regcomp.c, regexec.c.  So include it
29b46d8ef2Safresh1  * explicitly to process any data declarations within it.
30b46d8ef2Safresh1  */
31b46d8ef2Safresh1 #include "regcomp.h"
32b46d8ef2Safresh1 
33*eac174f2Safresh1 /* We need somewhere to declare this. This file seems a good place.
34*eac174f2Safresh1  * This is not a regular "global" in that we don't know whether it needs to
35*eac174f2Safresh1  * exist until we include threads.h, and we don't want it as part of any
36*eac174f2Safresh1  * global struct (if that or something similar is re-introduced. */
37*eac174f2Safresh1 
38*eac174f2Safresh1 #if defined(USE_ITHREADS) && defined(PERL_THREAD_LOCAL)
39*eac174f2Safresh1 PERL_THREAD_LOCAL void *PL_current_context;
40*eac174f2Safresh1 #endif
41b46d8ef2Safresh1 
4252bd00bfSmillert /*
4391f110e0Safresh1  * ex: set ts=8 sts=4 sw=4 et:
4452bd00bfSmillert  */
45