diff options
author | Fifer, Eric <EFifer@sanwaint.com> | 1999-05-12 21:25:54 +0100 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-17 08:26:21 +0000 |
commit | f89d6eaa35318513fcfc9665bbb2d0bcea3326ee (patch) | |
tree | 3d53229a1881c9ddf922b9b45cc7e3f2d0da37c6 /ext | |
parent | 4c2d12df80a53518a6a39a9dea25c4d82a2e6e47 (diff) | |
download | perl-f89d6eaa35318513fcfc9665bbb2d0bcea3326ee.tar.gz |
additional cleanups for cygwin32 port
Message-ID: <71E287AB0D94D111BBD600600849EC8185EDAF@POST>
Subject: [PATCH]perl5.005_03 (CORE) cygwin32 port
p4raw-id: //depot/perl@3430
Diffstat (limited to 'ext')
-rw-r--r-- | ext/DynaLoader/dl_cygwin32.xs | 23 | ||||
-rw-r--r-- | ext/POSIX/POSIX.xs | 3 |
2 files changed, 11 insertions, 15 deletions
diff --git a/ext/DynaLoader/dl_cygwin32.xs b/ext/DynaLoader/dl_cygwin32.xs index b64ab3e345..95afcf5453 100644 --- a/ext/DynaLoader/dl_cygwin32.xs +++ b/ext/DynaLoader/dl_cygwin32.xs @@ -26,9 +26,7 @@ calls. // modules are dynamically built. This should be similar to the behavoir on sunOS. // Leaving in the logic would have required changes to the standard perlmain.c code // -// // Includes call a dll function to initialize it's impure_ptr. #include <stdio.h> -void (*impure_setupptr)(struct _reent *); // pointer to the impure_setup routine //#include <windows.h> #define LOAD_WITH_ALTERED_SEARCH_PATH (8) @@ -36,6 +34,7 @@ typedef void *HANDLE; typedef HANDLE HINSTANCE; #define STDCALL __attribute__ ((stdcall)) typedef int STDCALL (*FARPROC)(); +#define MAX_PATH 260 HINSTANCE STDCALL @@ -82,6 +81,11 @@ dl_load_file(filename,flags=0) int flags PREINIT: CODE: + { + char win32_path[MAX_PATH]; + cygwin_conv_to_full_win32_path(filename, win32_path); + filename = win32_path; + DLDEBUG(1,PerlIO_printf(PerlIO_stderr(),"dl_load_file(%s):\n", filename)); RETVAL = (void*) LoadLibraryExA(filename, NULL, LOAD_WITH_ALTERED_SEARCH_PATH ) ; @@ -90,20 +94,9 @@ dl_load_file(filename,flags=0) ST(0) = sv_newmortal() ; if (RETVAL == NULL){ SaveError("%d",GetLastError()) ; + } else { + sv_setiv( ST(0), (IV)RETVAL); } - else{ - // setup the dll's impure_ptr: - impure_setupptr = GetProcAddress(RETVAL, "impure_setup"); - if( impure_setupptr == NULL){ - printf( - "Cygwin32 dynaloader error: could not load impure_setup symbol\n"); - RETVAL = NULL; - } - else{ - // setup the DLLs impure_ptr: - (*impure_setupptr)(_impure_ptr); - sv_setiv( ST(0), (IV)RETVAL); - } } diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index c83587f5ef..80e92ff2fc 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -102,6 +102,9 @@ } # define times(t) vms_times(t) #else +#if defined (CYGWIN32) +# define tzname _tzname +#endif #if defined (WIN32) # undef mkfifo # define mkfifo(a,b) not_here("mkfifo") |