Commit Graph

2712 Commits

Author SHA1 Message Date
Guy Harris 624ed977cb validate-clang-check: add yet another Windows-only file. 2021-09-23 03:39:11 -07:00
Martin Mathieson 543ea3968c ethercat: Fix some too-wide mask widths.
N.B. Some other issues spotted have been reported in
https://gitlab.com/wireshark/wireshark/~/issues/17605
2021-09-21 11:04:31 +01:00
João Valverde 8726c65267 win-setup.ps1: Be more lax about validating path separators
CMake file(TO_NATIVE_PATH) doesn't do the right thing on MinGW[1],
but Windows supports backslash and forward slash.

[1]https://gitlab.kitware.com/cmake/cmake/-/issues/5939
2021-09-20 14:38:03 +01:00
Martin Mathieson dd667dddf0 Some spelling fixes 2021-09-18 20:52:04 +00:00
João Valverde 8df2a73594 Use the musl in-tree getopt_long() everywhere
Besides the obvious limitation of being unavailable on Windows,
the standard is vague about getopt() and getopt_long() has many
non-portable pitfalls and buggy implementations, that increase
the maintainance cost a lot. Also the GNU libc code currently
in the tree is not suited for embedding and is unmaintainable.

Own maintainership for getopt_long() and use the musl implementation
everywhere. This way we don't need to worry if optreset is available,
or if the $OPERATING_SYSTEM version behaves in subtly different ways.

The API is under the Wireshark namespace to avoid conflicts with
system headers.

Side-note, the Mingw-w64 9.0 getopt_long() implementation is buggy
with opterr and known to crash. In my experience it's a headache to
use the embedded getopt implementation if the system provides one.
2021-09-17 00:43:54 +01:00
Chuck Craft 5b4c7e1c46 NEWS: multiple list indentation levels (nested lists) 2021-09-16 16:27:11 +00:00
Uli Heilmeier 2de4d40e22 setup-macos-brew: Extend to build dmg
Extend the script to be able to build a dmg bundle
2021-09-16 09:56:36 +00:00
Gerald Combs 55a67fd66a Tools: Migrate compress-pngs.sh to Python.
Migrate compress-pngs from a Bash script that ran Make to a Python
script, which should be usable on more platforms.

Add Efficient Compression Tool (ect) to the list of compressors.

Add the compressors to the various *-setup.sh scripts, but comment them
out for now.
2021-09-13 11:00:04 -07:00
Guy Harris 21339ceed0 make-pci-ids.py: make it executable.
It's a #! script, so it should be runnable from the command line without
explicitly running Python on it.
2021-09-11 10:21:05 +00:00
Guy Harris 76b08ea083 Fix spelling errors.
The Ubuntu build commented on some spelling errors in executable code
files.  Fix the errors that don't come from external files containing
the spelling errors (USB product and vendor IDs, PCI IDs, ASN.1
specifications), and fix some errors that don't show up in the
executable code files (e.g., in comments and variable names).
2021-09-11 10:01:27 +00:00
Guy Harris d4ed129727 pre-commit: skip some checks on idl2wrs.c.
Some checks intended for dissectors don't work well on dissector
*generators*, as they see stuff such as "value_string %s[]" in a format
string used to generate dissector code and get upset because the
purported value_string doesn't end with {0, NULL} (the generator *does*
put a {0, NULL} at the end, but the checker isn't clever enough to
figure that out).
2021-09-11 02:42:51 -07:00
Pascal Quantin 530ee0b365 Windows: upgrade Npcap to 1.55 2021-09-07 23:18:19 +02:00
Martin Mathieson fb02f423b1 Some spelling fixes 2021-09-03 22:45:06 +00:00
Alexis La Goutte bbcedb667c clang-check(tools): exit when set illegal option
and not when pass -c parameter, it is break some part of gitlab-ci (Clang Builder)
2021-09-02 16:06:17 +00:00
Evan Huus cdfab0d6e9 tvbuff: convert helper methods to pinfo->pool
A few of them just needed scratch memory, so allocate and free it
manually after doing any exception-raising checks.

