summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-11-22 03:34:46 +0000
committerbrian <brian@FreeBSD.org>1997-11-22 03:34:46 +0000
commit13d351d26116b6bf544f619e0de396a53d47ccd1 (patch)
tree46f16d562b4acde1edaea05f5b36744a6d87c9ff
parent91940416f200da3976e054c7ca5e5791e3907163 (diff)
downloadFreeBSD-src-13d351d26116b6bf544f619e0de396a53d47ccd1.zip
FreeBSD-src-13d351d26116b6bf544f619e0de396a53d47ccd1.tar.gz
const correctness for dl*()
-rw-r--r--include/link.h16
-rw-r--r--lib/csu/i386/crt0.c18
-rw-r--r--lib/csu/i386/dlfcn.h6
-rw-r--r--lib/csu/i386/dlopen.36
-rw-r--r--sys/sys/link_aout.h16
-rw-r--r--sys/sys/link_elf.h16
6 files changed, 39 insertions, 39 deletions
diff --git a/include/link.h b/include/link.h
index 0b55dca..19c43a4 100644
--- a/include/link.h
+++ b/include/link.h
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: link.h,v 1.13 1997/05/07 20:00:00 eivind Exp $
+ * $Id: link.h,v 1.14 1997/08/02 04:56:43 jdp Exp $
*/
/*
@@ -175,21 +175,21 @@ struct so_debug {
* to crt0.
*/
struct ld_entry {
- void *(*dlopen) __P((char *, int)); /* NONE */
+ void *(*dlopen) __P((const char *, int)); /* NONE */
int (*dlclose) __P((void *)); /* NONE */
- void *(*dlsym) __P((void *, char *)); /* NONE */
- char *(*dlerror) __P((void)); /* NONE */
+ void *(*dlsym) __P((void *, const char *)); /* NONE */
+ const char *(*dlerror) __P((void)); /* NONE */
void (*dlexit) __P((void)); /* HAS_DLEXIT */
- void *(*dlsym3) __P((void *, char *, void *)); /* HAS_DLSYM3 */
+ void *(*dlsym3) __P((void *, const char *, void *)); /* HAS_DLSYM3 */
};
/*
* dl*() prototypes.
*/
-extern void *dlopen __P((char *, int));
+extern void *dlopen __P((const char *, int));
extern int dlclose __P((void *));
-extern void *dlsym __P((void *, char *));
-extern char *dlerror __P((void));
+extern void *dlsym __P((void *, const char *));
+extern const char *dlerror __P((void));
/*
diff --git a/lib/csu/i386/crt0.c b/lib/csu/i386/crt0.c
index 4d217fb..b3884e4 100644
--- a/lib/csu/i386/crt0.c
+++ b/lib/csu/i386/crt0.c
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: crt0.c,v 1.29 1997/02/22 14:57:44 peter Exp $
+ * $Id: crt0.c,v 1.30 1997/08/02 04:56:33 jdp Exp $
*/
#include <sys/param.h>
@@ -265,9 +265,9 @@ __do_dynamic_link ()
if (ldso_version == -1) {
_PUTMSG("ld.so failed");
if (ld_entry != NULL) {
- char *msg = (ld_entry->dlerror)();
+ const char *msg = (ld_entry->dlerror)();
if(msg != NULL) {
- char *endp;
+ const char *endp;
_PUTMSG(": ");
for(endp = msg; *endp != '\0'; ++endp)
; /* Find the end */
@@ -290,7 +290,7 @@ __do_dynamic_link ()
void *
dlopen(name, mode)
-char *name;
+const char *name;
int mode;
{
if (ld_entry == NULL)
@@ -312,7 +312,7 @@ void *fd;
void *
dlsym(fd, name)
void *fd;
-char *name;
+const char *name;
{
if (ld_entry == NULL)
return NULL;
@@ -325,7 +325,7 @@ char *name;
}
-char *
+const char *
dlerror()
{
if (ld_entry == NULL)
@@ -398,7 +398,7 @@ _getenv(name)
void *
dlopen(name, mode)
-char *name;
+const char *name;
int mode;
{
return NULL;
@@ -414,13 +414,13 @@ void *fd;
void *
dlsym(fd, name)
void *fd;
-char *name;
+const char *name;
{
return NULL;
}
-char *
+const char *
dlerror()
{
return "Service unavailable";
diff --git a/lib/csu/i386/dlfcn.h b/lib/csu/i386/dlfcn.h
index b6817fe..e167ef2 100644
--- a/lib/csu/i386/dlfcn.h
+++ b/lib/csu/i386/dlfcn.h
@@ -51,9 +51,9 @@
#define RTLD_NEXT ((void *) -1)
__BEGIN_DECLS
-void *dlopen __P((char *, int));
-void *dlsym __P((void *, char *));
-char *dlerror __P((void));
+void *dlopen __P((const char *, int));
+void *dlsym __P((void *, const char *));
+const char *dlerror __P((void));
int dlclose __P((void *));
__END_DECLS
diff --git a/lib/csu/i386/dlopen.3 b/lib/csu/i386/dlopen.3
index 530d58e..b9a987c 100644
--- a/lib/csu/i386/dlopen.3
+++ b/lib/csu/i386/dlopen.3
@@ -39,10 +39,10 @@
.Sh SYNOPSIS
.Fd #include <dlfcn.h>
.Ft void *
-.Fn dlopen "char *path" "int mode"
+.Fn dlopen "const char *path" "int mode"
.Ft void *
-.Fn dlsym "void *handle" "char *symbol"
-.Ft char *
+.Fn dlsym "void *handle" "const char *symbol"
+.Ft const char *
.Fn dlerror "void"
.Ft int
.Fn dlclose "void *handle"
diff --git a/sys/sys/link_aout.h b/sys/sys/link_aout.h
index 0b55dca..19c43a4 100644
--- a/sys/sys/link_aout.h
+++ b/sys/sys/link_aout.h
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: link.h,v 1.13 1997/05/07 20:00:00 eivind Exp $
+ * $Id: link.h,v 1.14 1997/08/02 04:56:43 jdp Exp $
*/
/*
@@ -175,21 +175,21 @@ struct so_debug {
* to crt0.
*/
struct ld_entry {
- void *(*dlopen) __P((char *, int)); /* NONE */
+ void *(*dlopen) __P((const char *, int)); /* NONE */
int (*dlclose) __P((void *)); /* NONE */
- void *(*dlsym) __P((void *, char *)); /* NONE */
- char *(*dlerror) __P((void)); /* NONE */
+ void *(*dlsym) __P((void *, const char *)); /* NONE */
+ const char *(*dlerror) __P((void)); /* NONE */
void (*dlexit) __P((void)); /* HAS_DLEXIT */
- void *(*dlsym3) __P((void *, char *, void *)); /* HAS_DLSYM3 */
+ void *(*dlsym3) __P((void *, const char *, void *)); /* HAS_DLSYM3 */
};
/*
* dl*() prototypes.
*/
-extern void *dlopen __P((char *, int));
+extern void *dlopen __P((const char *, int));
extern int dlclose __P((void *));
-extern void *dlsym __P((void *, char *));
-extern char *dlerror __P((void));
+extern void *dlsym __P((void *, const char *));
+extern const char *dlerror __P((void));
/*
diff --git a/sys/sys/link_elf.h b/sys/sys/link_elf.h
index 0b55dca..19c43a4 100644
--- a/sys/sys/link_elf.h
+++ b/sys/sys/link_elf.h
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: link.h,v 1.13 1997/05/07 20:00:00 eivind Exp $
+ * $Id: link.h,v 1.14 1997/08/02 04:56:43 jdp Exp $
*/
/*
@@ -175,21 +175,21 @@ struct so_debug {
* to crt0.
*/
struct ld_entry {
- void *(*dlopen) __P((char *, int)); /* NONE */
+ void *(*dlopen) __P((const char *, int)); /* NONE */
int (*dlclose) __P((void *)); /* NONE */
- void *(*dlsym) __P((void *, char *)); /* NONE */
- char *(*dlerror) __P((void)); /* NONE */
+ void *(*dlsym) __P((void *, const char *)); /* NONE */
+ const char *(*dlerror) __P((void)); /* NONE */
void (*dlexit) __P((void)); /* HAS_DLEXIT */
- void *(*dlsym3) __P((void *, char *, void *)); /* HAS_DLSYM3 */
+ void *(*dlsym3) __P((void *, const char *, void *)); /* HAS_DLSYM3 */
};
/*
* dl*() prototypes.
*/
-extern void *dlopen __P((char *, int));
+extern void *dlopen __P((const char *, int));
extern int dlclose __P((void *));
-extern void *dlsym __P((void *, char *));
-extern char *dlerror __P((void));
+extern void *dlsym __P((void *, const char *));
+extern const char *dlerror __P((void));
/*
OpenPOWER on IntegriCloud