mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-25 10:50:08 +03:00
build: Move definition of ATTRIBUTE_DESTRUCTOR to libxml.h
This commit is contained in:
parent
fd099dd8dc
commit
1afaa37128
@ -139,9 +139,6 @@ if (NOT MSVC)
|
||||
f(void) {}
|
||||
int main(void) { return 0; }
|
||||
" HAVE_ATTRIBUTE_DESTRUCTOR)
|
||||
if(HAVE_ATTRIBUTE_DESTRUCTOR)
|
||||
set(ATTRIBUTE_DESTRUCTOR "__attribute__((destructor))")
|
||||
endif()
|
||||
check_include_files(arpa/inet.h HAVE_ARPA_INET_H)
|
||||
check_function_exists(class HAVE_CLASS)
|
||||
check_include_files(dlfcn.h HAVE_DLFCN_H)
|
||||
|
@ -1,6 +1,3 @@
|
||||
/* A form that will not confuse apibuild.py */
|
||||
#cmakedefine ATTRIBUTE_DESTRUCTOR @ATTRIBUTE_DESTRUCTOR@
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#cmakedefine HAVE_ARPA_INET_H 1
|
||||
|
||||
|
@ -355,7 +355,6 @@ void __attribute__((destructor))
|
||||
f(void) {}], [], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_ATTRIBUTE_DESTRUCTOR], [1],[Define if __attribute__((destructor)) is accepted])
|
||||
AC_DEFINE([ATTRIBUTE_DESTRUCTOR], [__attribute__((destructor))],[A form that will not confuse apibuild.py])],[
|
||||
AC_MSG_RESULT(no)])
|
||||
|
||||
dnl
|
||||
|
4
libxml.h
4
libxml.h
@ -53,6 +53,10 @@
|
||||
#define ATTRIBUTE_UNUSED
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ATTRIBUTE_DESTRUCTOR
|
||||
#define ATTRIBUTE_DESTRUCTOR __attribute__((destructor))
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) || \
|
||||
(defined(__GNUC__) && (__GNUC__ >= 8) && !defined(__EDG__))
|
||||
#define ATTRIBUTE_NO_SANITIZE(arg) __attribute__((no_sanitize(arg)))
|
||||
|
@ -298,7 +298,6 @@ endif
|
||||
### __attribute__((destructor))
|
||||
if cc.has_function_attribute('destructor')
|
||||
config_h.set10('HAVE_ATTRIBUTE_DESTRUCTOR', true)
|
||||
config_h.set('ATTRIBUTE_DESTRUCTOR', '__attribute__((destructor))')
|
||||
endif
|
||||
|
||||
### DSO support
|
||||
|
Loading…
x
Reference in New Issue
Block a user