]> git.ipfire.org Git - thirdparty/util-linux.git/commit
include/c: use __has_attribute
authorKarel Zak <kzak@redhat.com>
Tue, 21 May 2019 14:27:17 +0000 (16:27 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 21 May 2019 14:27:17 +0000 (16:27 +0200)
commit34b0a305f6a86b18ce7c4ca2f9fc71dc89d6e1d4
tree891a13884bb8627eadb29e6c6a83e3de25054b9a
parent2e56aa3c3b11bcf83fa36927da40eb6e901de1ff
include/c: use __has_attribute

The __has macros are more portable (supported by gcc as well as
clang).

The old __GNUC_PREREQ is deprecated and it should be removed in
future. (Well, the __has macros are supported since gcc 5, so we
should be patient as some old stable distros (e.g. RHEL 7) use gcc
4.x).

This patch helps clang to correctly analyze our xalloc.h stuff.

Signed-off-by: Karel Zak <kzak@redhat.com>
include/c.h