{
const char *name;
/* Loads a shared library */
- int (*dso_load)(DSO *dso, char *filename);
+ int (*dso_load)(DSO *dso, const char *filename);
/* Unloads a shared library */
int (*dso_unload)(DSO *dso);
/* Binds a function, variable, or whatever */
- int (*dso_bind)(DSO *dso, char *symname, void **symptr);
+ int (*dso_bind)(DSO *dso, const char *symname, void **symptr);
/* I don't think this would actually be used in any circumstances. */
#if 0
DSO_METHOD *DSO_set_method(DSO *dso, DSO_METHOD *meth);
/* The all-singing all-dancing load function, you normally pass NULL
- * for the last two parameters. Use DSO_up and DSO_free for reference
- * count handling. */
-DSO *DSO_load(DSO *dso, char *filename, DSO_METHOD *meth);
+ * for the first and third parameters. Use DSO_up and DSO_free for
+ * reference count handling. */
+DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth);
/* This function binds to a function, variable, whatever inside a
* shared library. */
-void *DSO_bind(DSO *dso, char *symname);
+void *DSO_bind(DSO *dso, const char *symname);
/* This method is the default, but will beg, borrow, or steal whatever
* method should be the default on any particular platform (including
#include <dl.h>
-static int dl_load(DSO *dso, char *filename);
+static int dl_load(DSO *dso, const char *filename);
static int dl_unload(DSO *dso);
-static int dl_bind(DSO *dso, char *symname, void **symptr);
+static int dl_bind(DSO *dso, const char *symname, void **symptr);
#if 0
static int dl_unbind(DSO *dso, char *symname, void *symptr);
static int dl_init(DSO *dso);
* type so the cast is safe.
*/
-static int dl_load(DSO *dso, char *filename)
+static int dl_load(DSO *dso, const char *filename)
{
shl_t ptr;
return(1);
}
-static int dl_bind(DSO *dso, char *symname, void **symptr)
+static int dl_bind(DSO *dso, const char *symname, void **symptr)
{
shl_t ptr;
void *sym;
#include <dlfcn.h>
#endif
-static int dlfcn_load(DSO *dso, char *filename);
+static int dlfcn_load(DSO *dso, const char *filename);
static int dlfcn_unload(DSO *dso);
-static int dlfcn_bind(DSO *dso, char *symname, void **symptr);
+static int dlfcn_bind(DSO *dso, const char *symname, void **symptr);
#if 0
static int dlfcn_unbind(DSO *dso, char *symname, void *symptr);
static int dlfcn_init(DSO *dso);
* (i) the handle (void*) returned from dlopen().
*/
-static int dlfcn_load(DSO *dso, char *filename)
+static int dlfcn_load(DSO *dso, const char *filename)
{
void *ptr;
return(1);
}
-static int dlfcn_bind(DSO *dso, char *symname, void **symptr)
+static int dlfcn_bind(DSO *dso, const char *symname, void **symptr)
{
void *ptr, *sym;
return(1);
}
-DSO *DSO_load(DSO *dso, char *filename, DSO_METHOD *meth)
+DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth)
{
DSO *ret;
int allocated = 0;
return(ret);
}
-void *DSO_bind(DSO *dso, char *symname)
+void *DSO_bind(DSO *dso, const char *symname)
{
void *ret = NULL;
}
#else
-static int win32_load(DSO *dso, char *filename);
+static int win32_load(DSO *dso, const char *filename);
static int win32_unload(DSO *dso);
-static int win32_bind(DSO *dso, char *symname, void **symptr);
+static int win32_bind(DSO *dso, const char *symname, void **symptr);
#if 0
static int win32_unbind(DSO *dso, char *symname, void *symptr);
static int win32_init(DSO *dso);
* LoadLibrary(), and copied.
*/
-static int win32_load(DSO *dso, char *filename)
+static int win32_load(DSO *dso, const char *filename)
{
HINSTANCE h, *p;
return(1);
}
-static int win32_bind(DSO *dso, char *symname, void **symptr)
+static int win32_bind(DSO *dso, const char *symname, void **symptr)
{
HINSTANCE *ptr;
void *sym;