1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 18:00:40 -08:00

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.
This commit is contained in:
Eli Zaretskii 2014-02-01 22:10:37 +02:00
parent 68e004e0cd
commit 28e6cee817
2 changed files with 7 additions and 4 deletions

View file

@ -1,5 +1,8 @@
2014-02-01 Eli Zaretskii <eliz@gnu.org>
* 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)

View file

@ -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);