summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@engin.umich.edu>1997-06-22 17:34:00 +1200
committerTim Bunce <Tim.Bunce@ig.co.uk>1997-08-07 00:00:00 +1200
commitb4793f7f58b137d8b2f6d505d6c77dee2cd8cb25 (patch)
tree43d50c896d552eb7bf3d0a469308d9bb704aae89
parent68d58bca0a3bd388198ebac3493f3709490347a0 (diff)
downloadperl-b4793f7f58b137d8b2f6d505d6c77dee2cd8cb25.tar.gz
Win32 sitelib intuition from DLL location
There is code for win32 that determines archlib from the location of PERL.DLL. This is only 50% effective, as any sitelib at the same location is not found. This simple patch adds that feature. It is needed for the win32 binary distribution to work in a relocatable fashion. [editor's note: perhaps only partially applied] p5p-msgid: 199706231647.MAA23260@aatma.engin.umich.edu
-rw-r--r--win32/config_h.PL3
-rw-r--r--win32/win32.c9
-rw-r--r--win32/win32.h1
3 files changed, 12 insertions, 1 deletions
diff --git a/win32/config_h.PL b/win32/config_h.PL
index 98b474a144..5d47016dc9 100644
--- a/win32/config_h.PL
+++ b/win32/config_h.PL
@@ -37,7 +37,8 @@ while (<SH>)
s#/[ *\*]*\*/#/**/#;
if (/^\s*#define\s+ARCHLIB_EXP/)
{
- $_ = "#define ARCHLIB_EXP (win32PerlLibPath())\t/**/\n";
+ $_ = "#define ARCHLIB_EXP (win32PerlLibPath())\t/**/\n"
+ . "#define APPLLIB_EXP (win32SiteLibPath())\t/**/\n";
}
print H;
}
diff --git a/win32/win32.c b/win32/win32.c
index 653cdf79cb..4663f86938 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -86,6 +86,15 @@ win32PerlLibPath(void)
return (szPerlLibRoot);
}
+char *
+win32SiteLibPath(void)
+{
+ static char szPerlSiteLib[MAXPATH+1];
+ strcpy(szPerlSiteLib, win32PerlLibPath());
+ strcat(szPerlSiteLib, "\\site");
+ return (szPerlSiteLib);
+}
+
BOOL
HasRedirection(char *ptr)
{
diff --git a/win32/win32.h b/win32/win32.h
index 344ddaba59..d295a75a35 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -99,6 +99,7 @@ struct tms {
unsigned int sleep(unsigned int);
char *win32PerlLibPath(void);
+char *win32SiteLibPath(void);
int mytimes(struct tms *timebuf);
unsigned int myalarm(unsigned int sec);
int do_aspawn(void* really, void** mark, void** arglast);