From 58d7a46ccb397e4b95aab703bec0f212c5559fa6 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sun, 9 May 2021 23:39:23 +0200 Subject: [PATCH] bswap.3: bswap_*() are implemented using functions See in glibc. These macros call functions of the form __bswap_N(), which use uintN_t. Even though 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 due to the underlying functions, so it's better to document these as the underlying functions, specifying the types. Signed-off-by: Alejandro Colomar Signed-off-by: Michael Kerrisk --- 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 .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.