1999-06-23 18:28:27 -04:00
|
|
|
/*
|
2018-02-23 03:53:12 -05:00
|
|
|
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
2000-07-31 21:33:37 -04:00
|
|
|
*
|
2016-06-27 00:56:38 -04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
2020-09-14 19:50:58 -04:00
|
|
|
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
2018-02-23 03:53:12 -05:00
|
|
|
*
|
|
|
|
|
* See the COPYRIGHT file distributed with this work for additional
|
|
|
|
|
* information regarding copyright ownership.
|
1999-06-23 18:28:27 -04:00
|
|
|
*/
|
|
|
|
|
|
2005-04-27 00:57:32 -04:00
|
|
|
/*! \file */
|
2000-06-22 18:00:42 -04:00
|
|
|
|
2018-11-23 15:35:01 -05:00
|
|
|
#include <isc/bind9.h>
|
1999-06-23 18:28:27 -04:00
|
|
|
#include <isc/lib.h>
|
2021-02-09 11:44:40 -05:00
|
|
|
#include <isc/mem.h>
|
|
|
|
|
#include <isc/util.h>
|
|
|
|
|
|
2021-03-26 14:43:18 -04:00
|
|
|
#include "config.h"
|
2021-02-09 11:44:40 -05:00
|
|
|
#include "mem_p.h"
|
|
|
|
|
#include "tls_p.h"
|
2021-02-16 09:57:39 -05:00
|
|
|
#include "trampoline_p.h"
|
1999-06-23 18:28:27 -04:00
|
|
|
|
2021-03-26 14:43:18 -04:00
|
|
|
#ifndef ISC_CONSTRUCTOR
|
|
|
|
|
#error Either __attribute__((constructor|destructor))__ or DllMain support needed to compile BIND 9.
|
|
|
|
|
#endif
|
|
|
|
|
|
1999-06-23 18:28:27 -04:00
|
|
|
/***
|
|
|
|
|
*** Functions
|
|
|
|
|
***/
|
|
|
|
|
|
2009-08-31 20:22:28 -04:00
|
|
|
void
|
2020-02-14 00:35:17 -05:00
|
|
|
isc_lib_register(void) {
|
2018-08-06 07:00:55 -04:00
|
|
|
isc_bind9 = false;
|
2009-08-31 20:22:28 -04:00
|
|
|
}
|
2021-02-09 11:44:40 -05:00
|
|
|
|
|
|
|
|
void
|
2021-05-19 02:38:33 -04:00
|
|
|
isc__initialize(void) ISC_CONSTRUCTOR;
|
2021-02-09 11:44:40 -05:00
|
|
|
void
|
2021-05-19 02:38:33 -04:00
|
|
|
isc__shutdown(void) ISC_DESTRUCTOR;
|
2021-02-09 11:44:40 -05:00
|
|
|
|
|
|
|
|
void
|
|
|
|
|
isc__initialize(void) {
|
|
|
|
|
isc__mem_initialize();
|
|
|
|
|
isc__tls_initialize();
|
2021-02-16 09:57:39 -05:00
|
|
|
isc__trampoline_initialize();
|
2021-02-09 11:44:40 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
isc__shutdown(void) {
|
2021-02-16 09:57:39 -05:00
|
|
|
isc__trampoline_shutdown();
|
2021-02-09 11:44:40 -05:00
|
|
|
isc__tls_shutdown();
|
|
|
|
|
isc__mem_shutdown();
|
|
|
|
|
}
|
2021-02-26 15:09:48 -05:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* This is a workaround for situation when libisc is statically linked. Under
|
|
|
|
|
* normal situation, the linker throws out all symbols from compilation unit
|
|
|
|
|
* when no symbols are used in the final binary. This empty function must be
|
|
|
|
|
* called at least once from different compilation unit (mem.c in this case).
|
|
|
|
|
*/
|
|
|
|
|
void
|
|
|
|
|
isc_enable_constructors() {
|
|
|
|
|
/* do nothing */
|
|
|
|
|
}
|