summaryrefslogtreecommitdiff
path: root/perl.c
Commit message (Collapse)AuthorAgeFilesLines
* Change white space to avoid C++ deprecation warningKarl Williamson2016-11-181-8/+8
| | | | | | | | | | | | | | | | | | | | | | C++11 requires space between the end of a string literal and a macro, so that a feature can unambiguously be added to the language. Starting in g++ 6.2, the compiler emits a warning when there isn't a space (presumably so that future versions can support C++11). Unfortunately there are many such instances in the perl core. This commit fixes those, including those in ext/, but individual commits will be used for the other modules, those in dist/ and cpan/. This commit also inserts space at the end of a macro before a string literal, even though that is not deprecated, and removes useless "" literals following a macro (instead of inserting a blank). The result is easier to read, making the macro stand out, and be clearer as to the intention. Code and modules included with the Perl core need to be compilable using C++. This is so that perl can be embedded in C++ programs. (Actually, only the hdr files need to be so compilable, but it would be hard to test that just the hdrs are compilable.) So we need to accommodate changes to the C++ language.
* Push current state to work on failing testsH.Merijn Brand2016-11-111-2/+7
|
* Revert "hv.h: rework HEK_FLAGS to a proper member in struct hek"Tony Cook2016-11-031-12/+0
| | | | | | | | This reverts commit d3148f758506efd28325dfd8e1b698385133f0cd. SV keys are stored as pointers in the key_key, on platforms with alignment requirements (such as PA-RISC) this resulted in bus errors early in the build.
* hv.h: rework HEK_FLAGS to a proper member in struct hekTodd Rinaldo2016-10-241-0/+12
| | | | | | | | | | | | | | | | | | | | | Move the store of HEK_FLAGS off the end of the allocated hek_key into the hek struct, simplifying access and providing clarity to the code. What is not clear is why Nicholas or perhaps Jarkko did not do this themselves. We use similar tricks elsewhere, so perhaps it was just continuing a tradition... One thought is that we often have do strcmp/memeq on these strings, and having their start be aligned might improve performance, wheras this patch changes them to be unaligned. If so perhaps we should just make flags a U32 and let the HEK's be larger. They are shared in PL_strtab, and are probably often sitting in malloc blocks that are sufficiently large enough that making them bigger would make no practical difference. (All of this is worth checking.) [with edits by Yves Orton]
* perl.[ch]: switch to using SvPVCLEAR() and string constant friendly macrosYves Orton2016-10-191-10/+10
|
* [rt #129336] #!perl -i u erroneously interpreted as -uDan Collins2016-10-111-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perl_moreswitches processes a single switch, and returns a pointer to the start of the next switch. It can return either the a pointer to the next flag itself: #!perl -n -p ^ Can point here Or, to the space before the next "arg": #!perl -n -p ^ Can point here (Where the next call to Perl_moreswitches will consume " -".) In the case of -i[extension], the pointer is by default pointing at the space after the end of the argument. The current code tries to do the former, by unconditionally advancing the pointer, and then advancing it again if it is on a '-'. But that is incorrect: #!perl -i p ^ Will point here, but that isn't a flag I could fix this by removing the unconditional s++, and having it increment by 2 if *(s+1)=='-', but this work isn't actually necessary - it's better to just leave it pointing at the space after the argument.
* restore comment mangled by 27da23d53ccce6Lukas Mai2016-09-161-0/+1
|
* Make PERLLIB_SEP dynamic on VMS.Craig A. Berry2016-09-011-2/+2
| | | | | | | Because if we're running under a Unix shell, the path separator is likely to meet the expectations of Unix shell scripts better if it's the Unix ':' rather than the VMS '|'. There is no change when running under DCL.
* Do not show error message if errno = 0 for flush fail on STDOUTH.Merijn Brand2016-08-191-2/+3
| | | | | | | | | | | | | Somehow (on HP-UX Itanium) the flush fails, but errno is still 0 The lib/warnings.t test then shows EXPECTED: Filehandle STDOUT opened only for output at - line 3. GOT: Filehandle STDOUT opened only for output at - line 3. Unable to flush stdout: Error 0 This change suppresses that last line if errno is (still) 0
* Take advantage of SvGROW's return valueKarl Williamson2016-08-171-2/+1
| | | | | | | | I had not realized that SvGROW returned the new string pointer. Using that makes a one-step process from a two-step process. I examined the code for other possible occurrences, and found others where it seemed that the two-step seemed clearer, so left those alone.
* Move some global destruction to where it belongsKarl Williamson2016-08-101-10/+0
| | | | | Out of ignorance, I put this locale global destruction in the per-thread destruction code, leading to segfaults on at least Darwin.
* INCMARK is a statement now; don't cast itLukas Mai2016-08-081-1/+1
|
* locale.c: Revamp my_strerror() for thread-safenessKarl Williamson2016-07-291-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is the first step in making locale handling thread-safe. [perl #127708] was solved for 5.24 by adding a mutex in this function. That bug was caused by the code changing the locale even if the calling program is not consciously using locales. Posix 2008 introduced thread-safe locale functions. This commit changes this function to use them if the perl is threaded and the platform has them available. This means that the mutex is avoided on modern platforms. It restructures the function to return a mortal copy of the error message. This is a step towards making the function completely thread safe. Right now, as documented, if you do 'use locale', locale handling isn't thread-safe. A global C locale object is created and used here if necessary. It is destroyed at the end of the program. Note that some platforms have a strerror_r(), which is automatically used instead of strerror() if available. It differs form straight strerror() by taking a buffer to place the returned string, so the return does not point to internal static storage. One could test for the existence of this and avoid the mortal copy.
* perl.c: comment that it's also perlmini.cDavid Mitchell2016-06-171-0/+4
|
* (perl #127380) only trace to $PERLIO_DEBUG if -Di is suppliedTony Cook2016-06-081-1/+2
|
* better glibc i_modulo bug handlingjimc2016-05-171-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pp-i-modulo code currently detects a glibc bug at runtime, at the 1st exec of each I_MODULO op. This is suboptimal; the bug should be detectable early, and PL_ppaddr[I_MODULO] updated just once, before any optrees are built. Then, because we avoid the need to fixup I_MODULO ops in already built optrees, we can drop the !PERL_DEBUG_READONLY_OPS limitation on the alternative/workaround I_MODULO implementation that avoids the bug. perl.c: bug detection code is copied from PP(i_modulo), into S_fixup_platform_bugs(), and called from perl_construct(). It patches Perl_pp_i_modulo_1() into PL_ppaddr[I_MODULO] when needed. pp.c: PP(i_modulo_0), the original implementation, is renamed to PP(i_modulo) PP(i_modulo_1), the bug-fix workaround, is renamed _glibc_bugfix it is #ifdefd as before, but dropping !PERL_DEBUG_READONLY_OPS PP(i_modulo) - the 1st-exec switcher code, is dropped ocode.pl: Two i_modulo entries are added to @raw_alias. - 1st alias: Perl_pp_i_modulo => 'i_modulo' - 2nd alt: Perl_pp_i_modulo_glibc_bugfix => 'i_modulo' 1st is a restatement of the default alias/mapping that would be created without the line. 2nd line is then seen as alternative to the explicit mapping set by 1st. Alternative functions are written to pp_proto.h after the standard Perl_pp_* list, and include #if-cond, #endif wrappings, as was specified by 2nd @raw_alias addition. Changes tested by inserting '1 ||' into the 3 ifdefs and bug-detection code. TODO: In pp_proto.h generation, the #ifdef wrapping code which handles the alternative functions looks like it should also be used for the non-alternate functions. In particular, there are a handful of pp-function prototypes that should be wrapped with #ifdef HAS_SOCKET. That said, there have been no problem reports, so I left it alone. TonyC: make S_fixup_platform_bugs static, porting/libperl.t was failing.
* add PERL_OP_PARENT to 'perl -V' outputDavid Mitchell2016-05-141-0/+3
|
* fix make test failures in -Accflags=-DPERL_TRACE_OPSJim Cromie2016-05-101-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | builds with -DPERL_TRACE_OPS currently fail make test, on ~124 files, for both normal & -DDEBUGGING, and plain & threaded configs. These tests fail because they check STDERR content, and reject the extra output issued by perl_destruct() in these builds. It turns out that "Trace of all OPs executed:" by itself is enough to cause the failures. The easiest fix is to silence -DPERL_TRACE_OPS printing by default, and enable it if $ENV{PERL_TRACE_OPS} > 0. Due to various aspects of the design, this is also the best fix. - OP-counting is only done in runops_debug(). runops_standard() avoids all counting overhead, so the only 'cost' then is the extra space in the interpreter structure. - use of runops_debug() vs runops_standard() varies at build, with -DDEBUGGING, and can be changed at runtime, with -MDevel::Peek -e 'BEGIN{runops_debug(0 or 1)}' - when runops_standard is used, perl_destruct() reports ALL-0s OP-exec-counts. This is wrong, silence is better. - when runops_* is toggled, OP-counts will only reflect part of the work done. Given the flexibilty of use, perl_destruct() cannot really know the counts are good, and shouldnt just spew them to STDERR. With this patch, the user asks for the output at runtime. - with patch, the build is not noisy, more usable, no stderr to deal with. miniperl is also silent, reducing `make` output too. - via simple XS, data can be read, cleared, at any compilation phase. with this, data to stderr is just a convienience, not "the way" to get data. Ive got Devel::TraceOps on-deck. I also took the liberty of suppressing "<optype>: 0" prints entirely. - no real info provided (0 count is inferrable by silence) - 0 is usually wrong, unless other OP-counts (from same interp) are non-0 - `make test` on a non-debug threaded build emits 5 million of them And now './perl -e 'print "foo\n"' becomes readably small: foo Trace of all OPs executed: pushmark: 1 gvsv: 1 nextstate: 1 enter: 1 leave: 1 print: 1 NOTES: Since the PERL_TRACE_OPs counting overhead is runtime selectable, it seemed useful to measure and report it: function run_trace_overhead() { for i in seq 1 2; do perf stat -r5 -- ./perl -Ilib -MDevel::Peek -e 'BEGIN{runops_debug(0)}' -e 'for (1..9_999_999){$i++}' perf stat -r5 -- ./perl -Ilib -MDevel::Peek -e 'BEGIN{runops_debug(1)}' -e 'for (1..9_999_999){$i++}' done 2>&1 | grep -E 'Performance|instructions' } bench.pl couldnt do this, not without different --perlargs per contestant. [jimc@popeye perl]$ run_trace_overhead Performance counter stats for './perl -MDevel::Peek -e BEGIN{runops_debug(0)} -e for (1..9_999_999){$i++}' (5 runs): 3,460,280,502 instructions # 1.57 insns per cycle (25.01%) Performance counter stats for './perl -MDevel::Peek -e BEGIN{runops_debug(1)} -e for (1..9_999_999){$i++}' (5 runs): 3,857,253,945 instructions # 2.00 insns per cycle (25.07%) Performance counter stats for './perl -MDevel::Peek -e BEGIN{runops_debug(0)} -e for (1..9_999_999){$i++}' (5 runs): 3,437,504,999 instructions # 1.57 insns per cycle (25.07%) Performance counter stats for './perl -MDevel::Peek -e BEGIN{runops_debug(1)} -e for (1..9_999_999){$i++}' (5 runs): 3,859,640,318 instructions # 2.00 insns per cycle (25.09%) IE: when swapping runops_debug for runops_standard, the instruction count predictably goes up: by 3.8/3.4 = 1.12 in these results. Subject to many caveats, this is a reasonable estimate of the worst-case cost overhead of OP-counting. NB: the insns per cycle above are garbage, on this older 32bit box. but the instruction counts look plausible (I didnt look at the assembly code), and the per-cycle numbers are sane on a 64bit cpu (with a newer PMU).
* Add locale mutexKarl Williamson2016-04-091-0/+1
| | | | | This adds a new mutex for use in the next commit for use with locale handling.
* Add SILENT_NO_TAINT_SUPPORT to S_Internals_V ()Yves Orton2016-04-061-0/+3
| | | | NO_TAINT_SUPPORT was added in 3b0e4ee2077, but SILENT_NO_TAINT_SUPPORT was overlooked.
* regcomp.c, perl.c: Use 'VOL' not 'volatile'Karl Williamson2016-03-191-1/+1
| | | | | | | I presume that VOL is so perl can at least compile on compilers that lack 'volatile'. (It was added by Larry in 1991 by 352d5a3ab; there were probably a lot more compilers like that back then.) But VOL is used consistently in the core, with these being the two exceptions.
* report an error and fail if we can't flush stdoutTony Cook2016-03-171-0/+13
|
* remove duplicate environment variables from environTony Cook2016-03-011-2/+49
| | | | | | | | | | | | | | | | | | | | | If we see duplicate environment variables while iterating over environ[]: a) make sure we use the same value in %ENV that getenv() returns. Previously on a duplicate, %ENV would have the last entry for the name from environ[], but a typical getenv() would return the first entry. Rather than assuming all getenv() implementations return the first entry explicitly call getenv() to ensure they agree. b) remove duplicate entries from environ Previously if there was a duplicate definition for a name in environ[] setting that name in %ENV could result in an unsafe value being passed to a child process, so ensure environ[] has no duplicates. CVE-2016-2381
* convert CX_PUSHEVAL/POPEVAL to inline fnsDavid Mitchell2016-02-031-1/+1
| | | | | | Replace CX_PUSHEVAL() with cx_pusheval() etc. No functional changes.
* convert CX_PUSH/POP/TOPBLOCK to inline fnsDavid Mitchell2016-02-031-1/+1
| | | | | | Replace CX_PUSHBLOCK() with cx_pushblock() etc. No functional changes.
* offset PL_savestack_max by SS_MAXPUSHDavid Mitchell2016-02-031-2/+6
| | | | | | | | | | | | | | | | The newer SS_ADD macros expect there to always be SS_MAXPUSH slots free on the savestack; so they can push multiple items, then only check once at the end whether stack needs expanding. This commit makes savestack_grow() set PL_savestack_max to SS_MAXPUSH short of what has actually been allocated. This makes the tests to see whether the stack needs growing slightly simpler, i.e. PL_savestack_ix > PL_savestack_max rather than PL_savestack_ix + SS_MAXPUSH > PL_savestack_max
* rename PUSHBLOCK,PUSHSUB etc to CX_PUSHBLOCK etcDavid Mitchell2016-02-031-1/+1
| | | | | | | Earlier all the POPFOO macros were renamed to CX_POPFOO to reflect the changed API (like POPBLOCK no longer decremented cxstack_ix). Now rename the PUSH ones for consistency.
* PUSHEVAL: make retop a parameterDavid Mitchell2016-02-031-1/+1
| | | | | | Rather than doing cx->blk_eval.retop = NULL in PUSHEVAL, then relying on the caller to subsequently change it to something more useful, make it an arg to PUSHEVAL.
* rename POPFOO() to CX_POPFOO()David Mitchell2016-02-031-1/+1
| | | | | | | | | | | | | | | | Rename all the context-popping macros such as POPBLOCK and POPSUB, by giving them a CX_ prefix. (Do TOPBLOCK too). This is principally to deliberately break any existing non-core use of these non-API macros, as their behaviour has changed in this branch. In particular, POPBLOCK(cx) no longer decrements the cxt stack pointer nor sets cx; instead, cx is now expected to already point to the stack frame which POPBLOCK should process. At the same time, giving them a CX_ prefix makes it clearer that these are all part of a family of macros that manipulate the context stack. The PUSHFOO() macros will be renamed in a later commit.
* restore PL_tmps_floor on exitDavid Mitchell2016-02-031-1/+4
| | | | | | | | | | A couple of places were expecting dounwind(-1); LEAVE_SCOPE(0); to restore PL_tmps_floor, since its old value was saved on the savestack. Since that's now stored in the context struct instead, do a POPBLOCK(&cxstack[0]). This problem only showed up on 'make test' rather than 'make test_harness', since only the former sets PERL_DESTRUCT_LEVEL.
* add CX_CUR() macroDavid Mitchell2016-02-031-1/+1
| | | | | | This is simply #define CX_CUR() (&cxstack[cxstack_ix])
* call_sv(), fold_const(): different CX pop testDavid Mitchell2016-02-031-3/+8
| | | | | | | | | | | | | | | | | | Perl_call_sv() and S_fold_constants() both have similar code that: pushes an EVAL context, does a JMPENV_PUSH() and CALLRUNOPS(), then optionally pops the EVAL context. The optionally part depends on whether what's doing the dying has already popped the context before long-jumping. Currently the decision on whether to pop is based on whether the scope stack has already been popped. This commit changes that to whether the context stack has already been popped, since shortly we're going to change eval contexts so that the old savestack_ix is stored in the CX struct rather than on the scope stack. I ran this code with some asserts that the two conditions were identical, and nothing failed.
* Fix umask for mkstemp(3) callsNiko Tyni2016-01-291-1/+1
| | | | | | | | | | | | | | | | | | With commit v5.21.0-67-g60f7fc1, perl started setting umask to 0600 before calling mkstemp(3), and then restoring it afterwards. This is wrong as it tells open(2) to strip the owner read and write bits from the given mode before applying it, rather than the intended negation of leaving only those bits in place. On modern systems which call open(2) with mode 0600 in mkstemp(3), this clears all the created temporary file permissions. However, any systems that use mode 0666 in mkstemp(3) (like ancient versions of glibc) now create a file with permissions 0066, leaving world read and write permission regardless of current umask. Using umask 0177 instead fixes this. Bug: https://rt.perl.org/Ticket/Display.html?id=127322
* Use vmstrnenv() to look up PERL5LIB/PERLLIB on VMS.Craig A. Berry2016-01-251-5/+5
| | | | | | | | | | | | | | | We have, for a long time, only considered logical names when looking for values of PERL5LIB. However, this makes us miss values stored in the environ array (such as when happens when Perl is invoked from bash) or as DCL symbols. So make looking up PERL5LIB and PERLLIB use the lower level routine that will look up values using the same search order as all other environment handling in Perl, while still handling a list of paths as a search list logical if that's where the value is stored. N.B. There is no change to the default path separator here, only to lookup method.
* updating copyright to 2016Stevan Little2016-01-201-2/+2
|
* Add qr/\b{lb}/Karl Williamson2016-01-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the final Unicode boundary type previously missing from core Perl: the LineBreak one. This feature is already available in the Unicode::LineBreak module, but I've been told that there are portability and some other issues with that module. What's added here is a light-weight version that is lacking the customizable features of the module. This implements the default Line Breaking algorithm, but with the customizations that Unicode is expecting everybody to add, as their test file tests for them. In other words, this passes Unicode's fairly extensive furnished tests, but wouldn't if it didn't include certain customizations specified by Unicode beyond the basic algorithm. The implementation uses a look-up table of the characters surrounding a boundary to see if it is a suitable place to break a line. In a few cases, context needs to be taken into account, so there is code in addition to the lookup table to handle those. This should meet the needs for line breaking of many applications, without having to load the module. The algorithm is somewhat independent of the Unicode version, just like the other boundary types. Only if new rules are added, or existing ones modified is there need to go in and change this code. Otherwise, running regen/mk_invlists.pl should be sufficient when a new Unicode release is done to keep it up-to-date, again like the other Unicode boundary types.
* silence compiler warnings using INCMARK/POPMARKDavid Mitchell2015-11-191-2/+2
| | | | | | | | | | v5.23.3-305-g6cae08a introduced debugging variants of INCMARK/POPMARK, and replaced a number of "PL_markstack_ptr--;" with "POPMARK;" etc. This spews a bunch of "value computed is not used" warnings; so add some "(void)"s. Also indent the new definitions of INCMARK/POPMARK correctly.
* MARK -Ds debuggingReini Urban2015-11-101-2/+2
| | | | | display the MARK arity and pointers with MARK macros. assert on markptr underflow.
* Allow overriding the compile time in "perl -V" outputNiko Tyni2015-11-031-7/+12
| | | | | | | | | | | | | | The C preprocessor macros __DATE__ and __TIME__ embed the compile time into the binary for the purposes of "perl -V" output. This makes the build unreproducible: compiling the same source with the same toolchain cannot be made to yield bitwise identical binaries and other generated files. The compile time can now be overridden with the PERL_BUILD_DATE macro. Bug: https://rt.perl.org/Ticket/Display.html?id=125830 Bug-Debian: https://bugs.debian.org/774422 Patch-Name: debian/do-not-record-build-date.diff
* Revert "Remove unused filesystem stat symbols."Jarkko Hietaniemi2015-10-301-0/+8
| | | | | | | | | | | This reverts commit 821805a244cacd9869331999cd53407f3323206a. What's out, is out. perl #107904 Filesys-Df perl #108189 Filesys-DfPortable perl #108191 Filesys-Statvfs perl #126368 Filesys-DfPortable
* [perl #126242] make the constant hash seeds unsigned char *Tony Cook2015-10-141-2/+2
| | | | | ...to prevent warnings on most C compilers and build failures on C++ compilers for -DNO_HASH_SEED builds.
* Perl_call_sv move EXTEND into branch that needs itDaniel Dragan2015-10-131-5/+3
| | | | | | | | | | | | | | If we aren't manipulating the stack, dont fetch it, check and possibly extend it. There is a slight chance this EXTEND was covering up missing EXTENDs somewhere else in Perl core or CPAN C code, if future bisects or valgrind reports show that this EXTEND by 1 must always be done, this patch can be reverted. pp_method_named contains a EXTEND/XPUSH* call, pp_entersub requires 1 arg on stack so, both sides of the "if (!(flags & G_METHOD_NAMED))" test will in theory make sure there is 1 free slot on the stack on entry to a SUB or XSUB. See also http://www.nntp.perl.org/group/perl.perl5.porters/2015/09/msg231329.html
* remove repeated PL_stack_sp derefs in Perl_eval_sv/Perl_call_svDaniel Dragan2015-10-131-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce scope of local SP and remove excessive reads and writes to PL_stack_sp in Perl_eval_sv/Perl_call_sv. EXTEND macro refetches the possibly realloced SP on its own, Perl_stack_grow returns the new SP as a retval and therefore in a register. By using PL_stack_sp instead of Perl_stack_grow, an extra redundant mem read is done. Also dont keep SP around for long periods unused, it wastes a C stack slot or non-vol reg and makes the callframe bigger. The EXTEND could be placed in the !(flags & G_METHOD_NAMED) branch, but that will be done in another patch for bisectability. VC 2003 -O1 machine code sizes of the functions Perl_eval_sv before 0x28a after 0x286 Perl_call_sv before 0x3cd after 0x3cb The savings look small since in x86 "*var+=4" and "var+=4" are the same number of bytes to encode the instruction, only the mod R/M bitfield vals are different. RISC CPUs benefit more from this patch. commit c106c2be8b "G_METHOD_NAMED flag for call_method and call_sv" added skipping the push SV onto stack The EXTEND and PL_stack_sp direct manipulation code is from commit a0d0e21ea6 "perl 5.000". The reason is unknown why it did "SV** sp = stack_sp;" and later "EXTEND(stack_sp, 1);" instead of using SP, since EXTEND at that time, and to this day requires C auto sp be in scope.
* add Win32 USE_NO_REGISTRY build optionDaniel Dragan2015-10-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -the first arg of win32_get_privlib is not used if the registry is not queried, create a macro to allow the arg to drop out on WIN32_NO_REGISTRY builds for efficiency and not to have unused C litteral strings in the binary -This patch changes the ABI of PerlEnv_lib_path/PerlEnvLibPath/win32_get_privlib between USE_NO_REGISTRY and no USE_NO_REGISTRY. Since win32_get_privlib is not exported from perl523.dll, assume it and PerlEnv_lib_path are not public API, note technically PerlEnv_lib_path will be callable only on PERL_IMPLICIT_SYS builds, on no PERL_IMPLICIT_SYS builds it will fail at link time since win32_get_privlib isnt exported. Therefore place it in non-[affecting]-binary compatibility even though it does affect binary compatibility. -delay load advapi32.dll to save startup time (loading the DLL and the DLL calling its initializers in DllMain) and one 4 KB memory page for advapi32's .data section (doing "perl -E"sleep 100" on WinXP shows advapi32 has a 20KB long .data section, first 4 KB are unique to the process, the remaining 16KB are COW shared between processes according to vmmap tool), putting a DebugBreak() in pp_getlogin and doing a "nmake all" shows miniperl never calls getlogin during the build process. An nmake test shows only ext/POSIX/t/wrappers.t and lib/warnings.t execute pp_getlogin. Keeping advapi32.dll out of the perl process requires removing comctl32.dll, since comctrl32.dll loads advapi32.dll, from perl which I always do as a custom patch. filed as [perl #123658] XXXXXXXXXXXXXXXXXXXXXXX
* partial PL_statbuf removalDaniel Dragan2015-10-081-8/+5
| | | | | | | | | | | | | | | | Perl_nextargv has to have access to the Stat_t that is written to inside S_openn_cleanup or else run/switches.t, io/argv.t, io/inplace.t, and io/iprefix.t will fail. Removing the uses of PL_statbuf that are using PL_statbuf due to historical reason, and not using PL_statbuf to pass data between different funcs/different callstacks. This patch makes it easier to remove PL_statbuf in the future since the number uses of it has been reduced. -in Perl_apply move SETERRNO before tot--; so the branch can be combined with other "tot--;" branches by CC optmizer -combine 2 Perl_croak(aTHX_ "Illegal suidscript"); statements in S_validate_suid to make code look simpler, drop my_perl arg for space efficiency on threads of rarely executed code
* Remove unused filesystem stat symbols.Jarkko Hietaniemi2015-10-021-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | d_fs_data_s HAS_STRUCT_FS_DATA d_fstatfs HAS_FSTATFS d_fstatvfs HAS_FSTATVFS d_getfsstat HAS_GETFSSTAT d_getmnt HAS_GETMNT d_getmntent HAS_GETMNTENT d_hasmntopt HAS_HASMNTOPT d_statfs_f_flags HAS_STRUCT_STATFS_F_FLAGS d_statfs_s HAS_STRUCT_STATFS d_ustat HAS_USTAT i_mntent I_MNTENT i_sysmount I_SYS_MOUNT i_sysstatfs I_SYS_STATFS i_sysstatvfs I_SYS_STATVFS i_sysvfs I_SYS_VFS i_ustat I_USTAT Unused by the Perl core. As far as I can remember I added these scans long ago, for some purpose (df(1) kind of APIs?) but whatever it was, it obviously hasn't exactly caught fire in the last 15 years. Some rare uses of these APIs (not these defines, but e.g. statfs) in CPAN (like the Quota module), but those seem to do their own configuration.
* amigaos4: use #ifdef/ifndef __amigaos4__ when feasibleAndy Broad2015-09-161-1/+1
|
* amigaos4: translate $^X to unix styleAndy Broad2015-09-051-0/+8
|
* Change to use UVCHR_SKIP over UNI_SKIPKarl Williamson2015-09-041-2/+2
| | | | | | | | | | UNI_SKIP is somewhat ambiguous. Perl has long used 'uvchr' as part of a name to mean the unsigned values using the native character set plus Unicode values for those above 255. This also changes two calls (one in dquote_static.c and one in dquote_inline.h) to use UVCHR_SKIP; they should not have been OFFUNI, as they are dealing with native values.
* Various pods: Add C<> around many typed-as-is thingsKarl Williamson2015-09-031-3/+3
| | | | Removes 'the' in front of parameter names in some instances.