summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgahr <gahr@FreeBSD.org>2010-03-24 15:59:51 +0000
committergahr <gahr@FreeBSD.org>2010-03-24 15:59:51 +0000
commitd3131ffa6e0b1603d1a09ff0d1d8b9ea5fde15a5 (patch)
tree7cdd8a4203b4842d0791a27585013710ce6195fd
parent5f4a0e75c2e87a86f1198cb1e64bf36e0bc4c320 (diff)
downloadFreeBSD-src-d3131ffa6e0b1603d1a09ff0d1d8b9ea5fde15a5.zip
FreeBSD-src-d3131ffa6e0b1603d1a09ff0d1d8b9ea5fde15a5.tar.gz
- Remove const'ness from dlerror(3) prototype, for consistency with POSIX.
Approved by: cognet MFC after: 1 week
-rw-r--r--include/dlfcn.h3
-rw-r--r--lib/libc/gen/dlfcn.c4
-rw-r--r--lib/libc/gen/dlopen.32
-rw-r--r--libexec/rtld-elf/rtld.c2
4 files changed, 5 insertions, 6 deletions
diff --git a/include/dlfcn.h b/include/dlfcn.h
index de654f7..794fde1 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -113,8 +113,7 @@ typedef struct dl_serinfo {
__BEGIN_DECLS
/* XSI functions first. */
int dlclose(void *);
-const char *
- dlerror(void);
+char *dlerror(void);
void *dlopen(const char *, int);
void *dlsym(void * __restrict, const char * __restrict);
diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c
index 4be8847..a1ca29d 100644
--- a/lib/libc/gen/dlfcn.c
+++ b/lib/libc/gen/dlfcn.c
@@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$");
#include <link.h>
#include <stddef.h>
-static const char sorry[] = "Service unavailable";
+static char sorry[] = "Service unavailable";
/*
* For ELF, the dynamic linker directly resolves references to its
@@ -69,7 +69,7 @@ dlclose(void *handle)
}
#pragma weak dlerror
-const char *
+char *
dlerror(void)
{
return sorry;
diff --git a/lib/libc/gen/dlopen.3 b/lib/libc/gen/dlopen.3
index 6488bef..d4b111a 100644
--- a/lib/libc/gen/dlopen.3
+++ b/lib/libc/gen/dlopen.3
@@ -52,7 +52,7 @@
.Fn dlsym "void * restrict handle" "const char * restrict symbol"
.Ft dlfunc_t
.Fn dlfunc "void * restrict handle" "const char * restrict symbol"
-.Ft const char *
+.Ft char *
.Fn dlerror "void"
.Ft int
.Fn dlclose "void *handle"
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index d91dcee..cb1002c 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -1961,7 +1961,7 @@ dlclose(void *handle)
return 0;
}
-const char *
+char *
dlerror(void)
{
char *msg = error_message;
OpenPOWER on IntegriCloud