freebsd-dev/contrib
Stefan Eßer e2650af157 Make CPU_SET macros compliant with other implementations
The introduction of <sched.h> improved compatibility with some 3rd
party software, but caused the configure scripts of some ports to
assume that they were run in a GLIBC compatible environment.

Parts of sched.h were made conditional on -D_WITH_CPU_SET_T being
added to ports, but there still were compatibility issues due to
invalid assumptions made in autoconfigure scripts.

The differences between the FreeBSD version of macros like CPU_AND,
CPU_OR, etc. and the GLIBC versions was in the number of arguments:
FreeBSD used a 2-address scheme (one source argument is also used as
the destination of the operation), while GLIBC uses a 3-adderess
scheme (2 source operands and a separately passed destination).

The GLIBC scheme provides a super-set of the functionality of the
FreeBSD macros, since it does not prevent passing the same variable
as source and destination arguments. In code that wanted to preserve
both source arguments, the FreeBSD macros required a temporary copy of
one of the source arguments.

This patch set allows to unconditionally provide functions and macros
expected by 3rd party software written for GLIBC based systems, but
breaks builds of externally maintained sources that use any of the
following macros: CPU_AND, CPU_ANDNOT, CPU_OR, CPU_XOR.

One contributed driver (contrib/ofed/libmlx5) has been patched to
support both the old and the new CPU_OR signatures. If this commit
is merged to -STABLE, the version test will have to be extended to
cover more ranges.

Ports that have added -D_WITH_CPU_SET_T to build on -CURRENT do
no longer require that option.

The FreeBSD version has been bumped to 1400046 to reflect this
incompatible change.

Reviewed by:	kib
MFC after:	2 weeks
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D33451
2021-12-30 12:20:32 +01:00
..
arm-optimized-routines Import Arm Optimized Routines v21.02 2021-07-06 11:05:34 +01:00
atf Import atf 0.22 snapshot 55c21b2c5fb189bbdfccb2b297bfa89236502542 2021-09-10 17:08:42 -06:00
bc contrib/bc: merge version 5.2.1 from vendor branch 2021-11-30 18:40:32 +01:00
bearssl
blacklist
bmake Merge bmake-20211212 2021-12-18 10:09:14 -08:00
bsddialog bsddialog: import version 0.0.2 2021-12-21 16:13:00 +01:00
bsnmp Fix bsnmpd(1) crash with ill-formed Discovery message 2021-10-01 14:10:39 +03:00
byacc yacc: Regen test cases for the previous commit 2021-02-11 18:41:28 -05:00
bzip2 Remove FREEBSD-vendor files 2021-12-06 16:36:44 -05:00
capsicum-test Re-enable network ioctls in capability mode 2021-04-23 09:22:49 -04:00
com_err
cortex-strings
dialog dialog: fix macro redefinition 2021-03-01 16:01:44 +01:00
diff Fix macro-redefined warning in gnu/diff for fputc_unlocked 2021-01-19 21:23:25 +00:00
dma dma: import snapshot 2021-07-10 2021-09-22 11:10:58 +02:00
ee ee: restore the stdin/stdout terminal check 2021-04-12 00:48:45 +03:00
elftoolchain readelf: add Go Build ID ELF note support 2021-12-29 15:30:22 -05:00
expat
file
flex contrib/flex: Drop local __dead2 patch 2021-04-21 10:54:59 +01:00
gdtoa
googletest
hyperv/tools
jemalloc Fix abort in jemalloc extent coalescing. 2020-12-18 10:09:21 +00:00
kyua
ldns
ldns-host
less less: upgrade to v590. 2021-07-17 22:20:44 -07:00
lib9p
libarchive libarchive: cherry-pick bugfix from vendor 2021-11-17 22:28:45 +01:00
libbegemot
libc-pwcache
libc-vis vis(3): avoid out-of-bounds stack buffer reads 2021-06-16 16:27:13 +01:00
libcbor Import libcbor at 'contrib/libcbor/' 2021-10-06 20:26:10 -04:00
libcxxrt Partially revert libcxxrt changes to avoid _Unwind_Exception change 2021-03-13 14:54:24 +01:00
libdivsufsort
libedit libedit: import snapshot 2021-09-10 2021-09-22 10:19:43 +02:00
libevent
libexecinfo
libfido2 libfido2: Address CHERI compatibility 2021-10-06 21:40:26 -04:00
libpcap
libucl Fix build post a040967612. 2021-03-22 08:42:18 -07:00
libxo
llvm-project Avoid emitting popcnt in libclang_rt.fuzzer*.a if unsupported 2021-12-30 10:55:49 +01:00
lua contrib/lua: update to 5.4.2 2021-01-13 23:56:18 -06:00
lutok
mandoc mandoc: import version 1.14.6 2021-11-15 16:58:58 +01:00
mknod
mtree fts_read: Handle error from a NULL return better. 2020-12-08 23:38:26 +00:00
ncurses ncurses: Apply a tputs() fix from patch 20210403 2021-08-11 13:08:23 -04:00
netbsd-tests Revert "t_setrlimit: Adjust resource limit to 20M" 2021-12-20 18:33:06 +01:00
netcat Remove FREEBSD-vendor files 2021-12-06 16:36:44 -05:00
ngatm
ntp ntp: Revert "Disable ntpd stack gap. When ASLR with STACK GAP != 0 ntpd suffers SIGSEGV." 2021-10-15 16:06:26 -07:00
nvi Allow building usr.bin/vi with MK_ASAN 2021-07-19 15:04:19 +01:00
ofed Make CPU_SET macros compliant with other implementations 2021-12-30 12:20:32 +01:00
one-true-awk Awk: Add error file 2021-11-06 16:24:36 -06:00
openbsm close_range: add audit support 2021-02-23 17:47:07 +00:00
opencsd/decoder
openpam Merge upstream r948: fix race condition in openpam_ttyconv(3). 2020-11-19 05:46:59 +00:00
openresolv
opie
pam_modules/pam_passwdqc
pf ftp-proxy: Revert incorrect migration to libpfctl 2021-07-01 21:34:40 +02:00
pjdfstest
pnglite pnglite: should use ntohl 2021-01-12 00:56:35 +02:00
pnpinfo
processor-trace
sendmail
smbfs
sqlite3 sqlite3: import sqlite3 3.35.5 2021-05-06 18:01:44 -07:00
tcp_wrappers tcp_wrappers: get rid of duplicate fgets declarations 2021-09-30 23:55:27 -05:00
tcpdump pf: Introduce ridentifier 2021-11-05 09:39:56 +01:00
tcsh tcsh: update to version 6.22.04. 2021-05-20 00:12:27 +03:00
telnet telnet(1): add quiet mode ("telnet -Q") 2021-06-21 17:11:57 +01:00
terminus contrib: setup terminus 2021-01-02 21:03:28 +02:00
tnftp
traceroute ping: fix some man pages and tests after r368045 2020-11-26 04:55:02 +00:00
tzcode tzcode: fix tz change detection logic 2021-12-21 12:01:24 -06:00
tzdata contrib/tzdata: import tzdata 2021e 2021-10-22 13:20:20 +08:00
unbound unbount: Vendor import 1.14.0rc1 2021-12-02 22:11:04 -08:00
unvis
vis Merge tag 'vendor/NetBSD/vis/20210621' into vis 2021-06-21 18:04:17 -06:00
wpa wpa: Redo import wpa_supplicant/hostapd commit 14ab4a816 2021-12-02 15:08:52 -08:00
xz