about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-10-20 11:54:09 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-10-20 11:54:09 +0000
commit9dd346ff431fc761f1b748bd4da8bb59f7652094 (patch)
treea0f17a8a5455b8707057d02ff5bee986f06bef53 /nptl
parent41075ae3e7f406e67d51da8cc5e89e397710d54b (diff)
downloadglibc-9dd346ff431fc761f1b748bd4da8bb59f7652094.tar.gz
glibc-9dd346ff431fc761f1b748bd4da8bb59f7652094.tar.xz
glibc-9dd346ff431fc761f1b748bd4da8bb59f7652094.zip
Convert 113 more function definitions to prototype style (files with assertions).
This mostly automatically-generated patch converts 113 function
definitions in glibc from old-style K&R to prototype-style.  Following
my other recent such patches, this one deals with the case of function
definitions in files that either contain assertions or where grep
suggested they might contain assertions - and thus where it isn't
possible to use a simple object code comparison as a sanity check on
the correctness of the patch, because line numbers are changed.

A few such automatically-generated changes needed to be supplemented
by manual changes for the result to compile.  openat64 had a prototype
declaration with "..." but an old-style definition in
sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the
generated prototype in the definition (I've filed
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68024> for diagnosing
such cases in GCC; the old state was undefined behavior not requiring
a diagnostic, but one seems a good idea).  In addition, as Florian has
noted regparm attribute mismatches between declaration and definition
are only diagnosed for prototype definitions, and five functions
needed internal_function added to their definitions (in the case of
__pthread_mutex_cond_lock, via the macro definition of
__pthread_mutex_lock) to compile on i386.

After this patch is in, remaining old-style definitions are probably
most readily fixed manually before we can turn on
-Wold-style-definition for all builds.

