summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/usr.bin/ld/rtld/rtld.c36
-rw-r--r--include/dlfcn.h6
-rw-r--r--include/link.h6
-rw-r--r--lib/csu/common.c10
-rw-r--r--share/man/man3/dlfcn.32
5 files changed, 30 insertions, 30 deletions
diff --git a/gnu/usr.bin/ld/rtld/rtld.c b/gnu/usr.bin/ld/rtld/rtld.c
index 03caa3ae525..48656343e2b 100644
--- a/gnu/usr.bin/ld/rtld/rtld.c
+++ b/gnu/usr.bin/ld/rtld/rtld.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld.c,v 1.11 1999/10/26 22:51:46 deraadt Exp $ */
+/* $OpenBSD: rtld.c,v 1.12 1999/12/09 18:10:24 espie Exp $ */
/* $NetBSD: rtld.c,v 1.43 1996/01/14 00:35:17 pk Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -164,9 +164,9 @@ static int ld_warn_non_pure_code;
static int ld_tracing;
-static void *__dlopen __P((char *, int));
+static void *__dlopen __P((const char *, int));
static int __dlclose __P((void *));
-static void *__dlsym __P((void *, char *));
+static void *__dlsym __P((void *, const char *));
static int __dlctl __P((void *, int, void *));
static void __dlexit __P((void));
@@ -193,9 +193,9 @@ static void reloc_map __P((struct so_map *));
static void reloc_copy __P((struct so_map *));
static void call_map __P((struct so_map *, char *));
static char *rtfindlib __P((char *, int, int, int *, char *));
-static struct nzlist *lookup __P((char *, struct so_map **, int));
-static inline struct rt_symbol *lookup_rts __P((char *));
-static struct rt_symbol *enter_rts __P((char *, long, int, caddr_t,
+static struct nzlist *lookup __P((const char *, struct so_map **, int));
+static inline struct rt_symbol *lookup_rts __P((const char *));
+static struct rt_symbol *enter_rts __P((const char *, long, int, caddr_t,
long, struct so_map *));
static void maphints __P((void));
static void unmaphints __P((void));
@@ -884,9 +884,9 @@ static struct rt_symbol *rt_symtab[RTC_TABSIZE];
*/
static inline int
hash_string(key)
- char *key;
+ const char *key;
{
- register char *cp;
+ register const char *cp;
register int k;
cp = key;
@@ -903,7 +903,7 @@ hash_string(key)
static inline struct rt_symbol *
lookup_rts(key)
- char *key;
+ const char *key;
{
register int hashval;
register struct rt_symbol *rtsp;
@@ -923,7 +923,7 @@ lookup_rts(key)
static struct rt_symbol *
enter_rts(name, value, type, srcaddr, size, smp)
- char *name;
+ const char *name;
long value;
int type;
caddr_t srcaddr;
@@ -969,7 +969,7 @@ enter_rts(name, value, type, srcaddr, size, smp)
*/
static struct nzlist *
lookup(name, src_map, strong)
- char *name;
+ const char *name;
struct so_map **src_map; /* IN/OUT */
int strong;
{
@@ -987,7 +987,7 @@ lookup(name, src_map, strong)
int buckets;
long hashval;
struct rrs_hash *hp;
- char *cp;
+ const char *cp;
struct nzlist *np;
/* Some local caching */
@@ -1306,7 +1306,7 @@ rtfindlib(name, major, minor, usehints, ipath)
dp = lpath = concat(ld_library_path ? ld_library_path : "",
(ld_library_path && ipath) ? ":" : "",
- ipath ? ipath : "");
+ ipath ? ipath : "", 0);
while ((cp = strsep(&dp, ":")) != NULL) {
cp = findhint(name, major, minor, cp);
@@ -1408,7 +1408,7 @@ static int dlerrno;
*/
void
build_sod(name, sodp)
- char *name;
+ const char *name;
struct sod *sodp;
{
unsigned int tuplet;
@@ -1478,8 +1478,8 @@ backout:
static void *
__dlopen(name, mode)
- char *name;
- int mode;
+ const char *name;
+ int mode;
{
struct sod *sodp;
struct so_map *smp;
@@ -1556,8 +1556,8 @@ xprintf("dlclose(%s): refcount = %d\n", smp->som_path, LM_PRIVATE(smp)->spd_refc
static void *
__dlsym(fd, sym)
- void *fd;
- char *sym;
+ void *fd;
+ const char *sym;
{
struct so_map *smp = (struct so_map *)fd, *src_map = NULL;
struct nzlist *np;
diff --git a/include/dlfcn.h b/include/dlfcn.h
index dfa877a161a..eff13c9fba2 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dlfcn.h,v 1.2 1997/09/21 10:45:32 niklas Exp $ */
+/* $OpenBSD: dlfcn.h,v 1.3 1999/12/09 18:10:23 espie Exp $ */
/* $NetBSD: dlfcn.h,v 1.2 1995/06/05 19:38:00 pk Exp $ */
/*
@@ -40,9 +40,9 @@
* User interface to the run-time linker.
*/
__BEGIN_DECLS
-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 void *dlsym __P((void *, const char *));
extern int dlctl __P((void *, int, void *));
extern char *dlerror __P((void));
__END_DECLS
diff --git a/include/link.h b/include/link.h
index 3c9893a8718..fad8bb51d2c 100644
--- a/include/link.h
+++ b/include/link.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: link.h,v 1.4 1999/05/18 15:50:09 espie Exp $ */
+/* $OpenBSD: link.h,v 1.5 1999/12/09 18:10:23 espie Exp $ */
/* $NetBSD: link.h,v 1.10 1996/01/09 00:00:11 pk Exp $ */
/*
@@ -167,9 +167,9 @@ struct so_debug {
* Entry points into ld.so - user interface to the run-time linker.
*/
struct ld_entry {
- void *(*dlopen) __P((char *, int));
+ void *(*dlopen) __P((const char *, int));
int (*dlclose) __P((void *));
- void *(*dlsym) __P((void *, char *));
+ void *(*dlsym) __P((void *, const char *));
int (*dlctl) __P((void *, int, void *));
void (*dlexit) __P((void));
void (*dlrsrvd[3]) __P((void));
diff --git a/lib/csu/common.c b/lib/csu/common.c
index 41c7dca1a52..978ee4a3c70 100644
--- a/lib/csu/common.c
+++ b/lib/csu/common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: common.c,v 1.4 1999/08/24 20:41:04 niklas Exp $ */
+/* $OpenBSD: common.c,v 1.5 1999/12/09 18:10:24 espie Exp $ */
/* $NetBSD: common.c,v 1.4 1995/09/23 22:34:20 pk Exp $ */
/*
* Copyright (c) 1993,1995 Paul Kranenburg
@@ -165,8 +165,8 @@ __load_rtld(dp)
void *
dlopen(name, mode)
- char *name;
- int mode;
+ const char *name;
+ int mode;
{
if (ld_entry == NULL)
return NULL;
@@ -186,8 +186,8 @@ dlclose(fd)
void *
dlsym(fd, name)
- void *fd;
- char *name;
+ void *fd;
+ const char *name;
{
if (ld_entry == NULL)
return NULL;
diff --git a/share/man/man3/dlfcn.3 b/share/man/man3/dlfcn.3
index 2ea5f7808c3..fb225f878ea 100644
--- a/share/man/man3/dlfcn.3
+++ b/share/man/man3/dlfcn.3
@@ -37,7 +37,7 @@
.Sh SYNOPSIS
.Fd #include <dlfcn.h>
.Ft "void *"
-.Fn dlopen "char *path" "int mode"
+.Fn dlopen "const char *path" "int mode"
.Ft "int"
.Fn dlclose "void *handle"
.Ft "void *"