summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-12-29 21:07:17 +0000
committered <ed@FreeBSD.org>2009-12-29 21:07:17 +0000
commitf590bf3733391efce2c5bc8816d31608a3af6324 (patch)
treecb860e98c746cc55642d58a1d6f8abf38791aa9e
parent5fbcec72beb7ffed8cace5ad64600f073e7fd80e (diff)
downloadFreeBSD-src-f590bf3733391efce2c5bc8816d31608a3af6324.zip
FreeBSD-src-f590bf3733391efce2c5bc8816d31608a3af6324.tar.gz
ANSIfy ldconfig and the aout bits it still uses from rtld-aout.
(Why is aout support still there?)
-rw-r--r--libexec/rtld-aout/shlib.c28
-rw-r--r--libexec/rtld-aout/support.c10
-rw-r--r--sbin/ldconfig/ldconfig.c20
3 files changed, 17 insertions, 41 deletions
diff --git a/libexec/rtld-aout/shlib.c b/libexec/rtld-aout/shlib.c
index 39ec792..f2c74a4 100644
--- a/libexec/rtld-aout/shlib.c
+++ b/libexec/rtld-aout/shlib.c
@@ -82,8 +82,7 @@ add_search_dir(const char *name)
}
void
-add_search_path(path)
-char *path;
+add_search_path(char *path)
{
register char *cp, *dup;
@@ -98,7 +97,7 @@ char *path;
}
void
-std_search_path()
+std_search_path(void)
{
int i, n;
@@ -115,9 +114,7 @@ std_search_path()
*/
int
-getdewey(dewey, cp)
-int dewey[];
-char *cp;
+getdewey(int dewey[], char *cp)
{
int i, n;
@@ -142,9 +139,7 @@ char *cp;
* Return 0 if equal.
*/
int
-cmpndewey(d1, n1, d2, n2)
-int d1[], d2[];
-int n1, n2;
+cmpndewey(int d1[], int n1, int d2[], int n2)
{
register int i;
@@ -185,10 +180,7 @@ int n1, n2;
*/
char *
-findshlib(name, majorp, minorp, do_dot_a)
-char *name;
-int *majorp, *minorp;
-int do_dot_a;
+findshlib(char *name, int *majorp, int *minorp, int do_dot_a)
{
int i;
@@ -212,8 +204,7 @@ int do_dot_a;
*/
char *
-find_lib_file(name)
- const char *name;
+find_lib_file(const char *name)
{
int i;
@@ -261,12 +252,7 @@ find_lib_file(name)
*/
char *
-search_lib_dir(dir, name, majorp, minorp, do_dot_a)
- char *dir;
- char *name;
- int *majorp;
- int *minorp;
- int do_dot_a;
+search_lib_dir(char *dir, char *name, int *majorp, int *minorp, int do_dot_a)
{
size_t namelen;
DIR *dd;
diff --git a/libexec/rtld-aout/support.c b/libexec/rtld-aout/support.c
index 71a84ff..eb8bd29 100644
--- a/libexec/rtld-aout/support.c
+++ b/libexec/rtld-aout/support.c
@@ -38,8 +38,7 @@
#include "support.h"
char *
-concat(s1, s2, s3)
- const char *s1, *s2, *s3;
+concat(const char *s1, const char *s2, const char *s3)
{
int len = 1;
char *s;
@@ -61,8 +60,7 @@ concat(s1, s2, s3)
}
void *
-xmalloc(n)
- size_t n;
+xmalloc(size_t n)
{
char *p = malloc(n);
@@ -73,9 +71,7 @@ xmalloc(n)
}
void *
-xrealloc(p, n)
- void *p;
- size_t n;
+xrealloc(void *p, size_t n)
{
p = realloc(p, n);
diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c
index 6364653..7fc6481 100644
--- a/sbin/ldconfig/ldconfig.c
+++ b/sbin/ldconfig/ldconfig.c
@@ -222,7 +222,7 @@ main(int argc, char **argv)
}
static void
-usage()
+usage(void)
{
fprintf(stderr,
"usage: ldconfig [-32] [-aout | -elf] [-Rimrsv] [-f hints_file] [directory | file ...]\n");
@@ -230,9 +230,7 @@ usage()
}
int
-dofile(fname, silent)
-char *fname;
-int silent;
+dofile(char *fname, int silent)
{
FILE *hfp;
char buf[MAXPATHLEN];
@@ -269,9 +267,7 @@ int silent;
}
int
-dodir(dir, silent)
-char *dir;
-int silent;
+dodir(char *dir, int silent)
{
DIR *dd;
struct dirent *dp;
@@ -328,9 +324,7 @@ int silent;
}
static void
-enter(dir, file, name, dewey, ndewey)
-char *dir, *file, *name;
-int dewey[], ndewey;
+enter(char *dir, char *file, char *name, int dewey[], int ndewey)
{
struct shlib_list *shp;
@@ -391,7 +385,7 @@ hinthash(char *cp, int vmajor)
}
int
-buildhints()
+buildhints(void)
{
struct hints_header hdr;
struct hints_bucket *blist;
@@ -523,7 +517,7 @@ buildhints()
}
static int
-readhints()
+readhints(void)
{
int fd;
void *addr;
@@ -623,7 +617,7 @@ readhints()
}
static void
-listhints()
+listhints(void)
{
struct shlib_list *shp;
int i;
OpenPOWER on IntegriCloud