ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Merging wiretap pint macro to wsutil/pint.h

From: Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx>
Date: Thu, 28 Nov 2013 22:39:53 +0100
On Tue, Nov 19, 2013 at 07:15:54PM +0100, Jakub Zawadzki wrote:
> htons(), htonl(), htonll() is kinda easier to write and looks prettier for me than hton16, hton32, hton64().

It seems that such change would get us to have name conflict with <endian.h> (at least on Linux),

../../wsutil/pint.h:154:9: warning: 'htole16' macro redefined
/usr/include/endian.h:64:11: note: previous definition is here

../../wsutil/pint.h:155:9: warning: 'htole32' macro redefined
/usr/include/endian.h:69:11: note: previous definition is here

I can #ifndef it (still man 3 endian.h don't indicate these to be macros), or prepend ws_.

I'm not happy with both.

Kuba.