Simplify test and use of gcc hidden attribute.
This commit is contained in:
parent
2547c6c81f
commit
dab7531ecc
8
configure
vendored
8
configure
vendored
@ -638,11 +638,7 @@ fi
|
|||||||
if test "$gcc" -eq 1; then
|
if test "$gcc" -eq 1; then
|
||||||
echo >> configure.log
|
echo >> configure.log
|
||||||
cat > $test.c <<EOF
|
cat > $test.c <<EOF
|
||||||
#if ((__GNUC__-0) * 100 + __GNUC_MINOR__-0 >= 303)
|
|
||||||
#define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
#define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
||||||
#else
|
|
||||||
# define ZLIB_INTERNAL
|
|
||||||
#endif
|
|
||||||
int ZLIB_INTERNAL foo;
|
int ZLIB_INTERNAL foo;
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
@ -650,10 +646,10 @@ int main()
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if tryboth $CC -c $CFLAGS $test.c; then
|
if tryboth $CC -c $CFLAGS $test.c; then
|
||||||
|
CFLAGS="$CFLAGS -DHAVE_HIDDEN"
|
||||||
|
SFLAGS="$SFLAGS -DHAVE_HIDDEN"
|
||||||
echo "Checking for attribute(visibility) support... Yes." | tee -a configure.log
|
echo "Checking for attribute(visibility) support... Yes." | tee -a configure.log
|
||||||
else
|
else
|
||||||
CFLAGS="$CFLAGS -DNO_VIZ"
|
|
||||||
SFLAGS="$SFLAGS -DNO_VIZ"
|
|
||||||
echo "Checking for attribute(visibility) support... No." | tee -a configure.log
|
echo "Checking for attribute(visibility) support... No." | tee -a configure.log
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
2
gzguts.h
2
gzguts.h
@ -12,7 +12,7 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ((__GNUC__-0) * 100 + __GNUC_MINOR__-0) >= 303 && !defined(NO_VIZ)
|
#ifdef HAVE_HIDDEN
|
||||||
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
||||||
#else
|
#else
|
||||||
# define ZLIB_INTERNAL
|
# define ZLIB_INTERNAL
|
||||||
|
2
zutil.h
2
zutil.h
@ -13,7 +13,7 @@
|
|||||||
#ifndef ZUTIL_H
|
#ifndef ZUTIL_H
|
||||||
#define ZUTIL_H
|
#define ZUTIL_H
|
||||||
|
|
||||||
#if ((__GNUC__-0) * 100 + __GNUC_MINOR__-0) >= 303 && !defined(NO_VIZ)
|
#ifdef HAVE_HIDDEN
|
||||||
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
||||||
#else
|
#else
|
||||||
# define ZLIB_INTERNAL
|
# define ZLIB_INTERNAL
|
||||||
|
Loading…
Reference in New Issue
Block a user