In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/93f31ee9fb6e815cac5df15822755aa4d75c91a9?hp=48cbae4fa8ee5b0b6d3dd7b18e27cdf83db0f0c0>
- Log ----------------------------------------------------------------- commit 93f31ee9fb6e815cac5df15822755aa4d75c91a9 Author: Paul Green <[email protected]> Date: Mon Mar 18 23:43:25 2013 -0400 Ensure only DOSish builds force O_BINARY=1 in the open path M perlio.c commit c0fcb8c5be7ac45a02537b1427a228c526293b5b Author: Paul Green <[email protected]> Date: Sun Mar 17 13:48:00 2013 -0400 Update copyright statement for the Stratus VOS port M perl.c commit 7d4dfb6d0d3036dc9082421530954cf313f4afb1 Author: Paul Green <[email protected]> Date: Sun Mar 17 13:47:10 2013 -0400 Update pod/perlpord.pod to reflect recent VOS port changes M pod/perlport.pod commit 48951f7e3553dec837b30f39e48bb62976cfbdc7 Author: Paul Green <[email protected]> Date: Sun Mar 17 13:46:18 2013 -0400 Update README.vos to reflect recent changes M README.vos commit 61d94d03cb90a0e9c37a71c379b138930c614e00 Author: Paul Green <[email protected]> Date: Sun Mar 17 11:41:51 2013 -0400 Update VOS hints file to use dynamic linking and 64-bit stream files M hints/vos.sh commit cf9c4992d66e640d2fff4fffa38156a27713f4ed Author: Paul Green <[email protected]> Date: Sun Mar 17 11:39:17 2013 -0400 Assume that the host and target have the same executable suffix M Makefile.SH commit e16ef93a4d961f1d11955a3a3a81c4bc8fffadd1 Author: Paul Green <[email protected]> Date: Sun Mar 17 11:35:47 2013 -0400 Remove VOS floating-point workaround; VOS bug long since fixed M pp_pack.c ----------------------------------------------------------------------- Summary of changes: Makefile.SH | 2 +- README.vos | 124 ++++++++++++++++------------------------------------- hints/vos.sh | 56 +++++++++++++++---------- perl.c | 2 +- perlio.c | 13 ++++-- pod/perlport.pod | 26 +++++++----- pp_pack.c | 34 --------------- 7 files changed, 98 insertions(+), 159 deletions(-) diff --git a/Makefile.SH b/Makefile.SH index e5ba3b9..24acd5b 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -305,7 +305,7 @@ RUN = $run # These variables may need to be manually set for non-Unix systems. AR = $full_ar -HOST_EXE_EXT = +HOST_EXE_EXT = $_exe EXE_EXT = $_exe LIB_EXT = $_a OBJ_EXT = $_o diff --git a/README.vos b/README.vos index 28cc9d1..7249f49 100644 --- a/README.vos +++ b/README.vos @@ -4,57 +4,42 @@ specially designed to be readable as is. =head1 NAME -perlvos - Perl for Stratus VOS +perlvos - Perl for Stratus OpenVOS =head1 SYNOPSIS -This file contains notes for building perl on the Stratus VOS +This file contains notes for building perl on the Stratus OpenVOS operating system. Perl is a scripting or macro language that is -popular on many systems. See L<perlbook> for a number of good -books on Perl. +popular on many systems. See L<perlbook> for a number of good books +on Perl. These are instructions for building Perl from source. This version of -Perl is not supported on VOS Release 14.2 or earlier releases. If you -have a Continuum platform running VOS Release 14.3 through 14.7, -download Perl from the Stratus Anonymous FTP site at -ftp://ftp.stratus.com/pub/vos/posix/ga/continuum/continuum.html. If -you have a V Series platform running VOS Release 15.0 or later, or if -you have a V Series platform running OpenVOS Release 17.0 or later, -download Perl from -ftp://ftp.stratus.com/pub/vos/posix/ga/v-series/v-series.html. The -perl distribution files on the Stratus anonymous FTP site are stored -in a format called a "bundled file". Instructions for unbundling the -Perl distribution file are at -ftp://ftp.stratus.com/pub/vos/utility/utility.html. +Perl requires the dynamic linking support that is found in OpenVOS +Release 17.1 and thus is not supported on OpenVOS Release 17.0 or +earlier releases. If you are running VOS Release 14.4.1 or later, you can obtain a -pre-compiled, supported copy of perl by purchasing Release 2.0.1 -(or later) of the VOS GNU C/C++ and GNU Tools product from -Stratus Technologies. +pre-compiled, supported copy of perl by purchasing the GNU Tools +product from Stratus Technologies. -=head1 BUILDING PERL FOR VOS +=head1 BUILDING PERL FOR OPENVOS -To build perl from its source code on the Stratus Continuum -platform, you must be have VOS Release 14.5.0 or later, the STCP -product, and the GNU C/C++ and GNU Tools, Release 2.0.1 or -later. On the V Series platform you must have VOS Release -15.0.0 or later, and any version of the GNU C/C++ and GNU Tools -product. +To build perl from its source code on the Stratus V Series platform +you must have OpenVOS Release 17.1.0 or later, GNU Tools Release +3.5 or later, and the C/POSIX Runtime Libraries. -To build full perl using the supplied Configure script and -makefiles, change to the "vos" subdirectory and type the command -"compile_full_perl" or "start_process compile_full_perl". This -will configure, build, and test perl. +Follow the normal instructions for building perl; e.g, enter bash, run +the Configure script, then use "gmake" to build perl. -=head1 INSTALLING PERL IN VOS +=head1 INSTALLING PERL IN OPENVOS =over 4 =item 1 -If you have built perl using the Configure script, ensure that -you have modify and default write permission to C<< ->system>ported >> and all subdirectories. Then type +After you have built perl using the Configure script, ensure that you +have modify and default write permission to C<< >system>ported >> and +all subdirectories. Then type gmake install @@ -65,8 +50,6 @@ modules distributed with perl, the following directories can be used to hold such files (replace the string VERSION by the appropriate version number): - >system>ported>lib>perl5>VERSION>7100 - >system>ported>lib>perl5>VERSION>8000 >system>ported>lib>perl5>VERSION>i786 =item 3 @@ -79,8 +62,6 @@ two places. Put architecture-independent files into: Put site-specific architecture-dependent files into one of the following directories: - >system>ported>lib>perl5>site_perl>VERSION>7100 - >system>ported>lib>perl5>site_perl>VERSION>8000 >system>ported>lib>perl5>site_perl>VERSION>i786 =item 4 @@ -90,61 +71,33 @@ to see the order in which Perl searches these directories. =back -=head1 USING PERL IN VOS +=head1 USING PERL IN OPENVOS -=head2 Restrictions of Perl on VOS +=head2 Restrictions of Perl on OpenVOS -This port of Perl version 5 to VOS prefers Unix-style, -slash-separated pathnames over VOS-style greater-than-separated -pathnames. VOS-style pathnames should work in most contexts, but -if you have trouble, replace all greater-than characters by slash -characters. Because the slash character is used as a pathname -delimiter, Perl cannot process VOS pathnames containing a slash -character in a directory or file name; these must be renamed. +This port of Perl version 5 prefers Unix-style, slash-separated +pathnames over OpenVOS-style greater-than-separated pathnames. +OpenVOS-style pathnames should work in most contexts, but if you have +trouble, replace all greater-than characters by slash characters. +Because the slash character is used as a pathname delimiter, Perl +cannot process OpenVOS pathnames containing a slash character in a +directory or file name; these must be renamed. This port of Perl also uses Unix-epoch date values internally. As long as you are dealing with ASCII character string representations of dates, this should not be an issue. The supported epoch is January 1, 1980 to January 17, 2038. -See the file pod/perlport.pod for more information about the VOS +See the file pod/perlport.pod for more information about the OpenVOS port of Perl. -=head2 Handling of underflow and overflow - -Prior to VOS Release 14.7.0, VOS does not support automatically -mapping overflowed floating-point values to +infinity, nor -automatically mapping underflowed floating-point values to zero, -unlike many other platforms. The Perl pack function has been -modified to perform such mapping in software on VOS. Performing -other floating-point computations that underflow or overflow -will probably result in SIGFPE. Don't push your luck. - -As of VOS Release 14.7.0 or later, the VOS POSIX runtime sets up -the PA-RISC and IA-32 hardware floating-point status register so -that the overflow and underflow exceptions do not trap, but -instead automatically convert the result to infinity or zero, as -appropriate. As of this writing, there are still floating-point -operations that can trap, for example, subtracting two infinite -values. This is recorded as suggestion posix-1022, which has -been fixed in VOS Release 15.2 and higher. - =head1 TEST STATUS -When Perl 5.9.0 is built using the native build process on VOS -Release 14.7.0 and GNU C++/GNU Tools 2.0.2a, all but nine -attempted tests either pass or result in TODO (ignored) -failures. The tests that fail are: - -t/io/dup, test 2 -t/io/tell, test 28 -t/op/pack, test 0 -ext/B/t/bytecode, test 1 -ext/Devel/Peek/t/Peek, test 1 -ext/Encode/t/enc_module, test 1 -ext/IO/t/io_dup, test 2 -lib/ExtUtils/t/MM_Unix, test 94 -lib/Net/ing/t/450_service, test 8 +A number of the perl self-tests fails for various reasons; generally +these are minor and due to subtle differences between common +POSIX-based environments and the OpenVOS POSIX environment. Ensure +that you conduct sufficient testing of your code to guarantee that it +works properly in the OpenVOS environment. =head1 SUPPORT STATUS @@ -153,10 +106,9 @@ can't guarantee I'll be able to answer them. There are some excellent books available on the Perl language; consult a book seller. -If you want a supported version of perl for VOS, purchase the -VOS GNU C/C++ and GNU Tools Release 2.0.1 (or later) product from -Stratus Technologies, along with a support contract (or from -anyone else who will sell you support). +If you want a supported version of perl for OpenVOS, purchase the +OpenVOS GNU Tools product from Stratus Technologies, along with a +support contract (or from anyone else who will sell you support). =head1 AUTHOR @@ -164,6 +116,6 @@ Paul Green ([email protected]) =head1 LAST UPDATE -October 6, 2010 +February 28, 2013 =cut diff --git a/hints/vos.sh b/hints/vos.sh index 0a3a677..2401f69 100644 --- a/hints/vos.sh +++ b/hints/vos.sh @@ -7,15 +7,13 @@ # Paul Green ([email protected]) # C compiler and default options. -cc=gcc -ccflags="-D_XOPEN_SOURCE=700 -D_VOS_EXTENDED_NAMES" -ccdlflags="-Wl,-rpath,$shrpdir" -cccdlflags="-fPIC" +cc=${CC-gcc} +ccflags=${CFLAGS-"-D_XOPEN_SOURCE=700 -D_SYSV -D_VOS_EXTENDED_NAMES -D_FILE_OFFSET_BITS=64"} # Make command. -make="/system/gnu_library/bin/gmake" +make=${MAKE-"/system/gnu_library/bin/gmake"} # indented to not put it into config.sh - _make="/system/gnu_library/bin/gmake" + _make=${MAKE-"/system/gnu_library/bin/gmake"} # Check for the minimum acceptable release of OpenVOS (17.1.0). if test `uname -r | sed -e 's/OpenVOS Release //' -e 's/VOS Release //'` \< "17.1.0"; then @@ -27,7 +25,7 @@ EOF exit 1 fi -# Always X86 +# Architecture name always X86 archname=`uname -m` # Executable suffix. @@ -43,35 +41,25 @@ glibpth="$loclibpth" # Include library paths locincpth="" -usrinc="/system/include_library" +usrinc=${USRINC-"/system/include_library"} # Where to install perl5. -prefix=/system/ported/perl5 +prefix=/system/ported # Linker is gcc. -ld="gcc" -lddlflags="-shared" - -# Shared libraries! -so="so" - -# Build libperl.so -useshrplib="true" +ld=${CC-"gcc"} # Don't use nm. The VOS copy of libc.a is empty. usenm="n" -# Make the default be no large file support. -uselargefiles="n" - # Don't use malloc that comes with perl. usemymalloc="n" # Make bison the default compiler-compiler. yacc="/system/gnu_library/bin/bison" -# VOS doesn't have (or need) a pager, but perl needs one. -pager="/system/gnu_library/bin/cat.pm" +# VOS doesn't need a pager, but perl does. +pager="/system/gnu_library/bin/less.pm" # VOS has a bug that causes _exit() to flush all files. # This confuses the tests. Make 'em happy here. @@ -89,3 +77,27 @@ test -h vos.c || ln -s vos/vos.c vos.c # Tell Configure where to find the hosts file. hostcat="cat /system/stcp/hosts" + +# VOS 17.1 has support for dynamic linking. +usedl="define" + +# Filename suffix for shared libraries. +so="so" + +# Flags used when compiling a module for a shared library. +cccdlflags="-fPIC" + +# Flags passed to $ld to produce shared libraries. +lddlflags="-shared" + +# Flags passed to $cc when linking a program that uses shared libraries. +ccdlflags="-Wl,-export-dynamic" + +# Filename suffix for dynamically-loaded perl modules. +dlext="so" + +# Use dlopen() to open shared libraries. +dlsrc="dl_dlopen.xs" + +# Build a shared libperl? (Define on Configure cmd line.) +# useshrplib="true" diff --git a/perl.c b/perl.c index e9549d5..87d98dc 100644 --- a/perl.c +++ b/perl.c @@ -3489,7 +3489,7 @@ S_minus_v(pTHX) #endif #ifdef __VOS__ PerlIO_printf(PIO_stdout, - "Stratus VOS port by [email protected], 1997-2002\n"); + "Stratus OpenVOS port by [email protected], 1997-2013\n"); #endif #ifdef POSIX_BC PerlIO_printf(PIO_stdout, diff --git a/perlio.c b/perlio.c index 097bc49..d356a7b 100644 --- a/perlio.c +++ b/perlio.c @@ -2610,10 +2610,15 @@ PerlIOUnix_oflags(const char *mode) oflags &= ~O_BINARY; mode++; } - /* - * Always open in binary mode - */ - oflags |= O_BINARY; + else { +#ifdef PERLIO_USING_CRLF + /* + * If neither "t" nor "b" was specified, open the file + * in O_BINARY mode. + */ + oflags |= O_BINARY; +#endif + } if (*mode || oflags == -1) { SETERRNO(EINVAL, LIB_INVARG); oflags = -1; diff --git a/pod/perlport.pod b/pod/perlport.pod index b6b07df..cdde52d 100644 --- a/pod/perlport.pod +++ b/pod/perlport.pod @@ -1195,12 +1195,12 @@ trailing apostrophe. Although an extended file name is limited to 255 characters, a path name is still limited to 256 characters. -The value of C<$^O> on VOS is "VOS". To determine the +The value of C<$^O> on VOS is "vos". To determine the architecture that you are running on without resorting to loading all of C<%Config> you can examine the content of the @INC array like so: - if ($^O =~ /VOS/) { + if ($^O =~ /vos/) { print "I'm on a Stratus box!\n"; } else { print "I'm not on a Stratus box!\n"; @@ -1219,14 +1219,18 @@ F<README.vos> (installed as L<perlvos>) The VOS mailing list. -There is no specific mailing list for Perl on VOS. You can post -comments to the comp.sys.stratus newsgroup, or use the contact -information located in the distribution files on the Stratus -Anonymous FTP site. +There is no specific mailing list for Perl on VOS. You can contact +the Stratus Technologies Customer Assistance Center (CAC) for your +region, or you can use the contact information located in the +distribution files on the Stratus Anonymous FTP site. =item * -VOS Perl on the web at L<http://ftp.stratus.com/pub/vos/posix/posix.html> +Stratus Technologies on the web at L<http://www.stratus.com> + +=item * + +VOS Open-Source Software on the web at L<http://ftp.stratus.com/pub/vos/vos.html> =back @@ -1908,7 +1912,7 @@ Not implemented. (S<Plan 9>) =item shmwrite -Not implemented. (Win32, VMS, S<RISC OS>, VOS) +Not implemented. (Win32, VMS, S<RISC OS>) =item sleep @@ -1925,8 +1929,6 @@ be implemented even in Unix platforms. Not implemented. (S<RISC OS>) -Available on OpenVOS Release 17.0 or later. (VOS) - Available on 64 bit OpenVMS 8.2 and later. (VMS) =item stat @@ -2123,6 +2125,8 @@ at L<http://www.cpan.org/src> =item MirOS BSD +=item Stratus OpenVOS (17.0 or later) + Caveats: =over @@ -2213,7 +2217,7 @@ available at L<http://www.cpan.org/src/> UNICOS UNICOS/mk UTS - VOS + VOS / OpenVOS Win95/98/ME/2K/XP 2) WinCE z/OS (formerly OS/390) diff --git a/pp_pack.c b/pp_pack.c index cc1e637..eaeec89 100644 --- a/pp_pack.c +++ b/pp_pack.c @@ -3101,22 +3101,6 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist ) NV anv; fromstr = NEXTFROM; anv = SvNV(fromstr); -#ifdef __VOS__ - /* VOS does not automatically map a floating-point overflow - during conversion from double to float into infinity, so we - do it by hand. This code should either be generalized for - any OS that needs it, or removed if and when VOS implements - posix-976 (suggestion to support mapping to infinity). - [email protected] 02-04-02. */ -{ -extern const float _float_constants[]; - if (anv > FLT_MAX) - afloat = _float_constants[0]; /* single prec. inf. */ - else if (anv < -FLT_MAX) - afloat = _float_constants[0]; /* single prec. inf. */ - else afloat = (float) anv; -} -#else /* __VOS__ */ # if defined(VMS) && !defined(_IEEE_FP) /* IEEE fp overflow shenanigans are unavailable on VAX and optional * on Alpha; fake it if we don't have them. @@ -3129,7 +3113,6 @@ extern const float _float_constants[]; # else afloat = (float)anv; # endif -#endif /* __VOS__ */ DO_BO_PACK_N(afloat, float); PUSH_VAR(utf8, cur, afloat); } @@ -3140,22 +3123,6 @@ extern const float _float_constants[]; NV anv; fromstr = NEXTFROM; anv = SvNV(fromstr); -#ifdef __VOS__ - /* VOS does not automatically map a floating-point overflow - during conversion from long double to double into infinity, - so we do it by hand. This code should either be generalized - for any OS that needs it, or removed if and when VOS - implements posix-976 (suggestion to support mapping to - infinity). [email protected] 02-04-02. */ -{ -extern const double _double_constants[]; - if (anv > DBL_MAX) - adouble = _double_constants[0]; /* double prec. inf. */ - else if (anv < -DBL_MAX) - adouble = _double_constants[0]; /* double prec. inf. */ - else adouble = (double) anv; -} -#else /* __VOS__ */ # if defined(VMS) && !defined(_IEEE_FP) /* IEEE fp overflow shenanigans are unavailable on VAX and optional * on Alpha; fake it if we don't have them. @@ -3168,7 +3135,6 @@ extern const double _double_constants[]; # else adouble = (double)anv; # endif -#endif /* __VOS__ */ DO_BO_PACK_N(adouble, double); PUSH_VAR(utf8, cur, adouble); } -- Perl5 Master Repository
