mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
67f19adfc6
aclocal hates when you only specify one parameter to AC_DEFINE ... simple patch to add the other two parameters fixes for acl and xfstests [hch: added nfs4acl] Reviewed-by: Christoph Hellwig <hch@lst.de>
23 lines
768 B
Plaintext
23 lines
768 B
Plaintext
AC_DEFUN([AC_FUNC_GCC_VISIBILITY],
|
|
[AC_CACHE_CHECK(whether __attribute__((visibility())) is supported,
|
|
libc_cv_visibility_attribute,
|
|
[cat > conftest.c <<EOF
|
|
int foo __attribute__ ((visibility ("hidden"))) = 1;
|
|
int bar __attribute__ ((visibility ("protected"))) = 1;
|
|
EOF
|
|
libc_cv_visibility_attribute=no
|
|
if ${CC-cc} -Werror -S conftest.c -o conftest.s \
|
|
>/dev/null 2>&1; then
|
|
if grep '\.hidden.*foo' conftest.s >/dev/null; then
|
|
if grep '\.protected.*bar' conftest.s >/dev/null; then
|
|
libc_cv_visibility_attribute=yes
|
|
fi
|
|
fi
|
|
fi
|
|
rm -f conftest.[cs]
|
|
])
|
|
if test $libc_cv_visibility_attribute = yes; then
|
|
AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE, [], [GCC supports visibility attributes])
|
|
fi
|
|
])
|