Fw: [PATCH 03/14] Add _REENT_ERRNO(ptr)

Sebastian Huber sebastian.huber@embedded-brains.de
Thu Jun 23 10:55:27 GMT 2022


On 21/06/2022 16:41, C Howland wrote:
>>
>> ------------------------------
>> *From:* Newlib<newlib-bounces+craig.howland=caci.com@sourceware.org>  on
>> behalf of Sebastian Huber<sebastian.huber@embedded-brains.de>
>> *Sent:* Tuesday, June 21, 2022 8:49 AM
>> *To:*newlib@sourceware.org  <newlib@sourceware.org>
>> *Subject:* [PATCH 03/14] Add _REENT_ERRNO(ptr)
>>
>>
>>
>> From: Matt Joyce<matthew.joyce@embedded-brains.de>
>>
>> Add a _REENT_ERRNO() macro to encapsulate the access to the
>> _errno member of struct reent. This will help to replace the
>> structure member with a thread-local storage object in a follow
>> up patch.
>> ---
>>
> There already exists an __errno_r() macro that does the very same function
> (defined in sys/errno.h).  (Its use, however, is limited, only being used
> in files under iconv/lib.)  Having the same thing done both ways probably
> doesn't make sense.  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.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the Newlib mailing list