Re: epoll

2021-01-27 Thread maya
On Mon, Jan 25, 2021 at 04:52:04PM +0100, r0ller wrote: > Hi All, > > I tried to wrap in the linux syscalls an epoll implementation that seems to > support NetBSD-9.1 > > https://github.com/jiixyj/epoll-shim > > but as I've never done such a thing before, it failed of course. > > First, I cop

Re: [9.1 AMD64 gcc] How to distinguish between AMD64 and I386 from C code?

2021-01-27 Thread Jeffrey Walton
On Wed, Jan 27, 2021 at 8:13 AM Martin Husemann wrote: > > On Wed, Jan 27, 2021 at 04:07:09PM +0300, Lord Vader wrote: > > Hi! > > > > On different linuxes with gcc 8.x and 9.x there is __WORDSIZE, that is > > either 32 or 64 depending on the architecture. > > The classic test is #ifdef _LP64 > >

Re: [9.1 AMD64 gcc] How to distinguish between AMD64 and I386 from C code?

2021-01-27 Thread Martin Husemann
On Wed, Jan 27, 2021 at 04:07:09PM +0300, Lord Vader wrote: > Hi! > > On different linuxes with gcc 8.x and 9.x there is __WORDSIZE, that is > either 32 or 64 depending on the architecture. The classic test is #ifdef _LP64 You can check (assuming you are on amd64) with something like: c

[9.1 AMD64 gcc] How to distinguish between AMD64 and I386 from C code?

2021-01-27 Thread Lord Vader
Hi! On different linuxes with gcc 8.x and 9.x there is __WORDSIZE, that is either 32 or 64 depending on the architecture. Here I have: === $ uname -a NetBSD amd64bsd9 9.1 NetBSD 9.1 (GENERIC) #0: Sun Oct 18 19:24:30 UTC 2020 mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC amd