freebsd-dev/contrib/libc++
John Baldwin f7f6b03a13 Use __FreeBSD_version to determine if gets() has been removed.
GCC compilers set __FreeBSD__ statically to a build-time determined
targeted version (which in ports always matches the build host's
version).  This means that when building any version (12 or 13, etc.)
of riscv or some other architecture via GCC on a 12.x host,
__FreeBSD__ will always be set to 12.  As a result, __FreeBSD__ cannot
be used to reliably detect the target FreeBSD version being built.
Instead, __FreeBSD_version from either <sys/param.h> (in the kernel)
or <osreldate.h> (in userland) should be used.

This changes the gets() test in libc++ to use __FreeBSD_version from
<osreldate.h>.

Reported by:	jenkins (riscv64 and amd64-gcc)
Reviewed by:	dim, imp
Differential Revision:	https://reviews.freebsd.org/D22034
2019-10-15 18:16:10 +00:00
..
include Use __FreeBSD_version to determine if gets() has been removed. 2019-10-15 18:16:10 +00:00
src Merge libc++ trunk r366426, resolve conflicts, and add FREEBSD-Xlist. 2019-08-22 19:49:51 +00:00
CREDITS.TXT Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
FREEBSD-upgrade
FREEBSD-Xlist Merge libc++ trunk r366426, resolve conflicts, and add FREEBSD-Xlist. 2019-08-22 19:49:51 +00:00
LICENSE.TXT Merge libc++ trunk r366426, resolve conflicts, and add FREEBSD-Xlist. 2019-08-22 19:49:51 +00:00