mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
header file cleanup
see http://seclists.org/nmap-dev/2013/q4/168 Move some includes out of nmap.h: nmap.h gets included lots of places, and unconditionally included math.h, ctype.h, errno.h, stdio.h, sys/stat.h, fcntl.h, sys/types.h, and stdarg.h. This commit moves those includes into the .cc files where they are necessary and out of nmap.h Remove redundant include global_structures.h, included from nmap.h Removed redundant code included from nmap.h Removing #include nbase.h when nmap.h is included (redundant) Remove duplicate #include lines Add ifndef guards to a few .h files
This commit is contained in:
12
nmap.h
12
nmap.h
@@ -173,9 +173,6 @@ void *realloc();
|
||||
#include <bstring.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef WIN32 /* from nmapNT -- seems to work */
|
||||
#include <sys/wait.h>
|
||||
#endif /* !WIN32 */
|
||||
@@ -184,8 +181,6 @@ void *realloc();
|
||||
#include <sys/param.h> /* Defines MAXHOSTNAMELEN on BSD*/
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if HAVE_RPC_TYPES_H
|
||||
#include <rpc/types.h>
|
||||
#endif
|
||||
@@ -194,14 +189,10 @@ void *realloc();
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#if HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
@@ -217,8 +208,6 @@ void *realloc();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
@@ -236,7 +225,6 @@ void *realloc();
|
||||
/* Keep assert() defined for security reasons */
|
||||
#undef NDEBUG
|
||||
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if HAVE_SYS_RESOURCE_H
|
||||
|
||||
Reference in New Issue
Block a user