Re: namespace pollution? clone()

2022-08-01 Thread Robert Elz
The test is fixed now. kre

Re: namespace pollution? clone()

2022-08-01 Thread Martin Husemann
On Mon, Aug 01, 2022 at 05:11:53PM +0200, Thomas Klausner wrote: > I don't understand why we expose __clone() in a public header at all, > but I understand your comments to result in the attached patch. It is used in tests:

Re: namespace pollution? clone()

2022-08-01 Thread Thomas Klausner
On Mon, Aug 01, 2022 at 06:06:19PM +0300, Valeriy E. Ushakov wrote: > On Mon, Aug 01, 2022 at 16:50:14 +0200, Thomas Klausner wrote: > > > On Mon, Aug 01, 2022 at 05:45:23PM +0300, Valeriy E. Ushakov wrote: > > > Shouldn't we expose __clone(2) (the real symbol in the reserved > > > namespace)

Re: namespace pollution? clone()

2022-08-01 Thread Valery Ushakov
On Mon, Aug 01, 2022 at 16:50:14 +0200, Thomas Klausner wrote: > On Mon, Aug 01, 2022 at 05:45:23PM +0300, Valeriy E. Ushakov wrote: > > Shouldn't we expose __clone(2) (the real symbol in the reserved > > namespace) under _NETBSD_SOURCE and only hide clone(2) weak alias > > under _GNU_SOURCE?

Re: namespace pollution? clone()

2022-08-01 Thread Thomas Klausner
On Mon, Aug 01, 2022 at 05:45:23PM +0300, Valeriy E. Ushakov wrote: > Shouldn't we expose __clone(2) (the real symbol in the reserved > namespace) under _NETBSD_SOURCE and only hide clone(2) weak alias > under _GNU_SOURCE? You kinda sidestep some potential issues here in > this case b/c __clone

Re: namespace pollution? clone()

2022-08-01 Thread Valery Ushakov
On Mon, Aug 01, 2022 at 15:57:19 +0200, Thomas Klausner wrote: > On Tue, Jul 26, 2022 at 03:03:54PM +0200, Martin Husemann wrote: > > On Tue, Jul 26, 2022 at 03:46:14PM +0300, Valery Ushakov wrote: > > > On Linux clone(2) is declared only for _GNU_SOURCE, which explains why > > > linux doesn't

Re: namespace pollution? clone()

2022-08-01 Thread Rin Okuyama
On 2022/08/01 23:22, Thomas Klausner wrote: On Mon, Aug 01, 2022 at 11:20:11PM +0900, Rin Okuyama wrote: On 2022/08/01 23:13, Martin Husemann wrote: On Mon, Aug 01, 2022 at 03:57:19PM +0200, Thomas Klausner wrote: The attached diff survived a complete amd64-current build. Ok to commit?

Re: namespace pollution? clone()

2022-08-01 Thread Thomas Klausner
On Mon, Aug 01, 2022 at 07:32:26AM -0700, Jason Thorpe wrote: > > > On Aug 1, 2022, at 7:22 AM, Thomas Klausner wrote: > > > > On Mon, Aug 01, 2022 at 11:20:11PM +0900, Rin Okuyama wrote: > >> On 2022/08/01 23:13, Martin Husemann wrote: > >>> On Mon, Aug 01, 2022 at 03:57:19PM +0200, Thomas

Re: namespace pollution? clone()

2022-08-01 Thread Jason Thorpe
> On Aug 1, 2022, at 7:22 AM, Thomas Klausner wrote: > > On Mon, Aug 01, 2022 at 11:20:11PM +0900, Rin Okuyama wrote: >> On 2022/08/01 23:13, Martin Husemann wrote: >>> On Mon, Aug 01, 2022 at 03:57:19PM +0200, Thomas Klausner wrote: The attached diff survived a complete amd64-current

Re: namespace pollution? clone()

2022-08-01 Thread Thomas Klausner
On Mon, Aug 01, 2022 at 11:20:11PM +0900, Rin Okuyama wrote: > On 2022/08/01 23:13, Martin Husemann wrote: > > On Mon, Aug 01, 2022 at 03:57:19PM +0200, Thomas Klausner wrote: > > > The attached diff survived a complete amd64-current build. Ok to commit? > > > > Looks good to me. > > Can you

Re: namespace pollution? clone()

2022-08-01 Thread Rin Okuyama
On 2022/08/01 23:13, Martin Husemann wrote: On Mon, Aug 01, 2022 at 03:57:19PM +0200, Thomas Klausner wrote: The attached diff survived a complete amd64-current build. Ok to commit? Looks good to me. Can you please mention _GNU_SOURCE in clone(2)? Thanks, rin

Re: namespace pollution? clone()

2022-08-01 Thread Martin Husemann
On Mon, Aug 01, 2022 at 03:57:19PM +0200, Thomas Klausner wrote: > The attached diff survived a complete amd64-current build. Ok to commit? Looks good to me. Martin

Re: namespace pollution? clone()

2022-08-01 Thread Thomas Klausner
On Tue, Jul 26, 2022 at 03:03:54PM +0200, Martin Husemann wrote: > On Tue, Jul 26, 2022 at 03:46:14PM +0300, Valery Ushakov wrote: > > On Linux clone(2) is declared only for _GNU_SOURCE, which explains why > > linux doesn't run into the name clash. I gather we should follow > > suit, as that's

Re: namespace pollution? clone()

2022-07-26 Thread Martin Husemann
On Tue, Jul 26, 2022 at 03:46:14PM +0300, Valery Ushakov wrote: > On Linux clone(2) is declared only for _GNU_SOURCE, which explains why > linux doesn't run into the name clash. I gather we should follow > suit, as that's what the apps expect. Yes, that is the right thing to do here, especially

Re: namespace pollution? clone()

2022-07-26 Thread Valery Ushakov
On Tue, Jul 26, 2022 at 13:27:43 +0300, Valery Ushakov wrote: > On Tue, Jul 26, 2022 at 12:00:16 +0200, Thomas Klausner wrote: > > > I wonder why it's visible though, since in sched.h it's protected by > > _NETBSD_SOURCE. > > Re-run that command with -E -dD and without -c and related options

Re: namespace pollution? clone()

2022-07-26 Thread Valery Ushakov
On Tue, Jul 26, 2022 at 12:00:16 +0200, Thomas Klausner wrote: > I wonder why it's visible though, since in sched.h it's protected by > _NETBSD_SOURCE. Re-run that command with -E -dD and without -c and related options -uwe

Re: namespace pollution? clone()

2022-07-26 Thread Thomas Klausner
On Tue, Jul 26, 2022 at 06:11:36AM -0400, Greg Troxel wrote: > So where is the visibility restriction? Oh, that's probably a misunderstanding on my side. Thomas

Re: namespace pollution? clone()

2022-07-26 Thread Greg Troxel
Thomas Klausner writes: > When compiling inkscape I found a weird compilation error that I > traced down to clone() being in the visible namespace. > > https://gitlab.com/inkscape/inbox/-/issues/7378 It's too bad they are expressing 'not supported' to avoid a reasonable change. Normally 'not