Tested for x86_64 and x86 (testsuite).

	* crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style
	function definition.
	* crypt/sha256-crypt.c (__sha256_crypt_r): Likewise.
	* crypt/sha512-crypt.c (__sha512_crypt_r): Likewise.
	* debug/backtracesyms.c (__backtrace_symbols): Likewise.
	* elf/dl-minimal.c (_itoa): Likewise.
	* hurd/hurdmalloc.c (malloc): Likewise.
	(free): Likewise.
	(realloc): Likewise.
	* inet/inet6_option.c (inet6_option_space): Likewise.
	(inet6_option_init): Likewise.
	(inet6_option_append): Likewise.
	(inet6_option_alloc): Likewise.
	(inet6_option_next): Likewise.
	(inet6_option_find): Likewise.
	* io/ftw.c (FTW_NAME): Likewise.
	(NFTW_NAME): Likewise.
	(NFTW_NEW_NAME): Likewise.
	(NFTW_OLD_NAME): Likewise.
	* libio/iofwide.c (_IO_fwide): Likewise.
	* libio/strops.c (_IO_str_init_static_internal): Likewise.
	(_IO_str_init_static): Likewise.
	(_IO_str_init_readonly): Likewise.
	(_IO_str_overflow): Likewise.
	(_IO_str_underflow): Likewise.
	(_IO_str_count): Likewise.
	(_IO_str_seekoff): Likewise.
	(_IO_str_pbackfail): Likewise.
	(_IO_str_finish): Likewise.
	* libio/wstrops.c (_IO_wstr_init_static): Likewise.
	(_IO_wstr_overflow): Likewise.
	(_IO_wstr_underflow): Likewise.
	(_IO_wstr_count): Likewise.
	(_IO_wstr_seekoff): Likewise.
	(_IO_wstr_pbackfail): Likewise.
	(_IO_wstr_finish): Likewise.
	* locale/programs/localedef.c (normalize_codeset): Likewise.
	* locale/programs/locarchive.c (add_locale_to_archive): Likewise.
	(add_locales_to_archive): Likewise.
	(delete_locales_from_archive): Likewise.
	* malloc/malloc.c (__libc_mallinfo): Likewise.
	* math/gen-auto-libm-tests.c (init_fp_formats): Likewise.
	* misc/tsearch.c (__tfind): Likewise.
	* nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise.
	* nptl/pthread_attr_getdetachstate.c
	(__pthread_attr_getdetachstate): Likewise.
	* nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize):
	Likewise.
	* nptl/pthread_attr_getinheritsched.c
	(__pthread_attr_getinheritsched): Likewise.
	* nptl/pthread_attr_getschedparam.c
	(__pthread_attr_getschedparam): Likewise.
	* nptl/pthread_attr_getschedpolicy.c
	(__pthread_attr_getschedpolicy): Likewise.
	* nptl/pthread_attr_getscope.c (__pthread_attr_getscope):
	Likewise.
	* nptl/pthread_attr_getstack.c (__pthread_attr_getstack):
	Likewise.
	* nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr):
	Likewise.
	* nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
	Likewise.
	* nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise.
	(__pthread_attr_init_2_0): Likewise.
	* nptl/pthread_attr_setdetachstate.c
	(__pthread_attr_setdetachstate): Likewise.
	* nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize):
	Likewise.
	* nptl/pthread_attr_setinheritsched.c
	(__pthread_attr_setinheritsched): Likewise.
	* nptl/pthread_attr_setschedparam.c
	(__pthread_attr_setschedparam): Likewise.
	* nptl/pthread_attr_setschedpolicy.c
	(__pthread_attr_setschedpolicy): Likewise.
	* nptl/pthread_attr_setscope.c (__pthread_attr_setscope):
	Likewise.
	* nptl/pthread_attr_setstack.c (__pthread_attr_setstack):
	Likewise.
	* nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr):
	Likewise.
	* nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
	Likewise.
	* nptl/pthread_condattr_setclock.c (pthread_condattr_setclock):
	Likewise.
	* nptl/pthread_create.c (__find_in_stack_list): Likewise.
	* nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise.
	* nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to
	use internal_function.
	* nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to
	prototype-style function definition.
	* nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise.
	(__pthread_mutex_cond_lock_adjust): Likewise.  Use
	internal_function.
	* nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock):
	Convert to prototype-style function definition.
	* nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock):
	Likewise.
	* nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
	Likewise.
	(__pthread_mutex_unlock): Likewise.
	* nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise.
	* nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise.
	* nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise.
	* nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise.
	* nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise.
	* nss/makedb.c (process_input): Likewise.
	* posix/fnmatch.c (__strchrnul): Likewise.
	(__wcschrnul): Likewise.
	(fnmatch): Likewise.
	* posix/fnmatch_loop.c (FCT): Likewise.
	* posix/glob.c (globfree): Likewise.
	(__glob_pattern_type): Likewise.
	(__glob_pattern_p): Likewise.
	* posix/regcomp.c (re_compile_pattern): Likewise.
	(re_set_syntax): Likewise.
	(re_compile_fastmap): Likewise.
	(regcomp): Likewise.
	(regerror): Likewise.
	(regfree): Likewise.
	* posix/regexec.c (regexec): Likewise.
	(re_match): Likewise.
	(re_search): Likewise.
	(re_match_2): Likewise.
	(re_search_2): Likewise.
	(re_search_stub): Likewise.  Use internal_function
	(re_copy_regs): Likewise.
	(re_set_registers): Convert to prototype-style function
	definition.
	(prune_impossible_nodes): Likewise.  Use internal_function.
	* resolv/inet_net_pton.c (inet_net_pton): Convert to
	prototype-style function definition.
	(inet_net_pton_ipv4): Likewise.
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise.
	* sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise.
	* sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise.
	* sysdeps/pthread/timer_delete.c (timer_delete): Likewise.
	* sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise.
	Make variadic.
	* time/strptime_l.c (localtime_r): Convert to prototype-style
	function definition.
	* wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise.
	* wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise.
	* wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise.
	* wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/pthread_attr_destroy.c3
