zopencommunity / perlport

Port of perl to z/OS
Apache License 2.0
6 stars 3 forks source link

Failure with miniperl on cpan/Pod-Checker/pm_to_blib #6

Closed MikeFultonDev closed 2 years ago

MikeFultonDev commented 2 years ago

Running: ./miniperl -Ilib make_ext.pl cpan/Pod-Checker/pm_to_blib MAKE="make" LIBPERL_A=libperl.a results in: '^4A^23^39^29^08^B1^4Aa^08^36^24^23^28^25^23^1A^25^39K^BF^EE^U' and '^4A^23^39^29^08^B1^4Aa^08^36^24^23^28^25^23^1A^25^39K^BF^EE^U' are identical (not copied) at Makefile.PL line 26. Can't copy ^4A^23^39^29^08^B1^4Aa^08^36^24^23^28^25^23^1A^25^39K^BF^EE^U to ^4A^23^39^29^08^B1^4Aa^08^36^24^23^28^25^23^1A^25^39K^BF ^EE^U: EDC5129I No such file or directory. at Makefile.PL line 26. Unsuccessful Makefile.PL(cpan/Pod-Checker): code=33024 at make_ext.pl line 532.

MikeFultonDev commented 2 years ago

A simpler program that reproduces this problem is:

https://github.com/ZOSOpenTools/perlport/blob/cpanfail/tests/printscripts.pl

which when run as:

../perl5/miniperl -I../perl5/lib printscripts.pl >/tmp/out 2>&1

writes out: basic array print A B C before loop file: ^4A^23^39^29^08^B1^4Aa^08^36^24^67^B5^21^34^08^33^25^49K^BF^EE^U^4A^23^39^29^08^B1^4Aa^08^36^24^67^B5^21^34^08^33^25^CDK^BF^EE after loop

MikeFultonDev commented 2 years ago

Building the following C test with ASCII still results in EBCDIC values in d_name fields:

define _POSIX_SOURCE

include <sys/types.h>

include

include

main() { DIR dir; struct dirent entry;

if ((dir = opendir("./")) == NULL) perror("opendir() error"); else { puts("contents of root:"); while ((entry = readdir(dir)) != NULL) printf(" %s\n", entry->d_name); closedir(dir); } }

MikeFultonDev commented 2 years ago

Adding #include to the C test above makes it work ok (so readdir appears to already be ASCII-enabled)