| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Align __float128 when using 64-bit mingw compilers.
|
|
|
|
|
|
|
| |
We have tests to make sure this doesn't go negative, but wrongly
declared the variable as unsigned.
Spotted by Craig Berry.
|
|
|
|
|
|
|
|
| |
get_env() needs to lock other threads from writing to the environment
while it is executing. It may need to have an exclusive lock if those
threads can clobber its buffer before it gets a chance to save them.
The previous commit has added a Configure probe which tells us if that
is the case. This commit uses it to select which type of mutex to use.
|
|
|
|
|
|
|
|
| |
There are several places where there could be a problem in the
environment were changed by another thread when a function is executing,
but otherwise if another thread were reading the environment at the same
time, there isn't a problem. This adds mutex for that situation.
Future commits will take advantage of it.
|
|
|
|
| |
Properly indent some nested #defines
|
|
|
|
|
| |
The old name did not encompass all the possible reasons for the
mutex signal condition to be invoked
|
|
|
|
|
|
|
| |
These have an inconsistent configuration in which several functions exist
for thread-safe locales, but the crucial one doesn't show up in our
Configure probe. The code this commit fixes assumed that all or nothing
would be present.
|
|
|
|
|
|
|
|
|
| |
These locks for different functions all use the same underlying mutex;
but that may not always be the case. By creating separate names
used only when we think they will be necessary, the compiler will
complain if the conditions in the code that actually use them are the
same. Doing this showed a misspelling in an #ifdef, fixed in
9289d4dc7a3d24b20c6e25045e687321ee3e8faf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was prompted by my realization that even on a locale thread-safe
platform, there are functions we call that may not be thread-safe in
that they return their results in an internal static buffer, which may
be process-wide instead of per-thread. Tomasz Konojacki++ briefly
looked at Windows source code for localeconv() and this indeed did
appear to be the case.
If we thought a platform was thread-safe, no locale mutexes were set up,
and instead the calls in the code to lock were no-oops. This would lead
to potential races, the most likely candidate being localeconv(). None
have been reported, at least as far as we know. Likely that function
isn't called frequently. This would be true on both Posix 2008 and
Windows platforms, except possibly for FreeBSD, which may be the only
platform that we support that has a localeconv_l() function, which is
supposed to be immune from this issue..
The solution adopted here is to test for all the possible functions that
the Perl core uses that may be susceptible to this, and to set up the
mutex if any are found. Thus there won't be no-ops where there should
be a lock.
|
|
|
|
|
| |
This macro is for localeconv(); the new name is clearer as to the
meaning, and this preps for further changes.
|
|
|
|
| |
This previously worked on some compilers, but not others.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit e7ae132ec78 consolidated PERL_SMALL_MACRO_BUFFER usages, but it
omitted the _MSC_VER number at which the buffer became large enough.
Apparently it did this because Windows compilations were failing with
the error "string too long", which doesn't happen if __ASSERT_ expands
to nothing, which it does under PERL_SMALL_MACRO_BUFFER.
However, commits 92a0bb2 and 88086fd shortened the offending strings
so later Windows compilers don't have to be considered as having small
macro buffers.
|
|
|
|
|
| |
This is in preparation for future commits where things will be needed
earlier/later than currently.
|
| |
|
|
|
|
| |
These are useless here
|
|
|
|
|
|
| |
The mutex macros already in perl are sufficient to allow us to emulate
this type of locking, which may also be available natively, but I don't
think it is worth the effort to use the native calls.
|
| |
|
| |
|
|
|
|
| |
or at least lead people to use something better
|
| |
|
|
|
|
|
| |
As the comment said, this was temporary until vtables got to be all
const
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit provide some basic method
to access to internal fields from one
INVLIST: SVt_INVLIST
- prev_index
- is_offset
- array_len
- get_invlist_array
This allows B::C to be walk and save invlists.
|
|
|
|
|
|
|
| |
This fixes GH #18295
The #ifdef introduced in 6bcc290 was meant to go after the line that it
actually did
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This feature allows documentation destined for perlapi or perlintern to
be split into sections of related functions, no matter where the
documentation source is. Prior to this commit the line had to contain
the exact text of the title of the section. Now it can be a $variable
name that autodoc.pl expands to the title. It still has to be an exact
match for the variable in autodoc, but now, the expanded text can be
changed in autodoc alone, without other files needing to be updated at
the same time.
|
| |
|
| |
|
|
|
|
| |
This #ifdef'd code clearly doesn't get compiled, as it would fail.
|
| |
|
| |
|
|
|
|
|
|
| |
Like solaris, trying to give the hint to the compiler that we know this
area of the code is unreachable, merely results in the warning we were
trying to suppress. So turn it off.
|
|
|
|
|
|
| |
Instead of using an underscore to mark this as private, we can #undef
this intermediary after use, as it isn't needed to be defined outside
the small area is is used in in perl.h
|
|
|
|
|
|
| |
Tomasz Konojacki pointed out on #irc that the formulation in
5d5b9c460e2a06563d2b5e35a1a79991460696eb was wrong, and the correction
here is the right way of doing it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The blead definition doesn't compile when I use Devel::PPPort earlier than
some point in the 5.19 series.
Examining the code, I noticed that there was a potential cyclic
definition: ASSUME can call NOTREACHED, and NOTREACHED can call assume.
Blead also assumed without checking that __builtin_unreachable() exists.
So, I refactored things so that there is no cycle, and changed a few
words in the comments to turn them into pod, and the new version
compiles all the way back.
|
|
|
|
|
| |
This commit also moves the definition of dVAR down so its
controlling #ifdef is combined with the next #ifdef
|
| |
|
|
|
|
|
| |
Indent preprocessor directives now enclosed within a new #ifdef block
from the previous commit
|
|
|
|
|
|
| |
This header defines symbols like N0, N1 that could easily be used
innocently by some XS code for its own purposes. We shouldn't pollute
the name space with names the likes of these.
|
| |
|
|
|
|
| |
Spotted by James Keenan
|
|
|
|
|
| |
Given a compiled regexp object, this returns a hashref of the optimization
information discovered for it.
|
| |
|
| |
|
|
|
|
| |
These should have a semicolon after each in their usage
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This puts these in the new sections of perlapi, and makes them display
better.
|