When generating `curl_config.h`, add size information for `long long`
and `__int64` types. These are needed as candidates for defining the
`ssize_t` type because on MSVC, `long` is not the same size as `size_t`.
This problem did not affect upstream curl because it computes the
`ssize_t` type in CMake code where all sizes are available. CMake's
port computes it in preprocessor logic because universal binaries on
macOS do not know type sizes until compile time.
Fixes: #18477
Some platforms (e.g. GNU/Hurd) do not define PATH_MAX. Add a few other
variants and a fallback constant. Also use alternatives where possible:
* For readlink(), use lstat() to read the length of the link first.
If it is not a symlink, report EINVAL before trying to allocate.
If the size reports as zero, fall back one of the PATH_MAX variants.
* For realpath(), POSIX 2008 allows us to pass a NULL buffer
to tell it to malloc() internally.
This patch was inspired by downstream patches in Debian packaging
for issues 897061 and 909011.
Issue: #18337
Backport libarchive commit v3.3.3~16^2 (fix build with LibreSSL 2.7,
2018-04-01). LibreSSL 2.7 adds OpenSSL 1.1 API leading to conflicts on
method names.
Fixes: #18404
Also add a binutils-2.31 to CMAKE_PREFIX_PATH in the environment so that
tests that look for them with `find_program` can find a newer version.
This is needed for the build id support in readelf.
This test fails spuriously too often and prevents the nightly binary
from finishing. Simply skip it for the nightly binary to allow it to
complete more regularly.
It is provided by `functional`, not `utility`. Fix the mapping added by
commit 276d3c7afe (IWYU: Add workaround mapping for std::hash,
2018-07-31). Also generalize the workaround from commit v3.12.0-rc1~39^2~1
(IWYU: Define a macro to tell code it is preprocessing for iwyu,
2018-05-25) to allow local builds to configure specific flags. This
is needed because iwyu behaves differently in different environments.
Some `.c` sources add `restrict` to their pointer types to tell
the optimizer that there is no aliasing. These do not appear in
the corresponding `.h` declarations so MSVC warns.
Revert commit v3.1.0-rc1~255^2~5 (liblzma: Port from C99 to C89/90,
2014-07-13). We now compile as C99 or above except on MSVC where
we will use another approach.
Revert commit v3.1.0-rc1~255^2~2 (liblzma: Avoid defining a 'restrict'
macro, 2014-07-24). We will use another approach to deal with the
'restrict' keyword.
Since commit v3.12.0-rc1~325^2 (ccmake: Check for curses more robustly
before enabling, 2018-03-21) we may not enable ccmake by default when
using a non-system curses (e.g. the static curses we build on Linux for
our binaries). Enable the option explicitly for our prebuilt binaries.
The documentation for CPack generators previously lived in their
respective internal CMake modules. This setup was misleading,
because it implied that you should include the modules in your own
code, which is not the case. Moving the documentation into a
separate section does a better job of hiding the internal modules,
which are just an implementation detail. The generator documentation
has also been modified to remove any references to the module name.
The CPackIFW module is a special exception: since it has user-facing
macros, the documentation for these macros has been kept in the module
page, while all other documentation related to the IFW generator has
been moved into the new section.
To make it easier to find the new documentation, the old help pages
for the CPack*.cmake modules have not been deleted, but have been
replaced with a link to their respective help page in the new
documentation section.
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`. Use `clang-format` version 6.0.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Update `.clang-format` with configuration to make the 6.0 format as
close as possible to what 3.8 produced before. Then revise the style:
* Indent preprocessor directives (a feature new since 3.8)
* Add a newline and indentation before inheritance `:` and `,`
Rename the Git attribute identifying the format to include the
clang-format version number: `format.clang-format-6.0`. This will aid
external infrastructure in knowing what version of the tool to run.
Versions of clang-format newer than 3.8 produce different output.
Our source code guide says that version 3.8 exactly must be used.
Update the comment in our `.clang-format` config file accordingly.
Add a check to our formatting script to verify the version.
Also update its tool search to look for the explicitly-named
3.8 variant first.
0d389d175a libuv: Revert local linux/sparc64 fix now that we have upstream fix
42fbb28516 Merge branch 'upstream-libuv' into update-libuv
c8b67ea119 libuv 2018-05-06 (bf605bd7)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2049
Hyperlink text color does not stand out when used inside a literal block
because such blocks typically get syntax highlighting. Update our CSS
style to make the links more distinct.
Suggested-by: Kyle Edwards <kyle.edwards@kitware.com>
Upstream libuv commits:
* node-v0.6.0~28 (linux: use ioctl(FIONBIO) to set O_NONBLOCK, saves a syscall, 2011-10-29)
* v1.11.0~11 (unix: use async-signal safe functions between fork and exec, 2016-12-12)
left an asymmetry in the way O_NONBLOCK is set and cleared. Normally
ioctl/FIONBIO is used for both. However, uv_spawn uses fcntl/O_NONBLOCK
to clear O_NONBLOCK between fork and exec. This fails on Linux/sparc64
where setting via ioctl/FIONBIO actually sets two bits (in O_NDELAY)
that cause clearing via fcntl/O_NONBLOCK to be silently ignored (though
clearing via ioctl/FIONBIO or fcntl/O_NDELAY works).
Since CMake commit v3.11.0-rc1~117^2 (CTest: Re-implement test process
handling using libuv, 2017-12-10), CTest uses libuv. On Linux/sparc64
child processes have been started with non-blocking output pipes. This
can lead to write errors or lost output from children not prepared to
deal with `EAGAIN` on stdout or stderr.
Fix this for now by switching libuv back to fcntl/O_NONBLOCK to set and
clear O_NONBLOCK when compiled on Linux/sparc64.
LibUV-Issue: 1830
Fixes: #17941
This enables cross-reference syntax for CMake environment variables:
:envvar:`SOMEVAR`
and definition of CMake environment variables via a directive:
.. envvar:: SOMEVAR
It also adds environment variables defined by the directive and by
`Help/envvar/SOMEVAR.rst` documents to the index.
This `envvar` role and directive is defined in our `cmake` domain
and overrides the equivalent `envvar` role and directive provided
by Sphinx in its default domain. This is okay because we build
CMake documents in the `cmakd` domain.
This follows up the work from commit v3.10.0-rc1~43^2 (Help: Document
CMake's environment variables, 2017-09-01) that originally added
`envvar` documentation.