[PATCH] Fix htonl, htons, ntohl, ntohs functions on big endian systems

Florian Weimer fw@deneb.enyo.de
Sun Jul 31 18:45:00 GMT 2016


* Aurelien Jarno:

> +#  if defined __GNUC__ && __GNUC__ >= 2
> +#   define ntohl(x) \
> +    (__extension__							      \
> +     ({ uint32_t __x = x;						      \

Please use __ntohl_x as the variable name or turn ntohl into a macro
which calls an inline function.  ntohl (__x) looks like something
another header file might do (although the example in gutenprint is
harmless).



More information about the Libc-alpha mailing list