[all-commits] [llvm/llvm-project] d5367d: Refine check for `_LIBCPP_C_HAS_NO_GETS` on FreeBSD

Dimitry Andric via All-commits all-commits at lists.llvm.org
Sat Oct 19 03:58:05 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d5367db95c4295b088bf9ae3cf99e24d8bf7e249
      https://github.com/llvm/llvm-project/commit/d5367db95c4295b088bf9ae3cf99e24d8bf7e249
  Author: Dimitry Andric <dimitry at andric.com>
  Date:   2019-10-19 (Sat, 19 Oct 2019)

  Changed paths:
    M libcxx/include/__config

  Log Message:
  -----------
  Refine check for `_LIBCPP_C_HAS_NO_GETS` on FreeBSD

Summary:
In D67316 we added `_LIBCPP_C_HAS_NO_GETS` to signal that the C library
does not provide `gets()`, and added a test for FreeBSD 13 or higher,
using the compiler-defined `__FreeBSD__` macro.

Unfortunately this did not work that well for FreeBSD's own CI process,
since the gcc compilers used for some architectures define `__FreeBSD__`
to match the build host, not the target.

Instead, we should use the `__FreeBSD_version` macro from the userland
header `<osreldate.h>`, which is more fine-grained.  See also
<https://reviews.freebsd.org/D22034>.

Reviewers: EricWF, mclow.lists, emaste, ldionne

Reviewed By: emaste, ldionne

Subscribers: dexonsmith, bsdjhb, krytarowski, christof, ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D69174

llvm-svn: 375340




More information about the All-commits mailing list