diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-02-21 10:22:18 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-02-21 10:22:18 +0100 |
commit | dae20dfe73b57ff796bda6379ae98486efa49881 (patch) | |
tree | 7a38a91810b7e0a44952183564bad82f5af22fdb /src/lib | |
parent | 20d59376617881caf404fe3d9d83345f7ef78565 (diff) | |
download | libmicrohttpd-dae20dfe73b57ff796bda6379ae98486efa49881.tar.gz libmicrohttpd-dae20dfe73b57ff796bda6379ae98486efa49881.zip |
fix fwd ref to MHD_init
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/init.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/src/lib/init.c b/src/lib/init.c index d3965763..8da693a9 100644 --- a/src/lib/init.c +++ b/src/lib/init.c | |||
@@ -43,24 +43,6 @@ MHD_MUTEX_STATIC_DEFN_INIT_(global_init_mutex_); | |||
43 | 43 | ||
44 | 44 | ||
45 | /** | 45 | /** |
46 | * Check whether global initialisation was performed | ||
47 | * and call initialiser if necessary. | ||
48 | */ | ||
49 | void | ||
50 | MHD_check_global_init_ (void) | ||
51 | { | ||
52 | #ifdef MHD_MUTEX_STATIC_DEFN_INIT_ | ||
53 | MHD_mutex_lock_chk_(&global_init_mutex_); | ||
54 | #endif /* MHD_MUTEX_STATIC_DEFN_INIT_ */ | ||
55 | if (0 == global_init_count++) | ||
56 | MHD_init (); | ||
57 | #ifdef MHD_MUTEX_STATIC_DEFN_INIT_ | ||
58 | MHD_mutex_unlock_chk_(&global_init_mutex_); | ||
59 | #endif /* MHD_MUTEX_STATIC_DEFN_INIT_ */ | ||
60 | } | ||
61 | |||
62 | |||
63 | /** | ||
64 | * Default implementation of the panic function, | 46 | * Default implementation of the panic function, |
65 | * prints an error message and aborts. | 47 | * prints an error message and aborts. |
66 | * | 48 | * |
@@ -134,5 +116,25 @@ MHD_fini (void) | |||
134 | } | 116 | } |
135 | 117 | ||
136 | #ifdef _AUTOINIT_FUNCS_ARE_SUPPORTED | 118 | #ifdef _AUTOINIT_FUNCS_ARE_SUPPORTED |
119 | |||
137 | _SET_INIT_AND_DEINIT_FUNCS(MHD_init, MHD_fini); | 120 | _SET_INIT_AND_DEINIT_FUNCS(MHD_init, MHD_fini); |
138 | #endif /* _AUTOINIT_FUNCS_ARE_SUPPORTED */ | 121 | |
122 | #else | ||
123 | |||
124 | /** | ||
125 | * Check whether global initialisation was performed | ||
126 | * and call initialiser if necessary. | ||
127 | */ | ||
128 | void | ||
129 | MHD_check_global_init_ (void) | ||
130 | { | ||
131 | #ifdef MHD_MUTEX_STATIC_DEFN_INIT_ | ||
132 | MHD_mutex_lock_chk_(&global_init_mutex_); | ||
133 | #endif /* MHD_MUTEX_STATIC_DEFN_INIT_ */ | ||
134 | if (0 == global_init_count++) | ||
135 | MHD_init (); | ||
136 | #ifdef MHD_MUTEX_STATIC_DEFN_INIT_ | ||
137 | MHD_mutex_unlock_chk_(&global_init_mutex_); | ||
138 | #endif /* MHD_MUTEX_STATIC_DEFN_INIT_ */ | ||
139 | } | ||
140 | #endif | ||