Wireshark-dev: Re: [Wireshark-dev] stdio.h/stdlib.h includes apparently not req'd in epan/disse
From: John Sullivan <jsethdev@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 16 Oct 2008 23:56:40 +0100
On Thursday, October 16, 2008, 11:41:07 PM, Bill Meier wrote:
> There are about 300+ non-generated epan/dissector source files which 
> include stdio.h and/or stdlib.h

> I've successfully done both a Linux and a Windows build with these 
> includes removed from epan/dissector/...

Under which compiler/glibc?

I recently had to add in <stdio.h> to a bunch of (local-to-me) source
files because I upgraded to the latest Fedora 9 with g++ 4.3.0 and
that seems to believe that NULL is only defined once <stdio.h> is
*explicitly* pulled in.

There were other similar issues with <string.h> and <stdlib.h> and
possibly a couple of others with various functions too.

(My hastily acquired conclusion is that this compiler/libc combination
appears to have some sort of anti-side-effect system so headers which
are included by other headers don't export their incidental symbols
unless the main file includes them explicitly too. I think I approve
of this in principal, if not the retroactive consequences, but one has
to be careful.)

> So, I plan to commit these changes tomorrow (Fri) unless someone 
> indicates a reason that I shouldn't.

Random *local* include files I would whole heartedly agree, but not
system ones unless you have tested on every single current and
historical system variant.

John
-- 
Dead stars still burn