gecko-dev/tools
Samuel Holland 23aebf1035 Bug 1041962 - Include libgen.h for basename r=jseward
Currently, the GNU version of basename from string.h is used, which
has behavior that conflicts with the POSIX version in libgen.h.

The GNU basename is not available in all libcs. In particular, it
is missing in musl libc, causing a build failure:

	error: 'basename' was not declared in this scope

The GNU version has the following implementation:

	char *p = strrchr (filename, '/');
	return p ? p + 1 : (char *) filename;

The POSIX version has slightly different semantics. It may modify
its argument string, or copy part of it to static storage. However,
it will also delete trailing slashes, while the GNU version will
return the empty string if there is a trailing slash.

This change resolves the issue by including libgen.h, adopting POSIX
basename semantics. This should be a safe change for the following
reasons:

- The google-breakpad code, from which this code was derived, has
  also switched to the POSIX basename:
  072f86ca83%5E%21/#F4

- The version of LulElf.cpp in mozglue/baseprofiler has also switched
  to the POSIX basename:
  https://hg.mozilla.org/mozilla-central/annotate/de1c3ae8df14cdb2c94a817b02dcffcb2cee12e2/mozglue/baseprofiler/lul/LulElf.cpp#l54

- The BaseFileName function is called only with paths to ELF files,
  never directories, so the paths will never contain a trailing
  slash, and the two versions of basename will behave identically.

Differential Revision: https://phabricator.services.mozilla.com/D61047

--HG--
extra : moz-landing-system : lando
2020-02-13 14:36:09 +00:00
..
bloatview
browsertime Bug 1608136 - Fixed ContentfulSpeedIndex extraction r=sparky 2020-01-21 19:56:52 +00:00
clang-tidy Bug 1613526 - Create a code quality documentation and move the appropriate docs r=ahal 2020-02-11 09:11:44 +00:00
code-coverage Bug 1611046 - avoid using namespace declaration r=dom-workers-and-storage-reviewers,sg 2020-01-29 12:05:47 +00:00
compare-locales Bug 1599045, part 2 - merge compare-locales docs into build docs, r=flod 2019-12-03 15:43:10 +00:00
coverity Bug 1590415 - Remove deprecated code from the Coverity model file. r=sylvestre 2019-10-22 16:38:50 +00:00
crashreporter Bug 1603988 - Part 2: Add a TC index for generated artifacts for mac symbols and reuse them in the next run r=tomprince 2020-02-03 18:41:49 +00:00
fuzzing Bug 1611855 - Worklet must be part of the same parent's agentCluster - part 2 - CloneDataPolicy in writing, r=smaug 2020-02-06 13:46:25 +00:00
github-sync Bug 1605171 - Replace wrupdater with github-sync r=tomprince 2020-01-14 18:37:28 +00:00
infer
jprof
leak-gauge
lint Bug 1599099 - Generate in-tree perfdocs using ./mach lint --fix. r=octavian_negru,sparky 2020-02-12 07:00:15 +00:00
moztreedocs Bug 1607143 - Ride along - Remove a useless declaration and add an empty line r=championshuttler 2020-02-11 12:50:44 +00:00
performance
power Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj 2019-12-20 07:16:43 +00:00
profiler Bug 1041962 - Include libgen.h for basename r=jseward 2020-02-13 14:36:09 +00:00
quitter Bug 1601252 - update quitter extension with signed version. r=mattwoodrow 2019-12-19 21:47:50 +00:00
rb Bug 1559977 - Remove tools/rb from py3/py2 linter exclusion list r=ahal 2019-10-15 20:58:35 +00:00
rewriting Bug 1614891 - Clarify the ESLint situation around some remote/ files. Remove unnecessary remote/test/demo.js. r=remote-protocol-reviewers,whimboo 2020-02-13 09:23:19 +00:00
tryselect Bug 1611989 - Refactor try estimates for code re-use. r=ahal 2020-02-12 21:06:56 +00:00
update-packaging Bug 1590693 - Unship empty chrome.manifest files. r=glandium 2019-12-12 11:13:42 +00:00
update-verify Bug 1588649 - release update verify secondary failing for 70.0, r=jlund 2019-10-15 22:36:25 +00:00
vcs Bug 1594182 - Move wgpu stuff under gfx/wgpu r=jgilbert,remote-protocol-reviewers 2019-11-15 00:29:53 +00:00
mach_commands.py
moz.build Bug 1613526 - Create a code quality documentation and move the appropriate docs r=ahal 2020-02-11 09:11:44 +00:00