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