GNU bug report logs -
#8562
Emacs 23.1 and later don't work in windows 98
Previous Next
Reported by: oslsachem <oslsachem <at> gmail.com>
Date: Tue, 26 Apr 2011 21:59:01 UTC
Severity: normal
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> In a second build, I have tried using the unicows implementation of
>> AppendMenuW and I have noticed that the menu items tooltips no longer
>> show.
>
> So it looks like we are better off without libunicows, with using
> function pointers to call the crucial several functions needed for
> normal display.
I didn't remember the libunicows build of emacs not showing the menu
items tooltips so I checked it, and it actually showed them.
So, reviewing globals_of_w32menu:
globals_of_w32menu ()
{
/* See if Get/SetMenuItemInfo functions are available. */
HMODULE user32 = GetModuleHandle ("user32.dll");
get_menu_item_info = (GetMenuItemInfoA_Proc) GetProcAddress (user32,
"GetMenuItemInfoA");
set_menu_item_info = (SetMenuItemInfoA_Proc) GetProcAddress (user32,
"SetMenuItemInfoA");
unicode_append_menu = (AppendMenuW_Proc) GetProcAddress (user32,
"AppendMenuW");
}
I realized that I had carelessly replaced all the occurrences of
'user32' with 'unicows' expecting that:
- At this point in the execution, the unicows library would be already
loaded, which seems to be true.
- Unicows would provide the most up-to-date implementations of the
ansi versions of these functions, which is false. In general, unicows
only provides the ansi implementations for a few of the functions. In
particular, unicows doesn't provide the ansi implementations for these
specific functions.
So the change correctly done (supposing the is_windows_9x() function
was available for this file) could be something like :
void
globals_of_w32menu ()
{
/* See if Get/SetMenuItemInfo functions are available. */
HMODULE user32 = GetModuleHandle ("user32.dll");
get_menu_item_info = (GetMenuItemInfoA_Proc) GetProcAddress (user32,
"GetMenuItemInfoA");
set_menu_item_info = (SetMenuItemInfoA_Proc) GetProcAddress (user32,
"SetMenuItemInfoA");
if (is_windows_9x())
{
HMODULE unicows = GetModuleHandle ("unicows.dll");
unicode_append_menu = (AppendMenuW_Proc) GetProcAddress
(unicows, "AppendMenuW");
}
else unicode_append_menu = (AppendMenuW_Proc) GetProcAddress
(user32, "AppendMenuW");
}
I think it would be interesting to make this change given that this
unicode function is already called through function pointers and that
this would keep the execution branches of windows 9x and windows NT as
close as possible.
Greetings,
Osl
This bug report was last modified 13 years and 201 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.