all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Arthur Miller <arthur.miller@live.com>
Cc: emacs-devel@gnu.org
Subject: Re: Compiling in mingw-ucrt runtime
Date: Fri, 23 Feb 2024 10:24:40 +0200	[thread overview]
Message-ID: <86cysn1tbr.fsf@gnu.org> (raw)
In-Reply-To: <DU2PR02MB10109DC51BBEF51D48089EE4D96552@DU2PR02MB10109.eurprd02.prod.outlook.com> (message from Arthur Miller on Fri, 23 Feb 2024 08:58:43 +0100)

> From: Arthur Miller <arthur.miller@live.com>
> Cc: emacs-devel@gnu.org
> Date: Fri, 23 Feb 2024 08:58:43 +0100
> 
> >> +#ifdef _UCRT
> >> +#define _snprintf snprintf
> >> +#endif
> >
> > I don't understand this change.  Are you saying UCRT doesn't provide
> > _snprintf?  If so, why is the above needed only in cmdproxy?  w32*.c
> 
> As mingw ucrt patch mentions; MS ucrt provides snprintf so mingw does not
> provide one in ucrt.

Sorry, I don't understand what you mean by that.  MinGW only provides
some stuff that the MS libraries lack, so by "UCRT doesn't provide
_snprintf" I meant that the combination of MS ucrt and the MinGW
additions in UCRT mode doesn't provide _snprintf.

> I don't know why is it needed only there. From my original attemt, the linker
> missed reference to _snprintf only for cmdproxy, so I guess it is linked with
> the wrong library. I have looked at the Makefiles in nt directory, but as far as
> I understand linker flags comes from some included makefile (LDFLAGS=@ldflags@),
> so perhaps they have somehow wrong library elsewhere.

If you say "make V=1", you will see the complete compilation and link
commands, including any libraries that we are linking into the
executables.  If you spot some library that is present for temacs.exe,
but not for cmdproxy.exe, we can add that missing library to the link
command, or at least understand the nature of the problem and devise
some solution.  MinGW should come with a tool that allows you to see
what functions are exported by a DLL, so if you find which libraries
are not linked into cmdproxy, you could look at those libraries and
see which one of them, if any, provides _snprintf.  Can you please try
that and report the results?

> Yes, I agree, it is all about close_stream. Seems like it is all the same error:
> -1 (unspecified error). You can see the test from the patch.
> 
> I haven't seen the code for close_stream or msys patches; I will have to
> download and look at it; but it sounds plausible as you said that they probably
> don't clean up errno.

The source fore close_stream is in the lib/ subdirectory of the Emacs
source tree, so you should already have it.



  reply	other threads:[~2024-02-23  8:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22  0:01 Compiling in mingw-ucrt runtime Arthur Miller
2024-02-22  6:24 ` Po Lu via Emacs development discussions.
2024-02-22  7:14 ` Eli Zaretskii
2024-02-23  7:58   ` Arthur Miller
2024-02-23  8:24     ` Eli Zaretskii [this message]
2024-02-23 11:32       ` Arthur Miller
2024-02-23 12:02         ` Eli Zaretskii
2024-02-24  9:13           ` Arthur Miller
2024-02-24 10:24             ` Eli Zaretskii
2024-02-24 23:11               ` Arthur Miller
2024-02-25  5:56                 ` Po Lu
2024-02-25  6:33                 ` Eli Zaretskii
2024-02-25 10:19                   ` Arthur Miller
2024-02-25 10:48                     ` Eli Zaretskii
2024-02-25 11:40                       ` Arthur Miller
2024-02-25 12:15                         ` Eli Zaretskii
2024-02-25 14:11                           ` Bruno Haible
2024-02-25 14:29                             ` Eli Zaretskii
2024-02-25 15:05                               ` Bruno Haible
2024-02-25 15:14                                 ` Eli Zaretskii
2024-02-25 15:32                                   ` Bruno Haible
2024-02-25 16:02                                     ` Eli Zaretskii
2024-04-02 15:30                                       ` Arthur Miller
2024-04-02 16:28                                         ` Eli Zaretskii
2024-04-03 13:09                                           ` Arthur Miller
2024-02-23 14:47 ` Benjamin Riefenstahl
2024-02-23 15:03   ` Benjamin Riefenstahl

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

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

  git send-email \
    --in-reply-to=86cysn1tbr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=arthur.miller@live.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.