unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kazuhiro Ito <kzhr@d1.dion.ne.jp>
To: 74312@debbugs.gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>, Ken Brown <kbrown@cornell.edu>
Subject: bug#74312: 31.0.50; Cygw32 build break
Date: Wed, 13 Nov 2024 01:14:54 +0900	[thread overview]
Message-ID: <85y11o1la9.wl--xmue@d1.dion.ne.jp> (raw)
In-Reply-To: <86jzd8ipxj.fsf@gnu.org>

> > ../../src/w32menu.c: In function ‘w32_popup_dialog’:
> > ../../src/w32menu.c:200:21: warning: implicit declaration of function 
> > ‘pMultiByteToWideChar’; did you mean ‘MultiByteToWideChar’? 
> > [-Wimplicit-function-declaration]
> >    200 |                   * pMultiByteToWideChar (CP_UTF8, 0, title, 
> > -1, NULL, 0));
> >        |                     ^~~~~~~~~~~~~~~~~~~~
> >        |                     MultiByteToWideChar
> > ../../src/w32menu.c:200:21: warning: nested extern declaration of 
> > ‘pMultiByteToWideChar’ [-Wnested-externs]
> > 
> > ../../src/w32dwrite.c:41: warning: macro "INITGUID" is not used 
> > [-Wunused-macros]
> >     41 | # define INITGUID
> >        |
> > ../../src/w32dwrite.c: In function ‘w32_dwrite_encode_char’:
> > ../../src/w32dwrite.c:662:51: warning: pointer targets in passing 
> > argument 2 of ‘dwrite_font_face->lpVtbl->GetGlyphIndicesA’ differ in 
> > signedness [-Wpointer-sign]
> >    662 |                                                   &c, 1, &index);
> >        |                                                   ^~
> >        |                                                   |
> >        |                                                   int *
> > ../../src/w32dwrite.c:662:51: note: expected ‘const UINT32 *’ {aka 
> > ‘const unsigned int *’} but argument is of type ‘int *’
> > 
> > /usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: 
> > w32menu.o: in function `w32_popup_dialog':
> > /home/kbrown/src/emacs/master/build-w32/src/../../src/w32menu.c:200:(.text+0xb6a): 
> > undefined reference to `pMultiByteToWideChar'
> > /usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: 
> > /home/kbrown/src/emacs/master/build-w32/src/../../src/w32menu.c:202:(.text+0xba5): 
> > undefined reference to `pMultiByteToWideChar'
> > /usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: 
> > /home/kbrown/src/emacs/master/build-w32/src/../../src/w32menu.c:252:(.text+0xc1e): 
> > undefined reference to `pMultiByteToWideChar'
> > /usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: 
> > /home/kbrown/src/emacs/master/build-w32/src/../../src/w32menu.c:256:(.text+0xc6a): 
> > undefined reference to `pMultiByteToWideChar'
> > /usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: 
> > /home/kbrown/src/emacs/master/build-w32/src/../../src/w32menu.c:230:(.text+0xdfe): 
> > undefined reference to `pMultiByteToWideChar'
> > /usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: 
> > w32menu.o:/home/kbrown/src/emacs/master/build-w32/src/../../src/w32menu.c:233: 
> > more undefined references to `pMultiByteToWideChar' follow
>
> Thanks, I tried to fix those.

As far as I tested, modifying your change as below was needed.  

diff --git a/src/w32menu.c b/src/w32menu.c
index b5f87ebb42c..e5415b89bcb 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -187,8 +187,8 @@ task_dialog_callback (HWND hwnd, UINT msg, WPARAM wParam,
 w32_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
 {
 #ifdef NTGUI_UNICODE
-  typedef int (WINAPI *WideCharToMultiByte_Proc)(UINT,DWORD,LPCWSTR,int,LPSTR,
-						 int,LPCSTR,LPBOOL);
+  typedef int (WINAPI *MultiByteToWideChar_Proc)(UINT,DWORD,LPCSTR,int,
+						 LPWSTR,int);
   static MultiByteToWideChar_Proc pMultiByteToWideChar = MultiByteToWideChar;
 #endif /* NTGUI_UNICODE */
   check_window_system (f);


> And when it does build, please try the drag-n-drop feature, both with
> dropping files and with dropping text on Emacs.

Dropping multiple files or text works the same as MingW build except
files and directories with non-ascii name.  When I dragged such files
in Emacs frame, mouse cursor changed into red NO ENTRY SIGN (U+1F6AB)
and no response for dropping.

-- 
Kazuhiro Ito





  reply	other threads:[~2024-11-12 16:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-11 14:51 bug#74312: 31.0.50; Cygw32 build break Kazuhiro Ito
2024-11-11 16:07 ` Eli Zaretskii
2024-11-11 18:08   ` Ken Brown
2024-11-11 20:13     ` Eli Zaretskii
2024-11-11 22:50       ` Ken Brown
2024-11-12 12:42         ` Eli Zaretskii
2024-11-12 16:14           ` Kazuhiro Ito [this message]
2024-11-12 16:47             ` Eli Zaretskii
2024-11-13 10:59               ` Kazuhiro Ito
2024-11-13 12:33                 ` Cecilio Pardo
2024-11-13 15:55                   ` Kazuhiro Ito
2024-11-14  8:55                     ` Cecilio Pardo
2024-11-14  9:39                       ` Eli Zaretskii
2024-11-14 10:05                         ` Cecilio Pardo
2024-11-14 15:00                       ` Kazuhiro Ito
2024-11-14 16:07                         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85y11o1la9.wl--xmue@d1.dion.ne.jp \
    --to=kzhr@d1.dion.ne.jp \
    --cc=74312@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=kbrown@cornell.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).