diff --git a/capinfos.c b/capinfos.c index 36c1dccf09..831f48120e 100644 --- a/capinfos.c +++ b/capinfos.c @@ -88,9 +88,7 @@ #include #endif -#ifdef HAVE_GETOPT_H -#include -#else +#ifndef HAVE_GETOPT #include "wsutil/wsgetopt.h" #endif diff --git a/configure.in b/configure.in index 5ba873fadc..d59ff6f7d2 100644 --- a/configure.in +++ b/configure.in @@ -1742,7 +1742,7 @@ AC_PROG_GCC_TRADITIONAL GETOPT_LO="" AC_CHECK_FUNC(getopt, [GETOPT_LO="" - AC_DEFINE(HAVE_GETOPT_H, 1, [Define to 1 if you have the header file.]) + AC_DEFINE(HAVE_GETOPT, 1, [Define to 1 if you have the getopt function.]) ], GETOPT_LO="wsgetopt.lo" ) diff --git a/dumpcap.c b/dumpcap.c index 319c419507..71e3a6cec8 100644 --- a/dumpcap.c +++ b/dumpcap.c @@ -59,9 +59,7 @@ #include #include -#ifdef HAVE_GETOPT_H -#include -#else +#ifndef HAVE_GETOPT #include "wsutil/wsgetopt.h" #endif diff --git a/editcap.c b/editcap.c index 517e94d23b..e74946ec82 100644 --- a/editcap.c +++ b/editcap.c @@ -42,9 +42,7 @@ #include "wtap.h" -#ifdef HAVE_GETOPT_H -#include -#else +#ifndef HAVE_GETOPT #include "wsutil/wsgetopt.h" #endif diff --git a/gtk/main.c b/gtk/main.c index a936329e50..5290829d40 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -45,9 +45,7 @@ #include #endif -#ifdef HAVE_GETOPT_H -#include -#else +#ifndef HAVE_GETOPT #include "wsutil/wsgetopt.h" #endif diff --git a/mergecap.c b/mergecap.c index 70b4b58ff7..99a9cf26f2 100644 --- a/mergecap.c +++ b/mergecap.c @@ -27,9 +27,7 @@ #include #include "wtap.h" -#ifdef HAVE_GETOPT_H -#include -#else +#ifndef HAVE_GETOPT #include "wsutil/wsgetopt.h" #endif diff --git a/randpkt.c b/randpkt.c index c1f58f0bf5..b6a8c86a54 100644 --- a/randpkt.c +++ b/randpkt.c @@ -27,16 +27,14 @@ #include "config.h" #endif -#ifdef HAVE_GETOPT_H -#include -#else -#include "wsutil/wsgetopt.h" -#endif - #ifdef HAVE_UNISTD_H #include #endif +#ifndef HAVE_GETOPT +#include "wsutil/wsgetopt.h" +#endif + #ifdef HAVE_FCNTL_H #include #endif diff --git a/rawshark.c b/rawshark.c index df30037b89..ce0e232339 100644 --- a/rawshark.c +++ b/rawshark.c @@ -61,9 +61,7 @@ # include #endif -#ifdef HAVE_GETOPT_H -#include -#else +#ifndef HAVE_GETOPT #include "wsutil/wsgetopt.h" #endif diff --git a/text2pcap.c b/text2pcap.c index daf1dacece..c2d5f7f532 100644 --- a/text2pcap.c +++ b/text2pcap.c @@ -125,9 +125,7 @@ #include #include -#ifdef HAVE_GETOPT_H -#include -#else +#ifndef HAVE_GETOPT #include "wsutil/wsgetopt.h" #endif diff --git a/tshark.c b/tshark.c index 473a6898ec..af1b256026 100644 --- a/tshark.c +++ b/tshark.c @@ -51,9 +51,7 @@ # include #endif -#ifdef HAVE_GETOPT_H -#include -#else +#ifndef HAVE_GETOPT #include "wsutil/wsgetopt.h" #endif