223 lines
7.0 KiB
Diff
223 lines
7.0 KiB
Diff
--- perl/ext/B/t/concise-xs.t#1~32694~ 2007-12-22 01:23:09.000000000 -0800
|
|
+++ perl/ext/B/t/concise-xs.t 2008-05-20 05:48:04.000000000 -0700
|
|
@@ -177,7 +177,10 @@
|
|
},
|
|
|
|
POSIX => { dflt => 'constant', # all but 252/589
|
|
- skip => [qw/ _POSIX_JOB_CONTROL /], # platform varying
|
|
+ skip => [qw/ _POSIX_JOB_CONTROL /, # platform varying
|
|
+ # Might be XS or imported from Fcntl, depending on your
|
|
+ # perl version:
|
|
+ qw / S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG /],
|
|
perl => [qw/ import croak AUTOLOAD /],
|
|
|
|
XS => [qw/ write wctomb wcstombs uname tzset tzname
|
|
|
|
--- perl/ext/POSIX/Makefile.PL#1~32694~ 2007-12-22 01:23:09.000000000 -0800
|
|
+++ perl/ext/POSIX/Makefile.PL 2008-05-20 05:48:04.000000000 -0700
|
|
@@ -48,13 +48,11 @@
|
|
MAX_INPUT MB_LEN_MAX MSG_CTRUNC MSG_DONTROUTE MSG_EOR MSG_OOB MSG_PEEK
|
|
MSG_TRUNC MSG_WAITALL NAME_MAX NCCS NGROUPS_MAX NOFLSH OPEN_MAX OPOST
|
|
PARENB PARMRK PARODD PATH_MAX PIPE_BUF RAND_MAX R_OK SCHAR_MAX
|
|
- SCHAR_MIN SEEK_CUR SEEK_END SEEK_SET SHRT_MAX SHRT_MIN SIGABRT SIGALRM
|
|
+ SCHAR_MIN SHRT_MAX SHRT_MIN SIGABRT SIGALRM
|
|
SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT
|
|
SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU
|
|
SIGUSR1 SIGUSR2 SIG_BLOCK SIG_SETMASK SIG_UNBLOCK SSIZE_MAX
|
|
- STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX
|
|
- S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID
|
|
- S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR TCIFLUSH TCIOFF
|
|
+ STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX TCIFLUSH TCIOFF
|
|
TCIOFLUSH TCION TCOFLUSH TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW
|
|
TMP_MAX TOSTOP TZNAME_MAX VEOF VEOL VERASE VINTR VKILL VMIN VQUIT
|
|
VSTART VSTOP VSUSP VTIME WNOHANG WUNTRACED W_OK X_OK
|
|
|
|
--- perl/ext/POSIX/POSIX.pm#2~33640~ 2008-04-03 09:03:24.000000000 -0700
|
|
+++ perl/ext/POSIX/POSIX.pm 2008-05-20 05:48:04.000000000 -0700
|
|
@@ -4,7 +4,7 @@
|
|
|
|
our(@ISA, %EXPORT_TAGS, @EXPORT_OK, @EXPORT, $AUTOLOAD, %SIGRT) = ();
|
|
|
|
-our $VERSION = "1.14";
|
|
+our $VERSION = "1.15";
|
|
|
|
use AutoLoader;
|
|
|
|
@@ -13,7 +13,10 @@
|
|
use Fcntl qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK F_SETFD
|
|
F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND
|
|
O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC
|
|
- O_WRONLY);
|
|
+ O_WRONLY SEEK_CUR SEEK_END SEEK_SET
|
|
+ S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG
|
|
+ S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID
|
|
+ S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR);
|
|
|
|
# Grandfather old foo_h form to new :foo_h form
|
|
my $loaded;
|
|
@@ -32,9 +35,9 @@
|
|
|
|
XSLoader::load 'POSIX', $VERSION;
|
|
|
|
-my %NON_CONSTS = (map {($_,1)}
|
|
- qw(S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG WEXITSTATUS
|
|
- WIFEXITED WIFSIGNALED WIFSTOPPED WSTOPSIG WTERMSIG));
|
|
+my %NON_CONSTS
|
|
+ = (map {($_,1)} qw(WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED WSTOPSIG
|
|
+ WTERMSIG));
|
|
|
|
sub AUTOLOAD {
|
|
no strict;
|
|
|
|
--- perl/ext/POSIX/POSIX.xs#2~33119~ 2008-01-30 02:06:52.000000000 -0800
|
|
+++ perl/ext/POSIX/POSIX.xs 2008-05-20 05:48:04.000000000 -0700
|
|
@@ -404,7 +404,7 @@
|
|
use ExtUtils::Constant qw (constant_types C_constant XS_constant);
|
|
|
|
my $types = {map {($_, 1)} qw(IV)};
|
|
-my @names = (qw(S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG WEXITSTATUS WIFEXITED
|
|
+my @names = (qw(WEXITSTATUS WIFEXITED
|
|
WIFSIGNALED WIFSTOPPED WSTOPSIG WTERMSIG));
|
|
|
|
print constant_types(); # macro defs
|
|
@@ -416,65 +416,14 @@
|
|
*/
|
|
|
|
switch (len) {
|
|
- case 7:
|
|
- /* Names all of length 7. */
|
|
- /* S_ISBLK S_ISCHR S_ISDIR S_ISREG */
|
|
- /* Offset 5 gives the best switch position. */
|
|
- switch (name[5]) {
|
|
- case 'E':
|
|
- if (memEQ(name, "S_ISREG", 7)) {
|
|
- /* ^ */
|
|
-#ifdef S_ISREG
|
|
- *arg_result = S_ISREG(*arg_result);
|
|
- return PERL_constant_ISIV;
|
|
-#else
|
|
- return PERL_constant_NOTDEF;
|
|
-#endif
|
|
- }
|
|
- break;
|
|
- case 'H':
|
|
- if (memEQ(name, "S_ISCHR", 7)) {
|
|
- /* ^ */
|
|
-#ifdef S_ISCHR
|
|
- *arg_result = S_ISCHR(*arg_result);
|
|
- return PERL_constant_ISIV;
|
|
-#else
|
|
- return PERL_constant_NOTDEF;
|
|
-#endif
|
|
- }
|
|
- break;
|
|
- case 'I':
|
|
- if (memEQ(name, "S_ISDIR", 7)) {
|
|
- /* ^ */
|
|
-#ifdef S_ISDIR
|
|
- *arg_result = S_ISDIR(*arg_result);
|
|
- return PERL_constant_ISIV;
|
|
-#else
|
|
- return PERL_constant_NOTDEF;
|
|
-#endif
|
|
- }
|
|
- break;
|
|
- case 'L':
|
|
- if (memEQ(name, "S_ISBLK", 7)) {
|
|
- /* ^ */
|
|
-#ifdef S_ISBLK
|
|
- *arg_result = S_ISBLK(*arg_result);
|
|
- return PERL_constant_ISIV;
|
|
-#else
|
|
- return PERL_constant_NOTDEF;
|
|
-#endif
|
|
- }
|
|
- break;
|
|
- }
|
|
- break;
|
|
case 8:
|
|
/* Names all of length 8. */
|
|
- /* S_ISFIFO WSTOPSIG WTERMSIG */
|
|
- /* Offset 3 gives the best switch position. */
|
|
- switch (name[3]) {
|
|
- case 'O':
|
|
+ /* WSTOPSIG WTERMSIG */
|
|
+ /* Offset 1 gives the best switch position. */
|
|
+ switch (name[1]) {
|
|
+ case 'S':
|
|
if (memEQ(name, "WSTOPSIG", 8)) {
|
|
- /* ^ */
|
|
+ /* ^ */
|
|
#ifdef WSTOPSIG
|
|
int i = *arg_result;
|
|
*arg_result = WSTOPSIG(WMUNGE(i));
|
|
@@ -484,9 +433,9 @@
|
|
#endif
|
|
}
|
|
break;
|
|
- case 'R':
|
|
+ case 'T':
|
|
if (memEQ(name, "WTERMSIG", 8)) {
|
|
- /* ^ */
|
|
+ /* ^ */
|
|
#ifdef WTERMSIG
|
|
int i = *arg_result;
|
|
*arg_result = WTERMSIG(WMUNGE(i));
|
|
@@ -496,17 +445,6 @@
|
|
#endif
|
|
}
|
|
break;
|
|
- case 'S':
|
|
- if (memEQ(name, "S_ISFIFO", 8)) {
|
|
- /* ^ */
|
|
-#ifdef S_ISFIFO
|
|
- *arg_result = S_ISFIFO(*arg_result);
|
|
- return PERL_constant_ISIV;
|
|
-#else
|
|
- return PERL_constant_NOTDEF;
|
|
-#endif
|
|
- }
|
|
- break;
|
|
}
|
|
break;
|
|
case 9:
|
|
|
|
--- perl/t/lib/proxy_constant_subs.t#1~32694~ 2007-12-22 01:23:09.000000000 -0800
|
|
+++ perl/t/lib/proxy_constant_subs.t 2008-05-20 05:48:04.000000000 -0700
|
|
@@ -7,20 +7,20 @@
|
|
print "1..0 # Skip -- Perl configured without B module\n";
|
|
exit 0;
|
|
}
|
|
- if ($Config::Config{'extensions'} !~ /\bPOSIX\b/) {
|
|
- print "1..0 # Skip -- Perl configured without POSIX\n";
|
|
+ if ($Config::Config{'extensions'} !~ /\bFcntl\b/) {
|
|
+ print "1..0 # Skip -- Perl configured without Fcntl\n";
|
|
exit 0;
|
|
}
|
|
- # errno is a real subroutine, and acts as control
|
|
+ # S_IFMT is a real subroutine, and acts as control
|
|
# SEEK_SET is a proxy constant subroutine.
|
|
- @symbols = qw(errno SEEK_SET);
|
|
+ @symbols = qw(S_IFMT SEEK_SET);
|
|
}
|
|
|
|
use strict;
|
|
use warnings;
|
|
use Test::More tests => 4 * @symbols;
|
|
use B qw(svref_2object GVf_IMPORTED_CV);
|
|
-use POSIX @symbols;
|
|
+use Fcntl @symbols;
|
|
|
|
# GVf_IMPORTED_CV should not be set on the original, but should be set on the
|
|
# imported GV.
|
|
@@ -29,7 +29,7 @@
|
|
my ($ps, $ms);
|
|
{
|
|
no strict 'refs';
|
|
- $ps = svref_2object(\*{"POSIX::$symbol"});
|
|
+ $ps = svref_2object(\*{"Fcntl::$symbol"});
|
|
$ms = svref_2object(\*{"::$symbol"});
|
|
}
|
|
isa_ok($ps, 'B::GV');
|
|
|