diff options
author | Vadim Konovalov <vkonovalov@lucent.com> | 2004-10-12 02:57:00 +0400 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-10-12 13:02:44 +0000 |
commit | d2b2597412218806baa0430cf97cc8334ac3ec71 (patch) | |
tree | 1385982f3c73ab987dad0b15eecc442442c570d7 /win32/dl_win32.xs | |
parent | 2d2b274444abe9850378c8466aa976c778ccebb2 (diff) | |
download | perl-d2b2597412218806baa0430cf97cc8334ac3ec71.tar.gz |
enable statically linked extensions for Win32
Message-ID: <80173417046.20041011225700@vkonovalov.ru>
p4raw-id: //depot/perl@23360
Diffstat (limited to 'win32/dl_win32.xs')
-rw-r--r-- | win32/dl_win32.xs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/win32/dl_win32.xs b/win32/dl_win32.xs index 69910dd539..4ff00a1f8e 100644 --- a/win32/dl_win32.xs +++ b/win32/dl_win32.xs @@ -68,7 +68,7 @@ static int dl_static_linked(char *filename) { char **p; - char* ptr; + char *ptr, *hptr; static char subStr[] = "/auto/"; char szBuffer[MAX_PATH]; @@ -90,7 +90,14 @@ dl_static_linked(char *filename) ptr = szBuffer; for (p = staticlinkmodules; *p;p++) { - if (strstr(ptr, *p)) return 1; + if (hptr = strstr(ptr, *p)) { + /* found substring, need more detailed check if module name match */ + if (hptr==ptr) { + return strcmp(ptr, *p)==0; + } + if (hptr[strlen(*p)] == 0) + return hptr[-1]=='/'; + } }; return 0; } |