From patchwork Fri Sep 26 19:49:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 393940 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6FC96140188 for ; Sat, 27 Sep 2014 05:49:23 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=uwA3GfdD50a5eojjweN+nmtANYlIl5RBlemaa9hvu16 29R2U1ZKFt9BJpiM6qJI5hcSflOZ+5X3/VQZQlz3sTMp6SMx7ElGRlDNWNgtUIDy 0fuZ/GotLDYBp+gQgyeblV+46YUiNxCbXQ+U8Q3bixUWFqlM+AbNB7i5t8YE2R9Q = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=8MBTzt8b3gmbPOokA1sQ/BPLGt8=; b=Jx7mdamVtPSEZQomR 5ORMqx5W5+s51kbIf1csrC8T075zulERmz7YfQoZtsHa48Yd7jEGQ3wbLkJt72R5 DTt2aOaUyulEEjKhnZ4MIFbkS1z2Si3Q0kDL0u4CaLSYmnz6p9JSJg8Qi1weHtTL 1WQfRzeS6Q29QKHR47YSYn5b7o= Received: (qmail 20017 invoked by alias); 26 Sep 2014 19:49:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 19954 invoked by uid 89); 26 Sep 2014 19:49:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e24smtp05.br.ibm.com Message-ID: <5425C32F.4040200@linux.vnet.ibm.com> Date: Fri, 26 Sep 2014 16:49:03 -0300 From: Adhemerval Zanella User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: "GNU C. Library" Subject: [PATCH 2/7] Function declaration cleanup References: <5425BDDA.5080807@linux.vnet.ibm.com> In-Reply-To: <5425BDDA.5080807@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14092619-1798-0000-0000-00000094ADD6 This patch changes the some function declaration from K&R style to default ISO C. Checked on x86_64, powerpc64, and powerpc32. --- * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait): Use ANSI prototype. * nptl/pthread_cond_wait.c (__pthread_cond_wait): Likewise. * nptl/pthread_exit.c (__pthread_exit): Likewise. * nptl/pthread_join.c (__pthread_join): Likewise. * nptl/pthread_timedjoin.c (__pthread_timedjoin_np): Likewise. * nptl/pthread_cancel.c (pthread_cancel): Likewise. * sysdeps/posix/waitid.c (__waitid): Likewise. * sysdeps/unix/sysv/linux/msgrcv.c (__libc_msgrv): Likewise. * sysdeps/unix/sysv/linux/msgsnd.c (__libc_msgsnd): Likewise. * sysdeps/unix/sysv/linux/openat.c (__OPENAT): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c (__libc_pread): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c (__libc_pread64): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c (__libc_write64): Likewise. * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Likewise. * sysdeps/unix/sysv/linux/readv.c (__libc_readv): Likewise. * sysdeps/unix/sysv/linux/sigsuspend.c (__sigsuspend): Likewise. * sysdeps/unix/sysv/linux/sigtimedwait.c (__sigtimedwait): Likewise. * sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Likewise. * sysdeps/unix/sysv/linux/sigwaitinfo.c (__sigwaitinfo): Likewise. * sysdeps/unix/sysv/linux/writev.c (__libc_writev): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c (__libc_read): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c (__libc_read64): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c (__libc_pwrite): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c (__libc_pwrite64): Likewise. * sysdeps/unix/sysv/linux/preadv.c (PREADV): Likewise. * sysdeps/unix/sysv/linux/pwritev.c (PWRITEV): Likewise. --- diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c index aeba1ff..057b5cc 100644 --- a/nptl/pthread_cancel.c +++ b/nptl/pthread_cancel.c @@ -24,8 +24,7 @@ int -pthread_cancel (th) - pthread_t th; +pthread_cancel (pthread_t th) { volatile struct pthread *pd = (volatile struct pthread *) th; diff --git a/nptl/pthread_cond_timedwait.c b/nptl/pthread_cond_timedwait.c index 1698085..f8f4d38 100644 --- a/nptl/pthread_cond_timedwait.c +++ b/nptl/pthread_cond_timedwait.c @@ -48,10 +48,8 @@ struct _condvar_cleanup_buffer }; int -__pthread_cond_timedwait (cond, mutex, abstime) - pthread_cond_t *cond; - pthread_mutex_t *mutex; - const struct timespec *abstime; +__pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex, + const struct timespec *abstime) { struct _pthread_cleanup_buffer buffer; struct _condvar_cleanup_buffer cbuffer; diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c index fc5eac4..077abc4 100644 --- a/nptl/pthread_cond_wait.c +++ b/nptl/pthread_cond_wait.c @@ -98,9 +98,7 @@ __condvar_cleanup (void *arg) int -__pthread_cond_wait (cond, mutex) - pthread_cond_t *cond; - pthread_mutex_t *mutex; +__pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex) { struct _pthread_cleanup_buffer buffer; struct _condvar_cleanup_buffer cbuffer; diff --git a/nptl/pthread_exit.c b/nptl/pthread_exit.c index 33d80d6..0ec1ea6 100644 --- a/nptl/pthread_exit.c +++ b/nptl/pthread_exit.c @@ -21,8 +21,7 @@ void -__pthread_exit (value) - void *value; +__pthread_exit (void *value) { THREAD_SETMEM (THREAD_SELF, result, value); diff --git a/nptl/pthread_join.c b/nptl/pthread_join.c index 5a43182..e822bbd 100644 --- a/nptl/pthread_join.c +++ b/nptl/pthread_join.c @@ -37,9 +37,7 @@ cleanup (void *arg) int -pthread_join (threadid, thread_return) - pthread_t threadid; - void **thread_return; +pthread_join (pthread_t threadid, void **thread_return) { struct pthread *pd = (struct pthread *) threadid; diff --git a/nptl/pthread_timedjoin.c b/nptl/pthread_timedjoin.c index 2f6701b..3a12bbf 100644 --- a/nptl/pthread_timedjoin.c +++ b/nptl/pthread_timedjoin.c @@ -30,10 +30,8 @@ cleanup (void *arg) int -pthread_timedjoin_np (threadid, thread_return, abstime) - pthread_t threadid; - void **thread_return; - const struct timespec *abstime; +pthread_timedjoin_np (pthread_t threadid, void **thread_return, + const struct timespec *abstime) { struct pthread *self; struct pthread *pd = (struct pthread *) threadid; diff --git a/sysdeps/posix/waitid.c b/sysdeps/posix/waitid.c index a1f8cc8..d8c3e15 100644 --- a/sysdeps/posix/waitid.c +++ b/sysdeps/posix/waitid.c @@ -149,11 +149,7 @@ OUR_WAITID (idtype_t idtype, id_t id, siginfo_t *infop, int options) int -__waitid (idtype, id, infop, options) - idtype_t idtype; - id_t id; - siginfo_t *infop; - int options; +__waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options) { if (SINGLE_THREAD_P) return do_waitid (idtype, id, infop, options); diff --git a/sysdeps/unix/sysv/linux/msgrcv.c b/sysdeps/unix/sysv/linux/msgrcv.c index c62367e..5477075 100644 --- a/sysdeps/unix/sysv/linux/msgrcv.c +++ b/sysdeps/unix/sysv/linux/msgrcv.c @@ -33,12 +33,8 @@ struct ipc_kludge ssize_t -__libc_msgrcv (msqid, msgp, msgsz, msgtyp, msgflg) - int msqid; - void *msgp; - size_t msgsz; - long int msgtyp; - int msgflg; +__libc_msgrcv (int msqid, void *msgp, size_t msgsz, long int msgtyp, + int msgflg) { /* The problem here is that Linux' calling convention only allows up to fives parameters to a system call. */ diff --git a/sysdeps/unix/sysv/linux/msgsnd.c b/sysdeps/unix/sysv/linux/msgsnd.c index cd397b1..86f7223 100644 --- a/sysdeps/unix/sysv/linux/msgsnd.c +++ b/sysdeps/unix/sysv/linux/msgsnd.c @@ -24,11 +24,7 @@ #include int -__libc_msgsnd (msqid, msgp, msgsz, msgflg) - int msqid; - const void *msgp; - size_t msgsz; - int msgflg; +__libc_msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg) { if (SINGLE_THREAD_P) return INLINE_SYSCALL (ipc, 5, IPCOP_msgsnd, msqid, msgsz, diff --git a/sysdeps/unix/sysv/linux/openat.c b/sysdeps/unix/sysv/linux/openat.c index 36555b9..851b45e 100644 --- a/sysdeps/unix/sysv/linux/openat.c +++ b/sysdeps/unix/sysv/linux/openat.c @@ -37,11 +37,7 @@ int -OPENAT_NOT_CANCEL (fd, file, oflag, mode) - int fd; - const char *file; - int oflag; - mode_t mode; +OPENAT_NOT_CANCEL (int fd, const char *file, int oflag, mode_t mode) { /* We have to add the O_LARGEFILE flag for openat64. */ @@ -61,10 +57,7 @@ OPENAT_NOT_CANCEL (fd, file, oflag, mode) the directory associated with FD. If OFLAG includes O_CREAT, a third argument is the file protection. */ int -__OPENAT (fd, file, oflag) - int fd; - const char *file; - int oflag; +__OPENAT (int fd, const char *file, int oflag, ...) { mode_t mode = 0; if (oflag & O_CREAT) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c index 33df944..04903a5 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c @@ -24,11 +24,7 @@ #include ssize_t -__libc_pread (fd, buf, count, offset) - int fd; - void *buf; - size_t count; - off_t offset; +__libc_pread (int fd, void *buf, size_t count, off_t offset) { ssize_t result; diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c index b6e478f..88a0ec9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c @@ -24,11 +24,7 @@ ssize_t -__libc_pread64 (fd, buf, count, offset) - int fd; - void *buf; - size_t count; - off64_t offset; +__libc_pread64 (int fd, void *buf, size_t count, off64_t offset) { ssize_t result; diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c index 90e4c9d..661ed41 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c @@ -25,11 +25,7 @@ ssize_t -__libc_pwrite (fd, buf, count, offset) - int fd; - const void *buf; - size_t count; - off_t offset; +__libc_pwrite (int fd, const void *buf, size_t count, off_t offset) { ssize_t result; diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c index 7f93ab7..67b726e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c @@ -24,11 +24,7 @@ ssize_t -__libc_pwrite64 (fd, buf, count, offset) - int fd; - const void *buf; - size_t count; - off64_t offset; +__libc_pwrite64 (int fd, const void *buf, size_t count, off64_t offset) { ssize_t result; diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c index d85ab90..4850a24 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c @@ -27,11 +27,7 @@ /* Consider moving to syscalls.list. */ ssize_t -__libc_pread (fd, buf, count, offset) - int fd; - void *buf; - size_t count; - off_t offset; +__libc_pread (int fd, void *buf, size_t count, off_t offset) { ssize_t result; diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c index 5bdeada..465eec2 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c @@ -26,11 +26,7 @@ /* Consider moving to syscalls.list. */ ssize_t -__libc_pread64 (fd, buf, count, offset) - int fd; - void *buf; - size_t count; - off64_t offset; +__libc_pread64 (int fd, void *buf, size_t count, off64_t offset) { ssize_t result; diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c index 7577d2e..e1f769d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c @@ -27,11 +27,7 @@ /* Consider moving to syscalls.list. */ ssize_t -__libc_pwrite (fd, buf, count, offset) - int fd; - const void *buf; - size_t count; - off_t offset; +__libc_pwrite (int fd, const void *buf, size_t count, off_t offset) { ssize_t result; diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c index 26ea65a..e39a391 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c @@ -26,11 +26,7 @@ /* Consider moving to syscalls.list. */ ssize_t -__libc_pwrite64 (fd, buf, count, offset) - int fd; - const void *buf; - size_t count; - off64_t offset; +__libc_pwrite64 (int fd, const void *buf, size_t count, off64_t offset) { ssize_t result; diff --git a/sysdeps/unix/sysv/linux/preadv.c b/sysdeps/unix/sysv/linux/preadv.c index af30443..0b2e9ed 100644 --- a/sysdeps/unix/sysv/linux/preadv.c +++ b/sysdeps/unix/sysv/linux/preadv.c @@ -48,11 +48,7 @@ static ssize_t PREADV_REPLACEMENT (int, const struct iovec *, ssize_t -PREADV (fd, vector, count, offset) - int fd; - const struct iovec *vector; - int count; - OFF_T offset; +PREADV (int fd, const struct iovec *vector, int count, OFF_T offset) { #ifdef __NR_preadv ssize_t result; diff --git a/sysdeps/unix/sysv/linux/pthread_kill.c b/sysdeps/unix/sysv/linux/pthread_kill.c index 0a4d862..d4af6ac 100644 --- a/sysdeps/unix/sysv/linux/pthread_kill.c +++ b/sysdeps/unix/sysv/linux/pthread_kill.c @@ -24,9 +24,7 @@ int -__pthread_kill (threadid, signo) - pthread_t threadid; - int signo; +__pthread_kill (pthread_t threadid, int signo) { struct pthread *pd = (struct pthread *) threadid; diff --git a/sysdeps/unix/sysv/linux/pwritev.c b/sysdeps/unix/sysv/linux/pwritev.c index b5b8fac..518db33 100644 --- a/sysdeps/unix/sysv/linux/pwritev.c +++ b/sysdeps/unix/sysv/linux/pwritev.c @@ -48,11 +48,7 @@ static ssize_t PWRITEV_REPLACEMENT (int, const struct iovec *, ssize_t -PWRITEV (fd, vector, count, offset) - int fd; - const struct iovec *vector; - int count; - OFF_T offset; +PWRITEV (int fd, const struct iovec *vector, int count, OFF_T offset) { #ifdef __NR_pwritev ssize_t result; diff --git a/sysdeps/unix/sysv/linux/readv.c b/sysdeps/unix/sysv/linux/readv.c index a977d17..17a2b18 100644 --- a/sysdeps/unix/sysv/linux/readv.c +++ b/sysdeps/unix/sysv/linux/readv.c @@ -27,10 +27,7 @@ /* Consider moving to syscalls.list. */ ssize_t -__libc_readv (fd, vector, count) - int fd; - const struct iovec *vector; - int count; +__libc_readv (int fd, const struct iovec *vector, int count) { ssize_t result; diff --git a/sysdeps/unix/sysv/linux/sigsuspend.c b/sysdeps/unix/sysv/linux/sigsuspend.c index 3b393ad..cb5cf80 100644 --- a/sysdeps/unix/sysv/linux/sigsuspend.c +++ b/sysdeps/unix/sysv/linux/sigsuspend.c @@ -32,8 +32,7 @@ do_sigsuspend (const sigset_t *set) /* Change the set of blocked signals to SET, wait until a signal arrives, and restore the set of blocked signals. */ int -__sigsuspend (set) - const sigset_t *set; +__sigsuspend (const sigset_t *set) { if (SINGLE_THREAD_P) return do_sigsuspend (set); diff --git a/sysdeps/unix/sysv/linux/sigtimedwait.c b/sysdeps/unix/sysv/linux/sigtimedwait.c index c7727cf..6c72202 100644 --- a/sysdeps/unix/sysv/linux/sigtimedwait.c +++ b/sysdeps/unix/sysv/linux/sigtimedwait.c @@ -67,10 +67,8 @@ do_sigtimedwait (const sigset_t *set, siginfo_t *info, /* Return any pending signal or wait for one for the given time. */ int -__sigtimedwait (set, info, timeout) - const sigset_t *set; - siginfo_t *info; - const struct timespec *timeout; +__sigtimedwait (const sigset_t *set, siginfo_t *info, + const struct timespec *timeout) { if (SINGLE_THREAD_P) return do_sigtimedwait (set, info, timeout); diff --git a/sysdeps/unix/sysv/linux/sigwait.c b/sysdeps/unix/sysv/linux/sigwait.c index b7ac868..688a078 100644 --- a/sysdeps/unix/sysv/linux/sigwait.c +++ b/sysdeps/unix/sysv/linux/sigwait.c @@ -86,9 +86,7 @@ do_sigwait (const sigset_t *set, int *sig) } int -__sigwait (set, sig) - const sigset_t *set; - int *sig; +__sigwait (const sigset_t *set, int *sig) { if (SINGLE_THREAD_P) return do_sigwait (set, sig); diff --git a/sysdeps/unix/sysv/linux/sigwaitinfo.c b/sysdeps/unix/sysv/linux/sigwaitinfo.c index fa9b0b7..7c1f52b 100644 --- a/sysdeps/unix/sysv/linux/sigwaitinfo.c +++ b/sysdeps/unix/sysv/linux/sigwaitinfo.c @@ -68,9 +68,7 @@ do_sigwaitinfo (const sigset_t *set, siginfo_t *info) /* Return any pending signal or wait for one for the given time. */ int -__sigwaitinfo (set, info) - const sigset_t *set; - siginfo_t *info; +__sigwaitinfo (const sigset_t *set, siginfo_t *info) { if (SINGLE_THREAD_P) return do_sigwaitinfo (set, info); diff --git a/sysdeps/unix/sysv/linux/writev.c b/sysdeps/unix/sysv/linux/writev.c index f19221f..59d8f25 100644 --- a/sysdeps/unix/sysv/linux/writev.c +++ b/sysdeps/unix/sysv/linux/writev.c @@ -28,10 +28,7 @@ /* Consider moving to syscalls.list. */ ssize_t -__libc_writev (fd, vector, count) - int fd; - const struct iovec *vector; - int count; +__libc_writev (int fd, const struct iovec *vector, int count) { ssize_t result;