Hi ALex, On 5/10/21 9:39 AM, Alejandro Colomar wrote: > See <bits/byteswap.h> in glibc. > These macros call functions of the form __bswap_N(), > which use uintN_t. > > Eventhough it's true that they are macros, > it's transparent to the user. > > The user will see their results casted to unsigned types > after the conversion do to the underlying functions, ^do^due > so it's better to document these as the underlying functions, > specifying the types. > > Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx> Applied. Thanks! (Typo in commit message fixed.) Cheers, Michael > --- > man3/bswap.3 | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/man3/bswap.3 b/man3/bswap.3 > index 937ef0416..369daa411 100644 > --- a/man3/bswap.3 > +++ b/man3/bswap.3 > @@ -29,19 +29,19 @@ bswap_16, bswap_32, bswap_64 \- reverse order of bytes > .nf > .B #include <byteswap.h> > .PP > -.BI bswap_16( x ); > -.BI bswap_32( x ); > -.BI bswap_64( x ); > +.BI "uint16_t bswap_16(uint16_t " x ); > +.BI "uint32_t bswap_32(uint32_t " x ); > +.BI "uint64_t bswap_64(uint64_t " x ); > .fi > .SH DESCRIPTION > -These macros return a value in which the order of the bytes > +These functions return a value in which the order of the bytes > in their 2-, 4-, or 8-byte arguments is reversed. > .SH RETURN VALUE > -These macros return the value of their argument with the bytes reversed. > +These functions return the value of their argument with the bytes reversed. > .SH ERRORS > -These macros always succeed. > +These functions always succeed. > .SH CONFORMING TO > -These macros are GNU extensions. > +These functions are GNU extensions. > .SH EXAMPLES > The program below swaps the bytes of the 8-byte integer supplied as > its command-line argument. > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/