diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-08 21:13:07 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-08 21:13:07 +0000 |
commit | dc9e4912b3381e3548a35c5aba633cc37261d318 (patch) | |
tree | 4d881006b05d299a40b2a6cfec8aced0dd737710 /win32 | |
parent | 91500cfd5c426b5ce4db817d5b64c763d5b8822b (diff) | |
download | perl-dc9e4912b3381e3548a35c5aba633cc37261d318.tar.gz |
integrate changes#2120,2168,2218 from maint-5.005;
add new vtbls; s/\bvtbl_/PL_vtbl_/; remove trailing comma in
enum; make regen_headers
p4raw-link: @2218 on //depot/maint-5.005/perl: eadd311f94dcb5fe096743b61371bd2d48466304
p4raw-link: @2168 on //depot/maint-5.005/perl: fb1d2f1891787fe7d6df85205b85f0528294ffa8
p4raw-link: @2120 on //depot/maint-5.005/perl: f9caadc6ad025d4bf993ab5b737b9a99347a59e3
p4raw-id: //depot/perl@2220
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/win32/win32.c b/win32/win32.c index 1ce7ad98bc..be5f5e1e0c 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -38,6 +38,8 @@ #include "EXTERN.h" #include "perl.h" +#include "patchlevel.h" + #define NO_XSLOCKS #ifdef PERL_OBJECT extern CPerlObj* pPerl; @@ -176,6 +178,7 @@ GetRegStr(const char *lpszValueName, char** ptr, DWORD* lpDataLen) static char * get_emd_part(char *prev_path, char *trailing_path, ...) { + char base[10]; va_list ap; char mod_name[MAX_PATH+1]; char *ptr; @@ -186,6 +189,8 @@ get_emd_part(char *prev_path, char *trailing_path, ...) va_start(ap, trailing_path); strip = va_arg(ap, char *); + sprintf(base, "%5.3f", (double) 5 + ((double) PATCHLEVEL / (double) 1000)); + GetModuleFileName((w32_perldll_handle == INVALID_HANDLE_VALUE) ? GetModuleHandle(NULL) : w32_perldll_handle, mod_name, sizeof(mod_name)); @@ -209,17 +214,21 @@ get_emd_part(char *prev_path, char *trailing_path, ...) va_end(ap); strcpy(++ptr, trailing_path); - newsize = strlen(mod_name) + 1; - if (prev_path) { - oldsize = strlen(prev_path) + 1; - newsize += oldsize; /* includes plus 1 for ';' */ - Renew(prev_path, newsize, char); - prev_path[oldsize-1] = ';'; - strcpy(&prev_path[oldsize], mod_name); - } - else { - New(1311, prev_path, newsize, char); - strcpy(prev_path, mod_name); + /* only add directory if it exists */ + if(GetFileAttributes(mod_name) != (DWORD) -1) { + /* directory exists */ + newsize = strlen(mod_name) + 1; + if (prev_path) { + oldsize = strlen(prev_path) + 1; + newsize += oldsize; /* includes plus 1 for ';' */ + Renew(prev_path, newsize, char); + prev_path[oldsize-1] = ';'; + strcpy(&prev_path[oldsize], mod_name); + } + else { + New(1311, prev_path, newsize, char); + strcpy(prev_path, mod_name); + } } return prev_path; |