From: Eli Zaretskii Date: Sat, 1 Feb 2014 20:10:37 +0000 (+0200) Subject: Attempt to solve bug #16615 by using a more accurate function prototype. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~201 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=28e6cee8178fb4134480e01e92a3a58a64e6cbee;p=emacs.git Attempt to solve bug #16615 by using a more accurate function prototype. src/w32fns.c (Ffile_system_info): Use WINAPI in the function pointers that get the address of GetDiskFreeSpaceEx. --- diff --git a/src/ChangeLog b/src/ChangeLog index 6c52ad45be2..c87b7e8b8e7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2014-02-01 Eli Zaretskii + * w32fns.c (Ffile_system_info): Use WINAPI in the function + pointers that get the address of GetDiskFreeSpaceEx. (Bug#16615) + * print.c (Fexternal_debugging_output): If the argument character is non-ASCII, encode it with the current locale's encoding before writing the result to the terminal. (Bug#16448) diff --git a/src/w32fns.c b/src/w32fns.c index 397b1796215..b688512da88 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -7461,12 +7461,12 @@ If the underlying system call fails, value is nil. */) added rather late on. */ { HMODULE hKernel = GetModuleHandle ("kernel32"); - BOOL (*pfn_GetDiskFreeSpaceExW) + BOOL (WINAPI *pfn_GetDiskFreeSpaceExW) (wchar_t *, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER) - = (void *) GetProcAddress (hKernel, "GetDiskFreeSpaceExW"); - BOOL (*pfn_GetDiskFreeSpaceExA) + = GetProcAddress (hKernel, "GetDiskFreeSpaceExW"); + BOOL (WINAPI *pfn_GetDiskFreeSpaceExA) (char *, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER) - = (void *) GetProcAddress (hKernel, "GetDiskFreeSpaceExA"); + = GetProcAddress (hKernel, "GetDiskFreeSpaceExA"); bool have_pfn_GetDiskFreeSpaceEx = (w32_unicode_filenames && pfn_GetDiskFreeSpaceExW || !w32_unicode_filenames && pfn_GetDiskFreeSpaceExA);