ANSIfy ldconfig and the aout bits it still uses from rtld-aout.

(Why is aout support still there?)
This commit is contained in:
ed 2009-12-29 21:07:17 +00:00
parent 5fbcec72be
commit f590bf3733
3 changed files with 17 additions and 41 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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;