summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--os2/Changes2
-rw-r--r--os2/Makefile.SHs1
-rw-r--r--os2/os2.c25
-rw-r--r--t/pragma/warn/op2
4 files changed, 18 insertions, 12 deletions
diff --git a/os2/Changes b/os2/Changes
index dbd721f088..f7251376ec 100644
--- a/os2/Changes
+++ b/os2/Changes
@@ -214,6 +214,8 @@ after 5.005_02:
$^E was reset on the second read, and contained ".\r\n" at the end.
after 5.005_53:
+ Would segfault system()ing non-existing program;
+ AOUT build was hosed;
warning-test for getpriority() might lock the system hard on
pre-fixpak22 configuration (calling getpriority() on
non-existing process triggers a system-wide bug).
diff --git a/os2/Makefile.SHs b/os2/Makefile.SHs
index 8fd7bfb989..c9bf39a1e2 100644
--- a/os2/Makefile.SHs
+++ b/os2/Makefile.SHs
@@ -18,6 +18,7 @@ $spitshell >>Makefile <<!GROK!THIS!
PERL_VERSION = $perl_version
+OPTIMIZE = $optimize
AOUT_OPTIMIZE = \$(OPTIMIZE)
AOUT_CCCMD = \$(CC) $aout_ccflags \$(AOUT_OPTIMIZE)
AOUT_AR = $aout_ar
diff --git a/os2/os2.c b/os2/os2.c
index 15a6392c5f..ce1f20949e 100644
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -580,21 +580,24 @@ char *inicmd;
/* Try adding script extensions to the file name, and
search on PATH. */
char *scr = find_script(PL_Argv[0], TRUE, NULL, 0);
- int l = strlen(scr);
-
- if (l >= sizeof scrbuf) {
- Safefree(scr);
- longbuf:
- croak("Size of scriptname too big: %d", l);
- }
- strcpy(scrbuf, scr);
- Safefree(scr);
- scr = scrbuf;
if (scr) {
- FILE *file = fopen(scr, "r");
+ FILE *file;
char *s = 0, *s1;
+ int l;
+ l = strlen(scr);
+
+ if (l >= sizeof scrbuf) {
+ Safefree(scr);
+ longbuf:
+ croak("Size of scriptname too big: %d", l);
+ }
+ strcpy(scrbuf, scr);
+ Safefree(scr);
+ scr = scrbuf;
+
+ file = fopen(scr, "r");
PL_Argv[0] = scr;
if (!file)
goto panic_file;
diff --git a/t/pragma/warn/op b/t/pragma/warn/op
index d0886edf58..195928c40d 100644
--- a/t/pragma/warn/op
+++ b/t/pragma/warn/op
@@ -296,7 +296,7 @@ Useless use of times in void context at - line 13.
use warning 'void' ;
use Config ;
BEGIN {
- if ( ! $Config{d_getprior}) {
+ if ( ! $Config{d_getprior} or $^O eq 'os2') { # Locks before fixpak22
print <<EOM ;
SKIPPED
# getpriority not present