summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* handy.h: Add isCASED_LCKarl Williamson2022-06-121-0/+5
| | | | As a convenience to other code.
* handy.h: Add wrapper layer macros for isalnum() etcKarl Williamson2022-06-121-58/+76
| | | | | | | | | | | | | | | | | | This adds a new set of macros, forming a lower layer to what is currently there, to wrap the character classification libc functions, isdigit() etc, and case changing ones, tolower(), toupper(). On most platforms these expand simply to the libc function call. But on Windows, they expand to something more complex, to bring the Windows calls into POSIX compliance. Similarly, but not as extensive, IBM products have some non-compliant behavior, and one macro is made more comples to fix that. Previously compliance was achieved at a higher level, with the result that lower level calls were broken. This resulted in parts of the test suite being skipped on Windows and IBM, which remain for now. The current level is rewritten to use the new lower layer, with the result that it is simpler, as the complexity is now done further down.
* handy.h: Collapse some macrosKarl Williamson2022-06-121-11/+6
| | | | These 3 sets of macros can be collapsed trivially into 3 macros.
* handy.h: Move some macro defns aroundKarl Williamson2022-06-121-45/+45
| | | | | | | This is to make the difference listing in future commits smaller. This change includes some comment changes, and some extra parens around some subexpressions
* handy.h: Collapse two sets of macrosKarl Williamson2022-06-121-29/+15
| | | | | | By redefining a wrapper macro used in one set based on compile-time info; the other set can be defined in terms of it, and the separate entries removed.
* No locales => don't use isspace(), toLower() etc.Karl Williamson2022-06-121-16/+16
| | | | | | | | | This commit changes what happens on platforms without locale handling to use our precomputed definitions of what the various character class definitions and case changing operations are. Previously, it just called the libc locale-dependent functions and made sure the result was ASCII. I think this is a holdover from before we had the precomputed definitions
* handy.h: #define one macro in terms of anotherKarl Williamson2022-06-121-1/+1
| | | | | | These two macros are equivalent as folding and lowercasing are the same for this input domain. Better to say so rather than to replicate the definitions.
* handy.h: Rmv unnecessary parameter to internal macrosKarl Williamson2022-06-121-9/+9
| | | | | The cast is required to be U8 by the POSIX standard. There is no need to have this added generality.
* handy.h: Refactor some internal macrosKarl Williamson2022-06-121-15/+12
| | | | This changes the parameters etc, in preparation for further changes
* handy.h: Rmv internal macroKarl Williamson2022-06-121-5/+2
| | | | | | LC_CAST_ was my attempt at generality, but I didn't realize that the POSIX standard specifies the type that this was meant to generalize, so there isn't any need for it.
* Change handy.h macro names to be C standard conformantKarl Williamson2022-06-1212-1064/+1060
| | | | | | | C reserves symbols beginning with underscores for its own use. This commit moves the underscore so it is trailing, which is legal. The symbols changed here are many of the ones in handy.h that have significant uses outside it.
* handy.h: Don't use char class if no LC_CTYPEKarl Williamson2022-06-121-1/+1
| | | | | | It is possible to compile perl to not pay attention to LC_CTYPE. This was testing for no locales at all; whereas the stricter requirement should be used.
* handy.h: White-space, comment onlyKarl Williamson2022-06-121-82/+92
|
* handy.h: Add some branch predictionsKarl Williamson2022-06-121-6/+6
|
* handy.h: Refactor some #ifdef's for commonalityKarl Williamson2022-06-121-34/+30
| | | | | | | | | This changes these compilation conditionals so that things in common between Windows and other platforms are only defined once. It changes the isIDFIRST_LC and isWORDCHAR_LC definitions for non-Windows to match that platform superficially, though expanding to what it previously did to.
* handy.h: Remove the only 2 calls to internal macroKarl Williamson2022-06-121-9/+2
| | | | | Replace isIDFIRST_LC and isWORD_CHAR_LC isIDFIRST_LC with slightly faster implementations.
* Change handy.h macro names to be C standard conformantKarl Williamson2022-06-124-201/+201
| | | | | | | C reserves symbols beginning with underscores for its own use. This commit moves the underscore so it is trailing, which is legal. The symbols changed here are most of the ones in handy.h that have few uses outside it.
* Minor update to perl -h to display newly added -g option.Mohammad S Anwar2022-06-121-0/+1
|
* regcomp.c: Add ASSERTKarl Williamson2022-06-121-1/+2
|
* Mohammad S Anwar is now a Perl authorKarl Williamson2022-06-111-0/+1
|
* Note gotchas, workarounds in STMT_START..STMT_ENDKarl Williamson2022-06-112-4/+111
|
* Discourage use of GCC brace groupsKarl Williamson2022-06-111-5/+11
| | | | | These days, static inline functions are the better bet, as you don't have to maintain two code paths.
* Make fc(), qr//i thread-safe on participating platformsKarl Williamson2022-06-1113-132/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A long standing bug in Perl that has gone undetected is that the array is global that is created when changing locales and tells fc() and qr//i matching what the folds are in the new locale. What this means is that any program only has one set of fold definitions that apply to all threads within it, even if we claim that the locales are thread-safe on the given platform. One possibility for this going undetected so long is that no one is using locales on multi-threaded systems much. Another possibility is that modern UTF-8 locales have the same set of folds as any other one. It is a simple matter to make the fold array per-thread instead of per-process, and that solves the problem transparently to other code. I discovered this stress-testing locale handling under threads. That test will be added in a future commit. In order to keep from having a dTHX inside foldEQ_locale, it has to have a pTHX_ parameter. This means that the other functions that function pointer variables get assigned to point to have to have an identical signature, which means adding pTHX_ to functions that don't require it. The bodies of all these are known to the compiler, since they are all in inline.h or in the same .c file as where they are called. Hence the compiler can optimize out the unused parameter. Two calls of STR_WITH_LEN also have to be changed because of C preprocessor limitations; perhaps there is another way to do it that I'm unfamiliar with.
* mg.c: Fix to compile under g++Karl Williamson2022-06-111-2/+4
| | | | | | | | | | | | Commit 00a5df846e035280750985222a693ac58022ee36 fixed some c undefined behavior, but it will not compile with g++, because a goto crosses initialization. https://stackoverflow.com/questions/14274225/statement-goto-can-not-cross-variable-definition and its links sort of explains why This commit works around this limitation
* Restore wrongly deleted pod for sv_pvutf8Karl Williamson2022-06-101-3/+9
|
* Remove pod for non-existent functionsKarl Williamson2022-06-103-46/+0
| | | | | 7008caa915ad99e650acf2aea40612b5e48b7ba2 removed several deprecated functions, but did not remove all the pods thereof.
* toke.c: Remove Undefined C behaviorKarl Williamson2022-06-101-2/+6
| | | | Spotted by clang 14.
* mg.c: Remove Undedfined C behaviorKarl Williamson2022-06-101-1/+2
| | | | Spotted by clang-14.
* op.c: Improve commentsKarl Williamson2022-06-101-25/+31
|
* Remove support for UltrixKarl Williamson2022-06-1014-155/+33
| | | | | | Ultrix has been removed. Ultrix was the native Unix-like operating system for various Digital Equipment Corporation machines. Its final release was in 1995.
* perlapi: Document hv_name_setKarl Williamson2022-06-102-1/+26
|
* SvGETMAGIC: evaluate its argument just onceKarl Williamson2022-06-105-6/+26
| | | | | | | This required making it into an inline function. I tried using STMT_START{ ... } STMT_END, which should work since it has a void return, but there were places where it was used in a comma operator, and those did not compile.
* Capitalize PerlElvin Aslanov2022-06-091-9/+9
| | | | | Capitalize Perl when referring to the language (rather than the interpreter). Also pluralize "built-ins" and format "CORE" package.
* POSIX.xs: White-space onlyKarl Williamson2022-06-091-27/+28
| | | | Properly indent some nested preprocessor directives
* POSIX.xs: Use macro to reduce complexityKarl Williamson2022-06-092-25/+31
| | | | | This #defines a macro and uses it to populate a structure, so that strings don't have to be typed twice.
* regexec.c: Handle Turkish locale if large ANYOF bitmapKarl Williamson2022-06-092-15/+45
| | | | | | Perl defaults to the bitmap for ANYOF nodes being for the lowest 256 characters, but it is possible to compile the bitmap to be up to size 2**16. Doing so, prior to this commit, broke Turkish locale handling.
* regexec.c: Avoid using a more general fcnKarl Williamson2022-06-091-18/+68
| | | | | | | The regnodes in the ANYOFH series by definition don't have a bitmap used in the other ANYOF-type nodes. Instead they have an inversion list. We can avoid the overhead of calling the general function that looks first in the bitmap.
* locale.c: Replace most #ifdef DEBUGGING linesKarl Williamson2022-06-091-252/+92
| | | | | | THe previous commit enhanced the DEBUG macros so that they contain the logic that previously had to be done with conditional compilation statements. Removing them makes the code easier to read.
* DEBUG_L now also looks at environment variableKarl Williamson2022-06-092-13/+25
| | | | | | | | | | Because locale initialization happens before command line processing, one can't pass a -DL argument to enable debugging of locale initialization. Instead, an environment variable is read then, and is used to enable debugging or not. In the past, code specifically had to test for this being set. This commit changes that so that debugging can automatically be enabled without having to write special code. Future commits will strip out those special checks.
* XSLoader: convert from Test::More to internal test helpersGraham Knop2022-06-091-8/+99
| | | | | | | | | | | | | The XSLoader tests need to play with the XS bits of various modules, which can interfere with testing modules like Test::More. For example, Test::More now loads Time::HiRes. This results in redefinition warnings, and could lead to more serious problems. Avoid this by creating some test helpers inside the XSLoader test, and using those rather than Test::More. The helpers implemented include roughly the same features used by the test itself, so that the impact on the rest of the test code is minimal.
* Fix building with clang-clClemens Wasser2022-06-093-2/+4
| | | | | As mentioned in https://lists.llvm.org/pipermail/llvm-dev/2015-July/088122.html and https://github.com/llvm/llvm-project/issues/24625 building with clang-cl currently fails due to the declaration of __PL_nan_u. By declaring it like this, cl and clang-cl are happy to parse it.
* perldelta for ea43bc00e1113fTony Cook2022-06-091-1/+3
|
* minitest_prep conflict on building $(MINIPERL_EXE)Tony Cook2022-06-091-3/+3
| | | | | | | | | | | | | | | | | minitest depends on $(MINIPERL_EXE) and minitest_prep, but minitest_prep calls back into make to build lib/Config.pm which indirectly depends on $(MINIPERL_EXE). This can result in a race between the parallel work of the parent make and the work of the child make, as they both try to build $(MINIPERL_EXE) and its dependencies, causing some of the errors described in the ticket. Note that trying to `make -j6 minitest all` could lead to similar conflicts, but I think that's an unlikely and not worth supporting anyway. Fixes #19829 (I think)
* perldelta for bbaab2c3cd9Tony Cook2022-06-091-0/+6
|
* use Off_t for file offsets in sdbm.cTony Cook2022-06-092-4/+9
| | | | | | | | | | | On Win32 long is only 32-bits (even for x86_64), which meant file sizes were limited to 2GB. This successfully runs the example code, and can successfully read all the keys back. I didn't add a test, since creating a 2GB (or 8GB for the issue test) would be unfriendly.
* handy.h: WIDEST_UTYPE is just PERL_UINTMAX_TKarl Williamson2022-06-081-5/+1
| | | | No need to re-derive it
* perl5dp.pl: Bump versionKarl Williamson2022-06-081-1/+1
|
* Data::Dumper: bump versionKarl Williamson2022-06-081-1/+1
|
* Elvin Aslanov is now a Perl authorKarl Williamson2022-06-081-0/+1
|
* Fix typos in tim64.c commentsKarl Williamson2022-06-081-2/+3
|