Ethereal-dev: Re: [Ethereal-dev] Removal of unneeded includes

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Fri, 12 Jul 2002 02:27:25 +0200
On Tue, Jul 09, 2002 at 06:51:51PM -0700, Guy Harris wrote:
> <netinet/in.h> is, I think, needed, on at least some platforms, to get
> ntohs/ntohl/htons/htonl declared (or defined, on platforms where they're
> do-nothing macros or otherwise inlined).

OK, I've just noticed that glib.h seems to contain equivalent macros, so
maybe I will have a closer look and replace the netinet/in.h ones by the
glib ones and then remove netinet.in. Depends on time and lack of negative
feedback :)

> <sys/types.h> could perhaps be removed from more files if we got rid of
> "u_char", "u_short", "u_int", and "u_long".  If, for a given item, all
> that matters is the unsignedness of the type (and the reduction in the
> number of characters in the name), "guchar", "gushort", "guint", and
> "gulong" could be used; if a precise size in bytes is desired, "guint8",
> "guint16", and "guint32" can be used.

I have just done that and will send it in a separate patch.

> (That might also remove the need to include <winsock2.h> in many cases.)

I've left them in as I'm not sure this is the only thing it is needed for
and as I can't test compilation on/for windows.

  Ciao
         Jörg
--
Joerg Mayer                                          <jmayer@xxxxxxxxx>
I found out that "pro" means "instead of" (as in proconsul). Now I know
what proactive means.