Browse Source

- remove old-style definitions. No object-code changes.

Bernhard Reutner-Fischer 16 years ago
parent
commit
11975abb2c

+ 5 - 11
libc/inet/resolv.c

@@ -1054,7 +1054,7 @@ __UCLIBC_MUTEX_INIT(__resolv_lock, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
  *	unix systems, we can have a list of nameservers after the keyword.
  */
 
-void attribute_hidden __open_nameservers()
+void attribute_hidden __open_nameservers(void)
 {
 	FILE *fp;
 	int i;
@@ -1303,11 +1303,8 @@ libc_hidden_def(res_query)
 #define __GOT_NODATA	(1<<1)
 #define __GOT_SERVFAIL	(1<<2)
 #define __TRIED_AS_IS	(1<<3)
-int res_search(name, class, type, answer, anslen)
-	 const char *name;	/* domain name */
-	 int class, type;	/* class and type of query */
-	 u_char *answer;		/* buffer to put answer */
-	 int anslen;		/* size of answer */
+int res_search(const char *name, int class, int type, u_char *answer,
+		int anslen)
 {
 	const char *cp, * const *domain;
 	HEADER *hp = (HEADER *)(void *)answer;
@@ -1457,11 +1454,8 @@ int res_search(name, class, type, answer, anslen)
  * Perform a call on res_query on the concatenation of name and domain,
  * removing a trailing dot from name if domain is NULL.
  */
-int res_querydomain(name, domain, class, type, answer, anslen)
-	 const char *name, *domain;
-	 int class, type;	/* class and type of query */
-	 u_char *answer;		/* buffer to put answer */
-	 int anslen;		/* size of answer */
+int res_querydomain(const char *name, const char *domain, int class, int type,
+			u_char * answer, int anslen)
 {
 	char nbuf[MAXDNAME];
 	const char *longname = nbuf;

+ 2 - 6
libc/misc/fnmatch/fnmatch_loop.c

@@ -29,12 +29,8 @@ static const CHAR *END (const CHAR *patternp) internal_function;
 
 static int
 internal_function
-FCT (pattern, string, string_end, no_leading_period, flags)
-     const CHAR *pattern;
-     const CHAR *string;
-     const CHAR *string_end;
-     int no_leading_period;
-     int flags;
+FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
+     int no_leading_period, int flags)
 {
   register const CHAR *p = pattern, *n = string;
   register UCHAR c;

+ 4 - 19
libc/misc/ftw/ftw.c

@@ -776,21 +776,14 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
 /* Entry points.  */
 
 int
-FTW_NAME (path, func, descriptors)
-     const char *path;
-     FTW_FUNC_T func;
-     int descriptors;
+FTW_NAME (const char *path, FTW_FUNC_T func, int descriptors)
 {
   return ftw_startup (path, 0, func, descriptors, 0);
 }
 
 #ifndef _LIBC
 int
-NFTW_NAME (path, func, descriptors, flags)
-     const char *path;
-     NFTW_FUNC_T func;
-     int descriptors;
-     int flags;
+NFTW_NAME (const char *path, NFTW_FUNC_T func, int descriptors, int flags)
 {
   return ftw_startup (path, 1, func, descriptors, flags);
 }
@@ -801,11 +794,7 @@ NFTW_NAME (path, func, descriptors, flags)
 int NFTW_NEW_NAME (const char *, NFTW_FUNC_T, int, int);
 
 int
-NFTW_NEW_NAME (path, func, descriptors, flags)
-     const char *path;
-     NFTW_FUNC_T func;
-     int descriptors;
-     int flags;
+NFTW_NEW_NAME (const char *path, NFTW_FUNC_T func, int descriptors, int flags)
 {
   if (flags
       & ~(FTW_PHYS | FTW_MOUNT | FTW_CHDIR | FTW_DEPTH | FTW_ACTIONRETVAL))
@@ -826,11 +815,7 @@ int NFTW_OLD_NAME (const char *, NFTW_FUNC_T, int, int);
 
 int
 attribute_compat_text_section
-NFTW_OLD_NAME (path, func, descriptors, flags)
-     const char *path;
-     NFTW_FUNC_T func;
-     int descriptors;
-     int flags;
+NFTW_OLD_NAME (const char *path, NFTW_FUNC_T func, int descriptors, int flags)
 {
   flags &= (FTW_PHYS | FTW_MOUNT | FTW_CHDIR | FTW_DEPTH);
   return ftw_startup (path, 1, func, descriptors, flags);

+ 1 - 2
libc/misc/time/ftime.c

@@ -21,8 +21,7 @@
 
 libc_hidden_proto(gettimeofday)
 
-int ftime(timebuf)
-struct timeb *timebuf;
+int ftime(struct timeb *timebuf)
 {
 	struct timeval tv;
 	struct timezone tz;

+ 1 - 3
libc/signal/killpg.c

@@ -25,9 +25,7 @@ libc_hidden_proto(kill)
    If PGRP is zero, send SIG to all processes in
    the current process's process group.  */
 int
-killpg (pgrp, sig)
-     __pid_t pgrp;
-     int sig;
+killpg (__pid_t pgrp, int sig)
 {
   if (pgrp < 0)
     {

+ 1 - 3
libc/signal/sigaddset.c

@@ -21,9 +21,7 @@
 /* Add SIGNO to SET.  */
 libc_hidden_proto(sigaddset)
 int
-sigaddset (set, signo)
-     sigset_t *set;
-     int signo;
+sigaddset (sigset_t *set, int signo)
 {
   if (set == NULL || signo <= 0 || signo >= NSIG)
     {

+ 1 - 5
libc/signal/sigandset.c

@@ -22,11 +22,7 @@
 #include <stddef.h>
 
 /* Combine sets LEFT and RIGHT by logical AND and place result in DEST.  */
-int
-sigandset (dest, left, right)
-     sigset_t *dest;
-     const sigset_t *left;
-     const sigset_t *right;
+int sigandset (sigset_t *dest, const sigset_t *left, const sigset_t *right)
 {
   if (dest == NULL || left == NULL || right == NULL)
     {

+ 1 - 3
libc/signal/sigempty.c

@@ -24,9 +24,7 @@
 
 /* Clear all signals from SET.  */
 libc_hidden_proto(sigemptyset)
-int
-sigemptyset (set)
-     sigset_t *set;
+int sigemptyset (sigset_t *set)
 {
   if (set == NULL)
     {

+ 1 - 3
libc/signal/sighold.c

@@ -25,9 +25,7 @@
 libc_hidden_proto(sigprocmask)
 libc_hidden_proto(sigaddset)
 
-int
-sighold (sig)
-     int sig;
+int sighold (int sig)
 {
   sigset_t set;
 

+ 1 - 3
libc/signal/sigignore.c

@@ -26,9 +26,7 @@
 
 libc_hidden_proto(sigaction)
 
-int
-sigignore (sig)
-     int sig;
+int sigignore (int sig)
 {
   struct sigaction act;
 

+ 1 - 4
libc/signal/sigintr.c

@@ -29,10 +29,7 @@ libc_hidden_proto(sigaction)
 extern sigset_t _sigintr attribute_hidden;	/* Defined in signal.c.  */
 #endif
 
-int
-siginterrupt (sig, interrupt)
-     int sig;
-     int interrupt;
+int siginterrupt (int sig, int interrupt)
 {
 #ifdef	SA_RESTART
   struct sigaction action;

+ 1 - 3
libc/signal/sigisempty.c

@@ -22,9 +22,7 @@
 #include <stddef.h>
 
 /* Test whether SET is empty.  */
-int
-sigisemptyset (set)
-     const sigset_t *set;
+int sigisemptyset (const sigset_t *set)
 {
   if (set == NULL)
     {

+ 1 - 4
libc/signal/sigismem.c

@@ -19,10 +19,7 @@
 #include "sigsetops.h"
 
 /* Return 1 if SIGNO is in SET, 0 if not.  */
-int
-sigismember (set, signo)
-     const sigset_t *set;
-     int signo;
+int sigismember (const sigset_t *set, int signo)
 {
   if (set == NULL || signo <= 0 || signo >= NSIG)
     {

+ 1 - 5
libc/signal/sigorset.c

@@ -22,11 +22,7 @@
 #include <stddef.h>
 
 /* Combine sets LEFT and RIGHT by logical OR and place result in DEST.  */
-int
-sigorset (dest, left, right)
-     sigset_t *dest;
-     const sigset_t *left;
-     const sigset_t *right;
+int sigorset (sigset_t *dest, const sigset_t *left, const sigset_t *right)
 {
   if (dest == NULL || left == NULL || right == NULL)
     {

+ 1 - 3
libc/signal/sigrelse.c

@@ -25,9 +25,7 @@
 libc_hidden_proto(sigprocmask)
 libc_hidden_proto(sigdelset)
 
-int
-sigrelse (sig)
-     int sig;
+int sigrelse (int sig)
 {
   sigset_t set;
 

+ 1 - 4
libc/signal/sigset.c

@@ -26,10 +26,7 @@ libc_hidden_proto(sigaction)
 libc_hidden_proto(sigprocmask)
 
 /* Set the disposition for SIG.  */
-__sighandler_t
-sigset (sig, disp)
-     int sig;
-     __sighandler_t disp;
+__sighandler_t sigset (int sig, __sighandler_t disp)
 {
   struct sigaction act, oact;
   sigset_t set;

+ 1 - 4
libc/signal/sysv_signal.c

@@ -35,10 +35,7 @@ libc_hidden_proto(sigaction)
 
 /* Set the handler for the signal SIG to HANDLER,
    returning the old handler, or SIG_ERR on error.  */
-__sighandler_t
-__sysv_signal (sig, handler)
-     int sig;
-     __sighandler_t handler;
+__sighandler_t __sysv_signal (int sig, __sighandler_t handler)
 {
   struct sigaction act, oact;
 

+ 1 - 3
libc/stdlib/a64l.c

@@ -36,9 +36,7 @@ static const char a64l_table[TABLE_SIZE] =
 };
 
 
-long int
-a64l (string)
-     const char *string;
+long int a64l (const char *string)
 {
   const char *ptr = string;
   unsigned long int result = 0ul;

+ 1 - 5
libc/stdlib/drand48-iter.c

@@ -26,12 +26,8 @@
 /* Global state for non-reentrant functions.  */
 struct drand48_data __libc_drand48_data attribute_hidden;
 
-
 int __drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer) attribute_hidden;
-int
-__drand48_iterate (xsubi, buffer)
-     unsigned short int xsubi[3];
-     struct drand48_data *buffer;
+int __drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer)
 {
   uint64_t X;
   uint64_t result;

+ 1 - 2
libc/stdlib/drand48.c

@@ -24,8 +24,7 @@ libc_hidden_proto(erand48_r)
 /* Global state for non-reentrant functions.  Defined in drand48-iter.c.  */
 extern struct drand48_data __libc_drand48_data attribute_hidden;
 
-double
-drand48 ()
+double drand48 (void)
 {
   double result;
 

+ 1 - 3
libc/stdlib/l64a.c

@@ -32,9 +32,7 @@ static const char conv_table[64] =
   's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
 };
 
-char *
-l64a (n)
-     long int n;
+char * l64a (long int n)
 {
   unsigned long int m = (unsigned long int) n;
   static char result[7];

+ 3 - 10
libc/string/generic/memcmp.c

@@ -59,8 +59,7 @@ static int memcmp_bytes __P((op_t, op_t));
 __inline
 # endif
 static int
-memcmp_bytes (a, b)
-     op_t a, b;
+memcmp_bytes (op_t a, op_t b)
 {
   long int srcp1 = (long int) &a;
   long int srcp2 = (long int) &b;
@@ -84,10 +83,7 @@ static int memcmp_common_alignment __P((long, long, size_t));
    objects (not LEN bytes!).  Both SRCP1 and SRCP2 should be aligned for
    memory operations on `op_t's.  */
 static int
-memcmp_common_alignment (srcp1, srcp2, len)
-     long int srcp1;
-     long int srcp2;
-     size_t len;
+memcmp_common_alignment (long int srcp1, long int srcp2, size_t len)
 {
   op_t a0, a1;
   op_t b0, b1;
@@ -171,10 +167,7 @@ static int memcmp_not_common_alignment __P((long, long, size_t));
    `op_t' objects (not LEN bytes!).  SRCP2 should be aligned for memory
    operations on `op_t', but SRCP1 *should be unaligned*.  */
 static int
-memcmp_not_common_alignment (srcp1, srcp2, len)
-     long int srcp1;
-     long int srcp2;
-     size_t len;
+memcmp_not_common_alignment (long int srcp1, long int srcp2, size_t len)
 {
   op_t a0, a1, a2, a3;
   op_t b0, b1, b2, b3;

+ 1 - 2
libc/termios/tcgetsid.c

@@ -28,8 +28,7 @@ libc_hidden_proto(tcgetpgrp)
 
 /* Return the session ID of FD.  */
 pid_t
-tcgetsid (fd)
-     int fd;
+tcgetsid (int fd)
 {
   pid_t pgrp;
   pid_t sid;

+ 1 - 3
libc/unistd/getpass.c

@@ -49,9 +49,7 @@ libc_hidden_proto(__uc_malloc)
 #endif
 #define PWD_BUFFER_SIZE 256
 
-char *
-getpass (prompt)
-     const char *prompt;
+char * getpass (const char *prompt)
 {
   static char *buf;
 

+ 1 - 5
libcrypt/md5.c

@@ -275,13 +275,9 @@ static void __md5_Final ( unsigned char digest[16], struct MD5Context *context)
 
 /* MD5 basic transformation. Transforms state based on block. */
 
-static void
-__md5_Transform (state, block)
-	u_int32_t state[4];
-	const unsigned char block[64];
+static void __md5_Transform (u_int32_t state[4], const unsigned char block[64])
 {
 	u_int32_t a, b, c, d, x[16];
-
 #if MD5_SIZE_OVER_SPEED > 1
 	u_int32_t temp;
 	const char *ps;

+ 1 - 3
libm/w_drem.c

@@ -9,9 +9,7 @@
 
 libm_hidden_proto(remainder)
 
-double
-drem(x, y)
-	double x, y;
+double drem(double x, double y)
 {
 	return remainder(x, y);
 }

+ 1 - 3
libpthread/linuxthreads.old/libc_pthread_init.c

@@ -32,9 +32,7 @@ libc_hidden_proto(uselocale)
 
 int __libc_multiple_threads attribute_hidden __attribute__((nocommon));
 
-int *
-__libc_pthread_init (functions)
-     const struct pthread_functions *functions;
+int * __libc_pthread_init (const struct pthread_functions *functions)
 {
 #ifdef SHARED
   /* We copy the content of the variable pointed to by the FUNCTIONS

+ 2 - 2
libpthread/linuxthreads.old/pthread.c

@@ -685,7 +685,7 @@ libpthread_hidden_def (pthread_equal)
 
 #ifndef THREAD_SELF
 
-pthread_descr __pthread_find_self()
+pthread_descr __pthread_find_self(void)
 {
   char * sp = CURRENT_STACK_FRAME;
   pthread_handle h;
@@ -890,7 +890,7 @@ static void pthread_handle_sigdebug(int sig attribute_unused)
    Notice that we can't free the stack segments, as the forked thread
    may hold pointers into them. */
 
-void __pthread_reset_main_thread()
+void __pthread_reset_main_thread(void)
 {
   pthread_descr self = thread_self();
 

+ 1 - 1
libpthread/linuxthreads.old/specific.c

@@ -134,7 +134,7 @@ void * pthread_getspecific(pthread_key_t key)
 
 /* Call the destruction routines on all keys */
 
-void __pthread_destroy_specifics()
+void __pthread_destroy_specifics(void)
 {
     pthread_descr self = thread_self();
     int i, j, round, found_nonzero;

+ 1 - 5
libutil/forkpty.c

@@ -27,11 +27,7 @@ libutil_hidden_proto(openpty)
 libutil_hidden_proto(login_tty)
 
 int
-forkpty (amaster, name, termp, winp)
-     int *amaster;
-     char *name;
-     struct termios *termp;
-     struct winsize *winp;
+forkpty (int *amaster, char *name, struct termios *termp, struct winsize *winp)
 {
   int master, slave, pid;