-rw-r--r--nptl/pthread_attr_getdetachstate.c4
-rw-r--r--nptl/pthread_attr_getguardsize.c4
-rw-r--r--nptl/pthread_attr_getinheritsched.c4
-rw-r--r--nptl/pthread_attr_getschedparam.c5
-rw-r--r--nptl/pthread_attr_getschedpolicy.c4
-rw-r--r--nptl/pthread_attr_getscope.c4
-rw-r--r--nptl/pthread_attr_getstack.c6
-rw-r--r--nptl/pthread_attr_getstackaddr.c4
-rw-r--r--nptl/pthread_attr_getstacksize.c4
-rw-r--r--nptl/pthread_attr_init.c6
-rw-r--r--nptl/pthread_attr_setdetachstate.c4
-rw-r--r--nptl/pthread_attr_setguardsize.c4
-rw-r--r--nptl/pthread_attr_setinheritsched.c4
-rw-r--r--nptl/pthread_attr_setschedparam.c5
-rw-r--r--nptl/pthread_attr_setschedpolicy.c4
-rw-r--r--nptl/pthread_attr_setscope.c4
-rw-r--r--nptl/pthread_attr_setstack.c6
-rw-r--r--nptl/pthread_attr_setstackaddr.c4
-rw-r--r--nptl/pthread_attr_setstacksize.c4
-rw-r--r--nptl/pthread_condattr_setclock.c4
-rw-r--r--nptl/pthread_create.c3
-rw-r--r--nptl/pthread_getattr_np.c4
-rw-r--r--nptl/pthread_mutex_cond_lock.c2
-rw-r--r--nptl/pthread_mutex_init.c5
-rw-r--r--nptl/pthread_mutex_lock.c7
-rw-r--r--nptl/pthread_mutex_timedlock.c5
-rw-r--r--nptl/pthread_mutex_trylock.c3
-rw-r--r--nptl/pthread_mutex_unlock.c7
29 files changed, 39 insertions, 88 deletions
diff --git a/nptl/pthread_attr_destroy.c b/nptl/pthread_attr_destroy.c
index 72ee19eca9..f2701c8bb3 100644
--- a/nptl/pthread_attr_destroy.c
+++ b/nptl/pthread_attr_destroy.c
@@ -24,8 +24,7 @@
 #include <shlib-compat.h>
 
 int
-__pthread_attr_destroy (attr)
-     pthread_attr_t *attr;
+__pthread_attr_destroy (pthread_attr_t *attr)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_getdetachstate.c b/nptl/pthread_attr_getdetachstate.c
index 92d683dc5c..8cc78785de 100644
--- a/nptl/pthread_attr_getdetachstate.c
+++ b/nptl/pthread_attr_getdetachstate.c
@@ -21,9 +21,7 @@
 
 
 int
-__pthread_attr_getdetachstate (attr, detachstate)
-     const pthread_attr_t *attr;
-     int *detachstate;
+__pthread_attr_getdetachstate (const pthread_attr_t *attr, int *detachstate)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_getguardsize.c b/nptl/pthread_attr_getguardsize.c
index 83cb8016ea..b05b36ecfb 100644
--- a/nptl/pthread_attr_getguardsize.c
+++ b/nptl/pthread_attr_getguardsize.c
@@ -21,9 +21,7 @@
 
 
 int
-pthread_attr_getguardsize (attr, guardsize)
-     const pthread_attr_t *attr;
-     size_t *guardsize;
+pthread_attr_getguardsize (const pthread_attr_t *attr, size_t *guardsize)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_getinheritsched.c b/nptl/pthread_attr_getinheritsched.c
index 9a0e8e6b8f..ed3435e020 100644
--- a/nptl/pthread_attr_getinheritsched.c
+++ b/nptl/pthread_attr_getinheritsched.c
@@ -21,9 +21,7 @@
 
 
 int
