| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
UTS was a mainframe version of System V created by Amdahl, subsequently sold
to UTS Global. The port has not been touched since before 5.8.0, and UTS
Global is now defunct.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
We are repeating standard prototypes but we haven't been making
them compatible with the standard versions when compiling under
C++. Now we do.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I think the best we can do with respect to the f?pathconf tests is to
make sure that the perl call doesn't die, and that the system call
doesn't fail. And it's arguable we should only be testing the former.
But since we've been testing more that this anyway, it's probably safe
to test both.
With respect to the sysconf call, I think we shouldn't test more than
that perl doesn't die. Any further testing would require different
tests based the argument being passed in. Before doing that, it's
probably worth considering the purpose of the tests. I don't think we
really want to test that POSIX has been implemented correctly, only that
our layer over it is correctly implemented.
This fixes RT #112866.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we cache the UID/GID and effective UID/GID similarly to how
we used to cache getpid() before v5.14.0-251-g0e21945. Remove this
magical behavior in favor of always calling getpid(), getgid()
etc. This resolves RT #96208.
A minimal testcase for this is the following by Leon Timmermans
attached to RT #96208:
eval { require 'syscall.ph'; 1 } or eval { require 'sys/syscall.ph'; 1 } or die $@;
if (syscall(&SYS_setuid, $ARGV[0] + 0 || 1000) >= 0 or die "$!") {
printf "\$< = %d, getuid = %d\n", $<, syscall(&SYS_getuid);
}
I.e. if we call the sete?[ug]id() functions unbeknownst to perl the
$<, $>, $( and $) variables won't be updated. This results in the same
sort of issues we had with $$ before v5.14.0-251-g0e21945, and
getppid() before my v5.15.7-407-gd7c042c patch.
I'm completely eliminating the PL_egid, PL_euid, PL_gid and PL_uid
variables as part of this patch, this will break some CPAN modules,
but it'll be really easy before the v5.16.0 final to reinstate
them. I'd like to remove them to see what breaks, and how easy it is
to fix it.
These variables are not part of the public API, and the modules using
them could either use the Perl_gete?[ug]id() functions or are working
around the bug I'm fixing with this commit.
The new PL_delaymagic_(egid|euid|gid|uid) variables I'm adding are
*only* intended to be used internally in the interpreter to facilitate
the delaymagic in Perl_pp_sassign. There's probably some way not to
export these to programs that embed perl, but I haven't found out how
to do that.
|
|
|
|
|
|
| |
I've reverted the strptime() code, which involved bumping the version
number, bump the version number again to 1.30 so the version number
won't go backwards.
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 0e582130ad8fc3afc6514f60b7a513c550379b7d, reversing
changes made to a748fe11f70695552294fe4e31343b2dacb59db2.
Conflicts:
ext/POSIX/POSIX.xs
ext/POSIX/lib/POSIX.pm
|
|
|
|
|
| |
This reverts commit 0e582130ad8fc3afc6514f60b7a513c550379b7d, reversing
changes made to 423a1dfc8c367cb58e7dcef73a81b4ec7a8b8810.
|
|
|
|
| |
This reverts commit 05a9a07a5bad262994c7980ced7fffdd93aa2867.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
My merge of strptime() in v5.15.7-367-g0e58213 would break systems
that didn't have strptime in the C library, use the probe H.Merijn
Brand kindly provided in v5.15.7-370-g8852e31 to deal with that.
Now we'll just croak on systems without strptime(3) if the
POSIX::strptime() function is called, in the same way we croak for
other unimplemented functions in there:
$ ./perl -Ilib -MPOSIX=strptime -e 'strptime(qw/foo bar/)'
POSIX::strptime not implemented on this architecture at -e line 1.
This patch is best viewed with the -w option to show or git log, I've
re-indented some code in time.t for the new SKIP block I've added.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Merge my rebased version of Paul "LeoNerd" Evans's branch to blead
after I'd cherry-picked the unrelated a748fe1 commit out of it.
This may or may not be the perfect implementation of strptime, but it
seems to work well enough for me, the bugs that have been raised
against it have been addressed, and it's going to work a hell of a lot
better than not having any strptime support at all.
|
| | |
|
| | |
|
| |
| |
| |
| | |
the string to match; taking care to handle pos() counts both sides
|
| |
| |
| |
| | |
the string to match; taking care to handle pos() counts both sides
|
| |
| |
| |
| | |
better handle mixed UTF-8/non between str and fmt
|
| | |
|
| |
| |
| |
| | |
by sec/min/hour = -1
|
| |
| |
| |
| | |
element yields false so ... and push ... would never have worked
|
| |
| |
| |
| | |
fields in strptime(3)
|
| | |
|
| |
| |
| |
| | |
for some architectures that have extra fields
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
fields are correct
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
| |
long is only 32-bits on x64 Win32, but time_t is 64-bits. This was warning:
POSIX.xs(1777) : warning C4244: 'initializing' : conversion from 'time_t' to 'const long', possible loss of data
The check against (time_t)-1 is the approved check from ANSI C 89 and
99.
|
|
|
|
|
| |
this is mostly for the benefit of the PAUSE indexer, as described
in the code comment
|
|
|
|
|
|
|
|
|
|
| |
Microsoft, in their wisdom, chose to ignore the POSIX spec when implementing
their dup2(), and have theirs return 0 on success, instead of the file
descriptor. It seems that no other vendor is this, um, "special", so code
the exception directly, as we don't run Configure on Win32, so there's little
point probing for this.
This resolves RT #98912.
|
|
|
|
|
|
|
|
| |
Previously it was a Perl wrapper for CORE::sleep, converting CORE::sleep's
return value of elapsed time slept into the POSIX return value of seconds
remaining. However, that approach could sometimes return a negative result
if CORE::sleep had slept for more than a second longer than the requested
time.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The whole point of sigsuspend and pause is to wait until a signal has
arrived, and then return *after* it has been triggered. Currently
delayed/"safe" signals prevent that from happening, which might cause
race conditions.
This patch prevents that (as far as possible) by running the signal
handlers ASAP.
|
|
|
|
|
|
|
|
|
| |
On Win32 which has no native TCSANOW definition this would produce:
Constant subroutine TCSANOW redefined at ../lib/POSIX.pm line -1.
because the macro wasn't defined when building the unknown symbols
table but was defined when building the defined symbols table.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
while compiling perl 5.14.2 on GNU/Hurd, I ran into what it seems a
undefined POSIX behaviour in ext/POSIX/t/sysconf.t.
my $fd = POSIX::open($fifo, O_RDWR)
or skip("could not open $fifo ($!)", 3 * @path_consts_fifo);
according to the POSIX open()[1] about O_RDWR,
The result is undefined if this flag is applied to a FIFO.
.... which is actually our case.
Apparently Linux and *FreeBSD (and maybe also OSes) accept this
behaviour, but on GNU/Hurd this causes the open() call to block
undefinitely. Given there's nothing done with the FIFO if not querying
{,f}pathconf() values, the proposed solution I attached is to change
the opening mode to "O_RDONLY | O_NONBLOCK".
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html
|
|
|
|
|
|
|
|
|
|
|
| |
Commit fa22ee54 changed some of the POSIX error messages to be more
consistent, but in doing so made many of them grammatically incorrect.
It is almost always incorrect in English to join two independent
clauses with a comma.
I don’t think it’s particularly important that error messages be gram-
matical; I just don’t want them getting worse over time. Hence, I
have not touched those that were already ungrammatical.
|
|
|
|
| |
Even though the underlying error is RMS$_DNF. Go figure.
|
|
|
|
|
|
|
|
| |
0 isn't valid on all operating systems. TCASNOW has the value 0 on most
operating systems, but on Solaris (at least) TCASNOW, TCSADRAIN and
TCSAFLUSH have the same values as the equivalent ioctls, TCSETS, TCSETSW and
TCSETSF. Solaris faults 0, setting errno to EINVAL. This isn't useful as a
default behaviour.
|
|
|
|
|
|
| |
As POSIX.xs is not dual life, we can always rely on these macros being
defined for us in perl.h. (And these days, dual life XS code should let
Devel::PPPort take care of this sort of thing.)
|
|
|
|
|
|
| |
This shares identical code marshaling 6 to 9 input arguments into a
struct tm. However, as the return types differ we have to explicitly code
pushing the return value onto perl's stack.
|
| |
|
|
|
|
| |
On this platform, this reduces the shared object size by about .5K.
|