Re: fix malfunction of socket functions on HP-UX in 64-bit mode

2018-04-24 Thread Bruno Haible
Tom G. Christensen wrote: > This testcase uses SO_REUSEPORT which is not available everywhere. > > From Solaris 9: > test-getsockname.c: In function 'open_server_socket': > test-getsockname.c:43:30: error: 'SO_REUSEPORT' undeclared (first use in > this function) > setsockopt (s, SOL_SOCKET,

Re: fix malfunction of socket functions on HP-UX in 64-bit mode

2018-04-24 Thread Tom G. Christensen
On 27/01/18 11:17, Bruno Haible wrote: Here's what I'm committing for gnulib: 1) A test case for getsockname() that highlights the problem: It fails on HP-UX in 64-bit mode (but succeeds in 32-bit mode). This testcase uses SO_REUSEPORT which is not available everywhere. From Solaris 9: tes

Re: [PATCH 0/4] Use AF_ALG in checksum utilities

2018-04-24 Thread Dmitry V. Levin
On Tue, Apr 24, 2018 at 03:28:51PM +0200, Bruno Haible wrote: > Hi Matteo, > > > > * As you already noticed, we need to avoid build failures and runtime > > > failures > > > on platforms where this is not supported. > > > > > > > I see "#ifdef __linux__" already in use in gnulibs, I assume

Re: [PATCH 0/4] Use AF_ALG in checksum utilities

2018-04-24 Thread Bruno Haible
Hi Matteo, > > * As you already noticed, we need to avoid build failures and runtime > > failures > > on platforms where this is not supported. > > > > I see "#ifdef __linux__" already in use in gnulibs, I assume this is > the preferred way. Not really. When being compiled on an older Lin

Re: [PATCH 0/4] Use AF_ALG in checksum utilities

2018-04-24 Thread Bruno Haible
Hi Matteo, > If not using an HW crypto engine, the code doesn't have locks, but I > tried it anyway on a quad core machine: > > $ time ./sha1sum 2g.bin > 752ef2367f479e79e4f0cded9c270c2890506ab0 2g.bin > > real0m2.198s > user0m0.000s > sys 0m2.198s > $ for i in {1..4}; do time ./sha

Re: [PATCH 0/4] Use AF_ALG in checksum utilities

2018-04-24 Thread Matteo Croce
On Mon, Apr 23, 2018 at 3:54 PM, Bruno Haible wrote: > A few hints regarding the gnulib coding style: > > * As you already noticed, we need to avoid build failures and runtime > failures > on platforms where this is not supported. > I see "#ifdef __linux__" already in use in gnulibs, I ass

Re: [PATCH 0/4] Use AF_ALG in checksum utilities

2018-04-24 Thread Matteo Croce
On Mon, Apr 23, 2018 at 7:18 PM, Bruno Haible wrote: > Hi Matteo, > >> > * says that on x86 >> > platforms the same functions can be done through CPU instructions. Are >> > these >> > instructions privileged? If not, then what are - for