Hi, Stefan!
On 12/7/21 12:02, Stefan Puiu wrote:
Notes: glibc uses long long instead of long for tv_nsec in some
architectures:
#if !(__x86_64__ && __ILP32__ /* == x32 */)
long tv_nsec;
#else
long long tv_nsec;
#endif
The #if condition is actually "we're not on x32", so maybe the comment
could say /* != x32 */? Otherwise it looks like the comment
contradicts the code; I know the comment is inside the paranthesis,
and the negation ('!') is outside, but the negation might be easy to
overlook.
Or maybe leave the x32 field size for a note? (E.g. something like
"This is true on almost all arches, but see NOTES", and then under
NOTES specify that "actually, on x32 tv_nsec is long long"). The #if
in the definition doesn't *exactly* match the code anyway.
In the latest version of the patch (unfortunately it's not tagged as
v4), we removed the negation to avoid that problem.
Thanks for reporting it :)
Cheers,
Alex
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/