A few others were returning memory, and needed conversion to accept a
wmem scope argument.
2021-09-01 03:54:52 +00:00
Adrian Ratiu 61e66c37ab cmake: lemon: allow overriding lemon CC setting
When cross-compiling wireshark the lemon tool should be built
using the host machine compiler to be run on the host. Before
cmake this was done via autotools CC_FOR_BUILD but cmake only
supports one compiler toolchain per build and requires some
workarounds like running cmake twice using separately defined
toolchains.

This gets ugly and complicated fast when considering multiple
toolchains, especially for a simple tool like lemon, so just
allow builds to override the C compiler and wipe the cflags.

This way systems like Gentoo/ChromeOS/Yocto with a properly
setup cross-compile environment can just point to the native
BUILD_CC or similar while minimizing complexity.
2021-08-31 19:19:05 +00:00
Martin Mathieson 70e26d691e Some spelling fixes. 2021-08-27 22:21:40 +00:00
Guy Harris d42ac7b4b5 check_tfs: we want os.path.commonprefix, not os.path.commonpath. 2021-08-25 01:24:31 -07:00
Guy Harris 9941c00a0f check_tfs: don't require plugins to use tfs.c true_false_strings.
To quote the comment in plugins/epan/gryphon/packet-gryphon.c, "Note:
using external tfs strings doesn't work in a plugin", so, for plugins,
don't check to make sure that the file doesn't define a
true_false_string that's the same as one defined by tfs.c.
2021-08-25 07:31:56 +00:00
Michael Tuexen 3d7729c6b3 tools: use glib version 2.68.4 on MacOS 2021-08-24 19:23:49 +00:00
Martin Mathieson d3b016a365 Remove trailing colons from item label names
This is a new check added to check_typed_item_calls.py --label

Ignoring cases where item type is FT_NONE, as fpr tjpse
text was appended that otherwise would lack a colon.
2021-08-23 08:32:56 +00:00
Martin Mathieson 927690e883 Fix some docbook spellings. 2021-08-20 10:43:01 +00:00
Gerald Combs 2683508b38 Windows: Upgrade c-ares to 1.17.2. 2021-08-15 18:45:33 +00:00
Martin Mathieson 545eab808e Fix some item label names with unbalanced parens/braces/brackets
Spotted by new check added to check_typed_item_calls.py --label
2021-08-14 21:24:13 +01:00
Martin Mathieson c0faa8f1da Some more dissector spellings. 2021-08-08 22:21:38 +01:00
Martin Mathieson 03c3c9a056 check_typed_item_calls: Add some ptvcursor_add...() calls
Fix up some NFAPI calls.
2021-08-08 17:47:42 +01:00
Jaap Keuter 9a35314d79 Generate a valid source file, with a newline at the end 2021-08-05 14:05:22 +00:00
Martin Mathieson 73a4ada071 A few documentation spelling fixes. 2021-08-02 17:40:55 +01:00
Martin Mathieson 6d02f1dcf9 Check scripts: split issues into errors and warnings
For CI, will now return error codes only for those issues
that are definitely bugs that will require fixing. i.e.

- if the type is not compatible with the call

- if a TFS is (case-sensitively) identical to a tfs.c entrywq
2021-07-31 16:06:32 +01:00
Guy Harris cc84bebcdc macos-setup: add the deployment flags when configuring with Meson.
We add them when configuring with autotools, so that we build GLib
appropriately for the OS versions we're targeting; do the same when
configuring with Meson.
2021-07-30 19:20:13 -07:00
Guy Harris 856c4f3af6 macos-setup: generate a .pc file for libffi if we have it.
If this version of macOS comes with a version of libffi, generate a .pc
file for it and install it in /usr/local/lib/pkgconfig, so that
pkg-config finds that version of libffi, and the GLib configuration
process - whether it's done with autotools or Meson - doesn't decide
that there is no libffi and fail or install its own libffi or whatever.
2021-07-30 18:54:04 -07:00
Guy Harris c8e17d7835 macos-setup: cleanups.
If we're running an external Python 3 package, pip3 will install scripts
in some directory under /Library; set MESON to point to the location
where Meson will be installed, and use that.

