From e9bdcd811a842a8e39c5796f83fcae42e7082d9b Mon Sep 17 00:00:00 2001 From: dmiller Date: Tue, 30 Jun 2015 18:34:28 +0000 Subject: [PATCH] Strip tcpip.h of some unnecessary includes --- osscan2.h | 2 ++ scan_engine.h | 2 ++ tcpip.cc | 14 ++------- tcpip.h | 87 --------------------------------------------------- 4 files changed, 6 insertions(+), 99 deletions(-) diff --git a/osscan2.h b/osscan2.h index a216ad9a2..2d6b1b8fb 100644 --- a/osscan2.h +++ b/osscan2.h @@ -128,6 +128,8 @@ #define OSSCAN2_H #include "nbase.h" +#include + #include #include #include "timing.h" diff --git a/scan_engine.h b/scan_engine.h index 21fa90516..30851812e 100644 --- a/scan_engine.h +++ b/scan_engine.h @@ -129,6 +129,8 @@ #include "nmap.h" /* stype */ +#include + #include "timing.h" #include "tcpip.h" #include diff --git a/tcpip.cc b/tcpip.cc index 51305ac5c..71b030e77 100644 --- a/tcpip.cc +++ b/tcpip.cc @@ -123,9 +123,8 @@ ***************************************************************************/ /* $Id$ */ -#ifdef WIN32 -#include "nmap_winconfig.h" -#endif + +#include "nmap.h" #include "nbase.h" #include "portreasons.h" @@ -138,15 +137,6 @@ #include "struct_ip.h" -#if HAVE_SYS_TIME_H -#include -#endif - -#if HAVE_UNISTD_H -/* #include */ -#include -#endif - #if HAVE_NETINET_IF_ETHER_H #ifndef NETINET_IF_ETHER_H #include diff --git a/tcpip.h b/tcpip.h index ef67e7b93..9b283a425 100644 --- a/tcpip.h +++ b/tcpip.h @@ -128,96 +128,9 @@ #ifndef TCPIP_H #define TCPIP_H -#ifdef HAVE_CONFIG_H -#include "nmap_config.h" -#endif - #include "nbase.h" -#ifdef WIN32 -#include "mswin32\winclude.h" -#else - -#ifdef STDC_HEADERS -#include -#else -void *malloc(); -void *realloc(); -#endif - -#if STDC_HEADERS || HAVE_STRING_H -#include -#if !STDC_HEADERS && HAVE_MEMORY_H -#include -#endif -#endif -#if HAVE_STRINGS_H -#include -#endif - -#ifdef HAVE_BSTRING_H -#include -#endif - -#include -#include - -#ifdef HAVE_SYS_PARAM_H -#include /* Defines MAXHOSTNAMELEN on BSD*/ -#endif - -#if HAVE_NETINET_IN_H -#include -#endif - -#ifdef HAVE_RPC_TYPES_H -#include -#endif - -#ifdef HAVE_NETDB_H -#include -#endif - -#if HAVE_SYS_SOCKET_H -#include -#endif - -#include -#if HAVE_UNISTD_H -#include -#endif -#include - -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -#include - -#ifdef __cplusplus -extern "C" { -#endif #include -#ifdef __cplusplus -} -#endif - -#if HAVE_SYS_SOCKIO_H -#include /* SIOCGIFCONF for Solaris */ -#endif -#endif /* WIN32 */ - -#include -#include -#include -#include class Target;