Re: [PATCH] Make more of stdlib.h visible if _NETBSD_SOURCE isn't defined

2020-08-30 Thread maya
On Mon, Aug 31, 2020 at 12:38:57AM +, Taylor R Campbell wrote: > > Date: Mon, 31 Aug 2020 00:25:52 + > > From: m...@netbsd.org > > > > The following script fails to compile, it shouldn't. > > > > #!/bin/sh > > > > cat << EOF > test.c > > #include > > #include > > > > void f1(void) >

Re: [PATCH] Make more of stdlib.h visible if _NETBSD_SOURCE isn't defined

2020-08-30 Thread Taylor R Campbell
> Date: Mon, 31 Aug 2020 00:25:52 + > From: m...@netbsd.org > > The following script fails to compile, it shouldn't. > > #!/bin/sh > > cat << EOF > test.c > #include > #include > > void f1(void) > { > puts("pushed first"); > fflush(stdout); > } > > void f2(void) > { > puts(

Re: [PATCH] Make more of stdlib.h visible if _NETBSD_SOURCE isn't defined

2020-08-30 Thread maya
On Sun, Aug 30, 2020 at 07:50:59PM +0200, Joerg Sonnenberger wrote: > On Sun, Aug 30, 2020 at 05:18:43PM +, m...@netbsd.org wrote: > > On Sun, Aug 30, 2020 at 06:09:47PM +0200, Joerg Sonnenberger wrote: > > > On Sun, Aug 30, 2020 at 12:00:33PM +, co...@sdf.org wrote: > > > > Move the big "i

Re: [PATCH] Make more of stdlib.h visible if _NETBSD_SOURCE isn't defined

2020-08-30 Thread Joerg Sonnenberger
On Sun, Aug 30, 2020 at 05:18:43PM +, m...@netbsd.org wrote: > On Sun, Aug 30, 2020 at 06:09:47PM +0200, Joerg Sonnenberger wrote: > > On Sun, Aug 30, 2020 at 12:00:33PM +, co...@sdf.org wrote: > > > Move the big "if _NETBSD_SOURCE" chunk to the "Implementation defined" > > > section. > >

Re: [PATCH] Make more of stdlib.h visible if _NETBSD_SOURCE isn't defined

2020-08-30 Thread maya
On Sun, Aug 30, 2020 at 06:09:47PM +0200, Joerg Sonnenberger wrote: > On Sun, Aug 30, 2020 at 12:00:33PM +, co...@sdf.org wrote: > > Move the big "if _NETBSD_SOURCE" chunk to the "Implementation defined" > > section. > > Makes "at_quick_exit" and others visible for strict C/C++. > > alloca is

Re: [PATCH] Make more of stdlib.h visible if _NETBSD_SOURCE isn't defined

2020-08-30 Thread Joerg Sonnenberger
On Sun, Aug 30, 2020 at 12:00:33PM +, co...@sdf.org wrote: > Move the big "if _NETBSD_SOURCE" chunk to the "Implementation defined" > section. > Makes "at_quick_exit" and others visible for strict C/C++. alloca is not part of POSIX. Joerg

[PATCH] Make more of stdlib.h visible if _NETBSD_SOURCE isn't defined

2020-08-30 Thread coypu
... This is some progress towards the previous patch being viable, however I'll have to patch libstdc++ and a bunch of other things, too. Move the big "if _NETBSD_SOURCE" chunk to the "Implementation defined" section. Makes "at_quick_exit" and others visible for strict C/C++. Index: stdlib

Re: [PATCH] Avoid defining _NETBSD_SOURCE for strict C++

2020-08-30 Thread coypu
On Sun, Aug 30, 2020 at 10:42:14AM +, co...@sdf.org wrote: > _NETBSD_SOURCE defines some extra functions, which may use reserved > names. The following patch avoids this problem. > > OK? I immediately regret my decision. Things are very broken this way.

[PATCH] Avoid defining _NETBSD_SOURCE for strict C++

2020-08-30 Thread coypu
_NETBSD_SOURCE defines some extra functions, which may use reserved names. The following patch avoids this problem. OK? Index: sys/featuretest.h === RCS file: /cvsroot/src/sys/sys/featuretest.h,v retrieving revision 1.10 diff -u -r