bug-inetutils
[Top][All Lists]
Advanced

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

Use gnulib select module.


From: Collin Funk
Subject: Use gnulib select module.
Date: Sun, 26 May 2024 00:21:59 -0700
User-agent: Mozilla Thunderbird

I haven't pushed this patch yet, any comments? The 'select' gnulib
module is mostly for Windows but also fixes one FreeBSD bug [1]. If
any other bugs are found they should be fixed in gnulib. Also I don't
think Windows support is impossible in Inetutils, so this is just one
step that will probably get done anyways.

The patch adds the module and adds the library to programs who use
'select'.

   $ gnulib-tool --extract-link-directive select
    $(SELECT_LIB)

Also, I was having a look at alot of the 'gettimeofday' calls. It is
2024 so I think that it would be nice to support nanosecond-resolution
time. Any thoughts on this idea?

I guess in some situations it doesn't matter, like ping, since ICMP
echo's use milliseconds (RFC 792, page 16-17) [2]. Even then the
'timespec' module has functions to perform arthritic on
struct timespec's. We do the same on struct timeval's but the gnulib
versions are more robust with overflow checking and such [3].

Collin

[1] https://www.gnu.org/software/gnulib/manual/html_node/select.html
[2] https://datatracker.ietf.org/doc/html/rfc792
[3] https://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/timespec.h

Attachment: 0001-Use-gnulib-select-module.patch
Description: Text Data


reply via email to

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