mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
Migrated to new API of autoinit_funcs.h
This commit is contained in:
@@ -24,15 +24,19 @@
|
||||
* @author Karlson2k (Evgeny Grin)
|
||||
*/
|
||||
#include "mhd_sys_options.h"
|
||||
#include "mhd_lib_init.h"
|
||||
|
||||
#include "mhd_panic.h"
|
||||
#include "mhd_mono_clock.h"
|
||||
|
||||
#include "mhd_socket_type.h"
|
||||
#include "mhd_send.h"
|
||||
#ifdef MHD_SOCKETS_KIND_WINSOCK
|
||||
# include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#include "mhd_mono_clock.h"
|
||||
#include "mhd_send.h"
|
||||
|
||||
#include "mhd_lib_init.h"
|
||||
|
||||
void
|
||||
mhd_lib_global_init (void)
|
||||
{
|
||||
@@ -62,7 +66,7 @@ mhd_lib_global_deinit (void)
|
||||
}
|
||||
|
||||
|
||||
#ifndef _AUTOINIT_FUNCS_ARE_SUPPORTED
|
||||
#ifndef AIF_AUTOINIT_FUNCS_ARE_SUPPORTED
|
||||
static volatile int mhd_lib_global_inited = 0;
|
||||
static volatile int mhd_lib_global_not_inited = ! 0;
|
||||
|
||||
@@ -86,4 +90,4 @@ MHD_lib_global_check_deinit (void)
|
||||
}
|
||||
|
||||
|
||||
#endif /* ! _AUTOINIT_FUNCS_ARE_SUPPORTED */
|
||||
#endif /* ! AIF_AUTOINIT_FUNCS_ARE_SUPPORTED */
|
||||
|
||||
@@ -29,11 +29,6 @@
|
||||
#include "mhd_sys_options.h"
|
||||
#include "autoinit_funcs.h"
|
||||
|
||||
#if ! defined(_AUTOINIT_FUNCS_ARE_SUPPORTED) \
|
||||
&& defined(AIF_AUTOINIT_FUNCS_ARE_SUPPORTED)
|
||||
# define _AUTOINIT_FUNCS_ARE_SUPPORTED 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Initialise library global resources
|
||||
*/
|
||||
@@ -46,9 +41,9 @@ mhd_lib_global_init (void);
|
||||
void
|
||||
mhd_lib_global_deinit (void);
|
||||
|
||||
#ifdef _AUTOINIT_FUNCS_ARE_SUPPORTED
|
||||
#ifdef AIF_AUTOINIT_FUNCS_ARE_SUPPORTED
|
||||
# define MHD_GLOBAL_INIT_CHECK() ((void) 0)
|
||||
#else /* ! _AUTOINIT_FUNCS_ARE_SUPPORTED */
|
||||
#else /* ! AIF_AUTOINIT_FUNCS_ARE_SUPPORTED */
|
||||
/* The functions are exported, but not declared in public header */
|
||||
|
||||
/**
|
||||
@@ -65,7 +60,7 @@ MHD_lib_global_check_deinit (void);
|
||||
|
||||
# define MHD_GLOBAL_INIT_CHECK() MHD_lib_global_check_init ()
|
||||
|
||||
#endif /* ! _AUTOINIT_FUNCS_ARE_SUPPORTED */
|
||||
#endif /* ! AIF_AUTOINIT_FUNCS_ARE_SUPPORTED */
|
||||
|
||||
|
||||
#endif /* ! MHD_LIB_INIT_H */
|
||||
|
||||
@@ -44,12 +44,6 @@
|
||||
#include "mhd_sys_options.h"
|
||||
#include "mhd_lib_init.h"
|
||||
|
||||
#if ! defined(_SET_INIT_AND_DEINIT_FUNCS) \
|
||||
&& defined(AIF_SET_INIT_AND_DEINIT_FUNCS)
|
||||
# define _SET_INIT_AND_DEINIT_FUNCS(FI,FD) \
|
||||
AIF_SET_INIT_AND_DEINIT_FUNCS (FI,FD)
|
||||
#endif
|
||||
|
||||
/* Forward declarations */
|
||||
void
|
||||
mhd_lib_global_init_wrap (void);
|
||||
@@ -72,11 +66,11 @@ mhd_lib_global_deinit_wrap (void)
|
||||
}
|
||||
|
||||
|
||||
#ifdef _AUTOINIT_FUNCS_ARE_SUPPORTED
|
||||
#ifdef AIF_AUTOINIT_FUNCS_ARE_SUPPORTED
|
||||
|
||||
_SET_INIT_AND_DEINIT_FUNCS (mhd_lib_global_init_wrap, \
|
||||
mhd_lib_global_deinit_wrap);
|
||||
AIF_SET_INIT_AND_DEINIT_FUNCS (mhd_lib_global_init_wrap, \
|
||||
mhd_lib_global_deinit_wrap);
|
||||
|
||||
#endif /* _AUTOINIT_FUNCS_ARE_SUPPORTED */
|
||||
#endif /* AIF_AUTOINIT_FUNCS_ARE_SUPPORTED */
|
||||
|
||||
#endif /* MHD_LIB_INIT_IMPL_H_IN_DAEMON_CREATE_C */
|
||||
|
||||
Reference in New Issue
Block a user