diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2014-05-23 15:28:55 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2014-05-23 15:28:55 +0000 |
commit | 6ba50a2001bcfa1b467f69985a002fc064d8c807 (patch) | |
tree | 286e3d8e4c7a3cd3b426563187a6c0f371c4538d /src | |
parent | 9315f64b6e8b6c1d986d90ffa207008d29b45c06 (diff) |
Added symbol visibility features to the build to hide internal symbols (GCC)
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.in | 3 | ||||
-rw-r--r-- | src/htsglobal.h | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index ab200b7..bb3cb6f 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -179,6 +179,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_CFLAGS = @AM_CFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -187,6 +188,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -208,6 +210,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ HTTPS_SUPPORT = @HTTPS_SUPPORT@ ICONV_LIBS = @ICONV_LIBS@ INSTALL = @INSTALL@ diff --git a/src/htsglobal.h b/src/htsglobal.h index efbe97e..bd10b39 100644 --- a/src/htsglobal.h +++ b/src/htsglobal.h @@ -257,8 +257,14 @@ Please visit our Website: http://www.httrack.com #define HTSEXT_API __declspec(dllimport) #endif #else +/* See <http://gcc.gnu.org/wiki/Visibility> */ +#if ( ( defined(__GNUC__) && ( __GNUC__ >= 4 ) ) \ + || ( defined(HAVE_VISIBILITY) && HAVE_VISIBILITY ) ) +#define HTSEXT_API __attribute__ ((visibility ("default"))) +#else #define HTSEXT_API #endif +#endif #ifndef HTS_LONGLONG #ifdef HTS_NO_64_BIT |