diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-05-11 12:57:28 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-05-11 19:58:15 +0000 |
commit | 7321183716f1e6e28584ea356b0782b06f330fe5 (patch) | |
tree | 304dbc6154a841e2dc35262735425f481f7d3efb /tools/checkAPIs.pl | |
parent | 6f1e6d24c64960bf347c1990fcca8dfdaaf44c68 (diff) |
Put the HAVE_REMOTE hack into wsutil/wspcap.h, and include that file.
Have a header file that defines HAVE_REMOTE if HAVE_PCAP_REMOTE is
defined, and then includes pcap.h. Replace all other includes of
pcap.h, and the definition of HAVE_REMOTE, with includes of that file.
Check for anything other than wspcap.h including pcap.h in checkAPIs.pl.
Change-Id: I3cbee8208944ad6f006f568b3fe3134e10b2a883
Reviewed-on: https://code.wireshark.org/review/21605
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tools/checkAPIs.pl')
-rwxr-xr-x | tools/checkAPIs.pl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl index 163347b423..22b9da4b13 100755 --- a/tools/checkAPIs.pl +++ b/tools/checkAPIs.pl @@ -1557,6 +1557,19 @@ sub check_included_files($$) } } + # only our wrapper file wsutils/wspcap.h may include pcap.h + # all other files should include the wrapper + if ($filename !~ /wspcap\.h/) { + foreach (@incFiles) { + if ( m#([<"]|/+)pcap\.h[>"]$# ) { + print STDERR "Warning: ".$filename. + " includes pcap.h directly. ". + "Include wsutil/wspcap.h instead.\n"; + last; + } + } + } + # files in the ui/qt directory should include the ui class includes # by using #include <> # this ensures that Visual Studio picks up these files from the |