From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: oslsachem Newsgroups: gmane.emacs.bugs Subject: bug#8562: Emacs 23.1 and later don't work in windows 98 Date: Sun, 12 Jun 2011 23:47:33 +0200 Message-ID: References: <83d3k88k6o.fsf@gnu.org> <83wri4kpwb.fsf@gnu.org> <83d3j9e2pn.fsf@gnu.org> <8339k3esws.fsf@gnu.org> <83wrhed91s.fsf@gnu.org> <838vtscbeu.fsf@gnu.org> <83vcwvc1eq.fsf@gnu.org> <83vcwsf2ra.fsf@gnu.org> <83k4d6fuph.fsf@gnu.org> <83pqmve2s2.fsf@gnu.org> <837h92dqai.fsf@gnu.org> <83r579c6wn.fsf@gnu.org> <8362ohcrht.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1307915306 4396 80.91.229.12 (12 Jun 2011 21:48:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 12 Jun 2011 21:48:26 +0000 (UTC) Cc: 8562@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 12 23:48:21 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QVsW5-0002zf-AX for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Jun 2011 23:48:21 +0200 Original-Received: from localhost ([::1]:57804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVsW4-0004Z8-Fw for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Jun 2011 17:48:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVsVn-0004Z1-Ub for bug-gnu-emacs@gnu.org; Sun, 12 Jun 2011 17:48:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QVsVm-0007V8-V5 for bug-gnu-emacs@gnu.org; Sun, 12 Jun 2011 17:48:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVsVm-0007V4-Q8 for bug-gnu-emacs@gnu.org; Sun, 12 Jun 2011 17:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QVsVm-0008OF-8V; Sun, 12 Jun 2011 17:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: oslsachem Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Jun 2011 21:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8562 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 8562-submit@debbugs.gnu.org id=B8562.130791526232221 (code B ref 8562); Sun, 12 Jun 2011 21:48:02 +0000 Original-Received: (at 8562) by debbugs.gnu.org; 12 Jun 2011 21:47:42 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QVsVR-0008Nd-O1 for submit@debbugs.gnu.org; Sun, 12 Jun 2011 17:47:42 -0400 Original-Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QVsVP-0008NP-NZ for 8562@debbugs.gnu.org; Sun, 12 Jun 2011 17:47:40 -0400 Original-Received: by fxm15 with SMTP id 15so2467019fxm.3 for <8562@debbugs.gnu.org>; Sun, 12 Jun 2011 14:47:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ux23I0tVg52alQLnql6xNpaZlt0vv/8P/bqY2oZBPNQ=; b=hDRv0aroPw7a+fX3T9ptBVFISItkj5pOFHskv6YTgE/ihZwbGVd27kQKjM1jiNEiqE te2Bsqwsg3N6gGjUQAMGAlWE2a3dZTqcgHPj5WQg0shy2GbsmzolvgHwEEcpr0wG8BFx Csse4Vtz8QuW0LRjqLK/+KTgMGRjlqet56HZI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=xotqbt6jZyvdZbrQ8rWYCl6QS+8t2fJN9t7gjyb2mD0iCHwvijdkzILIhyOkegPHIV GMAPmDvKJgDWbvSVX0lEyFJa5ChBJyVWWGOBa7xpci49ptNI7mQta8eGorQbKVI4Kpb3 tsnWKmZMq6HNXYkrwTIZcEOyUPVn3hvA+pgw0= Original-Received: by 10.223.143.17 with SMTP id s17mr3187698fau.34.1307915253960; Sun, 12 Jun 2011 14:47:33 -0700 (PDT) Original-Received: by 10.223.111.212 with HTTP; Sun, 12 Jun 2011 14:47:33 -0700 (PDT) In-Reply-To: <8362ohcrht.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 12 Jun 2011 17:48:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:47102 Archived-At: >> 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