summaryrefslogtreecommitdiff
path: root/os2
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-11-30 05:31:00 +1200
committerChip Salzenberg <chip@atlantic.net>1996-11-30 05:31:00 +1200
commitff68c7194e176ca1907544a3a65684b76834d0fe (patch)
tree4124d603a6b2a937f4ce1d9469426f84421f93e0 /os2
parenteff9c6e2f5bda63e4dc69fc15e237a9843954369 (diff)
downloadperl-ff68c7194e176ca1907544a3a65684b76834d0fe.tar.gz
[inseparable changes from patch from perl5.003_09 to perl5.003_10]
CORE LANGUAGE CHANGES Subject: Allow &{sub {...}} without warning From: Chip Salzenberg <chip@atlantic.net> Files: toke.c Subject: Make parens optional on [gs]ethost and [gs]et{pw,gr} function From: Chip Salzenberg <chip@atlantic.net> Files: toke.c Subject: Fix syntax error with "$x [0]" and "$x {y}" and "@x {y}" From: Chip Salzenberg <chip@atlantic.net> Files: toke.c DOCUMENTATION Subject: Improve documentation for sysread() and syswrite() From: Chip Salzenberg <chip@atlantic.net> Files: pod/perlfunc.pod Subject: Document how to use $SIG{ALRM} and alarm() Date: Tue, 26 Nov 1996 11:42:49 -0500 From: Roderick Schertler <roderick@ibcinc.com> Files: pod/perlfunc.pod Msg-ID: <5898.849026569@eeyore.ibcinc.com> (applied based on p5p patch as commit 5fa5e7dfc2abaaadd377c97cd1ebe78ea844da88) OTHER CORE CHANGES Subject: Hash key memory corruption fix and naming cleanup From: Chip Salzenberg <chip@atlantic.net> Files: hv.c hv.h perl.h Subject: Undo broken perf. patch (PADTMP stealing) From: Chip Salzenberg <chip@atlantic.net> Files: sv.c Subject: Make SV unstudied in sv_gets() From: Chip Salzenberg <chip@atlantic.net> Files: sv.c Subject: Better support for UVs From: Paul Marquess <pmarquess@bfsec.bt.co.uk> Files: global.sym old_global.sym perl.h pp.c pp.h proto.h sv.c sv.h Subject: Minor locale cleanups From: Chip Salzenberg <chip@atlantic.net> Files: t/lib/posix.t util.c Accept "POSIX" locale as standard like "C". Reset locale to 'C' when testing strtod() in t/lib/posix.t. Subject: Always taint result of sprintf() on float From: Chip Salzenberg <chip@atlantic.net> Files: doop.c Subject: Fix spurious warning from bitwise string ops From: Chip Salzenberg <chip@atlantic.net> Files: doop.c Subject: Eliminate warning on {,sys}read(,$newvar,) From: Chip Salzenberg <chip@atlantic.net> Files: doop.c pp_sys.c Subject: Namespace cleanup From: Chip Salzenberg <chip@atlantic.net> Files: global.sym old_global.sym perl.h Subject: Modify perl_exp.SH; create old_perl_exp.SH; document old_* From: Chip Salzenberg <chip@atlantic.net> Files: Configure INSTALL MANIFEST old_perl_exp.SH perl_exp.SH PORTABILITY Subject: Reliable signal patch Date: Tue, 26 Nov 1996 05:40:50 -0500 (EST) From: Kenneth Albanowski <kjahds@kjahds.com> Files: global.sym mg.c old_global.sym perl.h pp_sys.c proto.h util.c Msg-ID: <Pine.LNX.3.93.961126053209.294J-100000@kjahds.com> (applied based on p5p patch as commit 679728958e74b0ccd6d61567d84851f1ef994e1f) Subject: Emulate missing flock() with either fcntl() or lockf() From: Chip Salzenberg <chip@atlantic.net> Files: pp_sys.c Subject: 3_09: minor patches for OS/2 Date: Wed, 27 Nov 1996 03:30:05 -0500 (EST) From: Ilya Zakharevich <ilya@math.ohio-state.edu> Files: doio.c global.sym malloc.c old_global.sym os2/Makefile.SHs os2/OS2/ExtAttr/Makefile.PL os2/OS2/PrfDB/Makefile.PL os2/OS2/Process/Makefile.PL os2/OS2/REXX/Makefile.PL os2/os2.c os2/os2ish.h perl.h Subject: 3_09: minor patches This patches mostly enable commpilation under OS/2, and fix malloc.c. Enjoy, p5p-msgid: <199611270830.DAA04985@monk.mps.ohio-state.edu> Subject: Re: 5.003_09 and QNX Date: Wed, 27 Nov 96 13:36:06 est From: Norton Allen <nort@bottesini.harvard.edu> Files: Configure MANIFEST README.qnx hints/qnx.sh qnx/ar qnx/cpp t/TEST toke.c util.c x2p/proto.h Msg-ID: <9611271836.AA14460@bottesini.harvard.edu> (applied based on p5p patch as commit c5117498be098729dc2af28089bd130c88c8d42b)
Diffstat (limited to 'os2')
-rw-r--r--os2/Makefile.SHs8
-rw-r--r--os2/OS2/ExtAttr/Makefile.PL1
-rw-r--r--os2/OS2/PrfDB/Makefile.PL1
-rw-r--r--os2/OS2/Process/Makefile.PL1
-rw-r--r--os2/OS2/REXX/Makefile.PL1
-rw-r--r--os2/os2.c32
-rw-r--r--os2/os2ish.h10
7 files changed, 27 insertions, 27 deletions
diff --git a/os2/Makefile.SHs b/os2/Makefile.SHs
index b4ac75e949..b6564dffa9 100644
--- a/os2/Makefile.SHs
+++ b/os2/Makefile.SHs
@@ -64,16 +64,12 @@ $spitshell >>Makefile <<'!NO!SUBS!'
# grep -v '"\(malloc\|realloc\|free\)"' perl.linkexp >>$@
-# We assume here that perl is available somewhere ...
-
perl.exports: perl.exp EXTERN.h perl.h
- (echo '#include "EXTERN.h"'; echo '#include "perl.h"' ; \
- echo '#include "perl.exp"') | \
+ (echo "#include \"EXTERN.h\" \n#include \"perl.h\" \n#include \"perl.exp\""; \
+ echo "malloc\nrealloc\ncalloc\nfree") | \
$(CC) -DEMBED -E - | \
awk '{if ($$2 == "") print $$1}' | sort | uniq > $@
-# perl -ne 'print if (/^#!/ .. /^#\s/) && s/^(\w+) *$$/$$1/' > $@
-
perl.linkexp: perl.exports perl.map
cat perl.exports perl.map | sort | uniq -d | sed -e 's/\w\+/ "\0"/' > perl.linkexp
diff --git a/os2/OS2/ExtAttr/Makefile.PL b/os2/OS2/ExtAttr/Makefile.PL
index 4e8498f10c..35680288b8 100644
--- a/os2/OS2/ExtAttr/Makefile.PL
+++ b/os2/OS2/ExtAttr/Makefile.PL
@@ -4,6 +4,7 @@ use ExtUtils::MakeMaker;
WriteMakefile(
'NAME' => 'OS2::ExtAttr',
'VERSION_FROM' => 'ExtAttr.pm', # finds $VERSION
+ MAN3PODS => ' ', # Pods will be built by installman.
'LIBS' => [''], # e.g., '-lm'
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
'INC' => '', # e.g., '-I/usr/include/other'
diff --git a/os2/OS2/PrfDB/Makefile.PL b/os2/OS2/PrfDB/Makefile.PL
index c591c0490c..39521685df 100644
--- a/os2/OS2/PrfDB/Makefile.PL
+++ b/os2/OS2/PrfDB/Makefile.PL
@@ -4,6 +4,7 @@ use ExtUtils::MakeMaker;
WriteMakefile(
'NAME' => 'OS2::PrfDB',
'VERSION_FROM' => 'PrfDB.pm', # finds $VERSION
+ MAN3PODS => ' ', # Pods will be built by installman.
'LIBS' => [''], # e.g., '-lm'
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
'INC' => '', # e.g., '-I/usr/include/other'
diff --git a/os2/OS2/Process/Makefile.PL b/os2/OS2/Process/Makefile.PL
index ff4deabef6..b7a295f857 100644
--- a/os2/OS2/Process/Makefile.PL
+++ b/os2/OS2/Process/Makefile.PL
@@ -4,6 +4,7 @@ use ExtUtils::MakeMaker;
WriteMakefile(
'NAME' => 'OS2::Process',
'VERSION' => '0.1',
+ MAN3PODS => ' ', # Pods will be built by installman.
'LIBS' => [''], # e.g., '-lm'
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
'INC' => '', # e.g., '-I/usr/include/other'
diff --git a/os2/OS2/REXX/Makefile.PL b/os2/OS2/REXX/Makefile.PL
index 07f6cc67ea..c27cb0d905 100644
--- a/os2/OS2/REXX/Makefile.PL
+++ b/os2/OS2/REXX/Makefile.PL
@@ -3,5 +3,6 @@ use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'OS2::REXX',
VERSION => '0.2',
+ MAN3PODS => ' ', # Pods will be built by installman.
XSPROTOARG => '-noprototypes',
);
diff --git a/os2/os2.c b/os2/os2.c
index a35b706048..14a6ea0acf 100644
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -244,7 +244,7 @@ register SV **sp;
if (flag == P_WAIT)
flag = P_NOWAIT;
- if (strEQ(Argv[0],"/bin/sh")) Argv[0] = SH_PATH;
+ if (strEQ(Argv[0],"/bin/sh")) Argv[0] = sh_path;
if (Argv[0][0] != '/' && Argv[0][0] != '\\'
&& !(Argv[0][0] && Argv[0][1] == ':'
@@ -296,7 +296,7 @@ int execf;
have a shell which will not change between computers with the
same architecture, to avoid "action on a distance".
And to have simple build, this shell should be sh. */
- shell = SH_PATH;
+ shell = sh_path;
copt = "-c";
#endif
@@ -304,10 +304,10 @@ int execf;
cmd++;
if (strnEQ(cmd,"/bin/sh",7) && isSPACE(cmd[7])) {
- STRLEN l = strlen(SH_PATH);
+ STRLEN l = strlen(sh_path);
New(4545, news, strlen(cmd) - 7 + l, char);
- strcpy(news, SH_PATH);
+ strcpy(news, sh_path);
strcpy(news + l, cmd + 7);
cmd = news;
}
@@ -474,7 +474,7 @@ char *mode;
# else
char *shell = getenv("EMXSHELL");
- my_setenv("EMXSHELL", SH_PATH);
+ my_setenv("EMXSHELL", sh_path);
res = popen(cmd, mode);
my_setenv("EMXSHELL", shell);
# endif
@@ -724,8 +724,6 @@ os2error(int rc)
return buf;
}
-char sh_path[STATIC_FILE_LENGTH+1] = SH_PATH_INI;
-
char *
perllib_mangle(char *s, unsigned int l)
{
@@ -736,6 +734,8 @@ perllib_mangle(char *s, unsigned int l)
if (!newp && !notfound) {
newp = getenv("PERLLIB_PREFIX");
if (newp) {
+ char *s;
+
oldp = newp;
while (*newp && !isSPACE(*newp) && *newp != ';') {
newp++; oldl++; /* Skip digits. */
@@ -747,6 +747,12 @@ perllib_mangle(char *s, unsigned int l)
if (newl == 0 || oldl == 0) {
die("Malformed PERLLIB_PREFIX");
}
+ strcpy(ret, newp);
+ s = ret;
+ while (*s) {
+ if (*s == '\\') *s = '/';
+ s++;
+ }
} else {
notfound = 1;
}
@@ -763,7 +769,6 @@ perllib_mangle(char *s, unsigned int l)
if (l + newl - oldl > STATIC_FILE_LENGTH || newl > STATIC_FILE_LENGTH) {
die("Malformed PERLLIB_PREFIX");
}
- strncpy(ret, newp, newl);
strcpy(ret + newl, s + oldl);
return ret;
}
@@ -1102,17 +1107,20 @@ Perl_OS2_init()
settmppath();
OS2_Perl_data.xs_init = &Xs_OS2_init;
if ( (shell = getenv("PERL_SH_DRIVE")) ) {
+ New(404, sh_path, strlen(SH_PATH) + 1, char);
+ strcpy(sh_path, SH_PATH);
sh_path[0] = shell[0];
} else if ( (shell = getenv("PERL_SH_DIR")) ) {
- int l = strlen(shell);
+ int l = strlen(shell), i;
if (shell[l-1] == '/' || shell[l-1] == '\\') {
l--;
}
- if (l > STATIC_FILE_LENGTH - 7) {
- die("PERL_SH_DIR too long");
- }
+ New(404, sh_path, l + 8, char);
strncpy(sh_path, shell, l);
strcpy(sh_path + l, "/sh.exe");
+ for (i = 0; i < l; i++) {
+ if (sh_path[i] == '\\') sh_path[i] = '/';
+ }
}
}
diff --git a/os2/os2ish.h b/os2/os2ish.h
index 0597fdcd39..d83503d9b9 100644
--- a/os2/os2ish.h
+++ b/os2/os2ish.h
@@ -47,12 +47,6 @@
#define BIT_BUCKET "/dev/nul" /* Will this work? */
-/* SH_PATH_INI:
- * Duplicate for SH_PATH. This symbol allows redefinition of SH_PATH,
- * which may be needed to make a binary distribution.
- */
-#define SH_PATH_INI SH_PATH /**/
-
#if defined(I_SYS_UN) && !defined(TCPIPV4)
/* It is not working without TCPIPV4 defined. */
# undef I_SYS_UN
@@ -197,9 +191,7 @@ extern OS2_Perl_data_t OS2_Perl_data;
}
#define STATIC_FILE_LENGTH 127
-extern char sh_path[STATIC_FILE_LENGTH+1];
-#undef SH_PATH
-#define SH_PATH sh_path
+
#define PERLLIB_MANGLE(s, n) perllib_mangle((s), (n))
char *perllib_mangle(char *, unsigned int);