summaryrefslogtreecommitdiff
path: root/makedef.pl
Commit message (Collapse)AuthorAgeFilesLines
* Exclude Perl_my_setlocale symbol where it's not defined.Craig A. Berry2014-02-161-0/+6
| | | | | | | | | Because makedef.pl doesn't take into account the various ifdefs in embed.fnc, it must repeat their logic by maintaining various sets of platform-specific inclusions and exclusions. Perl_my_setlocale was added in b385bb4ddcb for Win32 only, so we shouldn't be telling the linker to export it except on Win32.
* Update the WinCE files to the new cross modelBrian Fraser2014-01-221-1/+1
|
* Purge sfio support, which has been broken for a decade.Nicholas Clark2013-12-271-82/+2
| | | | | | | | | | | The last Perl release that built with -Dusesfio was v5.8.0, and even that failed many regression tests. Every subsequent release fails to build, and in the decade that has passed we have had no bug reports about this. So it's safe to delete all the code. The Configure related code will be purged in a subsequent commit. 2 references to sfio intentionally remain in fakesdio.h and nostdio.h, as these appear to be for using its stdio API-compatibility layer.
* Purge remaining references to PerlIO_sprintf and PerlIO_vsprintf().Nicholas Clark2013-10-071-3/+0
| | | | | | Eliminate their function prototypes. Eliminate references in perlio.sym and makedef.pl which caused them to still be added to the Win32 linker definitions.
* Revert "[perl #117855] Store CopFILEGV in a pad under ithreads"Father Chrysostomos2013-08-091-3/+0
| | | | | | | | | | | | This reverts commit c82ecf346. It turn out to be faulty, because a location shared betweens threads (the cop) was holding a reference count on a pad entry in a particu- lar thread. So when you free the cop, how do you know where to do SvREFCNT_dec? In reverting c82ecf346, this commit still preserves the bug fix from 1311cfc0a7b, but shifts it around.
* Teach makedef.pl that Perl_allocfilegv does not exist without ithreads.Nicholas Clark2013-08-071-0/+1
| | | | | This linker skip was missed by commit c82ecf346a8512f2, which did add the 3 PL_ variables it added for ithreads builds.
* [perl #117855] Store CopFILEGV in a pad under ithreadsFather Chrysostomos2013-08-051-0/+3
| | | | | | | | | | | | | | | | This saves having to allocate a separate string buffer for every cop (control op; every statement has one). Under non-threaded builds, every cop has a pointer to the GV for that source file, namely *{"_<filename"}. Under threaded builds, the name of the GV used to be stored instead. Now we store an offset into the per-interpreter PL_filegvpad, which points to the GV. This makes no significant speed difference, but it reduces mem- ory usage.
* Teach makedef.pl that PL_op_exec_cnt is only available with -DPERL_TRACE_OPS.Nicholas Clark2013-07-021-0/+3
|
* typo fixes for root level scriptsDavid Steinbrunner2013-05-221-1/+1
| | | | | Add David Steinbrunner to AUTHORS. Update pod issues database.
* makedef.pl shouldn't prepend Perl_ to symbols already starting with Perl_.Andy Dougherty2013-03-281-1/+2
| | | | | | | | | | | | | | | | | In the next patch, I have Perl_croak_memory_wrap defined in embed.fnc with the 'nroX' flags, since this is a private function used by public macros. I used the long form of the name Perl_croak_memory_wrap everywhere, and used the 'o' flag so that embed.h wouldn't contain a useless #define croak_memory_wrap Perl_croak_memory_wrap. Unfortunately, makedef.pl (used by the Win32 build process) didn't know what to do with that entry and created an entry Perl_Perl_croak_memory_wrap. Changing makedef.pl to use the 'o' flag to decide whether to add the Perl_ prefix resulted in over 50 other symbols changing in the output of makedef.pl. I don't know if the changes are correct or if the 'o' flag is in error on those entries in embed.fnc, but I don't have time to check them all out. This patch just stops makedef.pl from adding a Perl_ prefix if there is already one there.
* restore building perl5**.dll and perl.exe on WinCEDaniel Dragan2013-03-121-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | extension building problems remain but the 2 above files will build be built for WinCE with the following 3 commands, replace the folder name with what you selected for $(MACHINE) in makefile.ce nmake all nmake -f makefile.ce wince-x86-hpc-wce300\perl517.dll nmake -f makefile.ce wince-x86-hpc-wce300\perl.exe makefile.ce: - -debug:full and -pdb:none are obsolete compiler flags, and add -opt:ref:icf, to sync eVC makefile with modern VC's makefile - create a shortcut for easily creating preprocessed (.i) files for debugging on the command line - add new interp .c files that were added over the years - the Dynaloader build process for Win32 was drastically changed in commit 281da5eaa8 , fix to reflect this, a "nmake all" on the Win32 build will create the correct dynaloader .c files for the ce makefile to use later - nothing depended on .\xconfig.h in the ce makefile, so there was an error that it was missing, fix that - rebase the CE perl5**.dll to same as on Win32 makefile, makes debugging/diassembly much easier when the dll is not relocated at runtime - config.sh seems to be a win32 build file, while the script configpm wants a .sh file in \Cross, so change config.sh dependency to that win32/Makefile: - add a preprocess target to easily create .i files for debugging by hand makedef.pl: - read the comments in the script - config.h is Win32 file, not a WinCE file, so use xconfig.h when under WinCE lib/.gitignore - Cross.pm is made during the build process, it shouldn't ever be commited win32/.gitignore - xconfig.h is made during the build process, it shouldn't ever be commited win32/wince.c - identifier isnan is defed to _isnan somewhere, this created an infinite loop when CE perl was run
* ensure PL_sawampersand is exported.David Mitchell2013-03-031-1/+1
| | | | | | | | | | | Commit 1a904fc88069e249a4bd0ef196a3f1a7f549e0fe disabled PL_sawampersand by default, since it was redundant with COW enabled. However the mechanism to optionally re-enable it (PERL_SAWAMPERSAND) didn't actually export the var, due to a typo. With the new default of disabling COW but enabling PL_sawampersand, this broke perl on builds where exports matters (and broke linux in non-threaded builds, where porting/globvar.t detects this).
* Rename PL_interp_size_5_16_0 to PL_interp_size_5_18_0.Nicholas Clark2013-02-191-1/+1
|
* makedef.pl: Don't export inline fcnsKarl Williamson2013-02-081-1/+1
| | | | | | | | An inline function is static to the file it is defined in. But they can be part of the public API if they are in #included header files and defined in embed.fnc. Normally such functions are written to the export list on platforms that have this, but since they are static, you get a linkage error. This commit suppresses the writing of inline functions
* PL_Vars and PL_VarsPtr aren't exported under PERL_GLOBAL_STRUCT_PRIVATETony Cook2013-01-251-1/+2
|
* Disable PL_sawampersandFather Chrysostomos2012-11-271-0/+4
| | | | | | | | | | | | | | | | | | | PL_sawampersand actually causes bugs (e.g., perl #4289), because the behaviour changes. eval '$&' after a match will produce different results depending on whether $& was seen before the match. Using copy-on-write for the pre-match copy (preceding patches do that) alleviates the slowdown caused by mentioning $&. The copy doesn’t happen unless the string is modified after the match. It’s now a post- match copy. So we no longer need to do things differently depending on whether $& has been seen. PL_sawampersand is now #defined to be equal to what it would be if every program began with $',$&,$`. I left the PL_sawampersand code in place, in case this commit proves immature. Running Configure with -Accflags=PERL_SAWAMPERSAND will reënable the PL_sawampersand mechanism.
* New COW mechanismFather Chrysostomos2012-11-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This was discussed in ticket #114820. This new copy-on-write mechanism stores a reference count for the PV inside the PV itself, at the very end. (I was using SvEND+1 at first, but parts of the regexp engine expect to be able to do SvCUR_set(sv,0), which causes the wrong byte of the string to be used as the reference count.) Only 256 SVs can share the same PV this way. Also, only strings with allocated space after the trailing null can be used for copy-on-write. Much of the code is shared with PERL_OLD_COPY_ON_WRITE. The restric- tion against doing copy-on-write with magical variables has hence been inherited, though it is not necessary. A future commit will take care of that. I had to modify _core_swash_init to handle $@ differently. The exist- ing mechanism of copying $@ to a new scalar and back again was very fragile. With copy-on-write, $@ =~ s/// can cause pp_subst’s string pointers to become stale. So now we remove the scalar from *@ and allow the utf8-table-loading code to autovivify a new one. Then we restore the untouched $@ afterwards if all goes well.
* Exclude signal-related symbols on VMS without home-grown signalling.Craig A. Berry2012-10-201-0/+11
| | | | | | | | | | config.h defines KILL_BY_SIGPRC when we are using our own signal handling functions based on the sys$sigprc system service. But when *not* doing that, and since using makedef.pl to define our exportable symbols, we have not properly excluded the symbols involved in the home-grown implementation. It's not a common configuration, but since it's configurable, it should work, and now it will.
* Remove exports of dummy set[ug]id functions on WindowsSteve Hay2012-10-051-2/+0
| | | | | | | These are surely not required by anything, and are only stub functions anyway so can easily be provided locally by anything that really does need them. Also hide the declarations other than when building the core itself as per the fix for [perl #114516].
* Eliminate PL_OP_SLAB_ALLOCFather Chrysostomos2012-07-121-15/+0
| | | | | | | | | | | | This commit eliminates the old slab allocator. It had bugs in it, in that ops would not be cleaned up properly after syntax errors. So why not fix it? Well, the new slab allocator *is* the old one fixed. Now that this is gone, we don’t have to worry as much about ops leak- ing when errors occur, because it won’t happen any more. Recent commits eliminated the only reason to hang on to it: PERL_DEBUG_READONLY_OPS required it.
* PERL_DEBUG_READONLY_OPS with the new allocatorFather Chrysostomos2012-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | I want to eliminate the old slab allocator (PL_OP_SLAB_ALLOC), but this useful debugging tool needs to be rewritten for the new one first. This is slightly better than under PL_OP_SLAB_ALLOC, in that CVs cre- ated after the main CV starts running will get read-only ops, too. It is when a CV finishes compiling and relinquishes ownership of the slab that the slab is made read-only, because at that point it should not be used again for allocation. BEGIN blocks are exempt, as they are processed before the Slab_to_ro call in newATTRSUB. The Slab_to_ro call must come at the very end, after LEAVE_SCOPE, because otherwise the ops freed via the stack (the SAVEFREEOP calls near the top of newATTRSUB) will make the slab writa- ble again. At that point, the BEGIN block has already been run and its slab freed. Maybe slabs belonging to BEGIN blocks can be made read-only later. Under PERL_DEBUG_READONLY_OPS, op slabs have two extra fields to record the size and readonliness of each slab. (Only the first slab in a CV’s slab chain uses the readonly flag, since it is conceptually simpler to treat them all as one unit.) Without recording this infor- mation manually, things become unbearably slow, the tests taking hours and hours instead of minutes.
* PERL_IMPLICIT_SYS can use the new slab allocatorFather Chrysostomos2012-06-291-4/+0
|
* CV-based slab allocation for opsFather Chrysostomos2012-06-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This addresses bugs #111462 and #112312 and part of #107000. When a longjmp occurs during lexing, parsing or compilation, any ops in C autos that are not referenced anywhere are leaked. This commit introduces op slabs that are attached to the currently- compiling CV. New ops are allocated on the slab. When an error occurs and the CV is freed, any ops remaining are freed. This is based on Nick Ing-Simmons’ old experimental op slab implemen- tation, but it had to be rewritten to work this way. The old slab allocator has a pointer before each op that points to a reference count stored at the beginning of the slab. Freed ops are never reused. When the last op on a slab is freed, the slab itself is freed. When a slab fills up, a new one is created. To allow iteration through the slab to free everything, I had to have two pointers; one points to the next item (op slot); the other points to the slab, for accessing the reference count. Ops come in different sizes, so adding sizeof(OP) to a pointer won’t work. The old slab allocator puts the ops at the end of the slab first, the idea being that the leaves are allocated first, so the order will be cache-friendly as a result. I have preserved that order for a dif- ferent reason: We don’t need to store the size of the slab (slabs vary in size; see below) if we can simply follow pointers to find the last op. I tried eliminating reference counts altogether, by having all ops implicitly attached to PL_compcv when allocated and freed when the CV is freed. That also allowed op_free to skip FreeOp altogether, free- ing ops faster. But that doesn’t work in those cases where ops need to survive beyond their CVs; e.g., re-evals. The CV also has to have a reference count on the slab. Sometimes the first op created is immediately freed. If the reference count of the slab reaches 0, then it will be freed with the CV still point- ing to it. CVs use the new CVf_SLABBED flag to indicate that the CV has a refer- ence count on the slab. When this flag is set, the slab is accessible via CvSTART when CvROOT is not set, or by subtracting two pointers (2*sizeof(I32 *)) from CvROOT when it is set. I decided to sneak the slab into CvSTART during compilation, because enlarging the xpvcv struct by another pointer would make all CVs larger, even though this patch only benefits few (programs using string eval). When the CVf_SLABBED flag is set, the CV takes responsibility for freeing the slab. If CvROOT is not set when the CV is freed or undeffed, it is assumed that a compilation error has occurred, so the op slab is traversed and all the ops are freed. Under normal circumstances, the CV forgets about its slab (decrement- ing the reference count) when the root is attached. So the slab ref- erence counting that happens when ops are freed takes care of free- ing the slab. In some cases, the CV is told to forget about the slab (cv_forget_slab) precisely so that the ops can survive after the CV is done away with. Forgetting the slab when the root is attached is not strictly neces- sary, but avoids potential problems with CvROOT being written over. There is code all over the place, both in core and on CPAN, that does things with CvROOT, so forgetting the slab makes things more robust and avoids potential problems. Since the CV takes ownership of its slab when flagged, that flag is never copied when a CV is cloned, as one CV could free a slab that another CV still points to, since forced freeing of ops ignores the reference count (but asserts that it looks right). To avoid slab fragmentation, freed ops are marked as freed and attached to the slab’s freed chain (an idea stolen from DBM::Deep). Those freed ops are reused when possible. I did consider not reusing freed ops, but realised that would result in significantly higher mem- ory using for programs with large ‘if (DEBUG) {...}’ blocks. SAVEFREEOP was slightly problematic. Sometimes it can cause an op to be freed after its CV. If the CV has forcibly freed the ops on its slab and the slab itself, then we will be fiddling with a freed slab. Making SAVEFREEOP a no-op won’t help, as sometimes an op can be savefreed when there is no compilation error, so the op would never be freed. It holds a reference count on the slab, so the whole slab would leak. So SAVEFREEOP now sets a special flag on the op (->op_savefree). The forced freeing of ops after a compilation error won’t free any ops thus marked. Since many pieces of code create tiny subroutines consisting of only a few ops, and since a huge slab would be quite a bit of baggage for those to carry around, the first slab is always very small. To avoid allocating too many slabs for a single CV, each subsequent slab is twice the size of the previous. Smartmatch expects to be able to allocate an op at run time, run it, and then throw it away. For that to work the op is simply mallocked when PL_compcv has’t been set up. So all slab-allocated ops are marked as such (->op_slabbed), to distinguish them from mallocked ops. All of this is kept under lock and key via #ifdef PERL_CORE, as it should be completely transparent. If it isn’t transparent, I would consider that a bug. I have left the old slab allocator (PL_OP_SLAB_ALLOC) in place, as it is used by PERL_DEBUG_READONLY_OPS, which I am not about to rewrite. :-) Concerning the change from A to X for slab allocation functions: Many times in the past, A has been used for functions that were not intended to be public but were used for public macros. Since PL_OP_SLAB_ALLOC is rarely used, it didn’t make sense for Perl_Slab_* to be API functions, since they were rarely actually available. To avoid propagating this mistake further, they are now X.
* make perl build again on non-DEBUGGING buildsDavid Mitchell2012-06-131-1/+0
| | | | | The PL_block_type debugging-only array is now used indeirectly in ext/re/re-exec.c, which enables debugging even on non-debugging builds
* Only export Perl_alloccopstash under threads.Craig A. Berry2012-06-101-0/+1
| | | | | | | | | | It might make more sense for makedef.pl to more carefully examine embed.fnc for what's a symbol to be exported only under threads and what's not, but for now, we appear to be maintaining a hard-coded list of symbols not to export when not under threads, so let's add Perl_alloccopstash to the list. Failing to do so breaks the build on platforms where the linker is literal-minded about what symbols it's been told to find in the export list.
* [perl #78742] Store CopSTASH in a pad under threadsFather Chrysostomos2012-06-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, a pointer to the cop’s stash was stored in cop->cop_stash under non-threaded perls, and the name and name length were stored in cop->cop_stashpv and cop->cop_stashlen under ithreads. Consequently, eval "__PACKAGE__" would end up returning the wrong package name under threads if the current package had been assigned over. This commit changes the way cops store their stash under threads. Now it is an offset (cop->cop_stashoff) into the new PL_stashpad array (just a mallocked block), which holds pointers to all stashes that have code compiled in them. I didn’t use the lexical pads, because CopSTASH(cop) won’t work unless PL_curpad is holding the right pad. And things start to get very hairy in pp_caller, since the correct pad isn’t anywhere easily accessible on the context stack (oldcomppad actually referring to the current comppad). The approach I’ve followed uses far less code, too. In addition to fixing the bug, this also saves memory. Instead of allocating a separate PV for every single statement (to hold the stash name), now all lines of code in a package can share the same stashpad slot. So, on a 32-bit OS X, that’s 16 bytes less memory per COP for short package names. Since stashoff is the same size as stashpv, there is no difference there. Each package now needs just 4 bytes in the stashpad for storing a pointer. For speed’s sake PL_stashpadix stores the index of the last-used stashpad offset. So only when switching packages is there a linear search through the stashpad.
* Further eliminate POSIX-emulation under LinuxThreadsÆvar Arnfjörð Bjarmason2012-02-151-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under POSIX threads the getpid() and getppid() functions return the same values across multiple threads, i.e. threads don't have their own PID's. This is not the case under the obsolete LinuxThreads where each thread has a different PID, so getpid() and getppid() will return different values across threads. Ever since the first perl 5.0 we've returned POSIX-consistent semantics for $$, until v5.14.0-251-g0e21945 when the getpid() cache was removed. In 5.8.1 Rafael added further explicit POSIX emulation in perl-5.8.0-133-g4d76a34 [1] by explicitly caching getppid(), so that multiple threads would always return the same value. I don't think all this effort to emulate POSIX sematics is worth it. I think $$ and getppid() are OS-level functions that should always return the same as their C equivalents. I shouldn't have to use a module like Linux::Pid to get the OS version of the return values. This is pretty much a complete non-issue in practice these days, LinuxThreads was a Linux 2.4 thread implementation that nobody maintains anymore[2], all modern Linux distros use NPTL threads which don't suffer from this discrepancy. Debian GNU/kFreeBSD does use LinuxThreads in the 6.0 release, but they too will be moving away from it in future releases, and really, nobody uses Debian GNU/kFreeBSD anyway. This caching makes it unnecessarily tedious to fork an embedded Perl interpreter. When someone that constructs an embedded perl interpreter and forks their application, the fork(2) system call isn't going to run Perl_pp_fork(), and thus the return value of $$ and getppid() doesn't reflect the current process. See [3] for a bug in uWSGI related to this, and Perl::AfterFork on the CPAN for XS code that you need to run after forking a PerlInterpreter unbeknownst to perl. We've already been failing the tests in t/op/getpid.t on these Linux systems that nobody apparently uses, the Debian GNU/kFreeBSD users did notice and filed #96270, this patch fixes that failure by changing the tests to test for different behavior under LinuxThreads, I've tested that this works on my Debian GNU/kFreeBSD 6.0.4 virtual machine. If this change is found to be unacceptable (i.e. we want to continue to emulate POSIX thread semantics for the sake of LinuxThreads) we also need to revert v5.14.0-251-g0e21945, because currently we're only emulating POSIX semantics for getppid(), not getpid(). But I don't think we should do that, both v5.14.0-251-g0e21945 and this commit are awesome. This commit includes a change to embedvar.h made by "make regen_headers". 1. http://www.nntp.perl.org/group/perl.perl5.porters/2002/08/msg64603.html 2. http://pauillac.inria.fr/~xleroy/linuxthreads/ 3. http://projects.unbit.it/uwsgi/ticket/85
* handle conditional definition of PL_check_mutexZefram2012-02-111-0/+1
| | | | | PL_check_mutex only exists on threading builds, so makedef.pl needs to know about that conditionality to produce correct export lists.
* Export PerlIOBase_openLeon Timmermans2011-12-291-0/+1
|
* On AIX, avoid a shell pipepline by making makedef.pl sort case insenitively.Nicholas Clark2011-12-041-1/+6
| | | | | | | | Previously the Makefile piped the output of makedef.pl to sort. This had the side effect of ignoring the exit code from makedef.pl, as make could only see the exit code of the last command in the pipeline. This concealed the causes of the parallel make failure when makedef.pl was missing a dependency on Config.pm
* skip Perl_my_symlink symbol on older VMS systems.Craig A. Berry2011-12-021-0/+3
| | | | | | It's a wrapper for cases where we have symlink, not a replacement for cases where we don't (pre-v8.3). Trying to include it on older systems causes a link error.
* The Borland Chainsaw MassacreSteve Hay2011-09-101-5/+1
| | | | | Remove support for the Borland C++ compiler on Win32, as agreed here: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2011-09/msg00034.html
* Eliminate global.sym, as makedef.pl can generate it internally.Nicholas Clark2011-08-251-2/+26
| | | | | | | | global.sym was a file listing the exported symbols, generated by regen/embed.pl from embed.fnc and regen/opcodes, which was only used by makedef.pl Move the code that generates global.sym from regen/embed.pl to makedef.pl, and thereby eliminate the need to ship a 907 line generated file.
* In makedef.pl, move handling of $ARGS{TARG_DIR} to the open statements.Nicholas Clark2011-08-251-18/+12
| | | | | This simplifies the code, and eliminates 5 lexicals used solely to hold filename constants.
* In makedef.pl, defaulting $ARGS{TARG_DIR} to '' simplifies the code.Nicholas Clark2011-08-251-5/+3
|
* In makedef.pl, no need to store 'config.h' in a variable.Nicholas Clark2011-08-251-2/+1
| | | | | Unlike the other files opened by makedef.pl, config.h is always opened in the current directory, so the filename doesn't modifying if $ARGS{TARG_DIR} is set.
* Add t/porting/globvar.t, to sanity test globvar.sym on a *nix platform.Nicholas Clark2011-08-231-3/+4
| | | | | | | This adds to makedef.pl a new platform, "test". Hopefully this change will catch most problems that previously had resulted in build failures on Win32.
* Handle PL_sh_path better in globvar.sym and makedef.plNicholas Clark2011-08-231-0/+3
| | | | | | | PL_sh_path needs some form of special case because it is conditionally defined either in perlvar.h or perl.h, but globvar.sym mentions all symbols unconditionally, and undef -DPERL_GLOBAL_STRUCT perlvar.h is parsed as an unconditional skip list.
* In makedef.pl, use %Config to avoid hardcoding the DLL version number.Nicholas Clark2011-08-131-2/+3
|
* Simplify embedvar.h, removing a level of macro indirection for PL_* variables.Nicholas Clark2011-08-111-1/+1
| | | | | | | For the default (non-multiplicity) configuration, PERLVAR*() macros now directly expand their arguments to tokens such as C<PL_defgv>, instead of expanding to C<PL_Idefgv>. This removes over 350 lines from F<embedvar.h>, which defined macros to map from C<PL_Idefgv> to C<PL_defgv> and so forth.
* Add the correct PL_sig_ignoring skip for VMS in makedef.pl.Craig A. Berry2011-08-021-0/+5
| | | | | | | | | | | | | | | | | | This only exists when FAKE_PERSISTENT_SIGNAL_HANDLERS is defined, and that's only defined when HAS_SIGACTION is false. The problem was exposed by ed76ea85d1, which fixed a typo introduced in aadb217dbe, but that typo introduced code that was a noop on all platforms, including VMS, where $^O is 'VMS', not 'vms'. TODO: The existence of PL_sig_defaulting and PL_sig_handlers_initted depends on the definedness of FAKE_DEFAULT_SIGNAL_HANDLERS, which depends on KILL_BY_SIGPRC, which is written directly to config.h without being recorded in config.sh and is thus not visible in Config. So there's no good way to know when these symbols should be skipped. KILL_BY_SIGPRC currently gets defined on all VMS versions and platforms, so it's a breakage-in-waiting but does not actually fall down (yet).
* In makedef.pl, refactor the code that reads *.sym files.Nicholas Clark2011-08-011-9/+7
| | | | | | Hoist the test that chooses the prefix out of the loop. Tweak the regex to avoid needing an explicit chomp/ Use 3-arg open and a lexical for the file handle.
* In makedef.pl, correct a typo in a comment.Nicholas Clark2011-08-011-1/+1
|
* In makedef.pl, avoid creating %PLATFORMS just for one existence check.Nicholas Clark2011-08-011-8/+10
| | | | | | | | A single linear search of @PLATFORMS is simpler and possibly even faster than building a hash from @PLATFORMS, making one lookup, then discarding the hash. Add a block to limit the scope of @PLATFORMS to the code that uses it.
* In makedef.pl, use %ARGS instead of 4 variables for command line arguments.Nicholas Clark2011-08-011-44/+43
| | | | This simplifies processing @ARGV.
* In makedef.pl, consolidate all the C compiler flags parsing code.Nicholas Clark2011-08-011-12/+10
| | | | | | | | | This isn't quite a "pure" refactoring, as -Dfoo=bar read from %Config will now be processed as $Config{foo} = 'bar'; instead of $Config{foo} = 1; However, it won't change any behaviour, as the only time makedef.pl uses a value of %define for anything other than a truth test is $define{PERL_DLL}, and that is passed in on the command-line by the Makefile invoking makedef.pl
* In makedef.pl, read ccflags and optimize from %Config.Nicholas Clark2011-08-011-18/+10
| | | | | Previously they were read by opening and parsing config.sh. Remove all code related to reading config.sh, as it is no longer needed.
* In makedef.pl, read 4 configuration values direct from %Config.Nicholas Clark2011-08-011-6/+4
| | | | | | makedef.pl has been using Config since commit 9d6c7f2eccef26a6 in 2009. Hence we can read them direct from %Config, instead of parsing config.sh and storing the values in %define.
* In makedef.pl, merge the code that reads config.shNicholas Clark2011-08-011-11/+8
| | | | | For now, retain compatibility (bug compatibility?) by not processing ccflags and optimize on Win32, WinCE and NetWare.
* In makedef.pl, export boot_* for static modules only on Win32 and WinCE.Nicholas Clark2011-08-011-5/+17
| | | | | | | | | The code as-is will only be run on Win32 and WinCE, because currently the code to populate $static_ext is only run on Win32 and WinCE. As-is this code can't be run on all platforms, because currently *nix (ie AIX) links static extensions into the perl executable, rather than into the shared perl library. Hence boot_* functions for static extensions aren't in the shared perl library, so it would be an error to attempt to export them from it.