In perl.git, the branch smoke-me/arc/posix-symbols has been created
<http://perl5.git.perl.org/perl.git/commitdiff/1c17d38d634a3bbda4b787af5c82a65a3bb4b2bd?hp=0000000000000000000000000000000000000000>
at 1c17d38d634a3bbda4b787af5c82a65a3bb4b2bd (commit)
- Log -----------------------------------------------------------------
commit 1c17d38d634a3bbda4b787af5c82a65a3bb4b2bd
Author: Aaron Crane <[email protected]>
Date: Fri May 13 13:50:01 2016 +0100
POSIX: test that all subroutines are exported
M ext/POSIX/t/export.t
commit b95ebab0f398c18aeafdd5b3029446568d710c8e
Author: Aaron Crane <[email protected]>
Date: Fri May 13 13:10:38 2016 +0100
POSIX: delete the L_tmpnam and L_tmpname symbols
The history here is relatively complicated.
The L_tmpname symbol is neither specified by POSIX or defined by traditional
Unix system; it's simply a typo for L_tmpnam, first introduced in Perl 5.0.
Commit 33f01dd10fdacfa5ccb83c4f933cacb0f65b707e (part of Perl 5.6) added
support for L_tmpnam, treating L_tmpname as a back-compat synonym. However,
no version of Perl has ever made L_tmpnam exportable, even at explicit
request; using that symbol has always required using its fully-qualified
POSIX::L_tmpnam name.
During the 5.8 development cycle, an apparently-unintended consequence of
various improvements to the way that POSIX.pm generates and exports
constants
meant that L_tmpname stopped working. It continued to be exportable, but
trying to use the constant yielded an exception saying "Your vendor has not
defined POSIX macro L_tmpname". (This isn't exactly incorrect, of course: no
vendor defines the macro L_tmpname!)
At this point, therefore, there seems little benefit in trying to resurrect
support for the L_tmpname typo: it's impossible for any program running on
5.8.0 or later to have successfully used it.
There's perhaps an argument for making L_tmpnam exportable at this point,
since it does work when called by its full-qualified name. One option would
be to add it to @EXPORT_OK; but that is explicitly counselled against by the
POSIX.pm comments summarising the policy on symbol exports, which recommend
adding a new export tag instead. In this case, the obvious tag to use is
:stdio_h (which already exists), since the C-level symbol is provided by the
<stdio.h> header.
However, that doesn't seem worth it to me. The only possible use of L_tmpnam
is to create a buffer of a size suitable for passing to the tmpnam() C
function (which is presumably why nobody's noticed in the last fifteen years
that the symbol isn't actually exported). Furthermore, the POSIX.pm wrapper
for tmpnam() itself was deleted by 19fc2965b60669d7bc25548edb32e3cdd86a68de,
a few days ago, so merely deleting this additional symbol seems correct.
M ext/POSIX/Makefile.PL
M ext/POSIX/lib/POSIX.pm
M ext/POSIX/lib/POSIX.pod
M ext/POSIX/t/export.t
M ext/POSIX/t/unimplemented.t
commit 4163f3199fd2db55fade45c577eaba9446dc4fcc
Author: Aaron Crane <[email protected]>
Date: Fri May 13 12:43:20 2016 +0100
POSIX: add new :sys_socket_h export tag with missing MSG_* symbols
These symbols were not previously exported at all, despite having been added
in the 5.9 cycle.
M ext/POSIX/lib/POSIX.pm
M ext/POSIX/t/export.t
commit aed93524004b54803013c1994a7752522951576e
Author: Aaron Crane <[email protected]>
Date: Fri May 13 12:37:17 2016 +0100
POSIX: add new :netdb_h tag with missing EAI_* symbols
These symbols were not previously exported at all, despite having been added
in the 5.11 cycle.
M ext/POSIX/lib/POSIX.pm
M ext/POSIX/t/export.t
commit 62db09e95e4910d1464760a1493a9cbd7f46a91f
Author: Aaron Crane <[email protected]>
Date: Fri May 13 11:29:01 2016 +0100
POSIX: add lround() to the :math_h_c99 export tag
Closes RT#127821.
M ext/POSIX/lib/POSIX.pm
M ext/POSIX/t/export.t
M ext/POSIX/t/math.t
-----------------------------------------------------------------------
--
Perl5 Master Repository