From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14404 invoked by alias); 19 Oct 2018 19:43:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 14391 invoked by uid 89); 19 Oct 2018 19:43:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=237A, 7628, 0287, 31F4 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Oct 2018 19:43:38 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6782D90925; Fri, 19 Oct 2018 19:43:37 +0000 (UTC) Received: from localhost (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3BA2260851; Fri, 19 Oct 2018 19:43:37 +0000 (UTC) From: Sergio Durigan Junior To: John Darrington Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/4] GDBSERVER: Listen on a unix domain (instead of TCP) socket if requested. References: <20181013175801.2670-1-john@darrington.wattle.id.au> <87a7nbxb2v.fsf@redhat.com> <20181019185548.izouwatbcjwnrs2a@jocasta.intra> Date: Fri, 19 Oct 2018 19:43:00 -0000 In-Reply-To: <20181019185548.izouwatbcjwnrs2a@jocasta.intra> (John Darrington's message of "Fri, 19 Oct 2018 20:55:48 +0200") Message-ID: <877eidwwlz.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00438.txt.bz2 On Friday, October 19 2018, John Darrington wrote: > On Thu, Oct 18, 2018 at 04:18:48PM -0400, Sergio Durigan Junior wrote: > > > + bool is_unix = hint->ai_family == AF_UNIX; > > No need for a newline between the declarations of is_ipv6 and is_unix. > > Here, and everywhere else, AF_UNIX may be undefined if building GDB on a > non-UNIX environment. I'm afraid you may have to guard this code with > "HAVE_SYS_UN_H". > > > This is true. But a quick experiment showed me that there are quite a > few other places in gdb which has this problem. Which places? There are some files that are not compiled on certain systems, so it's fine to have system-dependent code without the guards. I don't use proprietary OSes, so the way I test here is to compile GDB using a mingw compiler. If it passes, then I assume things are OK. Your patch, for example, broke the compilation (because of AF_UNIX/AF_LOCAL). Cheers, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/