commit afb497408f273bb11f88738cc3ed76ecd3d7ac3b (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Tue Jul 28 21:41:59 2015 -0700 Remove unnecessary stack overflow dependency * configure.ac (HAVE_STACK_OVERFLOW_HANDLING): Don't worry about $ac_cv_header_sys_resource_h and $ac_cv_func_getrlimit, as they're no longer needed for this. Problem reported by Eli Zaretskii in: http://lists.gnu.org/archive/html/emacs-devel/2015-07/msg00443.html diff --git a/configure.ac b/configure.ac index 19b8b9d..45008d8 100644 --- a/configure.ac +++ b/configure.ac @@ -4557,9 +4557,7 @@ if test $emacs_cv_func_sigsetjmp = yes; then fi # We need all of these features to handle C stack overflows. -if test "$ac_cv_header_sys_resource_h" = "yes" && - test "$ac_cv_func_getrlimit" = "yes" && - test "$emacs_cv_func_sigsetjmp" = "yes" && +if test "$emacs_cv_func_sigsetjmp" = "yes" && test "$emacs_cv_alternate_stack" = yes; then AC_DEFINE([HAVE_STACK_OVERFLOW_HANDLING], 1, [Define to 1 if C stack overflow can be handled in some cases.]) commit 87b8992ca357e180bf87f4a8df3ef58b7de89695 Author: Andy Moreton Date: Tue Jul 28 16:37:31 2015 +0300 Pacify compilation -Wincompatible-pointer-types warnings * src/w32proc.c (Fw32_get_codepage_charset): Avoid compilation warning. (CompareStringW_Proc): New typedef. (w32_compare_strings): Use it, to pacify compiler warnings under "-Wincompatible-pointer-types". * src/w32fns.c (GetDiskFreeSpaceExW_Proc) (GetDiskFreeSpaceExA_Proc): New typedefs. (Ffile_system_info): Use them, to pacify compiler warnings under "-Wincompatible-pointer-types". Copyright-paperwork-exempt: yes diff --git a/src/w32fns.c b/src/w32fns.c index abfa315..499450f 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -7799,6 +7799,11 @@ The following %-sequences are provided: #ifdef WINDOWSNT +typedef BOOL (WINAPI *GetDiskFreeSpaceExW_Proc) + (LPCWSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER); +typedef BOOL (WINAPI *GetDiskFreeSpaceExA_Proc) + (LPCSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER); + DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0, doc: /* Return storage information about the file system FILENAME is on. Value is a list of floats (TOTAL FREE AVAIL), where TOTAL is the total @@ -7822,12 +7827,10 @@ If the underlying system call fails, value is nil. */) added rather late on. */ { HMODULE hKernel = GetModuleHandle ("kernel32"); - BOOL (WINAPI *pfn_GetDiskFreeSpaceExW) - (wchar_t *, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER) - = GetProcAddress (hKernel, "GetDiskFreeSpaceExW"); - BOOL (WINAPI *pfn_GetDiskFreeSpaceExA) - (char *, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER) - = GetProcAddress (hKernel, "GetDiskFreeSpaceExA"); + GetDiskFreeSpaceExW_Proc pfn_GetDiskFreeSpaceExW = + (GetDiskFreeSpaceExW_Proc) GetProcAddress (hKernel, "GetDiskFreeSpaceExW"); + GetDiskFreeSpaceExA_Proc pfn_GetDiskFreeSpaceExA = + (GetDiskFreeSpaceExA_Proc) GetProcAddress (hKernel, "GetDiskFreeSpaceExA"); bool have_pfn_GetDiskFreeSpaceEx = ((w32_unicode_filenames && pfn_GetDiskFreeSpaceExW) || (!w32_unicode_filenames && pfn_GetDiskFreeSpaceExA)); diff --git a/src/w32proc.c b/src/w32proc.c index ca4322b..66a9761 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -3327,16 +3327,16 @@ yield nil. */) (Lisp_Object cp) { CHARSETINFO info; - DWORD dwcp; + DWORD_PTR dwcp; CHECK_NUMBER (cp); if (!IsValidCodePage (XINT (cp))) return Qnil; - /* Going through a temporary DWORD variable avoids compiler warning + /* Going through a temporary DWORD_PTR variable avoids compiler warning about cast to pointer from integer of different size, when - building --with-wide-int. */ + building --with-wide-int or building for 64bit. */ dwcp = XINT (cp); if (TranslateCharsetInfo ((DWORD *) dwcp, &info, TCI_SRCCODEPAGE)) return make_number (info.ciCharset); @@ -3499,6 +3499,9 @@ get_lcid (const char *locale_name) # define LINGUISTIC_IGNORECASE 0x00000010 #endif +typedef int (WINAPI *CompareStringW_Proc) + (LCID, DWORD, LPCWSTR, int, LPCWSTR, int); + int w32_compare_strings (const char *s1, const char *s2, char *locname, int ignore_case) @@ -3507,7 +3510,7 @@ w32_compare_strings (const char *s1, const char *s2, char *locname, wchar_t *string1_w, *string2_w; int val, needed; extern BOOL g_b_init_compare_string_w; - static int (WINAPI *pCompareStringW)(LCID, DWORD, LPCWSTR, int, LPCWSTR, int); + static CompareStringW_Proc pCompareStringW; DWORD flags = 0; USE_SAFE_ALLOCA; @@ -3523,8 +3526,9 @@ w32_compare_strings (const char *s1, const char *s2, char *locname, { if (os_subtype == OS_9X) { - pCompareStringW = GetProcAddress (LoadLibrary ("Unicows.dll"), - "CompareStringW"); + pCompareStringW = + (CompareStringW_Proc) GetProcAddress (LoadLibrary ("Unicows.dll"), + "CompareStringW"); if (!pCompareStringW) { errno = EINVAL;