From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by sourceware.org (Postfix) with ESMTPS id AE19D383E822 for ; Fri, 13 May 2022 09:28:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AE19D383E822 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f41.google.com with SMTP id a5so6808094wrp.7 for ; Fri, 13 May 2022 02:28:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=5KVBgVC2IP/CyPvFWdHhQUxBIbrESLVIwN4OINS0UOU=; b=7TNhwk5ucMst3ZsmQZPEfqdWXSskpzAm4XYMrlmrJhhxLLdnoKVFYiCYdTyyIEiboX /grEL+bdgh2Oj/thy7+1YqKmDO6OsOJmLmKyDWOZdgfB7BLw1lIri2QPUsf1Xl8ta4GV 65zk78diFmLP8P7kouXJ0BK6Szn7B/NKxF/c9ila4QWWpbc0xd3bS3O7YD0NIXmWXiYQ vGjTKyF0niyp8ugQhxPYX/iVdKmPM9t9XSENfGI0umeVYp8Pjx1YsuBcZIGW/ardjX1q CLFtO2nUswl8HmABtyVWwM81J+IOL3OB6Flr7A3nkxDmpZXnLd/AypeCM5e5JAscwC3N +z3A== X-Gm-Message-State: AOAM532kSA4vb7UkklykYU9JKUGOhaO8Ks1YDtAjXFzB9INX4JstcgEn dy/SZx48L29aYCcxUHslG9wVzueJSwE= X-Google-Smtp-Source: ABdhPJzFweseoBDEezSNcyqTafcRZj/OBvlC9Q+y/FQNHjBkCUFbdTXz2bZH9LC2XKnyDdC/gMQdlQ== X-Received: by 2002:a5d:5888:0:b0:20c:d66e:a637 with SMTP id n8-20020a5d5888000000b0020cd66ea637mr3201311wrf.215.1652434128508; Fri, 13 May 2022 02:28:48 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id r21-20020adfb1d5000000b0020c5253d924sm1614016wra.112.2022.05.13.02.28.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 May 2022 02:28:47 -0700 (PDT) Message-ID: <634dfd3e-dca9-3c5a-cf63-2a86ca23e40e@palves.net> Date: Fri, 13 May 2022 10:28:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] gdbsupport: Remove some unnecessary ifdef HAVE_POLL judgments Content-Language: en-US To: Youling Tang , gdb-patches@sourceware.org References: <20220513074905.21554-1-tangyouling@loongson.cn> From: Pedro Alves In-Reply-To: <20220513074905.21554-1-tangyouling@loongson.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2022 09:28:51 -0000 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 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?