mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-07 06:04:59 +00:00
commit
177562e6ba
6 changed files with 25 additions and 1 deletions
|
@ -101,6 +101,10 @@ set(EXTRA_COMPILE_FLAGS)
|
|||
if(FLAG_NO_STRICT_ALIASING)
|
||||
set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fno-strict-aliasing")
|
||||
endif()
|
||||
if(FLAG_VISIBILITY)
|
||||
add_definitions(-DXML_ENABLE_VISIBILITY=1)
|
||||
set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fvisibility=hidden")
|
||||
endif(FLAG_VISIBILITY)
|
||||
if (WARNINGS_AS_ERRORS)
|
||||
if(MSVC)
|
||||
add_definitions(/WX)
|
||||
|
|
|
@ -4,10 +4,13 @@ NOTE: We are looking for help with a few things:
|
|||
|
||||
Release x.x.x XXX XXXXXX XX XXXX
|
||||
Other changes:
|
||||
#195 #197 Autotools/CMake: Utilize -fvisibility=hidden to stop
|
||||
exporting non-API symbols
|
||||
#212 CMake: Make libdir of pkgconfig expat.pc support multilib
|
||||
|
||||
Special thanks to:
|
||||
@userwithuid
|
||||
Yury Gribov
|
||||
|
||||
Release 2.2.6 Sun August 12 2018
|
||||
Bug fixes:
|
||||
|
|
|
@ -68,3 +68,4 @@ configure_file(expat_config.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/expat_config.h"
|
|||
add_definitions(-DHAVE_EXPAT_CONFIG_H)
|
||||
|
||||
check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)
|
||||
check_c_compiler_flag("-fvisibility=hidden" FLAG_VISIBILITY)
|
||||
|
|
|
@ -88,6 +88,13 @@ if test "$GCC" = yes ; then
|
|||
LDFLAGS="${LDFLAGS} -fno-strict-aliasing"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(whether compiler supports visibility)
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden -Wall -Werror"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[void __attribute__((visibility("default"))) foo(void); void foo(void) {}]])],
|
||||
AC_MSG_RESULT(yes); CFLAGS="$OLDCFLAGS -fvisibility=hidden -DXML_ENABLE_VISIBILITY=1",
|
||||
AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS")
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
|
|
|
@ -93,7 +93,11 @@
|
|||
# endif
|
||||
#endif /* not defined XML_STATIC */
|
||||
|
||||
#if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
#ifndef XML_ENABLE_VISIBILITY
|
||||
# define XML_ENABLE_VISIBILITY 0
|
||||
#endif
|
||||
|
||||
#if !defined(XMLIMPORT) && XML_ENABLE_VISIBILITY
|
||||
# define XMLIMPORT __attribute__ ((visibility ("default")))
|
||||
#endif
|
||||
|
||||
|
|
|
@ -115,6 +115,11 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef XML_ENABLE_VISIBILITY
|
||||
#if XML_ENABLE_VISIBILITY
|
||||
__attribute__ ((visibility ("default")))
|
||||
#endif
|
||||
#endif
|
||||
void
|
||||
_INTERNAL_trim_to_complete_utf8_characters(const char * from, const char ** fromLimRef);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue