Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / arch / all-unix / bootstrap / hostlib.c
blob16e534c2546446988e5ca777d793fdb7e157ec2d
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <dlfcn.h>
7 #include <stdio.h>
9 #include "hostlib.h"
11 static inline void GetErrorStr(char **error)
13 if (error)
14 *error = (char *)dlerror();
17 void *Host_HostLib_Open(const char *filename, char **error)
19 void *ret = dlopen(filename, RTLD_NOW);
21 GetErrorStr(error);
22 return ret;
25 int Host_HostLib_Close(void *handle, char **error)
27 int ret = dlclose(handle);
29 GetErrorStr(error);
30 return ret;
33 void *Host_HostLib_GetPointer(void *handle, const char *symbol, char **error)
35 void *ret = dlsym(handle, symbol);
37 GetErrorStr(error);
38 return ret;