bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/4] sha1sum: use AF_ALG when available


From: Paul Eggert
Subject: Re: [PATCH v2 1/4] sha1sum: use AF_ALG when available
Date: Thu, 26 Apr 2018 09:31:40 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 04/26/2018 09:02 AM, Matteo Croce wrote:
I assume that C99 is safe to use in gnulib, good to know

Yes. Until recently we did require C89 in Gnulib because Awk still wanted C89. However, that last holdout has finally given up the ghost so C99isms are OK if they are portable in practice. I noticed some other C99isms in your patch so I assumed you didn't mind C99 either.

I can't find a definition for S_TYPEISTMO in my compiler
headers (gcc 7.3.1). Is it for a typed memory object?
Anyway, the size must be known in advance to use sendfile, is the cas
for SHM and STMO?

Yes, S_TYPEISTMO is defined by POSIX and st_size is required to work for it too. See <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html>. It's not in GNU/Linux (it's intended for real-time use which is not Linux's forte; a quick Google search suggests that it is supported by QNX) but presumably it would work if added, and in the meantime Gnulib defines a substitute S_TYPEISTMO that is always zero so your code should compile and run the same as if you didn't use it.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]