mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
Remove priority from attribute constructor/destructor
On some platforms, the __attribute__ constructor and destructor won't take priorities and the compilation failed. On such platform would be macOS. For this reason, the constructor/destructor in the libisc was reworked to not use priorities, but have a single constructor and destructor that calls the appropriate routines in correct order. This commit removes the extra priority because it's now not needed and it also breaks a compilation on macOS with GCC 10.
This commit is contained in:
parent
728422d939
commit
d68b009cfe
@ -49,11 +49,11 @@
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#if HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR && HAVE_FUNC_ATTRIBUTE_DESTRUCTOR
|
||||
#define ISC_CONSTRUCTOR(priority) __attribute__((constructor(priority)))
|
||||
#define ISC_DESTRUCTOR(priority) __attribute__((destructor(priority)))
|
||||
#define ISC_CONSTRUCTOR __attribute__((constructor))
|
||||
#define ISC_DESTRUCTOR __attribute__((destructor))
|
||||
#elif WIN32
|
||||
#define ISC_CONSTRUCTOR(priority)
|
||||
#define ISC_DESTRUCTOR(priority)
|
||||
#define ISC_CONSTRUCTOR
|
||||
#define ISC_DESTRUCTOR
|
||||
#endif
|
||||
|
||||
/*%
|
||||
|
@ -36,9 +36,9 @@ isc_lib_register(void) {
|
||||
}
|
||||
|
||||
void
|
||||
isc__initialize(void) ISC_CONSTRUCTOR(101);
|
||||
isc__initialize(void) ISC_CONSTRUCTOR;
|
||||
void
|
||||
isc__shutdown(void) ISC_DESTRUCTOR(101);
|
||||
isc__shutdown(void) ISC_DESTRUCTOR;
|
||||
|
||||
void
|
||||
isc__initialize(void) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user