2012-08-13 Eli Zaretskii <eliz@gnu.org>
+ * w32menu.c: Include w32heap.h.
+ (add_menu_item): If the call to AppendMenuW (via
+ unicode_append_menu) fails, disable Unicode menus only if we are
+ running on Windows 9X/Me.
+
+ * makefile.w32-in ($(BLD)/w32menu.$(O)): Depend on w32heap.h.
+
* window.c (Fdelete_other_windows_internal)
(Fdelete_window_internal): Don't access frame's mouse highlight
info of the initial frame. (Bug#11677)
if this is not done before the other system files. */
#include "w32term.h"
+#include "w32heap.h"
+
/* Load sys/types.h if not already loaded.
In some systems loading it twice is suicidal. */
#ifndef makedev
AppendMenu (menu, fuFlags,
item != NULL ? (UINT) item: (UINT) wv->call_data,
out_string);
- /* Don't use Unicode menus in future. */
- unicode_append_menu = NULL;
+ /* Don't use Unicode menus in future, unless this is Windows
+ NT or later, where a failure of AppendMenuW does NOT mean
+ Unicode menus are unsupported. */
+ if (osinfo_cache.dwPlatformId != VER_PLATFORM_WIN32_NT)
+ unicode_append_menu = NULL;
}
if (unicode_append_menu && (fuFlags & MF_OWNERDRAW))