With autotools, CMake, and nmake, if we have a function, #define
HAVE_{function_name_in_all_caps}, otherwise don't #define it.
If we provide our own version of a function in libwsutil, make sure we
have a header that declares it, and *ONLY* include that header if
HAVE_{function_name_in_all_caps} is *NOT* defined, so that we don't have
the system declaration and our declaration colliding.
Check for inet_aton, strncasecmp, and strptime with CMake, just as we do
with autotools.
Simplify the addition of {function_name_in_all_caps}_LO to libwsutil in
autotools.
Change-Id: Id5be5c73f79f81919a3a865324e400eca7b88889
Reviewed-on: https://code.wireshark.org/review/2903
Reviewed-by: Guy Harris <guy@alum.mit.edu>
(Strong typing is for weak minds.
Human minds are weak.
Therefore, strong typing is for human minds.)
Change-Id: I099b85e98f3b9742b1addd8d260b3e94ca7add31
Reviewed-on: https://code.wireshark.org/review/2866
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Some of those routines are used only in dumpcap; others are used in
TShark and Wireshark as well.
Change-Id: I9d92483f2fcff57a7d8b6bf6bdf2870505d19fb7
Reviewed-on: https://code.wireshark.org/review/2841
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This way, if you ask for both setuid and setcap installation of dumpcap,
it will fail, rather than silently (other than a message you might miss)
ignoring the request for setuid installation. See bug 10246.
Also:
if you ask for setuid or setcap installation of dumpcap, but
dumpcap isn't built, it'll let you know that there's nothing to
make setuid/setcap, and fail;
if you ask for setcap installation of dumpcap, but setcap wasn't
found, it'll let you know that it can't install it setcap, and
fail;
so that it won't silently (other than a message you might miss) ignore
those requests, either.
Change-Id: Ibc01593e59fd1cd1be8c68d8cdacbfdca863efa0
Reviewed-on: https://code.wireshark.org/review/2771
Reviewed-by: Guy Harris <guy@alum.mit.edu>
That's the option for newer versions of Sun^WOracle C.
Change-Id: I62c12d5870d84587f81a8789732675021523e9ed
Reviewed-on: https://code.wireshark.org/review/2769
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Not all AC_WIRESHARK_LDFLAGS_CHECK flags are -Wl,{option} flags, so
don't check for that first. If we want to check for specific compilers
and linkers, we should do that, not for -Wl,{option} support.
Change-Id: Ib9581d4a1573a1ffa2493ce08e6d5845d2601352
Reviewed-on: https://code.wireshark.org/review/2755
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This pulls some stuff out of the top-level directory, and means we don't
have to build them once for every program using them.
Change-Id: I37b31fed20f2d5c3563ecd2bae9fd86af70afff5
Reviewed-on: https://code.wireshark.org/review/2591
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This includes ws_mempbrk_sse42.c; if the compiler doesn't support
-msse4.2, HAS_SSE4_2 isn't defined, so all the stuff in
ws_mempbrk_sse42.c that uses SSE 4.2 will be #ifdeffed out.
Not all compilers with which we're built will support -msse4.2; in
particular, the ones that aren't compiling for x86 won't....
Change-Id: I69566ca06f602104b40c78b3b06fcb7dfeb054b2
Reviewed-on: https://code.wireshark.org/review/2373
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Adding -Qunused-arguments to CXXFLAGS causes the checks for -f and -m
flags not to fail with clang++, causing the configure script to warn
about -f flags supported by clang but not clang++ indicating that the
compilers are a mismatched pair.
The checks we do for flags should eliminate "unused" -f/-m flags,
suppressing the warnings that way.
Change-Id: I749d6f499a3d34300518cc0ba539f355377359af
Reviewed-on: https://code.wireshark.org/review/2362
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This might fix the Solaris/SPARC build error
configure: error: conditional "SSE42_SUPPORTED" was never defined.
Usually this means the macro was only invoked conditionally.
(not all the world's a VAX^Wx86).
Change-Id: Ib189ce70b203875188cee3266b8652c02ca34237
Reviewed-on: https://code.wireshark.org/review/2358
Reviewed-by: Guy Harris <guy@alum.mit.edu>
- check only for -msse4.2
- check if there's nmmintrin.h header
- don't check if current CPU support -msse4.2 (fix cross compilation)
Change-Id: Iba8d291fdf5602937ab540a69b7608a81427ad25
Reviewed-on: https://code.wireshark.org/review/2189
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Add autotools macros to distribution
Call AX_EXT to define HAVE_SSE4_2
Change-Id: I9ff085d923dfafb32510cdd14290e74a2aaea302
Reviewed-on: https://code.wireshark.org/review/2110
Tested-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Rename --enable-extra-warnings to --enable-extra-compiler-warnings, and
have the message talking about "extra warnings" talk about "extra
compiler warnings", to make it more uniform (the documentation for the
--enable flag speaks of "additional compiler warnings") and to clarify
that these are warnings from the compiler, not from *shark.
Change-Id: Ic1a045670144f8d9eda2e3427142027e2a339156
Reviewed-on: https://code.wireshark.org/review/1230
Reviewed-by: Guy Harris <guy@alum.mit.edu>
That makes it clearer that what we're enabling are extra warnings, and
fits better with the description for --enable-warnings-as-errors, which
says the default is "yes, unless extra warnings are enabled".
Change-Id: If21f778df0dfdb98acbe02cb6a763ed27f2a7f91
Reviewed-on: https://code.wireshark.org/review/1227
Reviewed-by: Guy Harris <guy@alum.mit.edu>
We test whether a given compiler supports a given -W flag, so we don't
need to separate them and check them only for particular compilers.
To make that even clearer, rename the --enable option from
--enable-extra-gcc-checks to --enable-extra-compiler-checks, and
document it as just "do additional -W checks", and rename the
WIRESHARK_EXTRA_GCC_ CMake variables to WIRESHARK_EXTRA_COMPILER_.
Sync up the lists of warning flags in CMake with the lists in autoconf.
Uncomment -Wdocumentation while we're at it. If it doesn't work *at
all*, comment it out until it's fixed, or, better yet, fix it; if it
still produces warnings, we just leave it among the "extra" flags.
Change-Id: I4042affdade612e4025e2881d08f1ca69d759626
Reviewed-on: https://code.wireshark.org/review/1226
Reviewed-by: Guy Harris <guy@alum.mit.edu>
With -Wunreachable-code flags (and disable for the moment -Wdocumentation)
Change-Id: I126c962b32e650a63b78092e95896736ae7335c9
Reviewed-on: https://code.wireshark.org/review/678
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Add optional dependancy to libsbc to play Bluetooth SBC in
A2DP payload. Also simplify RTP Player and extent codec interface.
Change-Id: I52e1fce9c82e2885736354fe73c6c37168a4fda3
Reviewed-on: https://code.wireshark.org/review/19
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
This is a VERY PRELIMINARY version of tfshark. It's an attempt to jumpstart FileShark and its architecture. Right now it's mostly just a very stripped down version of tshark with all of the necessary build modifications (including now building filetap library since tfshark depends on it)
This code has helped me identify what I believe to be all of the necessary layers for a complete fileshark architecture. And those layers will slowly be added in time (patches always welcome!).
svn path=/trunk/; revision=54646
dissector for Novell's PKIS certificate extensions
from me
clean up the $Id$ tags
remove packet-pkis(-template).h
remove ASN.1 definitions that cause compiler warnings
(OID, SecurityLabelType2)
move the dissector to the clean ASN.1 dissectors
support CMake build
change the name to novell_pkis
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9597
svn path=/trunk/; revision=54508
supported by some versions of g++ even though the corresponding version
of gcc supports them. Other versions of g++, and clang, support them.
Check, before adding a -W option for C++, whether the compiler supports
it; that check must be done with -Werror, at least with g++, in order to
get a non-zero exit status from the compiler.
svn path=/trunk/; revision=54447
Given that Wireshark is moving to QT, the Wireshark changes required to
fix the features deprecated in Gtk 3.10 will not be done.
svn path=/trunk/; revision=54337
It should fix:
cc1plus: warning: command line option `-Wmissing-prototypes' is valid for Ada/C/ObjC but not for C++ [enabled by default]
(only g++ complains, clang is OK with -Wmissing-prototypes)
svn path=/trunk/; revision=54086
on what libwiretap thinks it is.
Update some comments to reflect the death of the hack used to include
(libwiretap) plugin support in programs not built with libwireshark.
svn path=/trunk/; revision=54015
./configure's options for gtk2 vs gtk3 vs qt.
Make it possible to not build the GNOME package (now both UIs' packages are
optional). I think Chris requested this a while ago.
If this works out it may make sense to control the rest of the options via
./configure .
svn path=/trunk/; revision=53607
http://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/Code-Gen-Options.html#Code-Gen-Options
-ftrapv "generates traps for signed overflow on addition, subtraction,
multiplication operations." and -fwrapv "instructs the compiler to
assume that signed arithmetic overflow of addition, subtraction and
multiplication wraps around using twos-complement representation."
Those seem mutually-exclusive to me, and we probably want wrapping, not
traps, as there's probably a fair bit of code out there that explicitly
or implicitly assumes wrapping. (Actually, we really want to avoid
signed arithmetic for the cases that most matter, such as offsets and
lengths, but, unfortunately, we currently have API conventions that
allow negative values for lengths, either with -1 meaning "to the end"
or with negative values meaning "relative to the end".) In addition,
there seem to be some bugs complaining that -ftrapv doesn't always cause
traps on signed integer overflow.
We seem to be seeing crashes in Lemon on the Solaris buildbot subsequent
to adding -ftrapv; I don't know whether that's an overflow being
detected, a bug in the compiler, or something unrelated, especially
given that we're using Sun C, not GCC, on the Solaris buildbot.
However, we'll try removing -ftrapv, to see if it fixes the problem; the
MIT CSAIL paper in question wasn't really recommending all the GCC
options it mentioned (which, as noted, wouldn't make sense, as -ftrapv
and -fwrapv appear to be mutually-exclusive).
svn path=/trunk/; revision=53556
/usr/include/qt5/QtCore/qglobal.h:1079:4: error:
"You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC or -fPIE."
svn path=/trunk/; revision=53432
installing command-line developer tools with no SDKs but with a standard
UN*Xy /usr/include or of installing Full Frontal Xcode, if the user
didn't specify building against an SDK, check to see whether we *have*
any SDKs and, if not, don't set the deployment target.
svn path=/trunk/; revision=51501
configure Wireshark, so we don't, for example, do "make distcheck" with
no options, and thus default to GTK+ 3, on a system without GTK+ 3 where
Wireshark was configured with --with-gtk2. (This also means that if
we're configuring only with Qt, or with GTK+ *and* Qt, "make distcheck"
will check with those.)
svn path=/trunk/; revision=51456
the kernel" thing, and add the NetBSD and DragonFly BSD /proc links (if
they don't mount /proc, that doesn't work, but it doesn't get in the
way).
On Solaris, check for getexecname, just in case somebody tries to build
on an old Solaris that doesn't support it (that could well end up being
the least of their problems, but at least they won't ask us to diagnose
that one).
svn path=/trunk/; revision=51343
That way, if somebody specifies --with-gtk[23] and that version of GTK+
isn't found, we fail with an indication that the version of GTK+ they
asked for isn't there, and if no GUI toolkit was specified, and they
didn't explicitly say "don't build Wireshark", we look for GTK+ 3 and,
if it's not found, let the user know explicitly.
svn path=/trunk/; revision=51323
try it without -ldl (in case the OS doesn't have it - not a good idea,
as it complicates the build process for cross-platform tools that might
require it on other platforms, but "not a good idea" never stopped UN*X
vendors in the past) and, if that fails, try it with -ldl.
svn path=/trunk/; revision=51309
deployment target; if --disable-osx-deploy-target was specified, set it
to the OS version on which we're building - minor/dot-dot version and
all - as there's no guarantee that it'll work on *any* version earlier
than that.
svn path=/trunk/; revision=51060
anything other than OS X, fail; whatever it is you're trying to do won't
work (unless and until there exists a platform that fully supports
cross-development for OS X, *including* building against SDKs and
building with -mmacosx-version-min).
If you use neither on OS X, default to the OS major version on which
you're building. If you use --disable-osx-deploy-target, don't build
against an SDK and don't use -mmacosx-version-min.
svn path=/trunk/; revision=51057
packages, providing macros that we use in our configure script in case
somebody building from SVN doesn't happen to have the package installed
and thus doesn't happen to have those macros defined.
In the case of Qt, there *isn't* such a .m4 file, so we had to create
the macro. Move it to acinclude.m4, and rename it to
AC_WIRESHARK_QT_CHECK to indicate that it's our own check.
svn path=/trunk/; revision=50881
--disable-wireshark was not specified, build with GTK+ 3.
If any of --with-gtk2 or --with-qt are specified, and --with-gtk3 wasn't
specified, *don't* look for GTK+ 3 and don't build with it.
If *both* --with-gtk2 and --with-gtk3, fail.
svn path=/trunk/; revision=50872
@executable_path/../lib as well as /usr/local/lib, so we can use @rpath
in the install names in the executables and libraries in the application
bundle.
Have the osx-app.sh script tweak all references to libraries from
/usr/local/lib in all executables, libraries, and plugins in the app
bundle to use @rpath. (The "all" is important; it fixes the GTK+ crash
mentioned in the comment in osx-app.sh. The notion of doing all of them
came from the osx-app.sh script in a newer version of Inkscape.)
This renders the setting of DYLD_LIBRARY_PATH in the wrapper scripts in
the bundle unnecessary; remove it. (Ideally, we should try to get rid
of the wrapper scripts entirely, but that might have to wait for us to
switch to using Qt.)
svn path=/trunk/; revision=50560
tests using the compiler are done using the flags that
we'll be using when building.
Add a -mmacosx-version-min flag to CFLAGS/CPPFLAGS/LDFLAGS so that the
compiler tests use them. This may, or may not, obviate the need to set
MACOSX_DEPLOYMENT_TARGET in OSX_DEPLOY_TARGET.
svn path=/trunk/; revision=50426
when building for OS X; that causes the MACOSX_DEPLOYMENT_TARGET
environment variable to be set when building (so that, for example, we
don't use linker features available on the version on which we're
building but not on the minimum OS version for which we're building),
and causes the SDK for that version to be used (so that, for example, we
don't link with libraries with later version numbers than the ones
provided with the OS version for which we're building).
svn path=/trunk/; revision=50410
AC_WIRESHARK_COMPILER_FLAGS_CHECK, because it doesn't just affect CFLAGS
and it doesn't just affect the flags for GCC.
svn path=/trunk/; revision=50222
that it doesn't fail due to the C++ compiler not supporting -W options
that the C compiler does.
(We should fix that, too, by having separate checks for whether the C
and C++ compilers support particular options.)
svn path=/trunk/; revision=50215
C++ compiler (it might not be one on, for example, OS X, due to "cc"
being a C compiler, "CC" referring to "cc" due to the case-insensitivity
of the default OS X file system, and "CC" being one of the names checked
for in AC_PROG_CXX), so if we really need a C++ compiler, test it with a
program that a C compiler won't compile.
svn path=/trunk/; revision=50204