public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Youling Tang <tangyouling@loongson.cn>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdbsupport: Remove some unnecessary ifdef HAVE_POLL judgments
Date: Fri, 13 May 2022 10:28:46 +0100	[thread overview]
Message-ID: <634dfd3e-dca9-3c5a-cf63-2a86ca23e40e@palves.net> (raw)
In-Reply-To: <20220513074905.21554-1-tangyouling@loongson.cn>

On 2022-05-13 08:49, Youling Tang wrote:
> By searching event-loop.cc we found that there are only the following 2
> places to assign values to use_poll,
> $ grep -nr use_poll gdbsupport/event-loop.cc
>   88:static unsigned char use_poll = USE_POLL;
>   263:	use_poll = 0;
> 
> This USE_POLL is defined as follows,
>  #ifdef HAVE_POLL
>  #define USE_POLL 1
>  #else
>  #define USE_POLL 0
>  #endif
> 
> So use_poll may be 1 only if HAVE_POLL is defined. Removed "ifdef
> HAVE_POLL" judgment in use_poll control block.
> 
> Signed-off-by: Youling Tang <tangyouling@loongson.cn>

Maybe I'm missing something, but ISTM this can't possible work on hosts that don'
 have poll at all.  Like e.g., mingw:

 $ grep POLL *
 config.h:/* #undef HAVE_POLL */
 config.h:/* #undef HAVE_POLL_H */
 config.h:/* #undef HAVE_SYS_POLL_H */

Surely they'll fail to compile after the patch?

  reply	other threads:[~2022-05-13  9:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13  7:49 Youling Tang
2022-05-13  9:28 ` Pedro Alves [this message]
2022-05-13 10:09   ` Youling Tang
2022-05-13 10:21     ` Pedro Alves
2022-05-14  1:14       ` Youling Tang
2022-05-16  9:31         ` [PATCH] gdbsupport/even-loop.cc: simplify !HAVE_POLL paths Pedro Alves
2022-05-16 12:13           ` Youling Tang
2022-05-16 15:24           ` Tom Tromey
2022-05-16 19:01             ` [ob/pushed] Reindent gdbsupport/event-loop.cc:handle_file_event (Re: [PATCH] gdbsupport/even-loop.cc: simplify !HAVE_POLL paths) Pedro Alves

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=634dfd3e-dca9-3c5a-cf63-2a86ca23e40e@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=tangyouling@loongson.cn \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).