diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-10-19 21:23:47 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2015-10-19 21:23:47 +0000 |
commit | f63f2bfdfaad591305863a79c4fd2c3f50015f26 (patch) | |
tree | ec14e41dc43f547d3352ac677fff4c94d9239e3d /libio | |
parent | 6ab674ebff5e60c62b126d0ac2e774e581916afe (diff) | |
download | glibc-f63f2bfdfaad591305863a79c4fd2c3f50015f26.tar glibc-f63f2bfdfaad591305863a79c4fd2c3f50015f26.tar.gz glibc-f63f2bfdfaad591305863a79c4fd2c3f50015f26.tar.bz2 glibc-f63f2bfdfaad591305863a79c4fd2c3f50015f26.zip |
Convert 69 more function definitions to prototype style (line wrap cases).
This automatically-generated patch converts 69 function definitions in
glibc from old-style K&R to prototype-style.
This patch, covering both sysdeps and non-sysdeps files, deals with
cases where the prototype needed to be wrapped over more than one
line. Otherwise, exclusions and caveats are as for
<https://sourceware.org/ml/libc-alpha/2015-10/msg00594.html> and
<https://sourceware.org/ml/libc-alpha/2015-10/msg00599.html>.
Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).
* crypt/crypt-entry.c (__crypt_r): Convert to prototype-style
function definition.
* crypt/crypt_util.c (__encrypt_r): Likewise.
* libio/genops.c (_IO_no_init): Likewise.
* libio/iofopncook.c (_IO_fopencookie): Likewise.
(_IO_old_fopencookie): Likewise.
* libio/iofwrite_u.c (fwrite_unlocked): Likewise.
* libio/iogetline.c (_IO_getline): Likewise.
(_IO_getline_info): Likewise.
* libio/iogetwline.c (_IO_getwline): Likewise.
(_IO_getwline_info): Likewise.
* libio/vsnprintf.c (_IO_vsnprintf): Likewise.
* libio/vswprintf.c (_IO_vswprintf): Likewise.
* locale/programs/simple-hash.c (insert_entry_2): Likewise.
(find_entry): Likewise.
(iterate_table): Likewise.
(lookup): Likewise.
* login/forkpty.c (forkpty): Likewise.
* misc/hsearch_r.c (__hsearch_r): Likewise.
* misc/select.c (__select): Likewise.
* nptl/cleanup_defer_compat.c (_pthread_cleanup_pop_restore):
Likewise.
* nptl/old_pthread_cond_init.c (__pthread_cond_init_2_0):
Likewise.
* nptl/old_pthread_cond_timedwait.c
(__pthread_cond_timedwait_2_0): Likewise.
* nptl/pthread_barrier_init.c (__pthread_barrier_init): Likewise.
* nptl/pthread_barrierattr_getpshared.c
(pthread_barrierattr_getpshared): Likewise.
* nptl/pthread_getschedparam.c (__pthread_getschedparam):
Likewise.
* nptl/pthread_mutex_setprioceiling.c
(pthread_mutex_setprioceiling): Likewise.
* nptl/pthread_mutexattr_getprioceiling.c
(pthread_mutexattr_getprioceiling): Likewise.
* nptl/pthread_rwlock_init.c (__pthread_rwlock_init): Likewise.
* nptl/pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
Likewise.
* nptl/pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
Likewise.
* nptl/pthread_setschedparam.c (__pthread_setschedparam):
Likewise.
* socket/recvfrom.c (__recvfrom): Likewise.
* socket/sendto.c (__sendto): Likewise.
* socket/setsockopt.c (__setsockopt): Likewise.
* stdio-common/_itoa.c (_itoa): Likewise.
* stdio-common/_itowa.c (_itowa): Likewise.
* stdio-common/reg-printf.c (__register_printf_specifier):
Likewise.
(__register_printf_function): Likewise.
* stdio-common/tempname.c (__path_search): Likewise.
* stdlib/addmul_1.c (mpn_addmul_1): Likewise.
* stdlib/mul_1.c (mpn_mul_1): Likewise.
* stdlib/random_r.c (__initstate_r): Likewise.
* stdlib/setenv.c (__add_to_environ): Likewise.
* stdlib/submul_1.c (mpn_submul_1): Likewise.
* streams/getpmsg.c (getpmsg): Likewise.
* streams/putmsg.c (putmsg): Likewise.
* streams/putpmsg.c (putpmsg): Likewise.
* sunrpc/clnt_raw.c (clntraw_call): Likewise.
* sunrpc/clnt_tcp.c (clnttcp_call): Likewise.
* sunrpc/clnt_udp.c (clntudp_create): Likewise.
* sunrpc/clnt_unix.c (clntunix_call): Likewise.
* sunrpc/pm_getport.c (pmap_getport): Likewise.
* sunrpc/svc_udp.c (cache_get): Likewise.
* sunrpc/xdr_array.c (xdr_vector): Likewise.
* sysdeps/mach/hurd/getcwd.c
(__canonicalize_directory_name_internal): Likewise.
* sysdeps/mach/hurd/pselect.c (__pselect): Likewise.
* sysdeps/mach/hurd/recvfrom.c (__recvfrom): Likewise.
* sysdeps/mach/hurd/select.c (__select): Likewise.
* sysdeps/posix/ttyname_r.c (getttyname_r): Likewise.
* sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
* sysdeps/sparc/nptl/pthread_barrier_init.c
(__pthread_barrier_init): Likewise.
* sysdeps/unix/sysv/linux/hppa/pthread_cond_timedwait.c
(__pthread_cond_timedwait): Likewise.
* sysdeps/unix/sysv/linux/i386/putmsg.c (putmsg): Likewise.
* sysdeps/unix/sysv/linux/s390/semtimedop.c (semtimedop):
Likewise.
* sysdeps/unix/sysv/linux/semtimedop.c (semtimedop): Likewise.
* sysdeps/unix/sysv/linux/timer_settime.c (timer_settime):
Likewise.
* sysvipc/semtimedop.c (semtimedop): Likewise.
* time/setitimer.c (__setitimer): Likewise.
* time/strftime_l.c (emacs_strftime): Likewise.
Diffstat (limited to 'libio')
-rw-r--r-- | libio/genops.c | 8 | ||||
-rw-r--r-- | libio/iofopncook.c | 12 | ||||
-rw-r--r-- | libio/iofwrite_u.c | 7 | ||||
-rw-r--r-- | libio/iogetline.c | 17 | ||||
-rw-r--r-- | libio/iogetwline.c | 17 | ||||
-rw-r--r-- | libio/vsnprintf.c | 7 | ||||
-rw-r--r-- | libio/vswprintf.c | 7 |
7 files changed, 20 insertions, 55 deletions
diff --git a/libio/genops.c b/libio/genops.c index 873bd77c3a..377bda311f 100644 --- a/libio/genops.c +++ b/libio/genops.c @@ -596,12 +596,8 @@ _IO_old_init (_IO_FILE *fp, int flags) } void -_IO_no_init (fp, flags, orientation, wd, jmp) - _IO_FILE *fp; - int flags; - int orientation; - struct _IO_wide_data *wd; - const struct _IO_jump_t *jmp; +_IO_no_init (_IO_FILE *fp, int flags, int orientation, + struct _IO_wide_data *wd, const struct _IO_jump_t *jmp) { _IO_old_init (fp, flags); fp->_mode = orientation; diff --git a/libio/iofopncook.c b/libio/iofopncook.c index b16a263e8a..3998bc5dce 100644 --- a/libio/iofopncook.c +++ b/libio/iofopncook.c @@ -149,10 +149,8 @@ _IO_cookie_init (struct _IO_cookie_file *cfile, int read_write, _IO_FILE * -_IO_fopencookie (cookie, mode, io_functions) - void *cookie; - const char *mode; - _IO_cookie_io_functions_t io_functions; +_IO_fopencookie (void *cookie, const char *mode, + _IO_cookie_io_functions_t io_functions) { int read_write; struct locked_FILE @@ -244,10 +242,8 @@ static const struct _IO_jump_t _IO_old_cookie_jumps = { _IO_FILE * attribute_compat_text_section -_IO_old_fopencookie (cookie, mode, io_functions) - void *cookie; - const char *mode; - _IO_cookie_io_functions_t io_functions; +_IO_old_fopencookie (void *cookie, const char *mode, + _IO_cookie_io_functions_t io_functions) { _IO_FILE *ret; diff --git a/libio/iofwrite_u.c b/libio/iofwrite_u.c index 09bf9f5db7..2b1c47a500 100644 --- a/libio/iofwrite_u.c +++ b/libio/iofwrite_u.c @@ -30,11 +30,8 @@ #undef fwrite_unlocked _IO_size_t -fwrite_unlocked (buf, size, count, fp) - const void *buf; - _IO_size_t size; - _IO_size_t count; - _IO_FILE *fp; +fwrite_unlocked (const void *buf, _IO_size_t size, _IO_size_t count, + _IO_FILE *fp) { _IO_size_t request = size * count; _IO_size_t written = 0; diff --git a/libio/iogetline.c b/libio/iogetline.c index 0d939aba1d..72d643f6dc 100644 --- a/libio/iogetline.c +++ b/libio/iogetline.c @@ -28,12 +28,8 @@ #include <string.h> _IO_size_t -_IO_getline (fp, buf, n, delim, extract_delim) - _IO_FILE *fp; - char *buf; - _IO_size_t n; - int delim; - int extract_delim; +_IO_getline (_IO_FILE *fp, char *buf, _IO_size_t n, int delim, + int extract_delim) { return _IO_getline_info (fp, buf, n, delim, extract_delim, (int *) 0); } @@ -48,13 +44,8 @@ libc_hidden_def (_IO_getline) If extract_delim > 0, insert delim in output. */ _IO_size_t -_IO_getline_info (fp, buf, n, delim, extract_delim, eof) - _IO_FILE *fp; - char *buf; - _IO_size_t n; - int delim; - int extract_delim; - int *eof; +_IO_getline_info (_IO_FILE *fp, char *buf, _IO_size_t n, int delim, + int extract_delim, int *eof) { char *ptr = buf; if (eof != NULL) diff --git a/libio/iogetwline.c b/libio/iogetwline.c index b668a77e38..15fc0f3737 100644 --- a/libio/iogetwline.c +++ b/libio/iogetwline.c @@ -33,12 +33,8 @@ #endif _IO_size_t -_IO_getwline (fp, buf, n, delim, extract_delim) - _IO_FILE *fp; - wchar_t *buf; - _IO_size_t n; - wint_t delim; - int extract_delim; +_IO_getwline (_IO_FILE *fp, wchar_t *buf, _IO_size_t n, wint_t delim, + int extract_delim) { return _IO_getwline_info (fp, buf, n, delim, extract_delim, (wint_t *) 0); } @@ -52,13 +48,8 @@ _IO_getwline (fp, buf, n, delim, extract_delim) If extract_delim > 0, insert delim in output. */ _IO_size_t -_IO_getwline_info (fp, buf, n, delim, extract_delim, eof) - _IO_FILE *fp; - wchar_t *buf; - _IO_size_t n; - wint_t delim; - int extract_delim; - wint_t *eof; +_IO_getwline_info (_IO_FILE *fp, wchar_t *buf, _IO_size_t n, wint_t delim, + int extract_delim, wint_t *eof) { wchar_t *ptr = buf; if (eof != NULL) diff --git a/libio/vsnprintf.c b/libio/vsnprintf.c index fdceb3d786..967b4e978a 100644 --- a/libio/vsnprintf.c +++ b/libio/vsnprintf.c @@ -90,11 +90,8 @@ const struct _IO_jump_t _IO_strn_jumps attribute_hidden = int -_IO_vsnprintf (string, maxlen, format, args) - char *string; - _IO_size_t maxlen; - const char *format; - _IO_va_list args; +_IO_vsnprintf (char *string, _IO_size_t maxlen, const char *format, + _IO_va_list args) { _IO_strnfile sf; int ret; diff --git a/libio/vswprintf.c b/libio/vswprintf.c index 1533a6d02d..80f96884bd 100644 --- a/libio/vswprintf.c +++ b/libio/vswprintf.c @@ -89,11 +89,8 @@ const struct _IO_jump_t _IO_wstrn_jumps attribute_hidden = int -_IO_vswprintf (string, maxlen, format, args) - wchar_t *string; - _IO_size_t maxlen; - const wchar_t *format; - _IO_va_list args; +_IO_vswprintf (wchar_t *string, _IO_size_t maxlen, const wchar_t *format, + _IO_va_list args) { _IO_wstrnfile sf; int ret; |