This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


* 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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]