From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id E89F8385782C for ; Tue, 8 Jun 2021 02:32:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E89F8385782C Received: from fencepost.gnu.org ([2001:470:142:3::e]:44082) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqRXd-0004Vc-D3; Mon, 07 Jun 2021 22:32:33 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2213 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqRXc-0000RE-Uo; Mon, 07 Jun 2021 22:32:33 -0400 Date: Tue, 08 Jun 2021 05:32:15 +0300 Message-Id: <83im2pf5n4.fsf@gnu.org> From: Eli Zaretskii To: Mike Frysinger Cc: tom@tromey.com, gdb-patches@sourceware.org In-Reply-To: (message from Mike Frysinger on Mon, 7 Jun 2021 21:15:36 -0400) Subject: Re: [PATCH 1/4] gnulib: import chown References: <20210529172510.16285-1-vapier@gentoo.org> <87k0n5n47d.fsf@tromey.com> <83sg1tg2zp.fsf@gnu.org> X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Tue, 08 Jun 2021 02:32:44 -0000 > 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? 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.