diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1998-11-04 21:21:12 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-28 20:02:03 +0000 |
commit | e96326affd376a1d487cc153399fffe7e116ca34 (patch) | |
tree | 2b375322de78862feba0899defd5262328ed6fb0 /os2 | |
parent | 8f580fb8c3adcd8061f0e72f718bbf4ff930d697 (diff) | |
download | perl-e96326affd376a1d487cc153399fffe7e116ca34.tar.gz |
Yet another OS/2 patch
Message-Id: <199811050721.CAA27998@monk.mps.ohio-state.edu>
p4raw-id: //depot/perl@2374
Diffstat (limited to 'os2')
-rw-r--r-- | os2/Changes | 2 | ||||
-rw-r--r-- | os2/Makefile.SHs | 1 | ||||
-rw-r--r-- | os2/os2.c | 25 |
3 files changed, 17 insertions, 11 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 @@ -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; |