diff options
author | Jussi Lahdenniemi <jussi@aprikoodi.fi> | 2016-01-16 11:46:14 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2016-01-16 11:46:14 +0200 |
commit | 86e45139698fe773ffb4efbe59387f90201b80c8 (patch) | |
tree | 591778934aa994ac1b839a9fe2fb3dc40e8ecfcc /src/w32.h | |
parent | 4e96521948b74b8e91eb5a6bca18427f8243bc98 (diff) | |
download | emacs-86e45139698fe773ffb4efbe59387f90201b80c8.tar.gz emacs-86e45139698fe773ffb4efbe59387f90201b80c8.tar.bz2 emacs-86e45139698fe773ffb4efbe59387f90201b80c8.zip |
Fix incompatbilities with MS-Windows 2000 and older
* src/w32.c <multiByteToWideCharFlags>: New global variable.
(filename_to_utf16, filename_from_ansi, check_windows_init_file):
Use it instead of the literal MB_ERR_INVALID_CHARS.
(maybe_load_unicows_dll): Initialize multiByteToWideCharFlags as
appropriate for the underlying OS version. For details, see
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00835.html.
* src/w32.h: Declare multiByteToWideCharFlags.
* src/w32fns.c (Fx_file_dialog, Fw32_shell_execute)
(add_tray_notification): Use multiByteToWideCharFlags instead of
the literal MB_ERR_INVALID_CHARS.
(_resetstkoflw_proc): New typedef.
(w32_reset_stack_overflow_guard): Call _resetstkoflw via a
pointer, as this function is absent in msvcrt.dll shipped with W2K
and older systems.
Copyright-paperwork-exempt: yes
Diffstat (limited to 'src/w32.h')
-rw-r--r-- | src/w32.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/w32.h b/src/w32.h index ba3fec8b7e6..fde3803c739 100644 --- a/src/w32.h +++ b/src/w32.h @@ -183,6 +183,7 @@ typedef int (WINAPI *MultiByteToWideChar_Proc)(UINT,DWORD,LPCSTR,int,LPWSTR,int) typedef int (WINAPI *WideCharToMultiByte_Proc)(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOOL); extern MultiByteToWideChar_Proc pMultiByteToWideChar; extern WideCharToMultiByte_Proc pWideCharToMultiByte; +extern DWORD multiByteToWideCharFlags; extern void init_environment (char **); extern void check_windows_init_file (void); |