From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 8CA913857376 for ; Tue, 12 Jul 2022 18:25:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8CA913857376 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657650323; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=EyBsFzeEwqAAYnz3bTIAM5ijK1afMBmUhBGScMTXzII=; b=cuhec66rwWlXz1LZVBSXt1pL490hrnVLiehMfSN3QANuSbgUqpt5D8iIbWgVi8DC8Wj/UM jm9dh/fqSdu3reP2kv52WdnV2zHQEp2GkOboAVbsjVYkVt+NdqSatvnJjJzS7IPePRB6F4 ayl9qxX7XPaB66KeKad3LZoAWLt3qIE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-434-RYcV92IwO9-hsuJKrL4sqQ-1; Tue, 12 Jul 2022 14:25:22 -0400 X-MC-Unique: RYcV92IwO9-hsuJKrL4sqQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F1B043C2F761 for ; Tue, 12 Jul 2022 18:25:21 +0000 (UTC) Received: from calimero.vinschen.de (unknown [10.39.193.50]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CE7CD2166B26 for ; Tue, 12 Jul 2022 18:25:21 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 4DBB9A80772; Tue, 12 Jul 2022 20:25:20 +0200 (CEST) Date: Tue, 12 Jul 2022 20:25:20 +0200 From: Corinna Vinschen To: newlib@sourceware.org Subject: Re: Fw: [PATCH 03/14] Add _REENT_ERRNO(ptr) Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org References: <20220621124931.36450-1-sebastian.huber@embedded-brains.de> <20220621124931.36450-4-sebastian.huber@embedded-brains.de> <29672b0c-34bf-6015-ea8d-9fb8c3c09f2e@embedded-brains.de> MIME-Version: 1.0 In-Reply-To: <29672b0c-34bf-6015-ea8d-9fb8c3c09f2e@embedded-brains.de> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=vinschen@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2022 18:25:24 -0000 On Jul 12 18:38, Sebastian Huber wrote: > On 12/07/2022 18:11, Corinna Vinschen wrote: > > On Jun 23 12:55, Sebastian Huber wrote: > > > On 21/06/2022 16:41, C Howland wrote: > > > > The new name is more consistent with the rest of the > > > > things being done, while the old name is established and errno is a more > > > > specialized case. It probably would be a good idea to either > > > > 1) use __errno_r() instead of creating _REENT_ERRNO() or > > > > 2) replace __errno_r() with _REENT_ERRNO() as part of adding the latter. > > > I would not remove an existing macro, so option 1) would be preferred by me. > > Really? Your followup patches introduce a lot of new _REENT_foo macros, > > so defining one of them with a different name doesn't make a lot of sense, > > does it? > > There are lots of *_r() functions (for example _strdup_r()) so I assumed > that this __errno_r() might be used outside of Newlib. > > > > > Either all these macros should be called __foo_r(), or __errno_r() should > > actually be removed or at least be defined in terms of _REENT_errno(), > > if you really think we should keep it. > > The original patch defined __errno_r() like this: > > #define __errno_r(ptr) _REENT_ERRNO(ptr) > > I think naming of the new _REENT_*() macros is quite consistent with the > stuff we already have in . > > > Given that it's used only in > > iconv/lib kind of shows that it was never meant for consumption outside > > newlib anyway, isn't it? > > What about renaming the existing __errno_r() uses in Newlib to > _REENT_ERRNO() with a definition of __errno_r() in for > potential users outside of Newlib? Sounds good to me. Corinna