Commit graph

9085 commits

Author SHA1 Message Date
Cyril Zhang
f2f2413494 sort: Make NetBSD sort tests compatible with our sort
This diff primarily adds/removes flags to make the tests compatible with
sort.  Two tests are removed.  One test is changed to expect fail due to
a bug.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30217

(cherry picked from commit f9e565abca)
2021-05-20 09:15:46 -04:00
Kristof Provost
c505bdcc4e authpf: Start using libpfctl
Use pfctl_kill_states() rather than the DIOCKILLSTATES ioctl directly.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D30057

(cherry picked from commit 2b2ed4a697)
2021-05-14 10:40:12 +02:00
Alex Richardson
25fb1c01f8 contrib/flex: Drop local __dead2 patch
Upstream flex has added a yynoreturn macro, so this diff is no longer
needed. Partially reverts r181269.

Reviewed By:	jkim
Differential Revision: https://reviews.freebsd.org/D29679

(cherry picked from commit d37f81e35b)
2021-05-11 09:39:29 +01:00
Xin LI
8c10d2979c less: upgrade to v581.2.
(cherry picked from commit 50d31dbc6e)

less: upgrade to v581.

(cherry picked from commit 2235c7feac)
2021-05-08 19:31:02 -07:00
Kristof Provost
6fd48efd8d libpfctl: Switch to pfctl_rule
Stop using the kernel's struct pf_rule, switch to libpfctl's pfctl_rule.
Now that we use nvlists to communicate with the kernel these structures
can be fully decoupled.

Reviewed by:	glebius
MFC after:	4 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D29644

(cherry picked from commit e9eb09414a)
2021-05-07 10:15:42 +02:00
Kristof Provost
3711a14493 (t)ftp-proxy: use libpfctl
Reviewed by:	glebius
MFC after:	4 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D29641

(cherry picked from commit 95be9288f0)
2021-05-07 10:15:42 +02:00
Cy Schubert
80b7a3d4af Fix build post a040967612.
(cherry picked from commit 048488c0c4)
2021-05-05 10:42:57 +02:00
Baptiste Daroussin
59a0206067 libedit: vendor import libedit 2021-03-28
(cherry picked from commit f9a159da2a)
(cherry picked from commit 19318a62d7)
2021-05-05 09:21:54 +02:00
Baptiste Daroussin
2cd8c2e595 libucl: vendor import snapshort 20210314
(cherry picked from commit a040967612)
2021-05-05 09:18:44 +02:00
Jung-uk Kim
f1dab9dbdf lex: Use NULL instead of 0 for pointers
Note araujo tried to fix it in r298241 but he only touched generated
files for bootstrap.  This commit properly fixes the problem.

(cherry picked from commit 34e67bb597)
2021-04-23 11:59:29 -04:00
Ed Maste
f4c3c0189f readelf: return error in case of invalid file
GNU readelf exits with an error for a number of invalid file cases.
Previously ELF Tool Chain readelf always exited with 0.  Now we exit 1
upon detecting an error with one or more input files, but in any case
all of them are processed.

This should catch common failure cases.  We still do not report an error
for some types of malformed ELF files, but this is consistent with GNU
readelf.

PR:		252727
Reviewed by:	jkoshy, markj
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29377

(cherry picked from commit ea444392bb)
2021-04-23 11:37:49 -04:00
Alex Richardson
b38293b480 lib/msun: Allow building tests with WARNS=6
The only change needed is to mark a few variables as static.

(cherry picked from commit 87d65c747a)
2021-04-22 10:43:24 +01:00
Alex Richardson
c8f8369856 Allow ssp_test:read to pass more reliably
It appears that the stackframe layout can be slightly different depending on
compiler and target architecture. For example, when using CHERI LLVM for RISC-V
we can actually overflow the buffer by up to 8 bytes without SSP detecting it.
Fix this by increasing the overflow to 15 bytes.

Reviewed By:	ngie, emaste
Differential Revision: https://reviews.freebsd.org/D28997

(cherry picked from commit c88c1f23a8)
2021-04-22 10:42:36 +01:00
Alex Richardson
f6742fbfb5 Update libm tests from NetBSD
I did this without a full vendor update since that would cause too many
conflicts. Since these files now almost match the NetBSD sources the
next git subtree merge should work just fine.

Reviewed By:	lwhsu
Differential Revision: https://reviews.freebsd.org/D28797

