| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This new script tests that goto &xsub causes the sub to see the hints,
not of the subroutine it replaces, but of that subroutine’s caller.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Avoid list assignment to %ENV, which fails at compile time on VMS.
- Use consistent indentation for readability.
- Mark bsd_glob('~') tests TODO on VMS. The HOME path is successfully
retrieved, but it normally contains square brackets, which confuse
glob, because it thinks the directory portion of the path contained
within brackets is a pattern. The path probably needs to be
converted to Unix syntax first.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
$! should always be 0 after each call, so test this whether the result is
defined or undefined. Match a defined result against a regex to ensure that
it is an integer, and give better diagnostics if it is not.
|
|
|
|
| |
The new API removes a lot of code repetition in the callers.
|
|
|
|
|
| |
Avoid using ok() when alternatives are available, as ok() can't give useful
diagnostics on failure.
|
|
|
|
|
|
|
| |
is{alnum,alpha,cntrl,digit,graph,lower,print,punct,space,upper,xdigit}
have identical structures, so replace them with one body to marshal
arguments between Perl and C, calling the C library is*() function via
a function pointer stored in the CV's XSANY.
|
|
|
|
|
|
| |
10 functions take a single NV argument and return an NV result. Merging them
reduces the shared object size by over 2K on this platform. (Argument
marshalling code in XS is not free.)
|
| |
|
|
|
|
|
|
| |
This removes a lot of copy-paste code.
[with a tweak by Ilmari that removed residual duplication]
|
| |
|
|
|
|
|
|
| |
Using ALIAS to merge POSIX::sig{pending,suspend} and
POSIX::tc{flow,flush,sendbreak} reduces the size of POSIX.so by about 2K
on this platform.
|
|
|
|
|
|
| |
Using ALIAS to merge cfget[io]speed(), get[cloi]flag(), cfset[io]speed()
and set[cloi]flag() reduces the size of POSIX.so by almost 2K on this
platform.
|
|
|
|
|
|
| |
Using ALIAS to merge addset() with delset() and emptyset() with fillset()
reduces the shared object size, by removing duplicate marshaling code for
arguments and return values. On this platform the saving is over .5K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously POSIX::SigSet was using the PTROBJ typemap to store a pointer to
a dynamically-allocated sigset_t as an IV (blessed into the class)
This requires an explicit DESTROY to free the dynamic allocation, but fails
badly if any POSIX::SigSet objects exist at ithread clone time, as the
dynamic allocation is not duplicated in the new thread. (DESTROY is called
in both threads, free-from-wrong pool or other jollity occurs.)
Removing dynamic allocation removes the need for a DESTROY method.
This change is analogous to the previous change in POSIX::Termios, and is
made for the same reason.
|
|
|
|
|
| |
The same code will be needed for POSIX::SigSet::new(), so share it as a small
static function.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously POSIX::Termios was using the PTROBJ typemap to store a pointer to
a dynamically-allocated struct termios as an IV (blessed into the class).
This requires an explicit DESTROY to free the dynamic allocation, but fails
badly if any POSIX::Termios objects exist at ithread clone time, as the
dynamic allocation is not duplicated in the new thread. (DESTROY is called
in both threads, free-from-wrong pool or other jollity occurs.)
Removing dynamic allocation removes the need for a DESTROY method.
This introduces a new OPAQUEPTROBJ typemap, but currently doesn't use the
OUTPUT section, as that copies an existing structure, whereas
POSIX::Termios->new() only needs to zero-allocate the right space. Assuming
that this typemap should be of general applicability, it should be moved to
the main typemap file.
|
|
|
|
|
|
| |
We don't want to mess with the user's terminal (as we might mess it up), so
attempt to call each function on a disk file, and verify that it fails with
ENOTTY.
|
|
|
|
|
|
| |
We don't want to mess with the user's terminal (as we might mess it up), so
attempt to call tcsetattr() on a disk file, and verify that it fails with
ENOTTY.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
If no terminal devices are found, or getattr() fails on all of them, then
the struct termios wrapped by the POSIX:Termios object will consist of
initialised memory. In this case, it's not possible to use getcc() or the
other get*() methods on it.
Try harder to find a terminal device - as well as STDIN, STDOUT and STDERR
also try to open the controlling terminal directly.
|
|
|
|
|
|
|
|
|
|
| |
* Only import termios.h functions and constants from POSIX
* Loop over STDIN, STDOUT, STDERR instead of duplicating code.
* Avoid a needless defined? test, as isa_ok() handles undef.
* Switch to done_testing(), which also allows @getters to be inlined and
eliminated.
* The various get*() methods return integer values, so check this.
* Enable warnings.
|
| |
|
|
|
|
|
| |
Remove support for the Borland C++ compiler on Win32, as agreed here:
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2011-09/msg00034.html
|
|
|
|
|
|
|
|
|
|
|
| |
Previously in File::Glob, a plain ~ expansion will check
the $HOME environment variable, but that does not normally
exist on Windows systems. There is another variable that
holds the appropriate home path value, which is $USERPROFILE.
This adds a fallback to check $USERPROFILE when $HOME is
not there, the system does not support checking the password
file and the system is DOSISH.
|
|
|
|
|
|
| |
$[ remains as a variable. It no longer has compile-time magic.
At runtime, it always reads as zero, accepts a write of zero, but dies
on writing any other value.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This simplifies the RETVAL handling in TIEHASH, and makes the code closer
to the other 3 ?DBM_File modules. The difference in TIEHASH handling dates
back to 5.000, where only ODBM_File needed helper code around the dbm_open()
call. The other 3 were able to #define it as dbm_TIEHASH, and hence had no
CODE: section when first written.
|
|
|
|
| |
3c97495f56fb647c used bzero(), which isn't available on some platforms.
|
|
|
|
|
|
|
|
|
| |
Make Carp portable to older Perl versions:
* check minimum Perl version (5.6) at load time
* use || instead of //
* attempt downgrading to avoid loading Unicode tables when that might fail
* check whether utf8::is_utf8() exists before calling it
* lower IPC::Open3 version requirement in Carp tests
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SOCKETSHR is/was an interface to abstract out TCP/IP calls for the
various vendors' networking implementations, including the freeware
CMU-IP stack. Neither SOCKETSHR nor CMU-IP has seen any maintenance
for over a decade and are likely not even C89-compliant. The CRTL
socket routines have been supported by the different vendors' stacks
for many years so there is no reason to maintain an alternative, and
there probably hasn't been a real working alternative for some years
anyway.
The code is still there in maint-5.14 and earlier branches if
anyone has need of it.
|
|
|
|
|
|
|
|
|
| |
First, disable all the unsupported flags just to make sure they aren't
triggering something they shouldn't be. Also, zero the pglob struct
before passing to bsd_glob(); it contains function pointers, and it's
safest if they are null rather than containing random stack data.
Bug reported by Clément Lecigne <clemun@gmail.com>.
|
|
|
|
|
|
| |
Explicitly warn that the default of importing everything means that
use POSIX; has to import 553 symbols. Hence it's probably better to use
an explicit import list, or import nothing.
|
|
|
|
|
|
|
| |
This is considerably terser than listing all the entries for @EXPORT_OK
longhand. With this change we can no longer delete from %replacement in
AUTOLOAD(), as import() and load_imports() may be called after AUTOLOAD()
has already been run.
|
| |
|
|
|
|
|
|
| |
This effectively reverts commit d925a710473da185, which added it and
reformatted the source code. isatty was in (the generated) @EXPORT
at that time, hence there was never a need to add it.
|