summaryrefslogtreecommitdiff
path: root/makedef.pl
Commit message (Collapse)AuthorAgeFilesLines
* teach makedef.pl about PL_keyword_plugin_mutexLukas Mai2017-11-111-0/+1
| | | | This fixes t/porting/globvar.t.
* Don't link in Perl_my_strnlen when we don't have it.Craig A. Berry2017-10-261-0/+5
|
* Rely on C89 sprintf() return value semanticsAaron Crane2017-10-211-5/+0
|
* Initialize locale object even in unthreaded perlsKarl Williamson2017-08-121-2/+1
| | | | | | | This commit will now initialize the thread-safe C locale object if the POSIX 2008 functions are available, regardless of whether the perl is threaded or not. This will allow for a future commit that uses them, and which is a win on unthreaded builds.
* Make immortal SVs contiguousDavid Mitchell2017-07-271-0/+4
| | | | | | | | | | | | | | | | | | | Ensure that PL_sv_yes, PL_sv_undef, PL_sv_no and PL_sv_zero are allocated adjacently in memory. This allows the SvIMMORTAL() test to be more efficient, and will (in the next commit) allow SvTRUE() to be more efficient. In MULTIPLICITY builds the constraint is already met by virtue of them being adjacent items in the interpreter struct. For non-MULTIPLICITY builds, they were just 4 global vars with no guarantees of where they would be allocated. For this case, PL_sv_undef are deleted as global vars and replaced with a new global var PL_sv_immortals[4], with #define PL_sv_yes (PL_sv_immortals[0]) etc in their place.
* Fix Windows build following commit 9d5e3f1aaaSteve Hay2017-06-071-0/+3
|
* Switch most open() calls to three-argument form.John Lightsey2016-12-231-1/+1
| | | | | | | | | | Switch from two-argument form. Filehandle cloning is still done with the two argument form for backward compatibility. Committer: Get all porting tests to pass. Increment some $VERSIONs. Run: ./perl -Ilib regen/mk_invlists.pl; ./perl -Ilib regen/regcharclass.pl For: RT #130122
* Patch unit tests to explicitly insert "." into @INC when needed.H.Merijn Brand2016-11-111-1/+1
| | | | | require calls now require ./ to be prepended to the file since . is no longer guaranteed to be in @INC.
* Make PERLLIB_SEP dynamic on VMS.Craig A. Berry2016-09-011-0/+1
| | | | | | | 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.
* locale.c: Revamp my_strerror() for thread-safenessKarl Williamson2016-07-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* embed.fnc: Alter 'b' flag meaningKarl Williamson2016-05-121-16/+3
| | | | | | | | | | | | | This commit changes this flag to mean that the backward compatibility functions are compiled unless the -DNO_MATHOMS cflag is specified to Configure. Previously the meaning was sort of like that but not precisely. Doing this means that the prototypes that needed to be manually added to mathoms.c are no longer needed. No special parameter assertions have to be made. makedef.pl no longer needs to parse mathoms.c and have special cases for it. And several special case entries in embed.fnc can be non-special cased.
* embed.fnc: Change 'b' flag to not imply 'p' flagKarl Williamson2016-05-121-1/+1
| | | | | By doing this, we make it more general, which will be useful in a few commits.
* Add locale mutexKarl Williamson2016-04-091-0/+1
| | | | | This adds a new mutex for use in the next commit for use with locale handling.
* rename and function-ise dtrace macrosDavid Mitchell2016-03-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit: 1. Renames the various dtrace probe macros into a consistent and self-documenting pattern, e.g. ENTRY_PROBE => PERL_DTRACE_PROBE_ENTRY RETURN_PROBE => PERL_DTRACE_PROBE_RETURN Since they're supposed to be defined only under PERL_CORE, this shouldn't break anything that's not being naughty. 2. Implement the main body of these macros using a real function. They were formerly defined along the lines of if (PERL_SUB_ENTRY_ENABLED()) PERL_SUB_ENTRY(...); The PERL_SUB_ENTRY() part is a macro generated by the dtrace system, which for example on linux expands to a large bunch of assembly directives. Replace the direct macro with a function wrapper, e.g. if (PERL_SUB_ENTRY_ENABLED()) Perl_dtrace_probe_call(aTHX_ cv, TRUE); This reduces to once the number of times the macro is expanded. The new functions also take simpler args and then process the values they need using intermediate temporary vars to avoid huge macro expansions. For example ENTRY_PROBE(CvNAMED(cv) ? HEK_KEY(CvNAME_HEK(cv)) : GvENAME(CvGV(cv)), CopFILE((const COP *)CvSTART(cv)), CopLINE((const COP *)CvSTART(cv)), CopSTASHPV((const COP *)CvSTART(cv))); is now PERL_DTRACE_PROBE_ENTRY(cv); This reduces the executable size by 1K on -O2 -Dusedtrace builds, and by 45K on -DDEBUGGING -Dusedtrace builds.
* teach makedef.pl an alternate macro for PERL_COPY_ON_WRITEDaniel Dragan2016-03-011-1/+1
| | | | | otherwise a -DPERL_NO_COW perl win32 build fails during linking perl523.dll with missing Perl_sv_setsv_cow
* remove deprecated PL_timesbufDaniel Dragan2016-01-171-1/+0
| | | | Saves memory in interp struct.
* killpg for VMS.Craig A. Berry2015-09-261-0/+1
| | | | | | | | | | | | Implement our own killpg by scanning for processes in the specified process group, which may not mean exactly the same thing as a Unix process group, but at least we can now send a signal to a parent (or master) process and all of its sub-processes. In Perl-land, this means we can now send a negative pid like so: kill SIGKILL, -$pid; to signal all processes in the same group as $pid.
* Add code for debugging locale initializationKarl Williamson2015-09-081-0/+1
| | | | | | | | | | | This initialization is done before the processing of command line arguments, so that it has to be handled specially. This commit changes the initialization code to output debugging information if the environment variable PERL_DEBUG_LOCALE_INIT is set. I don't see the need to document this outside the source, as anyone who is using it would be reading the source anyway; it's of highly specialized use.
* Don't skip symbols for defunct -Uuseperlio case.Craig A. Berry2015-07-231-25/+5
| | | | | Those symbols can and must exist for the -Duseperlio case, which is the only configuration possible since 5.16.x.
* Use CRTL getlogin and getlogin_r on VMS.Craig A. Berry2015-07-121-1/+0
| | | | | | The CRTL has supplied getlogin since v7.0, so let's not use the home-made one anymore. Plus the CRTL als has a reentrant version, so we'll use that under threads.
* Remove NEW_ from PERL_NEW_COPY_ON_WRITEFather Chrysostomos2015-06-291-1/+1
|
* Remove PERL_OLD_COPY_ON_WRITEFather Chrysostomos2015-06-291-2/+1
|
* op_parent(): only exist under -DPERL_OP_PARENTDavid Mitchell2015-04-191-0/+7
| | | | | | Make the function Perl_op_parent() only be present in perls built with -DPERL_OP_PARENT. Previously the function was present in all builds, but always returned NULL on non PERL_OP_PARENT builds.
* Don't bother prettifying win32/perldll.defSteve Hay2015-01-251-5/+3
| | | | | | It's not a file that anyone ever really looks inside anyway, so it's not worth the possible future breakage if we ever have a PL_ symbol 32 or more characters long.
* export data symbols as data on Win32Daniel Dragan2015-01-251-28/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously on Win32 Perl, all the PL_* data symbols were treated as function symbols with expectation of machine code at their targets when generating the linking library perl5**.lib or perl5**.a. In VC Perl, if an DLL XS module accidentally (by manipulating the defines before #including perls headers) turned "extern __declspec(dllimport) I32 *PL_markstack_ptr;" into "extern I32 *PL_markstack_ptr;", a SEGV would result as if the XS module executed "I32 ax = (*(I32*)Perl_sv_2mortal)--;". By marking the symbols as data in the linking lib, the VC linker will error out while creating a XS DLL where this mistake of dropping out __declspec(dllimport) happened, instead of a runtime crash. Mingw GCC linker does the correct behavior, and does not treat the data symbol as machine code even if "__declspec(dllimport)" is removed. Still add DATA to the GCC perldll.def to be sure. There is no reason for "jmp" machine codestubs/thunks to exist in the perl.lib/perl.a to a data export. Also add constant folding to the loop in makedef.pl, since every other platform check executes exactly once, there is no point of executing the ops in the perl compile time constant folder vs runtime executing them. If a data symbol name exceeds the 32 limit, then "DATA" will be catted onto the symbol name and linking lib generation will fail since the symbol wont exist. The 32 limit will then be increased at that point in the future. See details about this patch in [perl #123626]
* makedef.pl: don't hard-code list of mathomsAaron Crane2014-12-141-151/+12
| | | | | | | | | | | | | | | It's easy enough to read the list out of mathoms.c directly, and this should prevent almost all bugs of the sort that were fixed by 083750a56b7927292a4bf7b1bf64aa26dd2a6858. (Only names that don't begin with "Perl_" will cause a problem.) The list of names detected automatically may actually differ slightly from the hard-coded list; for example, the definition of Perl_huge() is inside "#if defined(HUGE_VAL) || (defined(USE_LONG_DOUBLE) && defined(HUGE_VALL))", but the new code in makedef.pl ignores preprocessor conditions. However, the list is used as names to *skip*, rather than to include, so it's not a problem if makedef.pl is willing to skip names that it will never be asked to include.
* fix incomplete mathoming of Perl_pad_compname_typeDaniel Dragan2014-12-011-0/+1
| | | | | commit 09d7a3ba91 moved Perl_pad_compname_type to mathoms but didn't update makedef.pl. This causes a link failure of perl521.dll on Win32.
* Record errno value in IO handlesFather Chrysostomos2014-11-021-0/+2
|
* free up CvPADLIST slot for XSUBs for future useDaniel Dragan2014-10-311-0/+1
| | | | | | | | | | | | | | | | | | | CvRESERVED is a placeholder, it will be replaced with a sentinal value from future revised BOOTCHECK API. CvPADLIST_set was helpful during development of this patch, so keep it around for now. PoisonPADLIST's magic value is from PERL_POISON 0xEF pattern. Some PoisonPADLIST locations will get code from future BOOTCHECK API. Make padlist_dup a NN function to avoid overhead of calling it for XSUBs during closing. Perl_cv_undef_flags's else if (CvISXSUB(&cvbody)) is to avoid whitespace changes. Filed as perl [#123059].
* make -DNO_MATHOMS work on Win32Daniel Dragan2014-10-211-0/+152
| | | | | If you try to export symbols which dont exist, VC linker fails. NO_MATHOMS now works on Win32. The list of symbols is from VC's error log.
* globvar.sym: include PL_ prefix in namesDavid Mitchell2014-09-221-4/+1
| | | | | | | By prepending 'PL_' to each line in globvar.sym, it a) makes makedef.pl slightly simpler, b) makes it easier to spot all usage of a particular var when you do 'git grep PL_foo'
* quadmath helpers export list.Jarkko Hietaniemi2014-09-191-0/+5
|
* Remove MAD.Jarkko Hietaniemi2014-06-131-7/+0
| | | | | | MAD = Misc Attribute Decoration; unmaintained attempt at preserving the Perl parse tree more faithfully so that automatic conversion to Perl 6 would have been easier.
* Add C backtrace API.Jarkko Hietaniemi2014-06-071-0/+5
| | | | | | | | Useful for at least debugging. Supported in Linux and OS X (possibly to some extent in *BSD). See perlhacktips for details.
* 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.