[PATCH 08/11] Add stdio atexit handler

Corinna Vinschen vinschen@redhat.com
Wed May 11 16:54:16 GMT 2022


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);
      |         ^~~~~~


Corinna



More information about the Newlib mailing list