From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ksO1OtXuvmATUwAAWB0awg (envelope-from ) for ; Tue, 08 Jun 2021 00:15:17 -0400 Received: by simark.ca (Postfix, from userid 112) id D8E8A1F163; Tue, 8 Jun 2021 00:15:17 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 07B1A1E01F for ; Tue, 8 Jun 2021 00:15:17 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 42B613945C08 for ; Tue, 8 Jun 2021 04:15:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42B613945C08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623125716; bh=f/HVVs9JnN53qsuMq6/hnK22gtvPQlMN2QiQ+zHRX+g=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=eDF4ar9iteWcs1eCubfKogNhTyoGrVJcSal+7tsNDwGsgT6FP1xR4Yhn8dq0pW5VH dPosIGV9YAozKf/xxG0c+4NMgTiHoFxKyjnimiKuTD00MDweMEDcvj4j3vH5HTZp7b Mrmp4hGmqrxof/JrV41ENQ+cwOgASfOrFJ2Jncpk= Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id DFB21385780A for ; Tue, 8 Jun 2021 04:14:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DFB21385780A Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D4D51340DA8; Tue, 8 Jun 2021 04:14:37 +0000 (UTC) Date: Tue, 8 Jun 2021 00:14:37 -0400 To: Eli Zaretskii Subject: Re: [PATCH 1/4] gnulib: import chown Message-ID: Mail-Followup-To: Eli Zaretskii , tom@tromey.com, gdb-patches@sourceware.org References: <20210529172510.16285-1-vapier@gentoo.org> <87k0n5n47d.fsf@tromey.com> <83sg1tg2zp.fsf@gnu.org> <83im2pf5n4.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <83im2pf5n4.fsf@gnu.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: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: tom@tromey.com, gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 08 Jun 2021 05:32, Eli Zaretskii wrote: > > Date: Mon, 7 Jun 2021 21:15:36 -0400 > > From: Mike Frysinger > > Cc: Tom Tromey , gdb-patches@sourceware.org > > > > > AFAICT, the Gnulib emulation always returns a failure status in the > > > MinGW port, is that okay for the callers of chown? Perhaps a better > > > alternative is to silently do nothing on MS-Windows? > > > > the calling code can decide how to handle this. using gnulib is still better > > so we don't have to put _WIN32/__MINGW32__/whatever ifdefs everywhere. > > Sure, but won't the calling code need those same #ifdef's you want to > avoid? no, because chown will fail with ENOSYS, and the caller can choose to ignore those instead. > My point is that chown on Windows is largely a no-op, so most callers > will want to silently do nothing rather than always fail. i get that. my point is that we suffer from #ifdef hell and gnulib is providing a way out. the answer isn't to dive right back in. -mike