summaryrefslogtreecommitdiff
path: root/os2
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1997-02-22 04:41:00 +1200
committerChip Salzenberg <chip@atlantic.net>1997-02-22 04:41:00 +1200
commitaa6893958c2bfb6fa4ab923c8466c188c65748fd (patch)
tree012b1f5dd2622b8c322606df0fa2de1a7ec582b1 /os2
parentd53f8f1cc3de155a009198bbc7c01e2741aa70ac (diff)
downloadperl-aa6893958c2bfb6fa4ab923c8466c188c65748fd.tar.gz
[inseparable changes from patch from perl5.003_27 to perl5.003_28]
CORE LANGUAGE CHANGES Subject: Don't let C<sub foo;> undefine &foo From: Chip Salzenberg <chip@perl.com> Files: op.c Subject: Make code, doc agree on $ENV{PATH} and `cmd` From: Chip Salzenberg <chip@perl.com> Files: pod/perlsec.pod pp_sys.c Subject: Optimize keys() and values() in void context From: Chip Salzenberg <chip@perl.com> Files: doop.c op.c CORE PORTABILITY Subject: VMS patches post _27 Date: Thu, 20 Feb 1997 01:58:46 -0500 (EST) From: Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU> Files: MANIFEST dosish.h hv.c lib/ExtUtils/MM_VMS.pm lib/ExtUtils/xsubpp perl.c perlsdio.h pod/perldelta.pod pod/perlvar.pod t/op/closure.t unixish.h vms/Makefile vms/descrip.mms vms/ext/filespec.t vms/genconfig.pl vms/vms.c vms/vmsish.h private-msgid: <01IFMEMPN1IU0057E2@hmivax.humgen.upenn.edu> Subject: Re: OS/2 patch for _27 Date: Thu, 20 Feb 1997 19:24:16 -0500 (EST) From: Ilya Zakharevich <ilya@math.ohio-state.edu> Files: INSTALL README.os2 lib/Test/Harness.pm os2/Changes os2/OS2/PrfDB/t/os2_prfdb.t os2/os2.c os2/os2ish.h os2/perl2cmd.pl perl.c pod/perldelta.pod t/TEST t/harness t/op/magic.t Msg-ID: <199702210024.TAA03174@monk.mps.ohio-state.edu> (applied based on p5p patch as commit 833d3f255ed68b969f062cec63d33f853ed9237c) DOCUMENTATION Subject: INSTALL updates since _26 Date: Tue, 18 Feb 1997 16:00:08 -0500 (EST) From: Andy Dougherty <doughera@fractal.phys.lafayette.edu> Files: INSTALL Msg-ID: <Pine.SOL.3.95q.970218155815.2014F-100000@fractal.lafayette.e (applied based on p5p patch as commit a8247d96fd6167a3b920e63aedee5592cd6e29a7) Subject: Document "$$0" change From: Chip Salzenberg <chip@perl.com> Files: pod/perldelta.pod Subject: Don't recommend impossible //o for C<$x =~ $y> From: Chip Salzenberg <chip@perl.com> Files: pod/perlop.pod Subject: Correct doc that claimed that <FH> was never false From: Chip Salzenberg <chip@perl.com> Files: pod/perldelta.pod pod/perlop.pod Subject: Document C<$?> vs. $SIG{CHLD} From: Ulrich Pfeifer <pfeifer@charly.informatik.uni-dortmund.de> Files: pod/perlvar.pod Subject: Add pumpkin.pod From: Chip Salzenberg <chip@perl.com> Files: MANIFEST Porting/pumpkin.pod Subject: Don't say "associat*ve arr*y" From: Chip Salzenberg <chip@perl.com> Files: MANIFEST gv.h hv.c lib/Env.pm lib/overload.pm opcode.pl pod/perl.pod pod/perldelta.pod pod/perldiag.pod pod/perlfunc.pod pod/perlguts.pod pod/perlmod.pod pod/perltie.pod pod/perltoc.pod pod/perltrap.pod x2p/a2p.pod OTHER CORE CHANGES Subject: Fix a typo From: Chip Salzenberg <chip@perl.com> Files: pp_sys.c Subject: Fix perl_call_sv(..., G_NOARGS) From: Chip Salzenberg <chip@perl.com> Files: perl.c Subject: Fix SIGSEGV when cloning sub with complex expression From: Chip Salzenberg <chip@perl.com> Files: op.c
Diffstat (limited to 'os2')
-rw-r--r--os2/Changes10
-rw-r--r--os2/OS2/PrfDB/t/os2_prfdb.t2
-rw-r--r--os2/os2.c5
-rw-r--r--os2/os2ish.h8
-rw-r--r--os2/perl2cmd.pl2
5 files changed, 22 insertions, 5 deletions
diff --git a/os2/Changes b/os2/Changes
index 4691e5bd35..15fad979f3 100644
--- a/os2/Changes
+++ b/os2/Changes
@@ -133,3 +133,13 @@ after 5.003_21:
'script.sh'. Form without extension will call shell only if
the specified file exists (will not look on path) (to prohibit
trying to run shell commands directly). - Needed by magic.t.
+
+after 5.003_27:
+ ALTERNATE_SHEBANG="extproc " supported, thus options on this
+ line are processed (possibly twice). -S is made legal on such
+ a line. This -S -x is not needed any more.
+ perl.dll may be used from non-EMX programs (via PERL_SYS_INIT
+ - the caller should have valid variable "env" with
+ environment). Known problems: $$ does not work - is 0, waitpid
+ returns immediately, thus Perl cannot wait for completion of
+ started programs.
diff --git a/os2/OS2/PrfDB/t/os2_prfdb.t b/os2/OS2/PrfDB/t/os2_prfdb.t
index a8c9752d36..b9f7d90ae2 100644
--- a/os2/OS2/PrfDB/t/os2_prfdb.t
+++ b/os2/OS2/PrfDB/t/os2_prfdb.t
@@ -88,6 +88,8 @@ print( OS2::Prf::Set($ini,'bbb', 'xxx','abc') ? "ok 18\n" :
print( OS2::Prf::Set($ini,'bbb', 'yyy','456') ? "ok 19\n" :
"not ok 19\n# err: `$^E'\n");
+OS2::Prf::Close($ini);
+
my %hash1;
tie %hash1, 'OS2::PrfDB::Sub', $inifile, 'aaa';
diff --git a/os2/os2.c b/os2/os2.c
index 017230ff0b..f8f4a82735 100644
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -1139,12 +1139,15 @@ Xs_OS2_init()
OS2_Perl_data_t OS2_Perl_data;
void
-Perl_OS2_init()
+Perl_OS2_init(char **env)
{
char *shell;
settmppath();
OS2_Perl_data.xs_init = &Xs_OS2_init;
+ if (environ == NULL) {
+ environ = env;
+ }
if ( (shell = getenv("PERL_SH_DRIVE")) ) {
New(404, sh_path, strlen(SH_PATH) + 1, char);
strcpy(sh_path, SH_PATH);
diff --git a/os2/os2ish.h b/os2/os2ish.h
index 7cf56fe79b..06a92a31fb 100644
--- a/os2/os2ish.h
+++ b/os2/os2ish.h
@@ -47,7 +47,7 @@
* (IOW, Perl won't hand off to another interpreter via an alternate
* shebang sequence that might be legal Perl code.)
*/
-/* #define ALTERNATE_SHEBANG "#!" / **/
+#define ALTERNATE_SHEBANG "extproc "
#ifndef SIGABRT
# define SIGABRT SIGILL
@@ -64,12 +64,14 @@
# undef I_SYS_UN
#endif
-void Perl_OS2_init();
+void Perl_OS2_init(char **);
+
+/* XXX This code hideously puts env inside: */
#define PERL_SYS_INIT(argcp, argvp) STMT_START { \
_response(argcp, argvp); \
_wildcard(argcp, argvp); \
- Perl_OS2_init(); } STMT_END
+ Perl_OS2_init(env); } STMT_END
#define PERL_SYS_TERM()
diff --git a/os2/perl2cmd.pl b/os2/perl2cmd.pl
index c17ab761aa..e774f773d0 100644
--- a/os2/perl2cmd.pl
+++ b/os2/perl2cmd.pl
@@ -23,7 +23,7 @@ foreach $file (<$idir/*>) {
$base =~ s|.*/||;
$file =~ s|/|\\|g ;
print "Processing $file => $dir\\$base.cmd\n";
- system 'cmd.exe', '/c', "echo extproc perl -Sx > $dir\\$base.cmd";
+ system 'cmd.exe', '/c', "echo extproc perl -S >$dir\\$base.cmd";
system 'cmd.exe', '/c', "type $file >> $dir\\$base.cmd";
}