diff options
-rw-r--r-- | ConfigureChecks.cmake | 2 | ||||
-rw-r--r-- | capinfos.c | 2 | ||||
-rw-r--r-- | captype.c | 2 | ||||
-rw-r--r-- | cmakeconfig.h.in | 4 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | dumpcap.c | 2 | ||||
-rw-r--r-- | editcap.c | 2 | ||||
-rw-r--r-- | mergecap.c | 2 | ||||
-rw-r--r-- | randpkt.c | 2 | ||||
-rw-r--r-- | rawshark.c | 2 | ||||
-rw-r--r-- | reordercap.c | 2 | ||||
-rw-r--r-- | text2pcap.c | 2 | ||||
-rw-r--r-- | tfshark.c | 2 | ||||
-rw-r--r-- | tshark.c | 2 | ||||
-rw-r--r-- | ui/gtk/main.c | 2 | ||||
-rw-r--r-- | ui/qt/main.cpp | 10 | ||||
-rw-r--r-- | wsutil/CMakeLists.txt | 2 |
17 files changed, 24 insertions, 22 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 03beda2232..bc530a93b7 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -77,7 +77,7 @@ cmake_pop_check_state() # check_symbol_exists("floorl" "math.h" HAVE_FLOORL) check_function_exists("gethostbyname2" HAVE_GETHOSTBYNAME2) -check_function_exists("getopt" HAVE_GETOPT) +check_function_exists("getopt_long" HAVE_GETOPT_LONG) check_function_exists("getprotobynumber" HAVE_GETPROTOBYNUMBER) check_function_exists("inet_aton" HAVE_INET_ATON) check_function_exists("inet_ntop" HAVE_INET_NTOP_PROTO) diff --git a/capinfos.c b/capinfos.c index 8b4bfeaf05..3559fb9da1 100644 --- a/capinfos.c +++ b/capinfos.c @@ -100,7 +100,7 @@ #include <wsutil/wsgcrypt.h> #endif -#ifndef HAVE_GETOPT +#ifndef HAVE_GETOPT_LONG #include "wsutil/wsgetopt.h" #endif @@ -70,7 +70,7 @@ #include <wsutil/unicode-utils.h> #endif /* _WIN32 */ -#ifndef HAVE_GETOPT +#ifndef HAVE_GETOPT_LONG #include "wsutil/wsgetopt.h" #endif diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in index a0388be056..d5b29529cc 100644 --- a/cmakeconfig.h.in +++ b/cmakeconfig.h.in @@ -72,8 +72,8 @@ /* Define to 1 if you have the `gethostbyname2' function. */ #cmakedefine HAVE_GETHOSTBYNAME2 1 -/* Define to 1 if you have the getopt function. */ -#cmakedefine HAVE_GETOPT 1 +/* Define to 1 if you have the getopt_long function. */ +#cmakedefine HAVE_GETOPT_LONG 1 /* Define to 1 if you have the <getopt.h> header file. */ #cmakedefine HAVE_GETOPT_H 1 diff --git a/configure.ac b/configure.ac index 86fb03f8f4..5ebfa04c7f 100644 --- a/configure.ac +++ b/configure.ac @@ -2665,10 +2665,10 @@ AC_C_BIGENDIAN # XXX - do we need this? AC_PROG_GCC_TRADITIONAL -AC_CHECK_FUNC(getopt, +AC_CHECK_FUNC(getopt_long, [ GETOPT_LO="" - AC_DEFINE(HAVE_GETOPT, 1, [Define to 1 if you have the getopt function.]) + AC_DEFINE(HAVE_GETOPT_LONG, 1, [Define to 1 if you have the getopt_long function.]) ], GETOPT_LO="wsgetopt.lo") AC_SUBST(GETOPT_LO) @@ -74,7 +74,7 @@ #include <wsutil/crash_info.h> #include <wsutil/ws_version_info.h> -#ifndef HAVE_GETOPT +#ifndef HAVE_GETOPT_LONG #include "wsutil/wsgetopt.h" #endif @@ -64,7 +64,7 @@ #include "wtap.h" -#ifndef HAVE_GETOPT +#ifndef HAVE_GETOPT_LONG #include "wsutil/wsgetopt.h" #endif diff --git a/mergecap.c b/mergecap.c index 9cd1d7066d..89a27f5a8c 100644 --- a/mergecap.c +++ b/mergecap.c @@ -49,7 +49,7 @@ #include <string.h> #include "wtap.h" -#ifndef HAVE_GETOPT +#ifndef HAVE_GETOPT_LONG #include <wsutil/wsgetopt.h> #endif @@ -27,7 +27,7 @@ #include <unistd.h> #endif -#ifndef HAVE_GETOPT +#ifndef HAVE_GETOPT_LONG #include "wsutil/wsgetopt.h" #endif diff --git a/rawshark.c b/rawshark.c index c0a0593096..cbb69afb4d 100644 --- a/rawshark.c +++ b/rawshark.c @@ -60,7 +60,7 @@ # include <sys/stat.h> #endif -#ifndef HAVE_GETOPT +#ifndef HAVE_GETOPT_LONG #include "wsutil/wsgetopt.h" #endif diff --git a/reordercap.c b/reordercap.c index ba5a9d87a4..b70b7e3839 100644 --- a/reordercap.c +++ b/reordercap.c @@ -42,7 +42,7 @@ #include "wtap.h" -#ifndef HAVE_GETOPT +#ifndef HAVE_GETOPT_LONG #include "wsutil/wsgetopt.h" #endif diff --git a/text2pcap.c b/text2pcap.c index bdbd4e4ddc..e3ef07311c 100644 --- a/text2pcap.c +++ b/text2pcap.c @@ -133,7 +133,7 @@ #include <zlib.h> /* to get the libz version number */ #endif -#ifndef HAVE_GETOPT +#ifndef HAVE_GETOPT_LONG #include "wsutil/wsgetopt.h" #endif @@ -53,7 +53,7 @@ #include <zlib.h> /* to get the libz version number */ #endif -#ifndef HAVE_GETOPT +#ifndef HAVE_GETOPT_LONG #include "wsutil/wsgetopt.h" #endif @@ -58,7 +58,7 @@ # include <sys/capability.h> #endif -#ifndef HAVE_GETOPT +#ifndef HAVE_GETOPT_LONG #include "wsutil/wsgetopt.h" #endif diff --git a/ui/gtk/main.c b/ui/gtk/main.c index 6675ec29d5..86c5150c2f 100644 --- a/ui/gtk/main.c +++ b/ui/gtk/main.c @@ -40,7 +40,7 @@ #include <unistd.h> #endif -#ifndef HAVE_GETOPT +#ifndef HAVE_GETOPT_LONG #include "wsutil/wsgetopt.h" #endif diff --git a/ui/qt/main.cpp b/ui/qt/main.cpp index 3048c92b5e..2acdb80688 100644 --- a/ui/qt/main.cpp +++ b/ui/qt/main.cpp @@ -33,10 +33,12 @@ #include <zlib.h> /* to get the libz version number */ #endif -#ifndef HAVE_GETOPT -# include "wsutil/wsgetopt.h" -#else -# include <getopt.h> +#ifdef HAVE_GETOPT_H +#include <getopt.h> +#endif + +#ifndef HAVE_GETOPT_LONG +#include "wsutil/wsgetopt.h" #endif #include <wsutil/clopts_common.h> diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index f0595000ac..d4fed7d70f 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -85,7 +85,7 @@ if(HAVE_SSE4_2) set(WSUTIL_FILES ${WSUTIL_FILES} ws_mempbrk_sse42.c) endif() -if(NOT HAVE_GETOPT) +if(NOT HAVE_GETOPT_LONG) set(WSUTIL_FILES ${WSUTIL_FILES} wsgetopt.c) endif() |