]> git.ipfire.org Git - thirdparty/gcc.git/commit
libgomp: Don't include limits.h instead of hidden visibility block
authorJakub Jelinek <jakub@redhat.com>
Tue, 13 Jul 2021 07:50:49 +0000 (09:50 +0200)
committerJakub Jelinek <jakub@redhat.com>
Tue, 10 May 2022 08:14:25 +0000 (10:14 +0200)
commitb2d4fa11288632e144abb369cc0aa5bd567d259e
treec05564a2b28de8dc07c749ba2db5d7c676120745
parentcd1076871987740312a040fba9ba4e7c047bdedf
libgomp: Don't include limits.h instead of hidden visibility block

sem.h is included in between # pragma GCC visibility push(hidden)
and # pragma GCC visibility pop and includes limits.h there, which
since the introduction of sysconf declaration in recent glibcs
in there causes trouble.  libgomp assumes it is compiled by gcc,
so we don't really need to include limits.h there and can use
-__INT_MAX__ - 1 instead (which clang and icc support too for years).

2021-07-13  Jakub Jelinek  <jakub@redhat.com>
    Florian Weimer  <fweimer@redhat.com>

* config/linux/sem.h: Don't include limits.h.
(SEM_WAIT): Define to -__INT_MAX__ - 1 instead of INT_MIN.
* config/linux/affinity.c: Include limits.h.

(cherry picked from commit 42f10ba5b57250506d69a0391ea7771c843ea286)
libgomp/config/linux/affinity.c
libgomp/config/linux/sem.h