summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-05-20 08:47:51 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-05-20 08:47:51 +0000
commit11975abb2c891e563dbed51a52c050ea0b05b8a4 (patch)
treed99ca21591a2528ac4546b64c8f703b0fc6dac34 /libc
parent6a9087f96b69f1b8cea5cee76a27784d2b131cd2 (diff)
- remove old-style definitions. No object-code changes.
Diffstat (limited to 'libc')
-rw-r--r--libc/inet/resolv.c16
-rw-r--r--libc/misc/fnmatch/fnmatch_loop.c8
-rw-r--r--libc/misc/ftw/ftw.c23
-rw-r--r--libc/misc/time/ftime.c3
-rw-r--r--libc/signal/killpg.c4
-rw-r--r--libc/signal/sigaddset.c4
-rw-r--r--libc/signal/sigandset.c6
-rw-r--r--libc/signal/sigempty.c4
-rw-r--r--libc/signal/sighold.c4
-rw-r--r--libc/signal/sigignore.c4
-rw-r--r--libc/signal/sigintr.c5
-rw-r--r--libc/signal/sigisempty.c4
-rw-r--r--libc/signal/sigismem.c5
-rw-r--r--libc/signal/sigorset.c6
-rw-r--r--libc/signal/sigrelse.c4
-rw-r--r--libc/signal/sigset.c5
-rw-r--r--libc/signal/sysv_signal.c5
-rw-r--r--libc/stdlib/a64l.c4
-rw-r--r--libc/stdlib/drand48-iter.c6
-rw-r--r--libc/stdlib/drand48.c3
-rw-r--r--libc/stdlib/l64a.c4
-rw-r--r--libc/string/generic/memcmp.c13
-rw-r--r--libc/termios/tcgetsid.c3
-rw-r--r--libc/unistd/getpass.c4
24 files changed, 34 insertions, 113 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
index 7b19ce3a5..a6bee2589 100644
--- a/libc/inet/resolv.c
+++ b/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;
diff --git a/libc/misc/fnmatch/fnmatch_loop.c b/libc/misc/fnmatch/fnmatch_loop.c
index 191cef50c..af41727c0 100644
--- a/libc/misc/fnmatch/fnmatch_loop.c
+++ b/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;
diff --git a/libc/misc/ftw/ftw.c b/libc/misc/ftw/ftw.c
index 33d1a651d..81944ce98 100644
--- a/libc/misc/ftw/ftw.c
+++ b/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);
diff --git a/libc/misc/time/ftime.c b/libc/misc/time/ftime.c
index 233d6f70d..49c137ce5 100644
--- a/libc/misc/time/ftime.c
+++ b/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;
diff --git a/libc/signal/killpg.c b/libc/signal/killpg.c
index 6de79a714..46b6e4b35 100644
--- a/libc/signal/killpg.c
+++ b/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)
{
diff --git a/libc/signal/sigaddset.c b/libc/signal/sigaddset.c
index 83721772c..9840a56bf 100644
--- a/libc/signal/sigaddset.c
+++ b/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)
{
diff --git a/libc/signal/sigandset.c b/libc/signal/sigandset.c
index a25225bad..dcc37daba 100644
--- a/libc/signal/sigandset.c
+++ b/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)
{
diff --git a/libc/signal/sigempty.c b/libc/signal/sigempty.c
index a6136d057..7d8687bd1 100644
--- a/libc/signal/sigempty.c
+++ b/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)
{
diff --git a/libc/signal/sighold.c b/libc/signal/sighold.c
index 335af4a34..da723ac86 100644
--- a/libc/signal/sighold.c
+++ b/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;
diff --git a/libc/signal/sigignore.c b/libc/signal/sigignore.c
index c4d347f8d..17d93ce19 100644
--- a/libc/signal/sigignore.c
+++ b/libc/signal/sigignore.c
@@ -26,9 +26,7 @@
libc_hidden_proto(sigaction)
-int
-sigignore (sig)
- int sig;
+int sigignore (int sig)
{
struct sigaction act;
diff --git a/libc/signal/sigintr.c b/libc/signal/sigintr.c
index a977e22de..43136379f 100644
--- a/libc/signal/sigintr.c
+++ b/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;
diff --git a/libc/signal/sigisempty.c b/libc/signal/sigisempty.c
index 22baa0038..a25bb473d 100644
--- a/libc/signal/sigisempty.c
+++ b/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)
{
diff --git a/libc/signal/sigismem.c b/libc/signal/sigismem.c
index 6423a1a02..b546f626f 100644
--- a/libc/signal/sigismem.c
+++ b/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)
{
diff --git a/libc/signal/sigorset.c b/libc/signal/sigorset.c
index 7d7bf863d..3588cc482 100644
--- a/libc/signal/sigorset.c
+++ b/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)
{
diff --git a/libc/signal/sigrelse.c b/libc/signal/sigrelse.c
index a1d5a8849..8532a88f3 100644
--- a/libc/signal/sigrelse.c
+++ b/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;
diff --git a/libc/signal/sigset.c b/libc/signal/sigset.c
index 5d8c0d0bd..db1fb7d74 100644
--- a/libc/signal/sigset.c
+++ b/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;
diff --git a/libc/signal/sysv_signal.c b/libc/signal/sysv_signal.c
index 97857a250..6eebf201b 100644
--- a/libc/signal/sysv_signal.c
+++ b/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;
diff --git a/libc/stdlib/a64l.c b/libc/stdlib/a64l.c
index 23faf2744..d09dbf464 100644
--- a/libc/stdlib/a64l.c
+++ b/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;
diff --git a/libc/stdlib/drand48-iter.c b/libc/stdlib/drand48-iter.c
index 0e674a3ce..abfe53559 100644
--- a/libc/stdlib/drand48-iter.c
+++ b/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;
diff --git a/libc/stdlib/drand48.c b/libc/stdlib/drand48.c
index ab6239d75..f96947cb2 100644
--- a/libc/stdlib/drand48.c
+++ b/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;
diff --git a/libc/stdlib/l64a.c b/libc/stdlib/l64a.c
index f3a249fed..a8b2d551e 100644
--- a/libc/stdlib/l64a.c
+++ b/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];
diff --git a/libc/string/generic/memcmp.c b/libc/string/generic/memcmp.c
index e9767edef..fc63a2eae 100644
--- a/libc/string/generic/memcmp.c
+++ b/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;
diff --git a/libc/termios/tcgetsid.c b/libc/termios/tcgetsid.c
index ede8958af..ac7bd0992 100644
--- a/libc/termios/tcgetsid.c
+++ b/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;
diff --git a/libc/unistd/getpass.c b/libc/unistd/getpass.c
index c9daaaadd..08bf23636 100644
--- a/libc/unistd/getpass.c
+++ b/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;