(cherry picked from commit 1ec3feb648)
2021-04-22 10:41:45 +01:00
Stefan Eßer
0ca6ce5e97 [bc] Update to version 4.0.0
This version fixes an issue (missing pop of top-of-stack value in the
"P" command of the dc program).

This issue did not affect the bc program, since it does not use dc as
an back-end to actually perform the calculations as was the case with
the traditional bc and dc programs.

The major number has been bumped due to Windows support that has been
added to this version. It does not correspond to a major change that
might affect FreeBSD.

(cherry picked from commit b55a927bc8)
2021-04-10 16:18:50 +02:00
Alex Richardson
d612bd6d0d libarchive: Make test_read_append_filter_wrong_program pass again
libarchive: Apply upstream commit a1b7bf8013fb7a11a486794247daae592db6f5ae

This fixes the failing test_read_append_filter_wrong_program test in CI
which has been failing since 01-Dec-2020.

Commit message from a1b7bf8013

    Silence stderr in test_read_append_filter_program

    When the FreeBSD testsuite runs the libarchive tests it checks that stderr
    is empty. Since #1382 this is no longer the case. This change restores
    the behaviour of silencing bunzip2 stderr but doesn't bring back the
    output text check.

    Partially reverts 2e7aa5d9

MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D29036

(cherry picked from commit 2bca8aa7a7)
2021-04-10 14:01:05 +01:00
Kyle Evans
e0ad785a5d libevent1: fix layout of duplicated RB_ENTRY() definition
3a509754de removed the color field from our definition, but libevent1
has a copy of it off to the side to prevent event.h consumers from
*needing* to pull in sys/queue.h and sys/tree.h.

Update the event.h definition so that we don't accidentally end up with
two different views of struct event.

This appears to have no functional effect on anything in tree, but this
came up in a local patch to port if_switch(4) and related components
from OpenBSD.

(cherry picked from commit 64c01719e4)
2021-04-01 12:29:20 -05:00
Jessica Clarke
a20427cc03 elftoolchain: Support building on Arm-based Macs
Currently macOS and DragonFlyBSD get their own special case and only
handle x86. Since all the FreeBSD cases should be general enough for
macOS and DragonFlyBSD (and the x86 ones are identical to the existing
ones) we can just delete the special cases and reuse the FreeBSD ones.

Note that upstream has since removed all the architecture-specific
checks in this file, with the only code relevant to us being an
endianness check that uses the generic compiler-provided macros. Thus
this patch will not be upstreamed, and will be dropped in a future
vendor import.

(cherry picked from commit 839fdcfc0c)
2021-03-27 02:10:29 +00:00
Cy Schubert
7b3ff601f9 MFC eeb26cf52c:
wpa: import fix for P2P provision discovery processing vulnerability

Latest version available from: https://w1.fi/security/2021-1/

Vulnerability

A vulnerability was discovered in how wpa_supplicant processes P2P
(Wi-Fi Direct) provision discovery requests. Under a corner case
condition, an invalid Provision Discovery Request frame could end up
reaching a state where the oldest peer entry needs to be removed. With
a suitably constructed invalid frame, this could result in use
(read+write) of freed memory. This can result in an attacker within
radio range of the device running P2P discovery being able to cause
unexpected behavior, including termination of the wpa_supplicant process
and potentially code execution.

Vulnerable versions/configurations

wpa_supplicant v1.0-v2.9 with CONFIG_P2P build option enabled

An attacker (or a system controlled by the attacker) needs to be within
radio range of the vulnerable system to send a set of suitably
constructed management frames that trigger the corner case to be reached
in the management of the P2P peer table.

Note: FreeBSD base does not enable P2P.
(cherry picked from commit eeb26cf52c)
2021-03-24 01:55:49 -07:00
Stefan Eßer
cd0355bd26 Vendor import of bc 3.3.4
This update performs an implicit flush of the output when a script
calls read() in case a prompt is to be displayed in line-buffered
output mode.

(cherry picked from commit 893ecb52db)
2021-03-21 16:42:34 +01:00
Dmitry Chagin
ea1f0ecc15 Merge tcsh 6.22.03-ceccc7f
PR:		252663

(cherry picked from commit 5224c2a3bc)
2021-03-21 09:08:54 +03:00
Alex Richardson
c4a6d3b183 capsicum-test: Update for O_BENEATH removal
Update the tests to check O_RESOLVE_BENEATH instead.
If this looks reasonable, I'll try to upstream this change.
This keeps a compat fallback for O_BENEATH since the Linux port still
has/had O_BENEATH with "no .., no absolute paths" semantics.

