diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-12-24 17:10:40 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-12-25 01:11:10 +0000 |
commit | 20503c70478e0f83b7cafebbbb759de801a1d53e (patch) | |
tree | 429adece393765104527f18823738805e4fe105c /ui | |
parent | b6f70ed3f8959f6ba89f8df029b22b7d57ad8f0a (diff) |
Check for getopt_long(), not getopt().
We support three types of platforms:
1) UN*Xes that have both getopt() and getopt_long();
2) UN*Xes that have getopt() but not getopt_long();
3) Windows, which has neither.
Checking for getopt_long() lets us distinguish between 1) and 2) and
build getopt_long() for them.
Change-Id: Iaf0f142f9bebaa2eed2128d544ec9786711def45
Reviewed-on: https://code.wireshark.org/review/6045
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/main.c | 2 | ||||
-rw-r--r-- | ui/qt/main.cpp | 10 |
2 files changed, 7 insertions, 5 deletions
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> |