aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
AgeCommit message (Collapse)AuthorFilesLines
2016-01-07Clean up indentation.Guy Harris1-1/+1
Change-Id: Ica6615ef80867e911a1244a8a54411519033b275 Reviewed-on: https://code.wireshark.org/review/13105 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-07Don't assume a stat() fails only if the target file doesn't exist.Guy Harris1-2/+31
If the error is something other than ENOENT, return that error indication. Change-Id: If866cab5f0de0e4fa8b1ed1cead1290feb88a3cb Reviewed-on: https://code.wireshark.org/review/13091 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03No need for "struct nstime_t", "nstime_t" by itself suffices.Guy Harris1-1/+1
(That should also keep people from deciding that they don't want to include <wsutil/nstime.h>, but still want to use Wireshark nanosecond times, and do so by sticking a private incomplete definition of "struct nstime_t" into the code.) Change-Id: I94e863fe7083ebba254c3a718b85088a89fb6b7d Reviewed-on: https://code.wireshark.org/review/13022 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01Welcome in 2016Pascal Quantin1-1/+1
Change-Id: I727dcd07093de7cb9381804fbcf4c0e1a99a3d6c Reviewed-on: https://code.wireshark.org/review/12989 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-12-14Make init_progfile_dir() take a function pointer [-Wpedantic]João Valverde2-3/+7
Change-Id: I45f8ea5ee6ccc5a484c60ad6e686aaf30f6b0c98 Reviewed-on: https://code.wireshark.org/review/12557 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-12Remove -Wwrite-strings compiler flagJoão Valverde1-1/+1
The "-Wwrite-strings" flag produces nuisance warnings. These warnings are not useful, they're impossible to fix in a sane way and therefore are being handled with casts of static strings to (char *). This just moves the warning to [-Wcast-qual] and a compiler pragma is in turn required (and used) to squelch that warning. Remove the Wwrite-strings warning. Let that responsibility fall on the programmer (as is done by casting). Change-Id: I5a44dfd9decd6d80797a521a3373593074962fb5 Reviewed-on: https://code.wireshark.org/review/12162 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-12Avoid breaking output string mid-sentenceJoão Valverde1-2/+2
Change-Id: I463f93e515ebe12ed30b1f08cca7d29a7bd535ae Reviewed-on: https://code.wireshark.org/review/12552 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-01autotools: Fix g212f2f1João Valverde1-1/+1
Change-Id: If7185885faea2319fdce4d89a7a9bf40312bcfa6 Reviewed-on: https://code.wireshark.org/review/12346 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-01autotools: Clean abi-check with maintainer-cleanJoão Valverde1-1/+8
Change-Id: Ia2ce54592485d2995bcfd56bd127a2fedb1a7d07 Reviewed-on: https://code.wireshark.org/review/12293 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-01ws80211: Disable shorten-64-to-32.Gerald Combs1-1/+11
Disable shorten-64-to-32 in ws80211_create_on_demand_interface, which calls NLA_PUT_STRING, which passes the output of strlen to an int parameter. NLA_PUT_STRING is defined in netlink/attr.h so there's not much we can do to fix it directly. Suppress -Wpragmas before suppressing warnings in gcc so that we can use DIAG_OFF with clang-only warnings. Change-Id: I1180950edd93c056b8fbfbed164e482024aee90a Reviewed-on: https://code.wireshark.org/review/12314 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-29cfutils.c: Fix ISO C forbids an empty translation unit [-Wpedantic]João Valverde6-18/+29
Change-Id: Iac9384e63a4e946c73832103f8d6949f0187fa38 Reviewed-on: https://code.wireshark.org/review/12147 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-11-08Use ws_{read,write,fdopen,close}.Guy Harris1-0/+7
Be more consistent about using the ws_ routines, as we suggest in README.developer. In C++ on UN*X, define ws_close as ::close rather than close, so that it works even in classes with methods or members named "close". Change-Id: Ide2652229e6b6b4624cbddae0e909a4ea1efa591 Reviewed-on: https://code.wireshark.org/review/11637 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-07Clean up includes of unistd.h, fcntl.h, and sys/stat.h.Guy Harris5-36/+14
Have wsutil/file_util.h include them on UN*X, just as it includes io.h on Windows, so we can have a rule of "if you do file operations, include <wsutil/file_util.h> and use the routines in it". Remove includes of unistd.h, fcntl.h, and sys/stat.h that aren't necessary (whether because of the addition of them to wsutil/file_util.h or because they weren't needed in the first place). Change-Id: Ie241dd74deff284e39a5f690a297dbb6e1dc485f Reviewed-on: https://code.wireshark.org/review/11619 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-06file_util.h includes io.h, we don't need to do so ourselves.Guy Harris1-7/+32
While we're at it, get rid of a commented-out include, and update a comment to give more information. Change-Id: I910a26a3d7f4a50f0559abe5f2ab97a93c80357f Reviewed-on: https://code.wireshark.org/review/11610 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-05Get rid of ws80211_frequency_to_channel().Guy Harris1-0/+8
Use ieee80211_mhz_to_chan() instead. Change-Id: I1d9a3b9c3a5ad2b1a5bd3f8d10b7f8b1bbcba51d Reviewed-on: https://code.wireshark.org/review/11586 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-05Match what most source say are the actual Japanese 4.9 GHz channels.Guy Harris1-8/+20
I don't know where Matthew Gast got his 4.9 GHz channels, but IEEE Std 802.11-2012 and ARIB STD T-71 have something different. Change-Id: I5d86b12193e38422d3702f36cb106fe858daa4b5 Reviewed-on: https://code.wireshark.org/review/11585 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-04Don't include "file.h" if you don't need it.Guy Harris1-0/+3
It ends up dragging in libwireshark headers, which programs not linking with libwireshark shouldn't do. In particular, including <epan/address.h> causes some functions that refer to libwireshark functions to be defined if the compiler doesn't handle "static inline" the way GCC does, and you end up requiring libwireshark even though you shouldn't require it. Move plurality() to wsutil/str_util.h, so that non-libwireshark code can get it without include epan/packet.h. Fix includes as necessary. Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3 Reviewed-on: https://code.wireshark.org/review/11545 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-28Just use g_mkdir_with_parents() to make the .config directory on UN*X.Guy Harris1-8/+11
It will create all the relevant directories (if it can), using g_mkdir(), which is a wrapper for mkdir() on UN*X - just as ws_mkdir() is, so we don't need to make our own copy that uses ws_mkdir. Bug: 11645 Change-Id: I68affc6fabccf58dace75af078d9bfd67a1b47b2 Reviewed-on: https://code.wireshark.org/review/11373 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-28Do the "create parent of config file directory" stuff on UN*X as well.Guy Harris1-11/+8
~ obviously exists, but ~/.config might not, making it impossible to create ~/.config/wireshark. Bug: 11645 Change-Id: Ia267b168eb7b1438d4c35a6bb89df9d7bfcbd3f3 Reviewed-on: https://code.wireshark.org/review/11368 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-19On UN*X, use XDG_CONFIG_HOME/wireshark for configuration files.Guy Harris1-63/+88
If it doesn't exist, but ~/.wireshark does, continue to use that, for backwards compatibility. Derived from change I7fa64d6e8bd43c6a5dec93e30a4f69a747c34256. Bug: 6353 Change-Id: I937f94b19a371486b7ea2228e51994cc4c72b501 Reviewed-on: https://code.wireshark.org/review/11137 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-16Add DEGREE SIGN character to utf8_entities.h and use it.Guy Harris1-0/+1
Add a #define giving the UTF-8 sequence for DEGREE SIGN, and use it in packet-synphasor.c rather than having it define its own version. Use it in some other places rather than a string of two octal values. Change-Id: Ic0f3b23ae0165c9824d89304d683f45bce31dced Reviewed-on: https://code.wireshark.org/review/11102 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-16CMake: Add /WXGerald Combs1-2/+2
Add "/WX" to the Visual C++ compiler flags if DISABLE_WERROR is off, similar to config.nmake. We haven't compiled C++ code with -Wshorten-64-to-32 for quite some time so there's no need to add -Wno-shorten-64-to-32 in ui/qt/CMakeLists.txt. Additionally, squelch ---- C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3050) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3065) : see reference to function template instantiation 'void std::_Median<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_RanIt,_Pr)' being compiled with [ _RanIt=QList<QString>::iterator , _Pr=bool (__cdecl *)(const QString &,const QString &) ] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3127) : see reference to function template instantiation 'std::pair<_RanIt,_RanIt> std::_Unguarded_partition<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled with [ _RanIt=QList<QString>::iterator , _Pr=bool (__cdecl *)(const QString &,const QString &) ] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3157) : see reference to function template instantiation 'void std::_Sort<_Iter,int,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Diff,_Pr)' being compiled with [ _Iter=QList<QString>::iterator , _RanIt=QList<QString>::iterator , _Diff=int , _Pr=bool (__cdecl *)(const QString &,const QString &) ] .\rpc_service_response_time_dialog.cpp(130) : see reference to function template instantiation 'void std::sort<QList<QString>::iterator,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled with [ _RanIt=QList<QString>::iterator , _Pr=bool (__cdecl *)(const QString &,const QString &) ] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3051) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3052) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3053) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp) ---- in both rpc_service_response_time_dialog.cpp and wireshark_application.cpp so that we'll compile successfully. Change-Id: I457bcede99dcb1f3c1001f1f559c4901bb000357 Reviewed-on: https://code.wireshark.org/review/10533 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-13cmake: link against dl, fixes linking with goldPeter Wu1-0/+1
wsutil/filesystem.c uses dladdr (when available), but does not declare a dependency on it. Adding it fixes a CMAKE_C(XX)_FLAGS=-fuse-ld=gold build failure: run/libwsutil.so.0.0.0: error: undefined reference to 'dladdr' This change is somehow not necessary for autotools, just for cmake. Change-Id: I642a7d85f9c33541831262f930e73d1f47c58b60 Reviewed-on: https://code.wireshark.org/review/10906 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-12inet_v6def : fix warning: redundant redeclaration of 'inet_pton' ↵Alexis La Goutte1-1/+1
[-Wredundant-decls] Change-Id: I937a65378a62be50d3d0d2f4a049b8cd73c8875c Reviewed-on: https://code.wireshark.org/review/10951 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-11Remove duplicate transport ports from proto tree summaryJoão Valverde1-0/+1
Don't display duplicate ports if transport name resolution is not enabled (for UDP/TCP/DCCP). Also introduce col_append_port() to handle info column port display with name resolution in a uniform format. Change-Id: Icb8ac45f726b7c539b4534c62061473e9b582753 Reviewed-on: https://code.wireshark.org/review/10804 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-09nstime: fix -Wshift-negative-valuePeter Wu1-6/+2
Even if the result of the negative shift (in TIME_T_MIN) is not used because the signedness check happens before, it still causes a compile-time warning. Fix this by shifting on an unsigned value, then truncate by casting it. While at it, remove a "fix for broken SCO compiler", it might not apply to us (fingers crossed). Change-Id: Id9603149d8063e9eaaa65cf028323f10e60a6c42 Reviewed-on: https://code.wireshark.org/review/10862 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-05Move utf8_entities.h to wsutilJoão Valverde2-0/+64
Change-Id: I6298b3de5f0a1cb988014ff16082eaf8c2a3c3c0 Reviewed-on: https://code.wireshark.org/review/10786 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-02The official #define for 32-bit and 64-bit Windows is _WIN32.Guy Harris1-1/+1
It's _WIN32, with a leading underscore, not WIN32. See, for example: https://sourceforge.net/p/predef/wiki/OperatingSystems/ and https://msdn.microsoft.com/en-us/library/b0084kay.aspx *Some* environments may also define WIN32, but we shouldn't depend on that. Replace all-caps "WIN32" referring to Windows in comments and other text with "Windows" or "Win32". (The two are pretty much equivalent, these days; nobody much cares about Win16, not that we ever ran on it, and 64-bit Windows is just a 64-bitified Win32.) Change-Id: Id327bcd4b1e9baa4f27055eff08c2d9e594d6f70 Reviewed-on: https://code.wireshark.org/review/10367 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-26cmake: rework version.h handling to treat it like config.hJoerg Mayer1-2/+0
It wasn't working on my system: I kept seeing the old git revision in '...shark -v' even after deleting version.h Change-Id: I75f41a7afcee4b9384f33a56014e4af6b527fec5 Reviewed-on: https://code.wireshark.org/review/10265 Petri-Dish: Jörg Mayer <jmayer@loplof.de> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-08-18UDP multicast stream dialog.Gerald Combs1-0/+1
Add the UDP multicast stream dialog. Abuse TapParameterDialog a bit more so that we can edit parameters. Remove some unused struct members and an unused function. Change-Id: I962c70344e792f0959527e4bcba8a20bd7e8acf9 Reviewed-on: https://code.wireshark.org/review/10084 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-16Run abicheck commands at compile time.Gerald Combs1-2/+5
The CMake dumpbabi targets collectively copy over 800 files. Do that when when we build the actual targets instead of at configure time. Hopefully this will speed up initial CMake runs. Change-Id: I6e4d691e24c73ea05d638a0f897f570541c84e38 Reviewed-on: https://code.wireshark.org/review/10052 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-05[MSVC 2015] Compiler and visual studio version are off by 5 not 6 in MSVCAndersBroman1-2/+17
2015. Change-Id: I5476656789893af2c8aeb5dfe5cf06972fd8bd4b Reviewed-on: https://code.wireshark.org/review/9873 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-11terminate readlink resultTobias Stoeckmann1-6/+12
The readlink function does not guarantee to nul-terminate its result string. Therefore, it should be done in wsutil/filesystem.c. Change-Id: Id96533e825a302a1922ce9ac7ee47d5525ac9c39 Reviewed-on: https://code.wireshark.org/review/9597 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-07Next Windows Server version seems to be named Windows Server 2016 nowPascal Quantin1-1/+1
Change-Id: I31fb5495f5e17ccba1578a069ca33448a291923f Reviewed-on: https://code.wireshark.org/review/9539 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-06Add a comment.Guy Harris1-1/+11
Why, oh why, are channel numbers used for 802.11? Change-Id: Ie26987dfeaad2ce0ead0eef72339f966aadeeecd Reviewed-on: https://code.wireshark.org/review/9510 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-04Mark another function as printf-like.Guy Harris1-1/+1
Change-Id: I2aa13265da1efbf7edfe693c9b434940462ca237 Reviewed-on: https://code.wireshark.org/review/9497 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-30Use ws_fstat64() to determine the size of an open file.Guy Harris2-19/+18
fseek() to the end, followed by ftell(), is a bit of an odd way to get the file size. Use ws_fstat64() instead. Check that the file is a regular file, while we're at it. This means we don't have to check before opening. Bug: 11268 Change-Id: I31ee20dd5568d10541375cf97b286abfc1384d1c Reviewed-on: https://code.wireshark.org/review/9230 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-24Check _MSC_VER is defined before we use itEvan Huus1-1/+1
Otherwise it breaks a bunch of stuff on Linux machines because of the way gcc's preprocessor works (buildbot decryption tests, extcap, etc). Originally added in Ic5360089f96be620fbe99ba4e819e0caa5ca0215 Change-Id: Iad43fa1415aa331ae375771adac0818ea1b99060 Reviewed-on: https://code.wireshark.org/review/9091 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-23[MSVC 2015] file_exists() fails on MSVC2105 as file_stat.st_ino gets resetAndersBroman1-1/+2
to zero in the function call if the file does not exist. The general code seems to work with MSVC2015 so use that. Change-Id: Ic5360089f96be620fbe99ba4e819e0caa5ca0215 Reviewed-on: https://code.wireshark.org/review/9070 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-17Qt: fix a crash when closing application under WindowsPascal Quantin1-0/+1
QCoreApplication visits eldritch horrors upon argv on Windows. Keep a local copy for our own processing. --- [ Pascal's original comments ] g6c4ec4a introduced the use of arg_list_utf_16to8 that triggers a crash on my computer when freeing the g_allocated memory. Let's do a similar work but with a memory allocator that does not trigger an exception. Also fix a memory leak in arg_list_utf_16to8 while we are at it. Change-Id: I93d899af20b09c9a5d584a46297f715591502df9 Reviewed-on: https://code.wireshark.org/review/8961 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-16Qt: Make sure we have usable command line arguments.Gerald Combs1-0/+8
Call arg_list_utf_16to8 in wireshark-qt.cpp on Windows. Set our default codec in Qt4 to UTF-8 before doing so. Bug: 11276 Change-Id: I8e0afb9523ddb5956d30424b7b7ad7f3ea0838c7 Reviewed-on: https://code.wireshark.org/review/8954 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-16Add the wireless toolbar.Gerald Combs4-0/+186
Add the wireless toolbar to the Qt UI. Start adding AirPcap support to ui/80211_utils. Add FCS validation routines to ws80211_utils. Move a bunch of AirPcap routines that require epan from caputils to ui/gtk. They were required for driver key management, which we'll leave to the AirPcap Control Panel in the Qt UI. Move frequency-utils to wsutil. Change-Id: I44446758046621d183f5c2ba9f6526bf01e084f1 Reviewed-on: https://code.wireshark.org/review/8910 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-11Replace tabs in files with editor modeline "expandtab"Bill Meier1-1/+1
Change-Id: I4667fd4091c510a4c798f79dae333a07dc42dad6 Reviewed-on: https://code.wireshark.org/review/8880 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-06-10It's INVALID_HANDLE_VALUE, not INVALID_HANDLE.Guy Harris1-1/+1
Change-Id: I71d18ced0a1bd3438498230b6e647697be8e275d Reviewed-on: https://code.wireshark.org/review/8872 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-10Squelch some type-clash warnings on Windows.Guy Harris1-2/+13
Define WS_INVALID_PID to be the appropriate "there is no process" value. On UN*X, -1 works; the "pid" is actually a HANDLE for the process on Windows, so INVALID_HANDLE is appropriate. Cast HANDLE to intptr_t in the _cwait() call. Change-Id: Ica2d2319f5c95ba41f590776a745fe040fe494d2 Reviewed-on: https://code.wireshark.org/review/8871 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-10Rename wsutil/process.h to wsutil/processes.h to avoid collisions.Guy Harris2-5/+5
The MSVC rules for searching for headers are a huge barrel of fun; it appears that, for some files that need the MSVC <process.h> to declare getpid(), they're getting our <wsutil/process.h> instead, as that's in the current directory. Rename it to avoid the collision. Change-Id: I88eb70237062fa7957e38d7ff8132524390a6a5c Reviewed-on: https://code.wireshark.org/review/8870 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-10Make sure we include <windows.h> to get HANDLE declared.Guy Harris1-0/+2
Change-Id: I8cba1120f4667864eadeebd48bcdced3a2b71f4c Reviewed-on: https://code.wireshark.org/review/8867 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-10Get rid of extra blank line at the end.Guy Harris1-1/+0
Change-Id: Ibe7904b7e01a1b0b81ba20673cd85e08ebf660c2 Reviewed-on: https://code.wireshark.org/review/8863 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-10Use pid_t on UN*X, and HANDLE on Windows, for the process ID.Guy Harris2-0/+44
This avoids type punning; at least with Xcode 7 beta on El Capitan beta, that produces warnings that get turned into errors. Change-Id: I57f47455b9630f359828c07c92a190b5cb33816f Reviewed-on: https://code.wireshark.org/review/8862 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-17Fix some files to pass the pre-commit hook script.Joerg Mayer1-1/+1
Change-Id: I105bf4e03fcf95cf7541f6377215809759fd933e Reviewed-on: https://code.wireshark.org/review/8502 Reviewed-by: Jörg Mayer <jmayer@loplof.de>