diff --git a/crypto/dso/dso.h b/crypto/dso/dso.h index 5f86eb3ff8..91a44805e3 100644 --- a/crypto/dso/dso.h +++ b/crypto/dso/dso.h @@ -72,11 +72,11 @@ typedef struct dso_meth_st { 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 @@ -120,13 +120,13 @@ DSO_METHOD *DSO_get_method(DSO *dso); 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 diff --git a/crypto/dso/dso_dl.c b/crypto/dso/dso_dl.c index 4792edf557..e6e508d434 100644 --- a/crypto/dso/dso_dl.c +++ b/crypto/dso/dso_dl.c @@ -69,9 +69,9 @@ DSO_METHOD *DSO_METHOD_dl(void) #include -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); @@ -102,7 +102,7 @@ DSO_METHOD *DSO_METHOD_dl(void) * 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; @@ -148,7 +148,7 @@ static int dl_unload(DSO *dso) 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; diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c index 93545ecdaf..c5db28f356 100644 --- a/crypto/dso/dso_dlfcn.c +++ b/crypto/dso/dso_dlfcn.c @@ -71,9 +71,9 @@ DSO_METHOD *DSO_METHOD_dlfcn(void) #include #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); @@ -102,7 +102,7 @@ DSO_METHOD *DSO_METHOD_dlfcn(void) * (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; @@ -148,7 +148,7 @@ static int dlfcn_unload(DSO *dso) 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; diff --git a/crypto/dso/dso_lib.c b/crypto/dso/dso_lib.c index acaac27847..9430d0d76f 100644 --- a/crypto/dso/dso_lib.c +++ b/crypto/dso/dso_lib.c @@ -187,7 +187,7 @@ int DSO_up(DSO *dso) 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; @@ -227,7 +227,7 @@ DSO *DSO_load(DSO *dso, char *filename, DSO_METHOD *meth) return(ret); } -void *DSO_bind(DSO *dso, char *symname) +void *DSO_bind(DSO *dso, const char *symname) { void *ret = NULL; diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c index f04cb58a52..296e10ff6f 100644 --- a/crypto/dso/dso_win32.c +++ b/crypto/dso/dso_win32.c @@ -67,9 +67,9 @@ DSO_METHOD *DSO_METHOD_win32(void) } #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); @@ -99,7 +99,7 @@ DSO_METHOD *DSO_METHOD_win32(void) * LoadLibrary(), and copied. */ -static int win32_load(DSO *dso, char *filename) +static int win32_load(DSO *dso, const char *filename) { HINSTANCE h, *p; @@ -159,7 +159,7 @@ static int win32_unload(DSO *dso) 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;