Test Plan:	`/usr/tests/sys/capsicum/capsicum-test -u 977` passes and
		runs the O_RESOLVE_BENEATH tests.
Reviewed By:	markj
Differential Revision: https://reviews.freebsd.org/D29016

(cherry picked from commit 8cf5812af4)
2021-03-17 22:22:50 +00:00
Alex Richardson
4159566e56 Fix capsicum-test build with GCC
Apparently GCC defines NULL to 0 in C++11 mode (instead of nullptr), so
this causes the following error:
```
In file included from capsicum-test.h:15,
                 from capsicum-test.cc:1:
gtest-1.10.0/include/gtest/gtest.h: In instantiation of 'testing::AssertionResult testing::internal::CmpHelperNE(const char*, const char*, const T1&, const T2&) [with T1 = long int; T2 = procstat*]':
capsicum-test.cc:75:3:   required from here
gtest-1.10.0/include/gtest/gtest.h:1621:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
 1609 |   if (val1 op val2) {\
      |       ~~~~~~~~~~~~
......
 1621 | GTEST_IMPL_CMP_HELPER_(NE, !=);
gtest-1.10.0/include/gtest/gtest.h:1609:12: note: in definition of macro 'GTEST_IMPL_CMP_HELPER_'
 1609 |   if (val1 op val2) {\
      |            ^~
```

Fix this by using nullptr directly.

Submitted upstream as https://github.com/google/capsicum-test/pull/56

Reported by:	Jenkins CI

