Constification, and a silly mistake in the comments.
authorGeoff Thorpe <geoff@openssl.org>
Thu, 6 Apr 2000 14:54:54 +0000 (14:54 +0000)
committerGeoff Thorpe <geoff@openssl.org>
Thu, 6 Apr 2000 14:54:54 +0000 (14:54 +0000)
crypto/dso/dso.h
crypto/dso/dso_dl.c
crypto/dso/dso_dlfcn.c
crypto/dso/dso_lib.c
crypto/dso/dso_win32.c

index 5f86eb3ff820a03c43b1077289f1beea8bd687ea..91a44805e3557bd3e50bf6807c02cfecdc2604e8 100644 (file)
@@ -72,11 +72,11 @@ typedef struct dso_meth_st
        {
        const char *name;
        /* Loads a shared library */
        {
        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 */
        /* 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
 
 /* 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
 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. */
 
 /* 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
 
 /* This method is the default, but will beg, borrow, or steal whatever
  * method should be the default on any particular platform (including
index 4792edf5574a8312b5b64a6b0bcb1d8cae7000bc..e6e508d434239a4b596f9f489f0b15c08e2fefcd 100644 (file)
@@ -69,9 +69,9 @@ DSO_METHOD *DSO_METHOD_dl(void)
 
 #include <dl.h>
 
 
 #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_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);
 #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.
  */
 
  * 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;
 
        {
        shl_t ptr;
 
@@ -148,7 +148,7 @@ static int dl_unload(DSO *dso)
        return(1);
        }
 
        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;
        {
        shl_t ptr;
        void *sym;
index 93545ecdafb62548d0508728af939cf421d42b7d..c5db28f3566c73077eda051d9102126be34a2670 100644 (file)
@@ -71,9 +71,9 @@ DSO_METHOD *DSO_METHOD_dlfcn(void)
 #include <dlfcn.h>
 #endif
 
 #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_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);
 #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().
  */
 
  * (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;
 
        {
        void *ptr;
 
@@ -148,7 +148,7 @@ static int dlfcn_unload(DSO *dso)
        return(1);
        }
 
        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;
 
        {
        void *ptr, *sym;
 
index acaac278471d2aa0726e75e7bbab7a5b2606c15a..9430d0d76f6edc03c831b3e197a4e9dbe53b65ee 100644 (file)
@@ -187,7 +187,7 @@ int DSO_up(DSO *dso)
        return(1);
        }
 
        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;
        {
        DSO *ret;
        int allocated = 0;
@@ -227,7 +227,7 @@ DSO *DSO_load(DSO *dso, char *filename, DSO_METHOD *meth)
        return(ret);
        }
 
        return(ret);
        }
 
-void *DSO_bind(DSO *dso, char *symname)
+void *DSO_bind(DSO *dso, const char *symname)
        {
        void *ret = NULL;
 
        {
        void *ret = NULL;
 
index f04cb58a52761b34a54d07deb7a52f1c10f0c885..296e10ff6ffd7c64870e2095b7f783307a56a714 100644 (file)
@@ -67,9 +67,9 @@ DSO_METHOD *DSO_METHOD_win32(void)
        }
 #else
 
        }
 #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_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);
 #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.
  */
 
  *      LoadLibrary(), and copied.
  */
 
-static int win32_load(DSO *dso, char *filename)
+static int win32_load(DSO *dso, const char *filename)
        {
        HINSTANCE h, *p;
 
        {
        HINSTANCE h, *p;
 
@@ -159,7 +159,7 @@ static int win32_unload(DSO *dso)
        return(1);
        }
 
        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;
        {
        HINSTANCE *ptr;
        void *sym;