2424 */
2525
2626#ifndef _LIBUUTIL_H
27- #define _LIBUUTIL_H
27+ #define _LIBUUTIL_H extern __attribute__((visibility("default")))
2828
2929#include <sys/types.h>
3030#include <stdarg.h>
@@ -66,7 +66,7 @@ extern "C" {
6666/*
6767 * Error reporting functions.
6868 */
69- uint32_t uu_error (void );
69+ _LIBUUTIL_H uint32_t uu_error (void );
7070const char * uu_strerror (uint32_t );
7171
7272/*
@@ -169,11 +169,11 @@ typedef uintptr_t uu_list_index_t;
169169 * debugging? 0 : UU_AVL_POOL_DEBUG);
170170 * ...
171171 */
172- uu_list_pool_t * uu_list_pool_create (const char * , size_t , size_t ,
172+ _LIBUUTIL_H uu_list_pool_t * uu_list_pool_create (const char * , size_t , size_t ,
173173 uu_compare_fn_t * , uint32_t );
174174#define UU_LIST_POOL_DEBUG 0x00000001
175175
176- void uu_list_pool_destroy (uu_list_pool_t * );
176+ _LIBUUTIL_H void uu_list_pool_destroy (uu_list_pool_t * );
177177
178178/*
179179 * usage:
@@ -185,44 +185,44 @@ void uu_list_pool_destroy(uu_list_pool_t *);
185185 * uu_list_node_fini(a, &a->foo_list, pool);
186186 * free(a);
187187 */
188- void uu_list_node_init (void * , uu_list_node_t * , uu_list_pool_t * );
189- void uu_list_node_fini (void * , uu_list_node_t * , uu_list_pool_t * );
188+ _LIBUUTIL_H void uu_list_node_init (void * , uu_list_node_t * , uu_list_pool_t * );
189+ _LIBUUTIL_H void uu_list_node_fini (void * , uu_list_node_t * , uu_list_pool_t * );
190190
191- uu_list_t * uu_list_create (uu_list_pool_t * , void * _parent , uint32_t );
191+ _LIBUUTIL_H uu_list_t * uu_list_create (uu_list_pool_t * , void * , uint32_t );
192192#define UU_LIST_DEBUG 0x00000001
193193#define UU_LIST_SORTED 0x00000002 /* list is sorted */
194194
195- void uu_list_destroy (uu_list_t * ); /* list must be empty */
195+ _LIBUUTIL_H void uu_list_destroy (uu_list_t * ); /* list must be empty */
196196
197- size_t uu_list_numnodes (uu_list_t * );
197+ _LIBUUTIL_H size_t uu_list_numnodes (uu_list_t * );
198198
199- void * uu_list_first (uu_list_t * );
200- void * uu_list_last (uu_list_t * );
199+ _LIBUUTIL_H void * uu_list_first (uu_list_t * );
200+ _LIBUUTIL_H void * uu_list_last (uu_list_t * );
201201
202- void * uu_list_next (uu_list_t * , void * );
203- void * uu_list_prev (uu_list_t * , void * );
202+ _LIBUUTIL_H void * uu_list_next (uu_list_t * , void * );
203+ _LIBUUTIL_H void * uu_list_prev (uu_list_t * , void * );
204204
205- int uu_list_walk (uu_list_t * , uu_walk_fn_t * , void * , uint32_t );
205+ _LIBUUTIL_H int uu_list_walk (uu_list_t * , uu_walk_fn_t * , void * , uint32_t );
206206
207- uu_list_walk_t * uu_list_walk_start (uu_list_t * , uint32_t );
208- void * uu_list_walk_next (uu_list_walk_t * );
209- void uu_list_walk_end (uu_list_walk_t * );
207+ _LIBUUTIL_H uu_list_walk_t * uu_list_walk_start (uu_list_t * , uint32_t );
208+ _LIBUUTIL_H void * uu_list_walk_next (uu_list_walk_t * );
209+ _LIBUUTIL_H void uu_list_walk_end (uu_list_walk_t * );
210210
211- void * uu_list_find (uu_list_t * , void * , void * , uu_list_index_t * );
212- void uu_list_insert (uu_list_t * , void * , uu_list_index_t );
211+ _LIBUUTIL_H void * uu_list_find (uu_list_t * , void * , void * , uu_list_index_t * );
212+ _LIBUUTIL_H void uu_list_insert (uu_list_t * , void * , uu_list_index_t );
213213
214- void * uu_list_nearest_next (uu_list_t * , uu_list_index_t );
215- void * uu_list_nearest_prev (uu_list_t * , uu_list_index_t );
214+ _LIBUUTIL_H void * uu_list_nearest_next (uu_list_t * , uu_list_index_t );
215+ _LIBUUTIL_H void * uu_list_nearest_prev (uu_list_t * , uu_list_index_t );
216216
217- void * uu_list_teardown (uu_list_t * , void * * );
217+ _LIBUUTIL_H void * uu_list_teardown (uu_list_t * , void * * );
218218
219- void uu_list_remove (uu_list_t * , void * );
219+ _LIBUUTIL_H void uu_list_remove (uu_list_t * , void * );
220220
221221/*
222222 * lists: interfaces for non-sorted lists only
223223 */
224- int uu_list_insert_before (uu_list_t * , void * _target , void * _elem );
225- int uu_list_insert_after (uu_list_t * , void * _target , void * _elem );
224+ _LIBUUTIL_H int uu_list_insert_before (uu_list_t * , void * _target , void * _elem );
225+ _LIBUUTIL_H int uu_list_insert_after (uu_list_t * , void * _target , void * _elem );
226226
227227/*
228228 * avl trees: opaque structures
@@ -272,11 +272,11 @@ typedef uintptr_t uu_avl_index_t;
272272 * debugging? 0 : UU_AVL_POOL_DEBUG);
273273 * ...
274274 */
275- uu_avl_pool_t * uu_avl_pool_create (const char * , size_t , size_t ,
275+ _LIBUUTIL_H uu_avl_pool_t * uu_avl_pool_create (const char * , size_t , size_t ,
276276 uu_compare_fn_t * , uint32_t );
277277#define UU_AVL_POOL_DEBUG 0x00000001
278278
279- void uu_avl_pool_destroy (uu_avl_pool_t * );
279+ _LIBUUTIL_H void uu_avl_pool_destroy (uu_avl_pool_t * );
280280
281281/*
282282 * usage:
@@ -288,37 +288,37 @@ void uu_avl_pool_destroy(uu_avl_pool_t *);
288288 * uu_avl_node_fini(a, &a->foo_avl, pool);
289289 * free(a);
290290 */
291- void uu_avl_node_init (void * , uu_avl_node_t * , uu_avl_pool_t * );
292- void uu_avl_node_fini (void * , uu_avl_node_t * , uu_avl_pool_t * );
291+ _LIBUUTIL_H void uu_avl_node_init (void * , uu_avl_node_t * , uu_avl_pool_t * );
292+ _LIBUUTIL_H void uu_avl_node_fini (void * , uu_avl_node_t * , uu_avl_pool_t * );
293293
294- uu_avl_t * uu_avl_create (uu_avl_pool_t * , void * _parent , uint32_t );
294+ _LIBUUTIL_H uu_avl_t * uu_avl_create (uu_avl_pool_t * , void * _parent , uint32_t );
295295#define UU_AVL_DEBUG 0x00000001
296296
297- void uu_avl_destroy (uu_avl_t * ); /* list must be empty */
297+ _LIBUUTIL_H void uu_avl_destroy (uu_avl_t * ); /* list must be empty */
298298
299- size_t uu_avl_numnodes (uu_avl_t * );
299+ _LIBUUTIL_H size_t uu_avl_numnodes (uu_avl_t * );
300300
301- void * uu_avl_first (uu_avl_t * );
302- void * uu_avl_last (uu_avl_t * );
301+ _LIBUUTIL_H void * uu_avl_first (uu_avl_t * );
302+ _LIBUUTIL_H void * uu_avl_last (uu_avl_t * );
303303
304- void * uu_avl_next (uu_avl_t * , void * );
305- void * uu_avl_prev (uu_avl_t * , void * );
304+ _LIBUUTIL_H void * uu_avl_next (uu_avl_t * , void * );
305+ _LIBUUTIL_H void * uu_avl_prev (uu_avl_t * , void * );
306306
307- int uu_avl_walk (uu_avl_t * , uu_walk_fn_t * , void * , uint32_t );
307+ _LIBUUTIL_H int uu_avl_walk (uu_avl_t * , uu_walk_fn_t * , void * , uint32_t );
308308
309- uu_avl_walk_t * uu_avl_walk_start (uu_avl_t * , uint32_t );
310- void * uu_avl_walk_next (uu_avl_walk_t * );
311- void uu_avl_walk_end (uu_avl_walk_t * );
309+ _LIBUUTIL_H uu_avl_walk_t * uu_avl_walk_start (uu_avl_t * , uint32_t );
310+ _LIBUUTIL_H void * uu_avl_walk_next (uu_avl_walk_t * );
311+ _LIBUUTIL_H void uu_avl_walk_end (uu_avl_walk_t * );
312312
313- void * uu_avl_find (uu_avl_t * , void * , void * , uu_avl_index_t * );
314- void uu_avl_insert (uu_avl_t * , void * , uu_avl_index_t );
313+ _LIBUUTIL_H void * uu_avl_find (uu_avl_t * , void * , void * , uu_avl_index_t * );
314+ _LIBUUTIL_H void uu_avl_insert (uu_avl_t * , void * , uu_avl_index_t );
315315
316- void * uu_avl_nearest_next (uu_avl_t * , uu_avl_index_t );
317- void * uu_avl_nearest_prev (uu_avl_t * , uu_avl_index_t );
316+ _LIBUUTIL_H void * uu_avl_nearest_next (uu_avl_t * , uu_avl_index_t );
317+ _LIBUUTIL_H void * uu_avl_nearest_prev (uu_avl_t * , uu_avl_index_t );
318318
319- void * uu_avl_teardown (uu_avl_t * , void * * );
319+ _LIBUUTIL_H void * uu_avl_teardown (uu_avl_t * , void * * );
320320
321- void uu_avl_remove (uu_avl_t * , void * );
321+ _LIBUUTIL_H void uu_avl_remove (uu_avl_t * , void * );
322322
323323#ifdef __cplusplus
324324}
0 commit comments