-__pthread_attr_getinheritsched (attr, inherit)
-     const pthread_attr_t *attr;
-     int *inherit;
+__pthread_attr_getinheritsched (const pthread_attr_t *attr, int *inherit)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_getschedparam.c b/nptl/pthread_attr_getschedparam.c
index 3f38bd711d..3c9dffa6d3 100644
--- a/nptl/pthread_attr_getschedparam.c
+++ b/nptl/pthread_attr_getschedparam.c
@@ -22,9 +22,8 @@
 
 
 int
-__pthread_attr_getschedparam (attr, param)
-     const pthread_attr_t *attr;
-     struct sched_param *param;
+__pthread_attr_getschedparam (const pthread_attr_t *attr,
+			      struct sched_param *param)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_getschedpolicy.c b/nptl/pthread_attr_getschedpolicy.c
index 19996a68de..10728c364d 100644
--- a/nptl/pthread_attr_getschedpolicy.c
+++ b/nptl/pthread_attr_getschedpolicy.c
@@ -21,9 +21,7 @@
 
 
 int
-__pthread_attr_getschedpolicy (attr, policy)
-     const pthread_attr_t *attr;
-     int *policy;
+__pthread_attr_getschedpolicy (const pthread_attr_t *attr, int *policy)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_getscope.c b/nptl/pthread_attr_getscope.c
index e72247a99a..e704161caf 100644
--- a/nptl/pthread_attr_getscope.c
+++ b/nptl/pthread_attr_getscope.c
@@ -21,9 +21,7 @@
 
 
 int
-__pthread_attr_getscope (attr, scope)
-     const pthread_attr_t *attr;
-     int *scope;
+__pthread_attr_getscope (const pthread_attr_t *attr, int *scope)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_getstack.c b/nptl/pthread_attr_getstack.c
index 96c15c58ad..4cedcc5fd2 100644
--- a/nptl/pthread_attr_getstack.c
+++ b/nptl/pthread_attr_getstack.c
@@ -21,10 +21,8 @@
 
 
 int
-__pthread_attr_getstack (attr, stackaddr, stacksize)
-     const pthread_attr_t *attr;
-     void **stackaddr;
-     size_t *stacksize;
+__pthread_attr_getstack (const pthread_attr_t *attr, void **stackaddr,
+			 size_t *stacksize)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_getstackaddr.c b/nptl/pthread_attr_getstackaddr.c
index 9c85cec202..bceab68b58 100644
--- a/nptl/pthread_attr_getstackaddr.c
+++ b/nptl/pthread_attr_getstackaddr.c
@@ -22,9 +22,7 @@
 
 
 int
-__pthread_attr_getstackaddr (attr, stackaddr)
-     const pthread_attr_t *attr;
-     void **stackaddr;
+__pthread_attr_getstackaddr (const pthread_attr_t *attr, void **stackaddr)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_getstacksize.c b/nptl/pthread_attr_getstacksize.c
index ab18c27ae0..b48e1d06af 100644
--- a/nptl/pthread_attr_getstacksize.c
+++ b/nptl/pthread_attr_getstacksize.c
@@ -21,9 +21,7 @@
 
 
 int
-__pthread_attr_getstacksize (attr, stacksize)
-     const pthread_attr_t *attr;
-     size_t *stacksize;
+__pthread_attr_getstacksize (const pthread_attr_t *attr, size_t *stacksize)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_init.c b/nptl/pthread_attr_init.c
index 89bec2959b..3780b625c3 100644
--- a/nptl/pthread_attr_init.c
+++ b/nptl/pthread_attr_init.c
@@ -30,8 +30,7 @@ int __attr_list_lock = LLL_LOCK_INITIALIZER;
 
 
 int
