Commit Graph

179 Commits

Author SHA1 Message Date
Guy Harris b6ee206d2f Distribute CMakeLists.txt.
svn path=/trunk/; revision=48716
2013-04-03 07:38:44 +00:00
Stig Bjørlykke ca5516c665 Use pragma diagnostic also when compiling with clang.
svn path=/trunk/; revision=48295
2013-03-14 08:42:51 +00:00
Jaap Keuter 827eb58b04 From David Arnold:
Replace use of INCLUDES with AM_CPPFLAGS in all Makefiles to placate recent autotools.

svn path=/trunk/; revision=48261
2013-03-12 06:53:39 +00:00
Gerald Combs a79e5d5b94 Check to see if GLib's printf routines support the X/Open / POSIX
thousands grouping (') flag and use it in format_size if it's available.
As far as I can tell this translates to "everywhere except Windows and
OpenBSD". According to the various build logs at

https://build.opensuse.org/package/show?package=mingw32-glib2&project=windows%3Amingw%3Awin32

the OBS GLib packages enable GLib's internal printf implementation from
Gnulib which means we *should* be able to enable this on Windows.
Unfortunately this doesn't appear to be the case.

svn path=/trunk/; revision=48042
2013-03-03 19:34:58 +00:00
Anders Broman 85973068cc From beroset:
remove C++ incompatibilities

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48038
2013-03-03 17:14:19 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Jeff Morriss 98ea7d3a8d From Anders: revert r47934: it doesn't work everywhere.
See email discussion on -dev.

svn path=/trunk/; revision=47940
2013-02-28 15:16:46 +00:00
Balint Reczey 45c2884f1b Export libwsutil symbols using WS_DLL_PUBLIC define
This change replaces *.def and *.sym file usage following the
guideline at http://gcc.gnu.org/wiki/Visibility

svn path=/trunk/; revision=47938
2013-02-28 14:09:46 +00:00
Gerald Combs 2f47e63a88 str_util.c: Although the glib documentation doesn't explicitly say so,
it looks like the thousands grouping (') modifier is supported so use it
in format_size.

capinfos.c: Set our locale.

svn path=/trunk/; revision=47934
2013-02-28 04:44:38 +00:00
Gerald Combs 0645396514 Print human-readable statistics by default. Raw values can be printed
using "-M". Based on a suggestion by Hansang Bae.

svn path=/trunk/; revision=47900
2013-02-26 06:40:25 +00:00
Balint Reczey 82843905c5 ABI dumps don't have to depend on config.h directly
They depend on libs which need config.h already.

svn path=/trunk/; revision=47883
2013-02-25 21:27:07 +00:00
Balint Reczey d2e0724afc Add dumpabi targets to CMake builds
Also update automake generated targets to match CMake generated ones

svn path=/trunk/; revision=47879
2013-02-25 18:12:20 +00:00
Balint Reczey e1d24fdb49 Generate abi-descriptor.xml-s in CMake builds
svn path=/trunk/; revision=47865
2013-02-24 21:14:17 +00:00
Balint Reczey 7f0ee327ca Set library versions in CMake builds
svn path=/trunk/; revision=47848
2013-02-23 22:54:36 +00:00
Martin Kaiser b057717767 use pragma GCC diagnostic to work around gcrypt.h warnings
distinguish between different gcc versions

this should allow a clean build with libgcrypt 1.5.0

svn path=/trunk/; revision=47803
2013-02-21 18:40:48 +00:00
Martin Kaiser 7126d3a56b add wsutil/wsgcrypt.h as a wrapper around libgcrypt's gcrypt.h
(not used for now)

svn path=/trunk/; revision=47801
2013-02-21 18:09:18 +00:00
Gerald Combs 3ba2c108f1 As http://www.jrsoftware.org/iskb.php?mutexsessions points out, a session
mutex may not be visible to other sessions and we may not be able to
create a global mutex. Try to create both, and make each one accessible
to all users. Update the NSIS installer to check for both global and
session mutexes.

svn path=/trunk/; revision=47773
2013-02-20 19:58:55 +00:00
Gerald Combs 8f478c5c44 Exclude create_app_running_mutex.
svn path=/trunk/; revision=47762
2013-02-20 03:01:12 +00:00
Gerald Combs bd4cffae58 When any of our executables start on Windows create or open a "Wireshark
is running" mutex. Have the NSIS installer check for this mutex and ask
the user to close Wireshark if it's found. While not perfect this makes
the WinSparkle update process much less annoying.

svn path=/trunk/; revision=47758
2013-02-20 01:19:42 +00:00
Gerald Combs ec880b7db3 Use readlink instead of ls.
svn path=/trunk/; revision=47338
2013-01-29 01:06:24 +00:00
Balint Reczey c6f9d4c131 make dumpabi target build with multiple digits in library version numbers
svn path=/trunk/; revision=47329
2013-01-28 21:45:44 +00:00
Guy Harris e787c3434e Get rid of C++ comments from the CUPS code.
svn path=/trunk/; revision=47111
2013-01-16 03:56:36 +00:00
Guy Harris 9936b9764a Add crash_info.c
svn path=/trunk/; revision=47107
2013-01-15 23:37:47 +00:00
Guy Harris 111f8ea2bb Use GLib "return an allocated string generated by printf-style
formatting" routines and the corresponding deallocate routines.

svn path=/trunk/; revision=47106
2013-01-15 23:36:48 +00:00
Guy Harris 92b524bb1c I must haz config.h (to define _U_, if nothing else).
svn path=/trunk/; revision=47105
2013-01-15 22:22:44 +00:00
Guy Harris 05825b02cd Add some routines to wsutil to, at least on some platforms, add
information to crash dumps and the like.  (Currently, we only handle OS
X's CrashReporter, but we should do this on other platforms where this
information can be added and would be helpful.)

White space tweaks.

svn path=/trunk/; revision=47104
2013-01-15 21:54:41 +00:00
Michael Mann 86d690880f replace "unsigned" datatype with "guint". Some mpeg files needed "unsigned int" instead.
bugs 7825-7827 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7825)

svn path=/trunk/; revision=46928
2013-01-04 05:22:43 +00:00
Evan Huus c2945ff831 Squash some sign-conversion warnings that g++ picks up but gcc does
not. QtShark now builds warning-free (for me at least).

svn path=/trunk/; revision=46786
2012-12-26 13:41:30 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Guy Harris bb674a2e1e Include <wsutil/crc11.h> so that we check whether the prototypes therein
match the actual function types here.

svn path=/trunk/; revision=46648
2012-12-21 01:57:03 +00:00
Guy Harris 166b5d4469 Squelch some cast-discard warnings.
svn path=/trunk/; revision=46647
2012-12-21 00:53:30 +00:00
Guy Harris 0ddce65214 fclose() and fflush() are standard C routines, so there's no need for
our own wrappers.  (pcapio.c isn't using wrappers around, for example,
fwrite().)

svn path=/trunk/; revision=46640
2012-12-20 20:00:06 +00:00
Michael Tüxen 7e84abf005 Add ws_fclose(), ws_fflush(), and ws_fdopen() to the fileutils.
Retire libpcap_fdopen(), libpcap_dump_flush(), and libpcap_dump_close().

svn path=/trunk/; revision=46636
2012-12-20 14:53:09 +00:00
Anders Broman a98414062c try to fix Id.
svn path=/trunk/; revision=45922
2012-11-05 11:52:14 +00:00
Gerald Combs b369a09cd2 The file set and export object trees are lists. Make them act like
it. Show human-readable sizes in the file set dialog. Move the
format_size_flags_e operator to qt_ui_utils.cpp for lack of a better
place.

svn path=/trunk/; revision=45661
2012-10-19 19:04:21 +00:00
Gerald Combs 576b24c96e Move ui-independent object export routines to the common ui directory.
Implement DICOM, HTTP, and SMB object exports. Rename the GTK+ export
files. C++-ize epan/tap.h. Fix an apparent memory leak in
eo_save_all_clicked_cb.

The Qt dialog has an indeterminate progress bar. I tried adding
something similar to the GTK+ dialog but event processing led down a
rabbit hole.

svn path=/trunk/; revision=45647
2012-10-18 21:14:43 +00:00
Chris Maynard b66cc7ed48 str_util.c:format_size() uses 0xff00 for the mask, so left-shift format_size_prefix_[si|iec] by 8, not 16. Fixes Coverity CID 733852: Operands don't affect result.
svn path=/trunk/; revision=45637
2012-10-18 17:29:37 +00:00
Gerald Combs f003add90f Fix a copy+paste error and a missing include. Adjust the format_size
digit threshold.

svn path=/trunk/; revision=45456
2012-10-10 20:19:18 +00:00
Gerald Combs 98b0812341 Add a format_size function similar to g_format_size that renders a size
value in a human-readable format. Use it in the welcome screen, status
bar, and Win32 interface details.

Note that in the welcome screen and status bar we've switched from
customary binary prefixes to strict SI.

svn path=/trunk/; revision=45453
2012-10-10 19:17:31 +00:00
Bill Meier d882372200 *nix: Test return status of set*uid and related set*gid fcns for failure;
This fixes gcc compiler errors [-Werror=unused-result]  caused by the recent addition
of the "__wur" (warn_unused_result) attribute to the declarations of these functions in
unistd.h.

svn path=/trunk/; revision=45286
2012-10-03 15:22:31 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Chris Maynard 1c35b91296 Trivial typo/copy-and-paste comment fix.
svn path=/trunk/; revision=44983
2012-09-18 20:03:03 +00:00
Anders Broman 68e2e8b889 From Jacob Nordgren and Rishie Sharma:
Add CRC11 algorithms

svn path=/trunk/; revision=44346
2012-08-08 16:27:10 +00:00
Gerald Combs 89e6169fc5 Back out an inadvertent change in r44194.
svn path=/trunk/; revision=44210
2012-08-02 16:26:57 +00:00
Gerald Combs 02894a0be8 Move utf8_entities.h to the "ui" directory. Separate packet information
items with MIDDLE DOTs.

svn path=/trunk/; revision=44194
2012-08-01 19:18:49 +00:00
Anders Broman 967a3c9ce4 From Rishie Sharma:
Add a new CRC16 routine.

svn path=/trunk/; revision=43982
2012-07-25 08:57:33 +00:00
Anders Broman 01e69df536 Get rid of not needed includes
svn path=/trunk/; revision=43917
2012-07-22 16:48:52 +00:00
Anders Broman 5160177aff Remove not needed includes.
svn path=/trunk/; revision=43830
2012-07-19 15:04:43 +00:00
Evan Huus a234b68ff0 Fix some system header files that were #included with "" instead of <>.
They made cppcheck unhappy.

svn path=/trunk/; revision=43779
2012-07-18 02:47:56 +00:00