From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 836891F619 for ; Sun, 23 Feb 2020 10:58:58 +0000 (UTC) Received: from localhost ([::1]:51608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5oyP-0001xv-1h for normalperson@yhbt.net; Sun, 23 Feb 2020 05:58:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57082) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5oyK-0001xh-6m for bug-gnulib@gnu.org; Sun, 23 Feb 2020 05:58:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j5oyJ-0001xX-4m for bug-gnulib@gnu.org; Sun, 23 Feb 2020 05:58:52 -0500 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::3]:26542) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j5oyI-0001w7-Fp for bug-gnulib@gnu.org; Sun, 23 Feb 2020 05:58:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1582455527; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=/2Ab1ipBDlHNlMwSXYyB2RPVyp7ExLmPfFKCxtev/x8=; b=cwRUQtoTqoqtremAE36bScSEg7TUYd40LSxtl9CZ9PtQIwfvMLcIjhTAc5WRlbaDuS yih3JxAvB2SscOBes43iwJv3mJgyqnEmi0hXxRGtlpa5ytPpWb+ARhBw22IjGkVj1khg kTXf2L07owyAGQy77+D5BoZ9Crad0eN43POorHRZGD1+CjMwzuOIT3KZes+dxE5IiLTT NoGxXQKbJepBs8GpqzswhSm2738l4kqFIwTmdEmjFALO+CNHRo9T73dphtt+fb5KF4w8 4rXf0TDsEV8CeUKreNyJBTo4xTZqNuhkGpzznYcY230+9gV6J49ARCHtTC1s0adUMS2d sAKQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOH6fzxfs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 46.1.12 DYNA|AUTH) with ESMTPSA id g00701w1NAwjhRy (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sun, 23 Feb 2020 11:58:45 +0100 (CET) From: Bruno Haible To: Paul Eggert Subject: Re: [PATCH] fchmodat, lchmod: port to buggy Linux filesystems Date: Sun, 23 Feb 2020 11:58:45 +0100 Message-ID: <2690728.gVUGnRkd8D@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <9cfa2499-f466-065f-4f32-7f68523bde91@cs.ucla.edu> References: <20200213184209.34020-1-eggert@cs.ucla.edu> <2681568.EWPfcCKDUL@omega> <9cfa2499-f466-065f-4f32-7f68523bde91@cs.ucla.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::3 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi Paul, > found that I had trouble reading the code That's probably because I prefer the "one code for each platform" approach when suitable - because when debugging problems I don't like to rely to $CC ... -E file.c > file.i to tell me which code is actually enabled -, whereas you seem to prefer a "global minimum of lines" approach. It's understandable that I find your code hard to understand and vice versa. I'm not saying that one is better than the other; just trying to explain why we find each other's code odd here. > Instead of making it more complicated still I snipped away everything I > couldn't figure out the need for, and installed the attached. > > Perhaps I went too far and some of the complications need to be brought back, > but I hope not.... The fchmodat part looks right. On the other hand, the lchmod part looks wrong: You stripped away the test $REPLACE_LCHMOD = 1 case. However, the file doc/glibc-functions/lchmod.texi still says Portability problems fixed by Gnulib: @itemize ... @item This function always fails with @code{errno} set to @code{ENOSYS}, even when the file is not a symbolic link: GNU/Linux with glibc 2.31. Overriding the system's lchmod function requires the case REPLACE_LCHMOD=1. Bruno