diff options
| author | Jussi Lahdenniemi | 2016-01-16 11:46:14 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 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.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
| @@ -183,6 +183,7 @@ typedef int (WINAPI *MultiByteToWideChar_Proc)(UINT,DWORD,LPCSTR,int,LPWSTR,int) | |||
| 183 | typedef int (WINAPI *WideCharToMultiByte_Proc)(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOOL); | 183 | typedef int (WINAPI *WideCharToMultiByte_Proc)(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOOL); |
| 184 | extern MultiByteToWideChar_Proc pMultiByteToWideChar; | 184 | extern MultiByteToWideChar_Proc pMultiByteToWideChar; |
| 185 | extern WideCharToMultiByte_Proc pWideCharToMultiByte; | 185 | extern WideCharToMultiByte_Proc pWideCharToMultiByte; |
| 186 | extern DWORD multiByteToWideCharFlags; | ||
| 186 | 187 | ||
| 187 | extern void init_environment (char **); | 188 | extern void init_environment (char **); |
| 188 | extern void check_windows_init_file (void); | 189 | extern void check_windows_init_file (void); |