Wireshark-dev: Re: [Wireshark-dev] order of include files

From: Evan Huus <eapache@xxxxxxxxx>
Date: Thu, 4 Oct 2012 16:48:24 -0400
On Thu, Oct 4, 2012 at 4:43 PM, Martin Kaiser <lists@xxxxxxxxx> wrote:
> Hi,
>
> should the order in which we include files make any difference?
>
> #include <epan/packet.h>
> #include <epan/expert.h>
> -> ok
>
> #include <epan/expert.h>
> #include <epan/packet.h>
> -> failure
>
> expert.h needs packet_info.h, which is included by packet.h
>
> Trivial fix is of course to include packet_info.h in experts.h.
> Are such issues worth fixing?

Yes, fix them. It saves people unaware of the dependency countless
headaches, and costs basically nothing if everything is properly
guarded with #ifdefs.

Evan