diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-12-09 18:10:25 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-12-09 18:10:25 +0000 |
commit | 046c3d1156d795ac61465e04ca8b44a3c0744870 (patch) | |
tree | 984cc37fa7349fa5abfc0ccc8a8c7861d3595926 /gnu/usr.bin/ld/rtld | |
parent | d7976764a996c5568f4e7422d4db87b7ebaa9c09 (diff) |
dlopen and dlsym take const char * parameters.
Fix prototypes, propagate const where applicable.
Diffstat (limited to 'gnu/usr.bin/ld/rtld')
-rw-r--r-- | gnu/usr.bin/ld/rtld/rtld.c | 36 |
1 files changed, 18 insertions, 18 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; |