aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32.h
diff options
context:
space:
mode:
authorJussi Lahdenniemi2016-01-16 11:46:14 +0200
committerEli Zaretskii2016-01-16 11:46:14 +0200
commit86e45139698fe773ffb4efbe59387f90201b80c8 (patch)
tree591778934aa994ac1b839a9fe2fb3dc40e8ecfcc /src/w32.h
parent4e96521948b74b8e91eb5a6bca18427f8243bc98 (diff)
downloademacs-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.h1
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)
183typedef int (WINAPI *WideCharToMultiByte_Proc)(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOOL); 183typedef int (WINAPI *WideCharToMultiByte_Proc)(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOOL);
184extern MultiByteToWideChar_Proc pMultiByteToWideChar; 184extern MultiByteToWideChar_Proc pMultiByteToWideChar;
185extern WideCharToMultiByte_Proc pWideCharToMultiByte; 185extern WideCharToMultiByte_Proc pWideCharToMultiByte;
186extern DWORD multiByteToWideCharFlags;
186 187
187extern void init_environment (char **); 188extern void init_environment (char **);
188extern void check_windows_init_file (void); 189extern void check_windows_init_file (void);