summaryrefslogtreecommitdiff
path: root/lang/perl5.14/files/patch-bug54186
blob: 3421afe560910f5df93882927b622b771079c188 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# http://rt.perl.org/rt3/Public/Bug/Display.html?id=54186
# http://perl5.git.perl.org/perl.git/commitdiff/a5d752217825fadff051e943940b4abad8e8b552?hp=8d2082b01041d30d9a510164df9c5e4703949441
diff --git a/ext/POSIX/Makefile.PL b/ext/POSIX/Makefile.PL
index bd93e59..5f6679d 100644
--- ext/POSIX/Makefile.PL
+++ ext/POSIX/Makefile.PL
@@ -48,13 +48,11 @@ my @names =
       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
diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm
index fbbd253..97d0b2c 100644
--- ext/POSIX/POSIX.pm
+++ ext/POSIX/POSIX.pm
@@ -13,7 +13,9 @@ use XSLoader ();
 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_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;
diff --git a/t/lib/proxy_constant_subs.t b/t/lib/proxy_constant_subs.t
index 4af73d3..45b0a54 100644
--- t/lib/proxy_constant_subs.t
+++ t/lib/proxy_constant_subs.t
@@ -7,20 +7,20 @@ BEGIN {
         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 @@ foreach my $symbol (@symbols) {
     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');