Have a meson-done file to indicate that Meson's been installed by us,
and uninstall it only if that's present.
2021-07-30 03:45:41 -07:00
Guy Harris 2fd29240c8 macos-setup: test whether /usr/bin/python3 works, not python3 in general.
We want to check whether *Apple* provides Python 3, not whether there's
a Python 3 installed; if there is no Apple-provided Python 3, but
there's somebody else's Python 3 installed, leave it alone, don't
uninstall it.
2021-07-29 14:50:10 -07:00
Guy Harris cc34e1c406 macos-setup: install and use Meson+Ninja to build newer versions of GLib.
Newer versions of GLib require Meson (they don't support autotools) and
Ninja (they use Ninja rather than Make).  Install Meson and, based on
the GLib version, use autotools+make or Meson+Ninja to build GLib.

Move up the installation of Python 3 so that it's available when we
install Meson, as Meson requires Python 3 and is installed with pip3.
2021-07-29 14:06:58 -07:00
Guy Harris c263b0a13e macos-setup: if Xcode provides Python 3, use it.
Only install an external Python 3 if /usr/bin/python3 doesn't work; on
at least some versions of macOS, /usr/bin/python3 is a wrapper to run
Python 3 from Xcode, and at least some versions of Xcode provide Python
3.
2021-07-29 19:44:20 +00:00
Martin Mathieson d34d1a1e13 More fussing with masks.
Mostly longer masks with odd numbers of digits.
2021-07-29 10:15:58 +00:00
Guy Harris c4d3716ce8 macos-setup: install the current version of Ninja.
1.10.2 is the latest version, and is the first version to ship as a fat
x86-64/ARM64 binary, so that we have native binaries for both platforms
supported by macOS.
2021-07-27 00:26:28 -07:00
Martin Mathieson a7b5eec265 check_typed_item_calls.py: check add_bitmask() functions 2021-07-26 10:31:15 +00:00
Martin Mathieson a975ef7203 check_typed_item_calls.py: Add a check for all-zeroes mask
When the mask value is 0x0, it effectively means there is no
mask, and that all bits count.

Fix found instances and replace them with 0x0.
2021-07-24 10:58:15 +00:00
Evan Huus d6d7dd1e56 First pass pinfo->pool conversion
Automated find/replace of wmem_packet_scope() with pinfo->pool in all
files where it didn't cause a build failure.

I also tweaked a few of the docs which got caught up.
2021-07-21 05:38:29 +00:00
Martin Mathieson 86e2fda11e check_typed_item_calls: fix typo 2021-07-11 17:15:44 +01:00
Martin Mathieson 030d659f88 More mask checks and some fixes. 2021-07-11 14:55:55 +00:00
João Valverde d48c7e9305 make-version.pl: Remove duplicate "-f" option 2021-07-09 22:25:20 +01:00
João Valverde ffcfc83ecb Rename version.h to be more descriptive
Version.h is too generic. This is specific to VCSVERSION and that
should be made more obvious and discoverable.
2021-07-09 18:27:41 +00:00
Martin Mathieson 9e5d051a8a check_typed_item_calls.py Some more mask checks
Fix a handful of (trivial) issues found.
2021-07-08 13:02:18 +00:00
Martin Mathieson 3dd7ba03fa tools/check_typed_item_calls.py: Add extra mask checks 2021-07-07 10:00:45 +01:00
Martin Mathieson 43077b96e8 Fix a few dissector spelling errors. 2021-07-06 07:52:21 +00:00
Pascal Quantin fa21433c35 Windows: upgrade Npcap to 1.50 2021-06-26 13:16:49 +02:00
João Valverde 3fb7a6e0d5 checkAPIs: __func__ is now part of C99, allow it 2021-06-25 22:06:32 +00:00
Chuck Craft 54baebad48 Lua: reconcile expert info groups; add PI_ASSUMPTION 2021-06-21 15:27:51 +00:00