1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Add needed header checks, clean up unused ones. See #1887

This commit is contained in:
dmiller
2020-01-12 06:09:37 +00:00
parent ae10c8a19d
commit 30110f911e
8 changed files with 9 additions and 45 deletions

2
configure vendored
View File

@@ -5306,7 +5306,7 @@ fi
done
for ac_header in pwd.h termios.h sys/sockio.h stdint.h
for ac_header in pwd.h termios.h sys/sockio.h stdint.h sys/stat.h fcntl.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"

View File

@@ -203,7 +203,7 @@ esac
AC_SUBST(LUA_CFLAGS)
dnl Checks for header files.
AC_CHECK_HEADERS(pwd.h termios.h sys/sockio.h stdint.h)
AC_CHECK_HEADERS(pwd.h termios.h sys/sockio.h stdint.h sys/stat.h fcntl.h)
AC_CHECK_HEADERS(linux/rtnetlink.h,,,[#include <netinet/in.h>])
dnl A special check required for <net/if.h> on Darwin. See
dnl http://www.gnu.org/software/autoconf/manual/html_node/Header-Portability.html.

8
nmap.h
View File

@@ -156,10 +156,6 @@
#include <bstring.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h> /* Defines MAXHOSTNAMELEN on BSD*/
#endif
/* Keep assert() defined for security reasons */
#undef NDEBUG
@@ -317,10 +313,6 @@
wrapped. */
#define FP_RESULT_WRAP_LINE_LEN 74
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
#endif
/* Length of longest DNS name */
#define FQDN_LEN 254

View File

@@ -135,8 +135,6 @@
#undef HAVE_STRUCT_IP
#undef HAVE_NANOSLEEP
#undef HAVE_STRUCT_ICMP
#undef HAVE_IP_IP_SUM
@@ -149,8 +147,6 @@
#undef HAVE_STRING_H
#undef HAVE_GETOPT_H
#undef HAVE_STRINGS_H
#undef HAVE_PWD_H
@@ -161,15 +157,10 @@
#undef HAVE_MEMORY_H
/* both bzero() and memcpy() are used in the source */
#undef HAVE_BZERO
#undef HAVE_MEMCPY
#undef HAVE_STRERROR
#undef HAVE_STDINT_H
#undef HAVE_SYS_PARAM_H
#undef HAVE_SYS_SOCKIO_H
#undef HAVE_LINUX_RTNETLINK_H
@@ -182,14 +173,10 @@
#undef HAVE_TERMIOS_H
#undef HAVE_PCRE_H
#undef HAVE_PCRE_PCRE_H
#undef BSD_NETWORKING
#undef HAVE_STRCASESTR
#undef IN_ADDR_DEEPSTRUCT
#undef HAVE_NETINET_IF_ETHER_H

View File

@@ -187,10 +187,6 @@
#include <sys/wait.h>
#endif /* !WIN32 */
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h> /* Defines MAXHOSTNAMELEN on BSD*/
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -229,10 +225,6 @@
/* Keep assert() defined for security reasons */
#undef NDEBUG
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 128
#endif
#define MAXLINE 255
/* CONSTANT DEFINES ***********************************************************

View File

@@ -137,8 +137,6 @@
#undef HAVE_STRUCT_IP
#undef HAVE_NANOSLEEP
#undef HAVE_STRUCT_ICMP
#undef HAVE_IP_IP_SUM
@@ -153,8 +151,6 @@
#undef HAVE_STRING_H
#undef HAVE_GETOPT_H
#undef HAVE_STRINGS_H
#undef HAVE_PWD_H
@@ -165,13 +161,8 @@
#undef HAVE_MEMORY_H
/* both bzero() and memcpy() are used in the source */
#undef HAVE_BZERO
#undef HAVE_MEMCPY
#undef HAVE_STRERROR
#undef HAVE_SYS_PARAM_H
#undef HAVE_SYS_SOCKIO_H
#undef HAVE_SYS_STAT_H
@@ -180,14 +171,10 @@
#undef HAVE_TERMIOS_H
#undef HAVE_PCRE_H
#undef HAVE_PCRE_PCRE_H
#undef BSD_NETWORKING
#undef HAVE_STRCASESTR
#undef IN_ADDR_DEEPSTRUCT
#undef HAVE_SOCKADDR_SA_LEN

View File

@@ -134,7 +134,13 @@
#include "nmap_error.h"
#include "NmapOps.h"
#include <sys/types.h>
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#if HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include <errno.h>
extern NmapOps o;

View File

@@ -135,7 +135,7 @@ APP_DISPLAY_NAME = "Zenmap"
APP_WEB_SITE = "https://nmap.org/zenmap"
APP_DOWNLOAD_SITE = "https://nmap.org/download.html"
APP_DOCUMENTATION_SITE = "https://nmap.org/docs.html"
APP_COPYRIGHT = "Copyright 2005-2019 Insecure.Com LLC"
APP_COPYRIGHT = "Copyright 2005-2020 Insecure.Com LLC"
NMAP_DISPLAY_NAME = u"Nmap"
NMAP_WEB_SITE = "https://nmap.org"