-__pthread_attr_init_2_1 (attr)
-     pthread_attr_t *attr;
+__pthread_attr_init_2_1 (pthread_attr_t *attr)
 {
   struct pthread_attr *iattr;
 
@@ -54,8 +53,7 @@ versioned_symbol (libpthread, __pthread_attr_init_2_1, pthread_attr_init,
 
 #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
 int
-__pthread_attr_init_2_0 (attr)
-     pthread_attr_t *attr;
+__pthread_attr_init_2_0 (pthread_attr_t *attr)
 {
   /* This code is specific to the old LinuxThread code which has a too
      small pthread_attr_t definition.  The struct looked like
diff --git a/nptl/pthread_attr_setdetachstate.c b/nptl/pthread_attr_setdetachstate.c
index ad0d43135a..c4e085b723 100644
--- a/nptl/pthread_attr_setdetachstate.c
+++ b/nptl/pthread_attr_setdetachstate.c
@@ -22,9 +22,7 @@
 
 
 int
-__pthread_attr_setdetachstate (attr, detachstate)
-     pthread_attr_t *attr;
-     int detachstate;
+__pthread_attr_setdetachstate (pthread_attr_t *attr, int detachstate)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_setguardsize.c b/nptl/pthread_attr_setguardsize.c
index 86df9715d8..9a7a984bd9 100644
--- a/nptl/pthread_attr_setguardsize.c
+++ b/nptl/pthread_attr_setguardsize.c
@@ -21,9 +21,7 @@
 
 
 int
-pthread_attr_setguardsize (attr, guardsize)
-     pthread_attr_t *attr;
-     size_t guardsize;
+pthread_attr_setguardsize (pthread_attr_t *attr, size_t guardsize)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_setinheritsched.c b/nptl/pthread_attr_setinheritsched.c
index 477072d8de..c66a4e3d38 100644
--- a/nptl/pthread_attr_setinheritsched.c
+++ b/nptl/pthread_attr_setinheritsched.c
@@ -22,9 +22,7 @@
 
 
 int
-__pthread_attr_setinheritsched (attr, inherit)
-     pthread_attr_t *attr;
-     int inherit;
+__pthread_attr_setinheritsched (pthread_attr_t *attr, int inherit)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_setschedparam.c b/nptl/pthread_attr_setschedparam.c
index f6347a78c8..d6ac0fffb2 100644
--- a/nptl/pthread_attr_setschedparam.c
+++ b/nptl/pthread_attr_setschedparam.c
@@ -23,9 +23,8 @@
 
 
 int
-__pthread_attr_setschedparam (attr, param)
-     pthread_attr_t *attr;
-     const struct sched_param *param;
+__pthread_attr_setschedparam (pthread_attr_t *attr,
+			      const struct sched_param *param)
 {
   assert (sizeof (*attr) >= sizeof (struct pthread_attr));
   struct pthread_attr *iattr = (struct pthread_attr *) attr;
diff --git a/nptl/pthread_attr_setschedpolicy.c b/nptl/pthread_attr_setschedpolicy.c
index 70f439590f..8bc9ed20fb 100644
--- a/nptl/pthread_attr_setschedpolicy.c
+++ b/nptl/pthread_attr_setschedpolicy.c
@@ -22,9 +22,7 @@
 
 
 int
-__pthread_attr_setschedpolicy (attr, policy)
-     pthread_attr_t *attr;
-     int policy;
+__pthread_attr_setschedpolicy (pthread_attr_t *attr, int policy)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_setscope.c b/nptl/pthread_attr_setscope.c
index 8f510bfec2..7559d105db 100644
--- a/nptl/pthread_attr_setscope.c
+++ b/nptl/pthread_attr_setscope.c
@@ -22,9 +22,7 @@
 
 
 int
-__pthread_attr_setscope (attr, scope)
-     pthread_attr_t *attr;
-     int scope;
+__pthread_attr_setscope (pthread_attr_t *attr, int scope)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_setstack.c b/nptl/pthread_attr_setstack.c
index 6898f72540..c44c383aa7 100644
--- a/nptl/pthread_attr_setstack.c
+++ b/nptl/pthread_attr_setstack.c
@@ -28,10 +28,8 @@
 
 
 int
-__pthread_attr_setstack (attr, stackaddr, stacksize)
-     pthread_attr_t *attr;
-     void *stackaddr;
-     size_t stacksize;
+__pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr,
+			 size_t stacksize)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_setstackaddr.c b/nptl/pthread_attr_setstackaddr.c
index 2c028a54fa..ab0d7d2a33 100644
--- a/nptl/pthread_attr_setstackaddr.c
+++ b/nptl/pthread_attr_setstackaddr.c
@@ -22,9 +22,7 @@
 
 
 int
-__pthread_attr_setstackaddr (attr, stackaddr)
-     pthread_attr_t *attr;
-     void *stackaddr;
+__pthread_attr_setstackaddr (pthread_attr_t *attr, void *stackaddr)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_attr_setstacksize.c b/nptl/pthread_attr_setstacksize.c
index a0cda0cbce..d3d109a232 100644
--- a/nptl/pthread_attr_setstacksize.c
+++ b/nptl/pthread_attr_setstacksize.c
@@ -27,9 +27,7 @@
 
 
 int
-__pthread_attr_setstacksize (attr, stacksize)
-     pthread_attr_t *attr;
-     size_t stacksize;
+__pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize)
 {
   struct pthread_attr *iattr;
 
diff --git a/nptl/pthread_condattr_setclock.c b/nptl/pthread_condattr_setclock.c
index 0748d78d05..5300844d06 100644
--- a/nptl/pthread_condattr_setclock.c
+++ b/nptl/pthread_condattr_setclock.c
@@ -25,9 +25,7 @@
 
 
 int
-pthread_condattr_setclock (attr, clock_id)
-     pthread_condattr_t *attr;
-     clockid_t clock_id;
+pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock_id)
 {
   /* Only a few clocks are allowed.  */
   if (clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_REALTIME)
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index d10f4ea800..790f46db3f 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -80,8 +80,7 @@ static int create_thread (struct pthread *pd, const struct pthread_attr *attr,
 
 struct pthread *
 internal_function
-__find_in_stack_list (pd)
-     struct pthread *pd;
+__find_in_stack_list (struct pthread *pd)
 {
   list_t *entry;
   struct pthread *result = NULL;
diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c
index 52a4602730..5ebff5cbbc 100644
--- a/nptl/pthread_getattr_np.c
+++ b/nptl/pthread_getattr_np.c
@@ -30,9 +30,7 @@
 
 
 int
-pthread_getattr_np (thread_id, attr)
-     pthread_t thread_id;
-     pthread_attr_t *attr;
+pthread_getattr_np (pthread_t thread_id, pthread_attr_t *attr)
 {
   struct pthread *thread = (struct pthread *) thread_id;
   struct pthread_attr *iattr = (struct pthread_attr *) attr;
diff --git a/nptl/pthread_mutex_cond_lock.c b/nptl/pthread_mutex_cond_lock.c
index 7b6fbc18aa..2ac421fd63 100644
--- a/nptl/pthread_mutex_cond_lock.c
+++ b/nptl/pthread_mutex_cond_lock.c
@@ -14,7 +14,7 @@
 #define LLL_ROBUST_MUTEX_LOCK(mutex, id) \
   lll_robust_cond_lock ((mutex)->__data.__lock, id, \
 			PTHREAD_ROBUST_MUTEX_PSHARED (mutex))
-#define __pthread_mutex_lock __pthread_mutex_cond_lock
+#define __pthread_mutex_lock internal_function __pthread_mutex_cond_lock
 #define __pthread_mutex_lock_full __pthread_mutex_cond_lock_full
 #define NO_INCR
 
diff --git a/nptl/pthread_mutex_init.c b/nptl/pthread_mutex_init.c
index d71cfef0f7..45c159bad3 100644
--- a/nptl/pthread_mutex_init.c
+++ b/nptl/pthread_mutex_init.c
@@ -55,9 +55,8 @@ prio_inherit_missing (void)
 }
 
 int
-__pthread_mutex_init (mutex, mutexattr)
-     pthread_mutex_t *mutex;
-     const pthread_mutexattr_t *mutexattr;
+__pthread_mutex_init (pthread_mutex_t *mutex,
+		      const pthread_mutexattr_t *mutexattr)
 {
   const struct pthread_mutexattr *imutexattr;
 
diff --git a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c
index 9a3b46624d..493fe43778 100644
--- a/nptl/pthread_mutex_lock.c
+++ b/nptl/pthread_mutex_lock.c
@@ -60,8 +60,7 @@ static int __pthread_mutex_lock_full (pthread_mutex_t *mutex)
      __attribute_noinline__;
 
 int
-__pthread_mutex_lock (mutex)
-     pthread_mutex_t *mutex;
+__pthread_mutex_lock (pthread_mutex_t *mutex)
 {
   assert (sizeof (mutex->__size) >= sizeof (mutex->__data));
 
@@ -521,8 +520,8 @@ hidden_def (__pthread_mutex_lock)
 
 #ifdef NO_INCR
 void
-__pthread_mutex_cond_lock_adjust (mutex)
-     pthread_mutex_t *mutex;
+internal_function
+__pthread_mutex_cond_lock_adjust (pthread_mutex_t *mutex)
 {
   assert ((mutex->__data.__kind & PTHREAD_MUTEX_PRIO_INHERIT_NP) != 0);
   assert ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0);
diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c
index f0fb03e90b..370a232773 100644
--- a/nptl/pthread_mutex_timedlock.c
+++ b/nptl/pthread_mutex_timedlock.c
@@ -41,9 +41,8 @@
 #endif
 
 int
-pthread_mutex_timedlock (mutex, abstime)
-     pthread_mutex_t *mutex;
-     const struct timespec *abstime;
+pthread_mutex_timedlock (pthread_mutex_t *mutex,
+			 const struct timespec *abstime)
 {
   int oldval;
   pid_t id = THREAD_GETMEM (THREAD_SELF, tid);
diff --git a/nptl/pthread_mutex_trylock.c b/nptl/pthread_mutex_trylock.c
index 33df384bd0..17ec2302ec 100644
--- a/nptl/pthread_mutex_trylock.c
+++ b/nptl/pthread_mutex_trylock.c
@@ -31,8 +31,7 @@
 #endif
 
 int
-__pthread_mutex_trylock (mutex)
-     pthread_mutex_t *mutex;
+__pthread_mutex_trylock (pthread_mutex_t *mutex)
 {
   int oldval;
   pid_t id = THREAD_GETMEM (THREAD_SELF, tid);
diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c
index 9e864c1832..c078f7ebe3 100644
--- a/nptl/pthread_mutex_unlock.c
+++ b/nptl/pthread_mutex_unlock.c
@@ -34,9 +34,7 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr)
 
 int
 internal_function attribute_hidden
-__pthread_mutex_unlock_usercnt (mutex, decr)
-     pthread_mutex_t *mutex;
-     int decr;
+__pthread_mutex_unlock_usercnt (pthread_mutex_t *mutex, int decr)
 {
   int type = PTHREAD_MUTEX_TYPE_ELISION (mutex);
   if (__builtin_expect (type &
@@ -309,8 +307,7 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr)
 
 
 int
-__pthread_mutex_unlock (mutex)
-     pthread_mutex_t *mutex;
+__pthread_mutex_unlock (pthread_mutex_t *mutex)
 {
   return __pthread_mutex_unlock_usercnt (mutex, 1);
 }