Skip to content

Commit 9471c77

Browse files
Mike Fultonkhwilliamson
Mike Fulton
authored andcommitted
z/OS ASCII Enablement: Manage untagged header errno.h by copy & tag
The system headers on z/OS are in EBCDIC, but are untagged. The bi-modal build requires that files be tagged correctly so this patch copies the errno.h file (which may be mounted on a read-only file system) to a local file and then tags it as IBM-1047 (EBCDIC) so that it can be processed properly. The longer-term fix for this may be to have z/OS tag header files as EBCDIC, although this would not be something Perl could rely on for several years.
1 parent 5e4fe29 commit 9471c77

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ext/Errno/Errno_pm.PL

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use ExtUtils::MakeMaker;
22
use Config;
33
use strict;
44

5-
our $VERSION = "1.35";
5+
our $VERSION = "1.36";
66

77
my %err = ();
88

@@ -131,7 +131,11 @@ sub get_files {
131131
$file{'Sys$Library:DECC$RTLDEF.TLB'} = 1;
132132
} elsif ($^O eq 'os390') {
133133
# OS/390 C compiler doesn't generate #file or #line directives
134-
$file{'/usr/include/errno.h'} = 1;
134+
# and it does not tag the header as 1047 (EBCDIC), so make a local
135+
# copy and tag it
136+
my $cp = `cp /usr/include/errno.h ./errno.h`;
137+
my $chtag = `chtag -t -cIBM-1047 ./errno.h`;
138+
$file{'./errno.h'} = 1;
135139
} elsif ($Config{archname} eq 'arm-riscos') {
136140
# Watch out for cross compiling for RISC OS
137141
my $dep = `echo "#include <errno.h>" | gcc -E -M -`;

0 commit comments

Comments
 (0)