Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
To: Jon Turney <jon.turney@dronecode.org.uk>
Cc: Tom Tromey <tromey@adacore.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH] Use strwinerror in gdb/windows-nat.c
Date: Tue, 08 Nov 2022 11:24:18 -0700	[thread overview]
Message-ID: <87k045484t.fsf@tromey.com> (raw)
In-Reply-To: <b9448dd9-330c-8603-97d7-6e425fe3f23d@dronecode.org.uk> (Jon Turney's message of "Fri, 4 Nov 2022 14:21:04 +0000")

>>>>> "Jon" == Jon Turney <jon.turney@dronecode.org.uk> writes:

>> I'm checking this in now.

Jon> As is traditional by now, this breaks the Cygwin build.

Sorry about that.  I don't break Cygwin on purpose, but I also don't
have any way to do a test build.

Jon> I'd suggest the attached to fix this, but I don't think this qualifies
Jon> as obvious, since it's not obvious what USE_WIN32API is supposed to 
Jon> mean, so a review would be useful.

I don't fully know either, but this is what gdbsupport/common.m4 says:

  case ${host} in
    *mingw32*)
      AC_DEFINE(USE_WIN32API, 1,
		[Define if we should use the Windows API, instead of the
		 POSIX API.  On Windows, we use the Windows API when
		 building for MinGW, but the POSIX API when building
		 for Cygwin.])
      WIN32APILIBS="-lws2_32"

Jon> Commit 02d04eac "Use strwinerror in gdb/windows-nat.c" also moves
Jon> strwinerror() under the USE_WIN32API conditional, which is not defined
Jon> for Cygwin (and looks like it shouldn't be, as appears to imply
Jon> non-POSIX and MiNGW and WinSock...)

Jon> Also enable the declaration and definition of strwinerror() when
Jon> __CYGWIN__ is defined.

I'm not sure how this area ought to work on Cygwin.  The goal here is to
get a better error message when some Windows API fails.  If Cygwin can
use strwinerror, then this seems fine.  If not, I could write a patch to
stub this out for Cygwin, which would be the status quo ante.

Tom

  reply	other threads:[~2022-11-08 18:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28 17:05 Tom Tromey via Gdb-patches
2022-08-16 13:57 ` Tom Tromey via Gdb-patches
2022-11-04 14:21   ` Jon Turney
2022-11-08 18:24     ` Tom Tromey via Gdb-patches [this message]
2022-11-13 15:14       ` Jon Turney

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=87k045484t.fsf@tromey.com \
    --to=gdb-patches@sourceware.org \
    --cc=jon.turney@dronecode.org.uk \
    --cc=tromey@adacore.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox