From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62182 invoked by alias); 28 Oct 2018 16:20:34 -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 62171 invoked by uid 89); 28 Oct 2018 16:20:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=GDBSERVER, HTo:D*au, H*Ad:D*ca, guards X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 28 Oct 2018 16:20:32 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id EB29E1E4C2; Sun, 28 Oct 2018 12:20:28 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=simark.ca; s=mail; t=1540743630; bh=XYzlD8WmF7NlY9/OkubWtwwkccADlnkXvlP3zXMS5tY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=NvSgAPAV8fyYhnMR3pIiVsWDZXtQqQfDVxkROjF+GSeC6kiZA2sdDP+9sj+NQ7fy4 oCl/Cogk9IsndmCuEywNLxnvVKjLuZGz20+XW/JJCje1TWWaWRlrxTVOiCuYwb6yKm T2yT3VBmOTCdMLkiZIJOH/wNbAQTyJCW5EE8AaUE= Subject: Re: [PATCH 1/4] GDBSERVER: Listen on a unix domain (instead of TCP) socket if requested. To: Sergio Durigan Junior , John Darrington Cc: gdb-patches@sourceware.org References: <20181013175801.2670-1-john@darrington.wattle.id.au> <87a7nbxb2v.fsf@redhat.com> <20181019185548.izouwatbcjwnrs2a@jocasta.intra> <877eidwwlz.fsf@redhat.com> From: Simon Marchi Message-ID: Date: Sun, 28 Oct 2018 16:20:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <877eidwwlz.fsf@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-10/txt/msg00674.txt.bz2 On 2018-10-19 3:43 p.m., Sergio Durigan Junior wrote: > 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, > I just tried compiling with mingw and stumbled on this: CXX common/netstuff.o /home/simark/src/binutils-gdb/gdb/common/netstuff.c: In function ‘parsed_connection_spec parse_connection_spec(const char*, addrinfo*)’: /home/simark/src/binutils-gdb/gdb/common/netstuff.c:148:18: error: ‘AF_LOCAL’ was not declared in this scope { "unix:", AF_LOCAL, SOCK_STREAM }, ^~~~~~~~ What is the status on this? Simon