(cherry picked from commit 47ceb65f3c)
2021-03-17 22:22:49 +00:00
Alex Richardson
60a9c919a5 Update capsicum-test to git commit f4d97414d48b8f8356b971ab9f45dc5c70d53c40
This includes various fixes that I submitted recently such as updating the
pdkill() tests for the actual implemented behaviour
(https://github.com/google/capsicum-test/pull/53) and lots of changes to
avoid calling sleep() and replacing it with reliable synchronization
(pull requests 49,51,52,53,54). This should make the testsuite more reliable
when running on Jenkins. Additionally, process status is now retrieved using
libprocstat instead of running `ps` and parsing the output
(https://github.com/google/capsicum-test/pull/50). This fixes one previously
failing test and speeds up execution.

Overall, this update reduces the total runtime from ~60s to about 4-5 seconds.

(cherry picked from commit 955a3f9ad5)
2021-03-17 22:22:49 +00:00
Alex Richardson
8e6eb890fe Update capsicum-test to git commit 7707222b46abe52d18fd4fbb76115ffdb3e6f74b
This includes changes to use GTEST_SKIP() instead of the local hand-rolled
mechanism as well as a few minor cleanups.

(cherry picked from commit 2d936e6c99)
2021-03-17 22:22:49 +00:00
Alex Richardson
6805e948c4 close_range: add audit support
This fixes the closefrom test in sys/audit.

Includes cherry-picks of the following commits from openbsm:

4dfc628aaf
99ff6fe32a
da48a0399e

Reviewed By:	kevans
Differential Revision: https://reviews.freebsd.org/D28388

(cherry picked from commit fa32350347)
2021-03-17 22:22:48 +00:00
Alex Richardson
1d8b72afe8 libc: Fix t_spawn_fileactions test after ATF update
Since 4581cefc1e
ATF opens the results file on startup. This fixes problems like
capsicumized tests not being able to open the file on exit.

However, this test closes all file descriptors above 3 to get a
deterministic fd table allocation for the child. Instead of using closefrom
(which will close the ATF output file FD) I've changed this test use
the lowest available fd and pass that to the helper program as a string.

We could also try to re-open the results file in ATF if we get a EBADF
error, but that will fail when running under Capsicum.

Reviewed By:	cem
Differential Revision: https://reviews.freebsd.org/D28684

(cherry picked from commit 2aa3ef285a)
2021-03-17 12:22:24 +00:00
Alex Richardson
d97a4cb221 Fix two failing tests after ATF update
Since 4581cefc1e
ATF opens the results file on startup. This fixes problems like
capsicumized tests not being able to open the file on exit.

However, this test closes all file descriptors just to check that
socketpair returns fd 3+4 and thereby also closes the ATF results file.
This then results in an EBADF when writing the result so the test is
reported as broken.

While system calls that create new file descriptors (must?) use the lowest
available file descriptor number, it does not seem useful to test this
property here. Drop the check for FD==3/4 to unbreak the testsuite.

We could also try to re-open the results file in ATF if we get a EBADF
error, but that will fail when running under Capsicum.

Reviewed By:	cem
Differential Revision: https://reviews.freebsd.org/D28683

(cherry picked from commit 10fc4c3218)
2021-03-17 12:22:15 +00:00
Alex Richardson
cb83303714 Import atf 0.22 snapshot ca73d08c3fc1ecffc1f1c97458c31ab82c12bb01
This includes improvements to the atf-sh helper functions that
significantly reduce the number of spawned processes for each test
and therefore speeds up running the testsuite noticeably.

(cherry picked from commit c203bd70b5)
2021-03-17 12:21:06 +00:00
Alex Richardson
b40b1ae9d5 lib/libc/tests/rpc: Correctly set timeout
The rpc_control() API does not accept the CLCR_SET_RPCB_TIMEOUT command,
it only accepts RPC_SVC_CONNMAXREC_GET/RPC_SVC_CONNMAXREC_SET, so it was
not doing anything.
Instead of incorrectly calling this API, use clnt_create_timed() instead.

I noticed this because the test was timing out after 120s in the CheriBSD CI.

Reviewed By:	ngie
Differential Revision: https://reviews.freebsd.org/D28478

(cherry picked from commit 90b5fc9583)
2021-03-17 09:57:00 +00:00
Alex Richardson
9ea5cc1453 Un-XFAIL two tests with Clang > 10
SVN r343917 fixed this for in-tree clang, but when building with a newer
out-of-tree clang the test was still marked as XFAIL.

Reviewed By:	dim
Differential Revision: https://reviews.freebsd.org/D28390

(cherry picked from commit 83ff5d5d98)
2021-03-17 09:54:27 +00:00
Alex Richardson
ab0e7589d2 readelf: Fix printing NT_FREEBSD_ARCH_TAG
Looking at lib/csu/arm/crt1_s.S, this should be a string and therefore the
restriction to 4 characters seems wrong.
Found whle updating https://reviews.llvm.org/D74393.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D28470

(cherry picked from commit 2a39919364)
2021-03-17 09:51:39 +00:00
Dimitry Andric
0b45290603 Partially revert libcxxrt changes to avoid _Unwind_Exception change
(Note I am also applying this to main and stable/13, to restore the old
libcxxrt ABI and to avoid having to maintain a compat library.)

After the recent cherry-picking of libcxxrt commits 0ee0dbfb0d and
d2b3fadf2d, users reported that editors/libreoffice packages from the
official package builders did not start anymore. It turns out that the
combination of these commits subtly changes the ABI, requiring all
applications that depend on internal details of struct _Unwind_Exception
(available via unwind-arm.h and unwind-itanium.h) to be recompiled.

However, the FreeBSD package builders always use -RELEASE jails, so
these still use the old declaration of struct _Unwind_Exception, which
is not entirely compatible. In particular, LibreOffice uses this struct
in its internal "uno bridge" component, where it attempts to setup its
own exception handling mechanism.

To fix this incompatibility, go back to the old declarations of struct
_Unwind_Exception, and restore the __LP64__ specific workaround we had
in place before (which was to cope with yet another, older ABI bug).

Effectively, this reverts upstream libcxxrt commits 88bdf6b290da
("Specify double-word alignment for ARM unwind") and b96169641f79
("Updated Itanium unwind"), and reapplies our commit 3c4fd2463b
("libcxxrt: add padding in __cxa_allocate_* to fix alignment").

PR:		253840
2021-03-13 14:54:05 +01:00
Ed Maste
c4dbe899aa clang: Fix -gz=zlib options for linker
Clang commit ccb4124a4172bf2cb2e1cd7c253f0f1654fce294:

Fix -gz=zlib options for linker

gcc translates -gz=zlib to --compress-debug-options=zlib for both
assembler and linker but clang only does this for assembler.

The linker needs --compress-debug-options=zlib option to compress the
debug sections in the generated executable or shared library.

Due to this bug, -gz=zlib has no effect on the generated executable or
shared library.

This patch fixes that.

Clang commit 462cf39a5c180621b56f7602270ce33eb7b68d23:

[Driver] Fix -gz=zlib options for linker also on FreeBSD

ccb4124a4172 fixed translating -gz=zlib to --compress-debug-sections for
linker invocation for several ToolChains, but omitted FreeBSD.

PR:		253942
Approved by:	dim
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29028

(cherry picked from commit 19587d7422)
2021-03-09 09:28:54 -05:00
Stefan Eßer
f165641df4 bc: Vendor import new version 3.3.3
(cherry picked from commit 028616d0dd)

Make length(0) and length(0.0) return 1 for compatibility with GNU bc
and the traditional FreeBSD bc.

Fix a potential division by zero error in a non-standard (extended)
math library function.
2021-03-08 21:09:19 +01:00
dankm
9019e7b388 nvi: fix catalog generation
Upstream broke catalog generation with some over-eagre style cleanups.
This brings in my pull request.

Obtained from:	https://github.com/lichray/nvi2/pull/88
Differential Revision: https://reviews.freebsd.org/D28594

(cherry picked from commit 888ae57252)
2021-03-02 15:26:08 +01:00
Dimitry Andric
1c1460747e Fix possibly unitialized variables in __cxa_demangle_gnu3()
After 0ee0dbfb0d where I imported a more
recent libcxxrt snapshot, the variables 'rtn' and 'has_ret' could in
some cases be used while still uninitialized. Most obviously this would
lead to a jemalloc complaint about a bad free(), aborting the program.

Fix this by initializing a bunch variables in their declarations. This
change has also been sent upstream, with some additional changes to be
used in their testing framework.

PR:		253226

(cherry picked from commit d149877758)
2021-02-24 20:39:15 +01:00
Jung-uk Kim
80cb372e2a lex: Do not let input() return 0 when end-of-file is reached
Importing flex 2.6.4 has introduced a regression: input() now returns 0
instead of EOF to indicate that the end of input was reached, just like
traditional AT&T and POSIX lex.  Note the behavior contradicts flex(1).
See "INCOMPATIBILITIES WITH LEX AND POSIX" section for information.
This incompatibility traces back to the original version and documented
in its manual page by the Vern Paxson.

Apparently, it has been reported in a few places, e.g.,

https://github.com/westes/flex/issues/448
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911415

Unfortunately, this also breaks the scanner used by libdtrace and
dtrace is unable to resolve some probe argument types as a result.  See
PR253440 for more information.

Note the regression was introduced by the following upstream commit
without any explanation or documentation change:

f863c9490e

Now we restore the traditional flex behavior unless lex-compatibility
mode is set with "-l" option because I believe the author originally
wanted to make it more lex and POSIX compatible.

PR:		253440
Reported by:	markj

(cherry picked from commit 6b7e592c21)
2021-02-22 16:13:50 -05:00
Stefan Eßer
4aa71da8dc bc: Upgrade to version 3.3.0
This update changes the behavior of "-e" or "-f" in BC_ENV_ARGS:

Use of these options on the command line makes bc exit after executing
the given commands. These options will not cause bc to exit when
passed via the environment (but EOF in STDIN or -e or -f on the
command line will make bc exit as before).

The same applies to DC_ENV_ARGS with regard to the dc program.

(cherry picked from commit 9a995fe186)
2021-02-22 12:50:32 +01:00
Dimitry Andric
d4a0c102a2 Merge libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456
Interesting fixes:
b3c73ba libelftc_dem_gnu3: Sync with elftoolchain r3877
7b2335c Mostly fix __cxa_demangle after #3

Reported by:	arichardson
PR:		253226

(cherry picked from commit 0ee0dbfb0d)

Revert 3c4fd2463b since upstream libcxxrt fixed it in another way

In 0ee0dbfb0d I imported a more recent
libcxxrt snapshot, which includes an upstream fix for the padding of
struct _Unwind_Exception:

e458560b7e

However, we also had a similar fix in our tree as:
https://cgit.freebsd.org/src/commit/?id=3c4fd2463bb29f65ef1404011fcb31e508cdf2e2

Since having both fixes makes the struct too large again, it leads to
SIGBUSes when throwing exceptions on amd64 (or other LP64 arches). This
is most easily tested by running kyua without any arguments.

It looks like our fix is no longer needed now, so revert it to reduce
diffs against upstream.

PR:		253226
Reviewed by:	arichardson, kp
Differential Revision: https://reviews.freebsd.org/D28799

(cherry picked from commit d2b3fadf2d)
2021-02-21 12:57:45 +01:00
Dimitry Andric
6af57633d7 Revert "Revert 3c4fd2463b since upstream libcxxrt fixed it in another way"
This reverts commit aeb00dca0d, since I
messed up and didn't merge the earlier libcxxrt changes first.
2021-02-20 21:39:43 +01:00
Dimitry Andric
aeb00dca0d Revert 3c4fd2463b since upstream libcxxrt fixed it in another way
In 0ee0dbfb0d I imported a more recent
libcxxrt snapshot, which includes an upstream fix for the padding of
struct _Unwind_Exception:

e458560b7e

However, we also had a similar fix in our tree as:
https://cgit.freebsd.org/src/commit/?id=3c4fd2463bb29f65ef1404011fcb31e508cdf2e2

Since having both fixes makes the struct too large again, it leads to
SIGBUSes when throwing exceptions on amd64 (or other LP64 arches). This
is most easily tested by running kyua without any arguments.

It looks like our fix is no longer needed now, so revert it to reduce
diffs against upstream.

PR:		253226
Reviewed by:	arichardson, kp
Differential Revision: https://reviews.freebsd.org/D28799

(cherry picked from commit d2b3fadf2d)
2021-02-20 21:00:17 +01:00
Dimitry Andric
83b1614a2e Update Subversion to 1.14.1 LTS. See contrib/subversion/CHANGES for a
summary of changes, or for a more thorough overview:

https://subversion.apache.org/docs/release-notes/1.14

NOTE 1: There is no need to dump and reload repositories, and the
working copy format is still the same as Subversion 1.8 through 1.13.

NOTE 2: The upstream release also contains a fix for a security issue in
mod_dav_svn (CVE-2020-17525), but since we do not build or use any
Apache modules, it is not an issue for the FreeBSD base system.

Relnotes:	yes

(cherry-picked from 0ff1014944)
2021-02-18 21:03:57 +01:00
Ed Maste
207f428971 readelf: do not trucate section name with -W
PR:		246015
Reviewed by:	cem
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D28461

(cherry picked from commit 847dfd2803)
2021-02-18 14:31:28 -05:00
Dimitry Andric
97232b0dc0 Fix incorrect hypotl(3) result with subnormal numbers
This adjusts the factor used to scale the subnormal numbers, so it
becomes the right value after adjusting its exponent. Thanks to Steve
Kargl for finding the most elegant fix.

Also enable the hypot tests, and add a test case for this bug.

PR:		253313

(cherry picked from commit d3338f3355)

Fix lib/msun/test builds on platforms without 80-bit long doubles

After d3338f3355, the lib/msun test case
'hypotl_near_underflow' would fail to compile on platforms where long
doubles weren't 80 bit, like on x86. Disable this particular test on
such platforms for now.

PR:		253313

(cherry picked from commit 2512066228)
2021-02-18 19:08:27 +01:00
Cy Schubert
6bb08afcf9 MFC 57785538c6 and
1e811efbc5:

57785538c6:

Simplify the FreeBSD check using __FreeBSD__ compiler macro.

Rather than rely on __FreeBSD_version, defined in sys/param.h, use
__FreeBSD__ defined by the compiler.

Reported by:	emaste
MFC after:	1 week

(cherry picked from commit 57785538c6)

1e811efbc5:

Fix non-IPv6 build post 57785538c6.

57785538c6 change the test for FreeBSD
from __FreeBSD_version to __FreeBSD__. However this test was performed
before sys/param.h was included, therefore __FreeBSD_version was never
defined. As the test was never true opt_random_ip_id.h was never included.

Submitted by:	bdragon
Reported by:	bdragon

(cherry picked from commit 1e811efbc5)
2021-02-15 16:40:50 -08:00
Cy Schubert
b3e0463c74 MFC d20f7a5a3d:
Simply FreeBSD check using __FreeBSD__ and remove OpenBSD

(cherry picked from commit d20f7a5a3d)
2021-02-15 16:40:50 -08:00
Cy Schubert
5c32dfaaa1 MFC 10990cb460:
Simplify FreeBSD check.

(cherry picked from commit 10990cb460)
2021-02-15 16:40:50 -08:00
Cy Schubert
d751393cdd MFC e673debe7d:
Simplify BSD macro tests.

All FreeBSD and NetBSD are BSD >= 199306 and have been for a long time.

(cherry picked from commit e673debe7d)
2021-02-15 16:40:49 -08:00
Cy Schubert
d81409e2b9 MFC 0f34c80f37:
Replace the redundant MENTAT macro with SOLARIS.

MENTAT and SOLARIS are synonymous. Remove the extraneous duplicate
macro.

(cherry picked from commit 0f34c80f37)
2021-02-15 16:40:49 -08:00