From: Steve Hay Date: Tue, 29 Aug 2006 13:24:56 +0000 (+0000) Subject: Silence Borland compiler warnings in XS::APItest and Win32 X-Git-Tag: accepted/trunk/20130322.191538~17102 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d477a6df415688392cecb2d16fade0065706d72;p=platform%2Fupstream%2Fperl.git Silence Borland compiler warnings in XS::APItest and Win32 (See: http://www.nntp.perl.org/group/perl.daily-build.reports/40471) p4raw-id: //depot/perl@28768 --- diff --git a/ext/XS/APItest/APItest.xs b/ext/XS/APItest/APItest.xs index 0c5c517..d83e32f 100644 --- a/ext/XS/APItest/APItest.xs +++ b/ext/XS/APItest/APItest.xs @@ -30,7 +30,7 @@ my_cxt_setint_p(pMY_CXT_ int i) } SV* -my_cxt_getsv_interp() +my_cxt_getsv_interp(void) { #ifdef PERL_IMPLICIT_CONTEXT dTHX; diff --git a/win32/ext/Win32/Win32.pm b/win32/ext/Win32/Win32.pm index e55bfee..e35efc9 100644 --- a/win32/ext/Win32/Win32.pm +++ b/win32/ext/Win32/Win32.pm @@ -8,7 +8,7 @@ BEGIN { require DynaLoader; @ISA = qw|Exporter DynaLoader|; - $VERSION = '0.2601'; + $VERSION = '0.2601_01'; @EXPORT = qw( NULL diff --git a/win32/ext/Win32/Win32.xs b/win32/ext/Win32/Win32.xs index 3e502b1..b92ae65 100644 --- a/win32/ext/Win32/Win32.xs +++ b/win32/ext/Win32/Win32.xs @@ -8,6 +8,8 @@ typedef BOOL (WINAPI *PFNSHGetSpecialFolderPath)(HWND, char*, int, BOOL); typedef HRESULT (WINAPI *PFNSHGetFolderPath)(HWND, int, HANDLE, DWORD, LPTSTR); +typedef int (__stdcall *PFNDllRegisterServer)(void); +typedef int (__stdcall *PFNDllUnregisterServer)(void); #ifndef CSIDL_FLAG_CREATE # define CSIDL_FLAG_CREATE 0x8000 #endif @@ -357,14 +359,14 @@ XS(w32_RegisterServer) dXSARGS; BOOL result = FALSE; HINSTANCE hnd; - FARPROC func; if (items != 1) croak("usage: Win32::RegisterServer($libname)\n"); hnd = LoadLibraryA(SvPV_nolen(ST(0))); if (hnd) { - func = GetProcAddress(hnd, "DllRegisterServer"); + PFNDllRegisterServer func; + func = (PFNDllRegisterServer)GetProcAddress(hnd, "DllRegisterServer"); if (func && func() == 0) result = TRUE; FreeLibrary(hnd); @@ -378,14 +380,14 @@ XS(w32_UnregisterServer) dXSARGS; BOOL result = FALSE; HINSTANCE hnd; - FARPROC func; if (items != 1) croak("usage: Win32::UnregisterServer($libname)\n"); hnd = LoadLibraryA(SvPV_nolen(ST(0))); if (hnd) { - func = GetProcAddress(hnd, "DllUnregisterServer"); + PFNDllUnregisterServer func; + func = (PFNDllUnregisterServer)GetProcAddress(hnd, "DllUnregisterServer"); if (func && func() == 0) result = TRUE; FreeLibrary(hnd);