[PATCH 08/11] Add stdio atexit handler

Sebastian Huber sebastian.huber@embedded-brains.de
Wed May 11 17:51:07 GMT 2022


On 11/05/2022 18:54, Corinna Vinschen wrote:
> On May 11 17:23, Corinna Vinschen wrote:
>> On May 10 10:09, Matthew Joyce wrote:
>>> From: Matt Joyce<matthew.joyce@embedded-brains.de>
>>>
>>> Add a dedicated stdio atexit handler to avoid using _GLOBAL_REENT in exit().
>> The idea is ok, I would just prefer to use another name. The reason is
>> that an unsuspecting user could assume that this function actually gets
>> added to the atexit functions. What about stdio_exit_handler()?
> Btw., this produces a build problem in Cygwin:
> 
> winsup/cygwin/signal.cc:179:1: error: conflicting declaration of C function ‘unsigned int usleep(useconds_t)’
>    179 | usleep (useconds_t useconds)
>        | ^~~~~~
> In file included from libc/include/unistd.h:4,
>                   from winsup/cygwin/../../newlib/libc/stdio/local.h:29,
>                   from winsup/cygwin/signal.cc:25:
> libc/include/sys/unistd.h:240:9: note: previous declaration ‘int usleep(useconds_t)’
>    240 | int     usleep (useconds_t __useconds);
>        |         ^~~~~~

Should this be fixed in signal.cc? usleep() should return int.

-- 
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