mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-01 13:17:19 +08:00
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. |
||
---|---|---|
.. | ||
cache.c | ||
chroot_canon.c | ||
circleload1.c | ||
circlemod1.c | ||
circlemod1a.c | ||
circlemod2.c | ||
circlemod2a.c | ||
circlemod3.c | ||
circlemod3a.c | ||
constload1.c | ||
constload2.c | ||
constload3.c | ||
dblload.c | ||
dblloadmod1.c | ||
dblloadmod2.c | ||
dblloadmod3.c | ||
dblunload.c | ||
dep1.c | ||
dep2.c | ||
dep3.c | ||
dep4.c | ||
dl-addr.c | ||
dl-brk.c | ||
dl-cache.c | ||
dl-caller.c | ||
dl-close.c | ||
dl-conflict.c | ||
dl-debug.c | ||
dl-deps.c | ||
dl-dst.h | ||
dl-environ.c | ||
dl-error.c | ||
dl-execstack.c | ||
dl-fini.c | ||
dl-fptr.c | ||
dl-hwcaps.c | ||
dl-init.c | ||
dl-iteratephdr.c | ||
dl-libc.c | ||
dl-load.c | ||
dl-load.h | ||
dl-lookup.c | ||
dl-machine-reject-phdr.h | ||
dl-map-segments.h | ||
dl-minimal.c | ||
dl-misc.c | ||
dl-object.c | ||
dl-open.c | ||
dl-origin.c | ||
dl-profile.c | ||
dl-profstub.c | ||
dl-reloc.c | ||
dl-runtime.c | ||
dl-sbrk.c | ||
dl-scope.c | ||
dl-support.c | ||
dl-sym.c | ||
dl-symaddr.c | ||
dl-sysdep.c | ||
dl-tls.c | ||
dl-trampoline.c | ||
dl-tsd.c | ||
dl-unmap-segments.h | ||
dl-version.c | ||
dl-writev.h | ||
do-rel.h | ||
dynamic-link.h | ||
elf.h | ||
enbl-secure.c | ||
failobj.c | ||
filter.c | ||
filtmod1.c | ||
filtmod2.c | ||
firstobj.c | ||
gen-trusted-dirs.awk | ||
genrtldtbl.awk | ||
get-dynamic-info.h | ||
global.c | ||
globalmod1.c | ||
ifuncdep1.c | ||
ifuncdep1pic.c | ||
ifuncdep2.c | ||
ifuncdep2pic.c | ||
ifuncdep5.c | ||
ifuncdep5pic.c | ||
ifuncmain1.c | ||
ifuncmain1pic.c | ||
ifuncmain1picstatic.c | ||
ifuncmain1pie.c | ||
ifuncmain1static.c | ||
ifuncmain1staticpic.c | ||
ifuncmain1staticpie.c | ||
ifuncmain1vis.c | ||
ifuncmain1vispic.c | ||
ifuncmain1vispie.c | ||
ifuncmain2.c | ||
ifuncmain2pic.c | ||
ifuncmain2picstatic.c | ||
ifuncmain2static.c | ||
ifuncmain3.c | ||
ifuncmain4.c | ||
ifuncmain4picstatic.c | ||
ifuncmain4static.c | ||
ifuncmain5.c | ||
ifuncmain5pic.c | ||
ifuncmain5picstatic.c | ||
ifuncmain5pie.c | ||
ifuncmain5static.c | ||
ifuncmain5staticpic.c | ||
ifuncmain6pie.c | ||
ifuncmain7.c | ||
ifuncmain7pic.c | ||
ifuncmain7picstatic.c | ||
ifuncmain7pie.c | ||
ifuncmain7static.c | ||
ifuncmod1.c | ||
ifuncmod3.c | ||
ifuncmod5.c | ||
ifuncmod6.c | ||
initfirst.c | ||
interp.c | ||
lateglobal.c | ||
ldconfig.c | ||
ldd.bash.in | ||
link.h | ||
loadfail.c | ||
loadtest.c | ||
ltglobmod1.c | ||
ltglobmod2.c | ||
Makefile | ||
multiload.c | ||
neededobj1.c | ||
neededobj2.c | ||
neededobj3.c | ||
neededobj4.c | ||
neededobj5.c | ||
neededobj6.c | ||
neededtest2.c | ||
neededtest3.c | ||
neededtest4.c | ||
neededtest.c | ||
next.c | ||
nextmod1.c | ||
nextmod2.c | ||
nodel2mod1.c | ||
nodel2mod2.c | ||
nodel2mod3.c | ||
nodelete2.c | ||
nodelete.c | ||
nodelmod1.c | ||
nodelmod2.c | ||
nodelmod3.c | ||
nodelmod4.c | ||
nodlopen2.c | ||
nodlopen.c | ||
nodlopenmod2.c | ||
nodlopenmod.c | ||
noload.c | ||
order2.c | ||
order2mod1.c | ||
order2mod2.c | ||
order2mod3.c | ||
order2mod4.c | ||
order.c | ||
origtest.c | ||
pathoptobj.c | ||
pldd-xx.c | ||
pldd.c | ||
preloadtest.c | ||
readelflib.c | ||
readlib.c | ||
reldep2.c | ||
reldep3.c | ||
reldep4.c | ||
reldep4mod1.c | ||
reldep4mod2.c | ||
reldep4mod3.c | ||
reldep4mod4.c | ||
reldep5.c | ||
reldep6.c | ||
reldep6mod0.c | ||
reldep6mod1.c | ||
reldep6mod2.c | ||
reldep6mod3.c | ||
reldep6mod4.c | ||
reldep7.c | ||
reldep7mod1.c | ||
reldep7mod2.c | ||
reldep8.c | ||
reldep8mod1.c | ||
reldep8mod2.c | ||
reldep8mod3.c | ||
reldep9.c | ||
reldep9mod1.c | ||
reldep9mod2.c | ||
reldep9mod3.c | ||
reldep.c | ||
reldepmod1.c | ||
reldepmod2.c | ||
reldepmod3.c | ||
reldepmod4.c | ||
reldepmod5.c | ||
reldepmod6.c | ||
resolvfail.c | ||
restest1.c | ||
restest2.c | ||
rtld-debugger-interface.txt | ||
rtld-Rules | ||
rtld.c | ||
setup-vdso.h | ||
sln.c | ||
sofini.c | ||
soinit.c | ||
sotruss-lib.c | ||
sotruss.sh | ||
sprof.c | ||
static-stubs.c | ||
testobj1_1.c | ||
testobj1.c | ||
testobj2.c | ||
testobj3.c | ||
testobj4.c | ||
testobj5.c | ||
testobj6.c | ||
testobj.h | ||
tls-macros.h | ||
tlsdeschtab.h | ||
tst-addr1.c | ||
tst-align2.c | ||
tst-align.c | ||
tst-alignmod2.c | ||
tst-alignmod.c | ||
tst-array1-static.c | ||
tst-array1.c | ||
tst-array1.exp | ||
tst-array2.c | ||
tst-array2.exp | ||
tst-array2dep.c | ||
tst-array3.c | ||
tst-array4.c | ||
tst-array4.exp | ||
tst-array5-static.c | ||
tst-array5-static.exp | ||
tst-array5.c | ||
tst-array5.exp | ||
tst-array5dep.c | ||
tst-audit1.c | ||
tst-audit2.c | ||
tst-audit8.c | ||
tst-audit9.c | ||
tst-auditmod1.c | ||
tst-auditmod9a.c | ||
tst-auditmod9b.c | ||
tst-auxv.c | ||
tst-deep1.c | ||
tst-deep1mod1.c | ||
tst-deep1mod2.c | ||
tst-deep1mod3.c | ||
tst-dl-iter-static.c | ||
tst-dlmodcount.c | ||
tst-dlmopen1.c | ||
tst-dlmopen1mod.c | ||
tst-dlmopen2.c | ||
tst-dlmopen3.c | ||
tst-dlopen-aout.c | ||
tst-dlopenrpath.c | ||
tst-dlopenrpathmod.c | ||
tst-execstack-mod.c | ||
tst-execstack-needed.c | ||
tst-execstack-prog.c | ||
tst-execstack.c | ||
tst-global1.c | ||
tst-initorder2.c | ||
tst-initorder2.exp | ||
tst-initorder.c | ||
tst-initorder.exp | ||
tst-initordera1.c | ||
tst-initordera2.c | ||
tst-initordera3.c | ||
tst-initordera4.c | ||
tst-initorderb1.c | ||
tst-initorderb2.c | ||
tst-leaks1-static.c | ||
tst-leaks1.c | ||
tst-nodelete2.c | ||
tst-nodelete2mod.c | ||
tst-nodelete-opened-lib.c | ||
tst-nodelete-opened.c | ||
tst-nodelete-rtldmod.cc | ||
tst-nodelete-uniquemod.cc | ||
tst-nodelete-zmod.cc | ||
tst-nodelete.cc | ||
tst-null-argv-lib.c | ||
tst-null-argv.c | ||
tst-order-a1.c | ||
tst-order-a2.c | ||
tst-order-a3.c | ||
tst-order-a4.c | ||
tst-order-b1.c | ||
tst-order-b2.c | ||
tst-order-main.c | ||
tst-pathopt.c | ||
tst-pathopt.sh | ||
tst-pie1.c | ||
tst-pie2.c | ||
tst-piemod1.c | ||
tst-protected1a.c | ||
tst-protected1b.c | ||
tst-protected1mod.h | ||
tst-protected1moda.c | ||
tst-protected1modb.c | ||
tst-ptrguard1-static.c | ||
tst-ptrguard1.c | ||
tst-relsort1.c | ||
tst-relsort1mod1.c | ||
tst-relsort1mod2.c | ||
tst-rtld-load-self.sh | ||
tst-stackguard1-static.c | ||
tst-stackguard1.c | ||
tst-thrlock.c | ||
tst-tls1-static.c | ||
tst-tls1.c | ||
tst-tls2-static.c | ||
tst-tls2.c | ||
tst-tls3.c | ||
tst-tls4.c | ||
tst-tls5.c | ||
tst-tls6.c | ||
tst-tls7.c | ||
tst-tls8.c | ||
tst-tls9-static.c | ||
tst-tls9.c | ||
tst-tls10.c | ||
tst-tls10.h | ||
tst-tls11.c | ||
tst-tls12.c | ||
tst-tls13.c | ||
tst-tls14.c | ||
tst-tls15.c | ||
tst-tls16.c | ||
tst-tls17.c | ||
tst-tls18.c | ||
tst-tls19.c | ||
tst-tls19mod1.c | ||
tst-tls19mod2.c | ||
tst-tls19mod3.c | ||
tst-tls-dlinfo.c | ||
tst-tlsalign-extern-static.c | ||
tst-tlsalign-extern.c | ||
tst-tlsalign-lib.c | ||
tst-tlsalign-static.c | ||
tst-tlsalign-vars.c | ||
tst-tlsalign.c | ||
tst-tlsmod1.c | ||
tst-tlsmod2.c | ||
tst-tlsmod3.c | ||
tst-tlsmod4.c | ||
tst-tlsmod5.c | ||
tst-tlsmod6.c | ||
tst-tlsmod7.c | ||
tst-tlsmod8.c | ||
tst-tlsmod9.c | ||
tst-tlsmod10.c | ||
tst-tlsmod11.c | ||
tst-tlsmod12.c | ||
tst-tlsmod13.c | ||
tst-tlsmod13a.c | ||
tst-tlsmod14a.c | ||
tst-tlsmod14b.c | ||
tst-tlsmod15a.c | ||
tst-tlsmod15b.c | ||
tst-tlsmod16a.c | ||
tst-tlsmod16b.c | ||
tst-tlsmod17a.c | ||
tst-tlsmod17b.c | ||
tst-tlsmod18a.c | ||
tst-unique1.c | ||
tst-unique1mod1.c | ||
tst-unique1mod2.c | ||
tst-unique2.c | ||
tst-unique2mod1.c | ||
tst-unique2mod2.c | ||
tst-unique3.cc | ||
tst-unique3.h | ||
tst-unique3lib2.cc | ||
tst-unique3lib.cc | ||
tst-unique4.cc | ||
tst-unique4.h | ||
tst-unique4lib.cc | ||
unload2.c | ||
unload2dep.c | ||
unload2mod.c | ||
unload3.c | ||
unload3mod1.c | ||
unload3mod2.c | ||
unload3mod3.c | ||
unload3mod4.c | ||
unload4.c | ||
unload4mod1.c | ||
unload4mod2.c | ||
unload4mod3.c | ||
unload4mod4.c | ||
unload5.c | ||
unload6.c | ||
unload6mod1.c | ||
unload6mod2.c | ||
unload6mod3.c | ||
unload7.c | ||
unload7mod1.c | ||
unload7mod2.c | ||
unload8.c | ||
unload8mod1.c | ||
unload8mod1x.c | ||
unload8mod2.c | ||
unload8mod3.c | ||
unload.c | ||
unloadmod.c | ||
Versions | ||
vismain.c | ||
vismod1.c | ||
vismod2.c | ||
vismod3.c | ||
vismod.h |