summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-10-09 19:04:57 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-10-09 19:04:57 +0200
commit7bb5f8a836b916d6ebf7b6921b136e99cea2442d (patch)
tree28a7ed786dae726ad14f100e8626eee872b1ba11 /io
parentf76453c31593957fec1a99b986bfa5506618b79c (diff)
parentab30899d880f9741a409cbc0d7a28399bdac21bf (diff)
Merge tag 'glibc-2.23' into baseline
The GNU C Library ================= The GNU C Library version 2.23 is now available. The GNU C Library is used as *the* C library in the GNU system and in GNU/Linux systems, as well as many other systems that use Linux as the kernel. The GNU C Library is primarily designed to be a portable and high performance C library. It follows all relevant standards including ISO C11 and POSIX.1-2008. It is also internationalized and has one of the most complete internationalization interfaces known. The GNU C Library webpage is at http://www.gnu.org/software/libc/ Packages for the 2.23 release may be downloaded from: http://ftpmirror.gnu.org/libc/ http://ftp.gnu.org/gnu/libc/ The mirror list is at http://www.gnu.org/order/ftp.html NEWS for version 2.23 ===================== * Unicode 8.0.0 Support: Character encoding, character type info, and transliteration tables are all updated to Unicode 8.0.0, using new and/or improved generator scripts contributed by Mike FABIAN (Red Hat). These updates cause user visible changes, such as the fixes for bugs 89, 16061, and 18568. * sched_setaffinity, pthread_setaffinity_np no longer attempt to guess the kernel-internal CPU set size. This means that requests that change the CPU affinity which failed before (for example, an all-ones CPU mask) will now succeed. Applications that need to determine the effective CPU affinities need to call sched_getaffinity or pthread_getaffinity_np after setting it because the kernel can adjust it (and the previous size check would not detect this in the majority of cases). * The fts.h header can now be used with -D_FILE_OFFSET_BITS=64. With LFS the following new symbols are used: fts64_children, fts64_close, fts64_open, fts64_read and fts64_set. * getaddrinfo now detects certain invalid responses on an internal netlink socket. If such responses are received, an affected process will terminate with an error message of "Unexpected error <number> on netlink descriptor <number>" or "Unexpected netlink response of size <number> on descriptor <number>". The most likely cause for these errors is a multi-threaded application which erroneously closes and reuses the netlink file descriptor while it is used by getaddrinfo. * A defect in the malloc implementation, present since glibc 2.15 (2012) or glibc 2.10 via --enable-experimental-malloc (2009), could result in the unnecessary serialization of memory allocation requests across threads. The defect is now corrected. Users should see a substantial increase in the concurent throughput of allocation requests for applications which trigger this bug. Affected applications typically create create and destroy threads frequently. (Bug 19048 was reported and analyzed by Ericsson.) * There is now a --disable-timezone-tools configure option for disabling the building and installing of the timezone related utilities (zic, zdump, and tzselect). This is useful for people who build the timezone data and code independent of the GNU C Library. * The obsolete header <regexp.h> has been removed. Programs that require this header must be updated to use <regex.h> instead. * The obsolete functions bdflush, create_module, get_kernel_syms, query_module and uselib are no longer available to newly linked binaries; the header <sys/kdaemon.h> has been removed. These functions and header were specific to systems using the Linux kernel and could not usefully be used with the GNU C Library on systems with version 2.6 or later of the Linux kernel. * Optimized string, wcsmbs and memory functions for IBM z13. Implemented by Stefan Liebler. * Newly linked programs that define a variable called signgam will no longer have it set by the lgamma, lgammaf and lgammal functions. Programs that require signgam to be set by those functions must ensure that they use the variable provided by the GNU C Library and declared in <math.h>, without defining their own copy. * The minimum GCC version that can be used to build this version of the GNU C Library is GCC 4.7. Older GCC versions, and non-GNU compilers, can still be used to compile programs using the GNU C Library. Security related changes: * An out-of-bounds value in a broken-out struct tm argument to strftime no longer causes a crash. Reported by Adam Nielsen. (CVE-2015-8776) * The LD_POINTER_GUARD environment variable can no longer be used to disable the pointer guard feature. It is always enabled. Previously, LD_POINTER_GUARD could be used to disable security hardening in binaries running in privileged AT_SECURE mode. Reported by Hector Marco-Gisbert. (CVE-2015-8777) * An integer overflow in hcreate and hcreate_r could lead to an out-of-bounds memory access. Reported by Szabolcs Nagy. (CVE-2015-8778) * The catopen function no longer has unbounded stack usage. Reported by Max. (CVE-2015-8779) * The nan, nanf and nanl functions no longer have unbounded stack usage depending on the length of the string passed as an argument to the functions. Reported by Joseph Myers. (CVE-2014-9761) * A stack-based buffer overflow was found in libresolv when invoked from libnss_dns, allowing specially crafted DNS responses to seize control of execution flow in the DNS client. The buffer overflow occurs in the functions send_dg (send datagram) and send_vc (send TCP) for the NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC family. The use of AF_UNSPEC triggers the low-level resolver code to send out two parallel queries for A and AAAA. A mismanagement of the buffers used for those queries could result in the response of a query writing beyond the alloca allocated buffer created by _nss_dns_gethostbyname4_r. Buffer management is simplified to remove the overflow. Thanks to the Google Security Team and Red Hat for reporting the security impact of this issue, and Robert Holiday of Ciena for reporting the related bug 18665. (CVE-2015-7547) The following bugs are resolved with this release: [89] localedata: Locales nb_NO and nn_NO should transliterate æøå [887] math: Math library function "logb" and "nextafter" inconsistent [2542] math: Incorrect return from float gamma (-0X1.FA471547C2FE5P+1) [2543] math: Incorrect return from float gamma (-0X1.9260DCP+1) [2558] math: Incorrect return from double gamma (-0X1.FA471547C2FE5P+1) [2898] libc: [improve] warning: the use of `mktemp' is dangerous, better use `mkstemp' [4404] localedata: German translation of "Alarm clock" is misleading [6799] math: nextafter() and nexttoward() doen't set errno on overflow/underflow errors [6803] math: scalb(), scalbln(), scalbn() do not set errno on overflow/underflow [10432] nis: _nss_nis_setnetgrent assertion failure [11460] libc: fts has no LFS support [12926] network: getaddrinfo()/make_request() may spin forever [13065] nptl: Race condition in pthread barriers [13690] nptl: pthread_mutex_unlock potentially cause invalid access [14341] dynamic-link: Dynamic linker crash when DT_JMPREL and DT_REL{,A} are not contiguous [14551] math: [ldbl-128ibm] strtold overflow handling for IBM long double [14912] libc: Rename non-installed bits/*.h headers [15002] libc: Avoid undefined behavior in posix_fallocate overflow check [15367] math: Let gcc use __builtin_isinf [15384] math: One constant fewer in ieee754/dbl-64/wordsize-64/s_finite.c [15421] math: lgamma wrongly sets signgam for ISO C [15470] math: [arm] On ARM llrintl() and llroundl() do not raise FE_INVALID with argument out of range [15491] math: [i386/x86_64] x86 nearbyint implementations wrongly clear all exceptions [15786] dynamic-link: ifunc resolver functions can smash function arguments [15918] math: Unnecessary check for equality in hypotf() [16061] localedata: Review / update transliteration data [16068] math: [i386/x86_64] x86 and x86_64 fesetenv exclude state they should include [16141] time: strptime %z offset restriction [16171] math: drem should be alias of remainder [16296] math: fegetround is pure? [16347] math: [ldbl-128ibm] ldbl-128/e_lgammal_r.c may not be suitable. [16364] libc: sleep may leave SIGCHLD blocked on sync cancellation on GNU/Linux [16399] math: [mips] lrint / llrint / lround / llround missing exceptions [16415] math: Clean up ldbl-128 / ldbl-128ibm expm1l for large positive arguments [16422] math: [powerpc] math-float, math-double failing llrint tests with "Exception "Inexact" set" on ppc32 [16495] localedata: nl_NL: date_fmt: shuffle year/month around [16517] math: Missing underflow exception from tanf/tan/tanl [16519] math: Missing underflow exception from sinhf [16520] math: Missing underflow exception from tanhf [16521] math: Missing underflow exception from exp2 [16620] math: [ldbl-128ibm] exp10l spurious overflows / bad directed rounding results [16734] stdio: fopen calls mmap to allocate its buffer [16961] math: nan function incorrect handling of bad sequences [16962] math: nan function unbounded stack allocation (CVE-2014-9761) [16973] localedata: Fix lang_lib/lang_term as per ISO 639-2 [16985] locale: localedef: confusing error message when opening output fails [17118] math: ctanh(INFINITY + 2 * I) returns incorrect value [17197] locale: Redundant shift character in iconv conversion output at block boundary [17243] libc: trunk/posix/execl.c:53: va_args problem ? [17244] libc: trunk/sysdeps/unix/sysv/linux/semctl.c:116: va_args muxup ? [17250] dynamic-link: static linking breaks nss loading (getaddrinfo/getpwnam/etc...) [17404] libc: atomic_exchange_rel lacking a barrier on MIPS16, GCC before 4.7? [17441] math: isnan() should use __builtin_isnan() in GCC [17514] nptl: Assert failure unlocking ERRORCHECK mutex after timedlock (related to lock elision) [17787] manual: Exponent on page 324 of the PDF ends prematurely [17886] time: strptime should be able to parse "Z" as a timezone with %z [17887] time: strptime should be able to parse "+01:00" style timezones [17905] libc: catopen() Multiple unbounded stack allocations (CVE-2015-8779) [18084] libc: backtrace (..., 0) dumps core on x86 [18086] libc: nice() sets errno to 0 on success [18240] libc: hcreate, hcreate_r should fail with ENOMEM if element count is too large (CVE-2015-8778) [18251] dynamic-link: SONAME missing when audit modules provides path [18265] libc: add attributes for wchar string and memory functions [18370] math: csqrt missing underflows [18421] libc: [hppa] read-only segment has dynamic relocations [18472] libc: Obsolete syscall wrappers should be compat symbols [18480] libc: hppa glibc miscompilation in sched_setaffinity() [18491] localedata: Update tr_TR LC_CTYPE as part of Unicode updates [18525] localedata: Remove locale timezone information [18560] libc: [powerpc] spurious bits/ipc.h definitions [18568] localedata: Update locale data to Unicode 8.0 [18589] locale: sort-test.sh fails at random [18595] math: ctan, ctanh missing underflows [18604] libc: assert macro-expands its argument [18610] math: S390: fetestexcept() reports any exception if DXC-code contains a vector instruction exception. [18611] math: j1, jn missing errno setting on underflow [18618] localedata: sync Chechen locale definitions with other *_RU locales [18647] math: powf(-0x1.000002p0, 0x1p30) returns 0 instead of +inf [18661] libc: Some x86-64 assembly codes don't align stack to 16 bytes [18665] network: In send_dg, the recvfrom function is NOT always using the buffer size of a newly created buffer (CVE-2015-7547) [18674] libc: [i386] trunk/sysdeps/i386/tst-auditmod3b.c:84: possible missing break ? [18675] libc: fpathconf(_PC_NAME_MAX) fails against large filesystems for 32bit processes [18681] libc: regexp.h is obsolete and buggy, and should be desupported [18699] math: tilegx cproj() for various complex infinities does not yield infinity [18724] libc: Harden put*ent functions against data injection [18743] nptl: PowerPC: findutils testcase fails with --enable-lock-elision [18755] build: build errors with -DNDEBUG [18757] stdio: fmemopen fails to set errno on failure [18778] dynamic-link: ld.so crashes if failed dlopen causes libpthread to be forced unloaded [18781] libc: openat64 lacks O_LARGEFILE [18787] libc: [hppa] sysdeps/unix/sysv/linux/hppa/bits/atomic.h:71:6: error: can’t find a register in class ‘R1_REGS’ while reloading ‘asm’ [18789] math: [ldbl-128ibm] sinhl inaccurate near 0 [18790] math: [ldbl-128ibm] tanhl inaccurate [18795] libc: stpncpy fortification misses buffer lengths that are statically too large [18796] build: build fails for --disable-mathvec [18803] math: hypot missing underflows [18820] stdio: fmemopen may leak memory on failure [18823] math: csqrt spurious underflows [18824] math: fma spurious underflows [18825] math: pow missing underflows [18857] math: [ldbl-128ibm] nearbyintl wrongly uses signaling comparisons [18868] nptl: pthread_barrier_init typo has in-theory-undefined behavior [18870] build: sem_open.c fails to compile with missing symbol FUTEX_SHARED [18872] stdio: Fix memory leak in printf_positional [18873] libc: posix_fallocate overflow check ineffective [18875] math: Excess precision leads incorrect libm [18877] libc: arm: mmap offset regression [18887] libc: memory corruption when using getmntent on blank lines [18918] localedata: hu_HU: change time to HH:MM:SS format [18921] libc: Regression: extraneous stat() and fstat() performed by opendir() [18928] dynamic-link: LD_POINTER_GUARD is not ignored for privileged binaries (CVE-2015-8777) [18951] math: tgamma missing underflows [18952] math: [ldbl-128/ldbl-128ibm] lgammal spurious "invalid", incorrect signgam [18953] localedata: lt_LT: change currency symbol to the euro [18956] math: powf inaccuracy [18961] math: [i386] exp missing underflows [18966] math: [i386] exp10 missing underflows [18967] math: math.h XSI POSIX namespace (gamma, isnan, scalb) [18969] build: multiple string test failures due to missing locale dependencies [18970] libc: Reference of pthread_setcancelstate in libc.a [18977] math: float / long double Bessel functions not in XSI POSIX [18980] math: i386 libm functions return with excess range and precision [18981] math: i386 scalb*, ldexp return with excess range and precision [18982] stdio: va_list and vprintf [18985] time: Passing out of range data to strftime() causes a segfault (CVE-2015-8776) [19003] math: [x86_64] fma4 version of pow inappropriate contraction [19007] libc: FAIL: elf/check-localplt with -z now and binutils 2.26 [19012] locale: iconv_open leaks memory on error path [19016] math: clog, clog10 inaccuracy [19018] nptl: Mangle function pointers in tls_dtor_list [19032] math: [i386] acosh (-qNaN) spurious "invalid" exception [19046] math: ldbl-128 / ldbl-128ibm lgamma bad overflow handling [19048] malloc: malloc: arena free list can become cyclic, increasing contention [19049] math: [powerpc] erfc incorrect zero sign [19050] math: [powerpc] log* incorrect zero sign [19058] math: [x86_64] Link fail with -fopenmp and -flto [19059] math: nexttoward overflow incorrect in non-default rounding modes [19071] math: ldbl-96 lroundl incorrect just below powers of 2 [19074] network: Data race in _res_hconf_reorder_addrs [19076] math: [ldbl-128ibm] log1pl (-1) wrong sign of infinity [19077] math: [ldbl-128ibm] logl (1) incorrect sign of zero result [19078] math: [ldbl-128ibm] expl overflow incorrect in non-default rounding modes [19079] math: dbl-64/wordsize-64 lround based on llround incorrect for ILP32 [19085] math: ldbl-128 lrintl, lroundl missing exceptions for 32-bit long [19086] manual: posix_fallocate64 documented argument order is wrong. [19088] math: lround, llround missing exceptions close to overflow threshold [19094] math: lrint, llrint missing exceptions close to overflow threshold [19095] math: dbl-64 lrint incorrect for 64-bit long [19122] dynamic-link: Unnecessary PLT relocations in librtld.os [19124] dynamic-link: ld.so failed to build with older assmebler [19125] math: [powerpc32] llroundf, llround incorrect exceptions [19129] dynamic-link: [arm] Concurrent lazy TLSDESC resolution can crash [19134] math: [powerpc32] lround, lroundf spurious exceptions [19137] libc: i386/epoll_pwait.S doesn't support cancellation [19143] nptl: Remove CPU set size checking from sched_setaffinity, pthread_setaffinity_np [19156] math: [ldbl-128] j0l spurious underflows [19164] nptl: tst-getcpu fails with many possible CPUs [19168] math: math/test-ildoubl and math/test-ldouble failure [19174] nptl: PowerPC: TLE enabled pthread mutex performs poorly. [19178] dynamic-link: ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA confuses prelink [19181] math: [i386/x86_64] fesetenv (FE_DFL_ENV), fesetenv (FE_NOMASK_ENV) do not clear SSE exceptions [19182] malloc: malloc deadlock between ptmalloc_lock_all and _int_new_arena/reused_arena [19189] math: [ldbl-128] log1pl (-qNaN) spurious "invalid" exception [19201] math: dbl-64 remainder incorrect sign of zero result [19205] math: bits/math-finite.h conditions do not match math.h and bits/mathcalls.h [19209] math: bits/math-finite.h wrongly maps ldexp to scalbn [19211] math: lgamma functions do not set signgam for -ffinite-math-only for C99-based standards [19212] libc: features.h not -Wundef clean [19213] math: [i386/x86_64] log* (1) incorrect zero sign for -ffinite- math-only [19214] libc: Family and model identification for AMD CPU's are incorrect. [19219] libc: GLIBC build fails for ia64 with missing __nearbyintl [19228] math: [powerpc] nearbyint wrongly clears "inexact", leaves traps disabled [19235] math: [powerpc64] lround, lroundf, llround, llroundf spurious "inexact" exceptions [19238] math: [powerpc] round, roundf spurious "inexact" for integer arguments [19242] libc: strtol incorrect in Turkish locales [19243] malloc: reused_arena can pick an arena on the free list, leading to an assertion failure and reference count corruption [19253] time: tzset() ineffective when temporary TZ did not include DST rules [19266] math: strtod ("NAN(I)") incorrect in Turkish locales [19270] math: [hppa] Shared libm missing __isnanl [19285] libc: [hppa] sysdeps/unix/sysv/linux/hppa/bits/mman.h: missing MAP_HUGETLB and MAP_STACK defines [19313] nptl: Wrong __cpu_mask for x32 [19347] libc: grantpt: try to force a specific gid even without pt_chown [19349] math: [ldbl-128ibm] tanhl inaccurate for small arguments [19350] math: [ldbl-128ibm] sinhl spurious overflows [19351] math: [ldbl-128ibm] logl inaccurate near 1 [19363] time: x32: times() return value wrongly truncates/sign extends from 32bit [19367] dynamic-link: Improve branch prediction on Silvermont [19369] network: Default domain name not reset by res_ninit when "search" / "domain" entry is removed from resolv.conf [19375] math: powerpc: incorrect results for POWER7 logb with negative subnormals [19385] localedata: bg_BG: time separator should be colon, not comma [19408] libc: linux personality syscall wrapper may erroneously return an error on 32-bit architectures [19415] libc: dladdr returns wrong names on hppa [19432] libc: iconv rejects redundant escape sequences in IBM900, IBM903, IBM905, IBM907, and IBM909 [19439] math: Unix98 isinf and isnan functions conflict with C++11 [19443] build: build failures with -DDEBUG [19451] build: Make check fails on test-double-vlen2 [19462] libc: Glibc failed to build with -Os [19465] math: Wrong code with -Os [19466] time: time/tst-mktime2.c is compiled into an infinite loop with -Os [19467] string: Fast_Unaligned_Load needs to be enabled for Excavator core CPU's. [19475] libc: Glibc 2.22 doesn't build on sparc [PATCH] [19486] math: S390: Math tests fail with "Exception Inexact set". [19529] libc: [ARM]: FAIL: stdlib/tst-makecontext [19550] libc: [mips] mmap negative offset handling inconsistent with other architectures [19590] math: Fail to build shared objects that use libmvec.so functions. Contributors ============ This release was made possible by the contributions of many people. The maintainers are grateful to everyone who has contributed changes or bug reports. These include: Adhemerval Zanella Alan Modra Amit Pawar Andreas Schwab Andrew Bennett Andrew Senkevich Andrew Stubbs Anton Blanchard Arjun Shankar Arslanbek Astemirov Aurelien Jarno Brett Neumeier Carlos Eduardo Seo Carlos O'Donell Chris Metcalf Chung-Lin Tang Damyan Ivanov Daniel Marjamäki David Kastrup David Lamparter David S. Miller Dmitry V. Levin Egmont Koblinger Evert Flavio Cruz Florian Weimer Gabriel F. T. Gomes Geoffrey Thomas Gleb Fotengauer-Malinovskiy Gunnar Hjalmarsson H.J. Lu Helge Deller James Perkins John David Anglin Joseph Myers Justus Winter Khem Raj Ludovic Courtès Maciej W. Rozycki Manolis Ragkousis Marcin Kościelnicki Mark Wielaard Marko Myllynen Martin Sebor Maxim Ostapenko Mike FABIAN Mike Frysinger Namhyung Kim Ondrej Bilka Ondřej Bílka Paul E. Murphy Paul Eggert Paul Murphy Paul Pluzhnikov Petar Jovanovic Phil Blundell Rajalakshmi Srinivasaraghavan Rasmus Villemoes Richard Henderson Rob Wu Roland McGrath Samuel Thibault Siddhesh Poyarekar Stan Shebs Stefan Liebler Steve Ellcey Szabolcs Nagy Thomas Schwinge Torvald Riegel Tulio Magno Quites Machado Filho Vincent Bernat Wilco Dijkstra Zack Weinberg
Diffstat (limited to 'io')
-rw-r--r--io/Makefile7
-rw-r--r--io/Versions3
-rw-r--r--io/access.c6
-rw-r--r--io/bits/fcntl2.h2
-rw-r--r--io/bits/poll2.h2
-rw-r--r--io/bug-ftw1.c2
-rw-r--r--io/bug-ftw2.c2
-rw-r--r--io/bug-ftw4.c2
-rw-r--r--io/chdir.c5
-rw-r--r--io/chmod.c6
-rw-r--r--io/chown.c7
-rw-r--r--io/close.c5
-rw-r--r--io/creat.c6
-rw-r--r--io/creat64.c6
-rw-r--r--io/dup.c5
-rw-r--r--io/dup2.c6
-rw-r--r--io/dup3.c7
-rw-r--r--io/euidaccess.c6
-rw-r--r--io/faccessat.c8
-rw-r--r--io/fchdir.c2
-rw-r--r--io/fchmod.c6
-rw-r--r--io/fchmodat.c8
-rw-r--r--io/fchown.c7
-rw-r--r--io/fchownat.c9
-rw-r--r--io/fcntl.c6
-rw-r--r--io/fcntl.h2
-rw-r--r--io/flock.c6
-rw-r--r--io/fstat.c2
-rw-r--r--io/fstat64.c2
-rw-r--r--io/fstatat.c2
-rw-r--r--io/fstatat64.c2
-rw-r--r--io/fstatfs.c2
-rw-r--r--io/fstatfs64.c2
-rw-r--r--io/fstatvfs.c2
-rw-r--r--io/fstatvfs64.c2
-rw-r--r--io/fts.c182
-rw-r--r--io/fts.h96
-rw-r--r--io/fts64.c30
-rw-r--r--io/ftw.c25
-rw-r--r--io/ftw.h2
-rw-r--r--io/ftw64.c2
-rw-r--r--io/ftwtest-sh16
-rw-r--r--io/futimens.c2
-rw-r--r--io/fxstat.c2
-rw-r--r--io/fxstat64.c2
-rw-r--r--io/fxstatat.c2
-rw-r--r--io/fxstatat64.c2
-rw-r--r--io/getcwd.c2
-rw-r--r--io/getdirname.c2
-rw-r--r--io/getwd.c5
-rw-r--r--io/have_o_cloexec.c2
-rw-r--r--io/isatty.c5
-rw-r--r--io/lchmod.c2
-rw-r--r--io/lchown.c7
-rw-r--r--io/link.c6
-rw-r--r--io/linkat.c9
-rw-r--r--io/lockf.c2
-rw-r--r--io/lockf64.c2
-rw-r--r--io/lseek.c7
-rw-r--r--io/lseek64.c2
-rw-r--r--io/lstat.c2
-rw-r--r--io/lstat64.c2
-rw-r--r--io/lxstat.c2
-rw-r--r--io/lxstat64.c2
-rw-r--r--io/mkdir.c6
-rw-r--r--io/mkdirat.c7
-rw-r--r--io/mkfifo.c6
-rw-r--r--io/mkfifoat.c7
-rw-r--r--io/mknod.c2
-rw-r--r--io/mknodat.c2
-rw-r--r--io/open.c6
-rw-r--r--io/open64.c6
-rw-r--r--io/open64_2.c2
-rw-r--r--io/open_2.c2
-rw-r--r--io/openat.c2
-rw-r--r--io/openat64.c2
-rw-r--r--io/openat64_2.c2
-rw-r--r--io/openat_2.c2
-rw-r--r--io/pipe.c5
-rw-r--r--io/pipe2.c6
-rw-r--r--io/poll.c2
-rw-r--r--io/posix_fadvise.c2
-rw-r--r--io/posix_fadvise64.c2
-rw-r--r--io/posix_fallocate.c2
-rw-r--r--io/posix_fallocate64.c2
-rw-r--r--io/ppoll.c2
-rw-r--r--io/pwd.c2
-rw-r--r--io/read.c2
-rw-r--r--io/readlink.c7
-rw-r--r--io/readlinkat.c8
-rw-r--r--io/rmdir.c5
-rw-r--r--io/sendfile.c2
-rw-r--r--io/sendfile64.c2
-rw-r--r--io/stat.c2
-rw-r--r--io/stat64.c2
-rw-r--r--io/statfs.c2
-rw-r--r--io/statfs64.c2
-rw-r--r--io/statvfs.c2
-rw-r--r--io/statvfs64.c2
-rw-r--r--io/symlink.c6
-rw-r--r--io/symlinkat.c7
-rw-r--r--io/sys/poll.h2
-rw-r--r--io/sys/sendfile.h2
-rw-r--r--io/sys/stat.h2
-rw-r--r--io/sys/statfs.h2
-rw-r--r--io/sys/statvfs.h2
-rw-r--r--io/test-lfs.c25
-rw-r--r--io/test-stat.c2
-rw-r--r--io/test-stat2.c2
-rw-r--r--io/test-utime.c2
-rw-r--r--io/tst-fcntl.c20
-rw-r--r--io/tst-fts-lfs.c2
-rw-r--r--io/tst-fts.c231
-rw-r--r--io/tst-getcwd.c2
-rw-r--r--io/ttyname.c5
-rw-r--r--io/ttyname_r.c7
-rw-r--r--io/umask.c5
-rw-r--r--io/unlink.c5
-rw-r--r--io/unlinkat.c7
-rw-r--r--io/utime.c6
-rw-r--r--io/utime.h2
-rw-r--r--io/utimensat.c2
-rw-r--r--io/write.c2
-rw-r--r--io/xmknod.c2
-rw-r--r--io/xmknodat.c2
-rw-r--r--io/xstat.c2
-rw-r--r--io/xstat64.c2
127 files changed, 657 insertions, 397 deletions
diff --git a/io/Makefile b/io/Makefile
index 613dce0124..deb6100156 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2015 Free Software Foundation, Inc.
+# Copyright (C) 1992-2016 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -49,7 +49,7 @@ routines := \
ttyname ttyname_r isatty \
link linkat symlink symlinkat readlink readlinkat \
unlink unlinkat rmdir \
- ftw ftw64 fts poll ppoll \
+ ftw ftw64 fts fts64 poll ppoll \
posix_fadvise posix_fadvise64 \
posix_fallocate posix_fallocate64 \
sendfile sendfile64 \
@@ -71,7 +71,7 @@ tests := test-utime test-stat test-stat2 test-lfs tst-getcwd \
tst-renameat tst-fchownat tst-fchmodat tst-faccessat \
tst-symlinkat tst-linkat tst-readlinkat tst-mkdirat \
tst-mknodat tst-mkfifoat tst-ttyname_r bug-ftw5 \
- tst-posix_fallocate
+ tst-posix_fallocate tst-fts tst-fts-lfs
ifeq ($(run-built-tests),yes)
tests-special += $(objpfx)ftwtest.out
@@ -90,6 +90,7 @@ CFLAGS-fstatfs.c = -fexceptions
CFLAGS-statvfs.c = -fexceptions
CFLAGS-fstatvfs.c = -fexceptions
CFLAGS-fts.c = -Wno-uninitialized $(uses-callbacks) -fexceptions
+CFLAGS-fts64.c = -Wno-uninitialized $(uses-callbacks) -fexceptions
CFLAGS-ftw.c = $(uses-callbacks) -fexceptions
CFLAGS-ftw64.c = $(uses-callbacks) -fexceptions
CFLAGS-lockf.c = -fexceptions
diff --git a/io/Versions b/io/Versions
index 6c0a23b465..64316cd025 100644
--- a/io/Versions
+++ b/io/Versions
@@ -122,4 +122,7 @@ libc {
GLIBC_2.9 {
dup3; pipe2;
}
+ GLIBC_2.23 {
+ fts64_children; fts64_close; fts64_open; fts64_read; fts64_set;
+ }
}
diff --git a/io/access.c b/io/access.c
index 43445a1a55..45347048af 100644
--- a/io/access.c
+++ b/io/access.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,9 +21,7 @@
/* Test for access to FILE. */
int
-__access (file, type)
- const char *file;
- int type;
+__access (const char *file, int type)
{
if (file == NULL || (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0)
{
diff --git a/io/bits/fcntl2.h b/io/bits/fcntl2.h
index 2ac54b200a..c3f267e422 100644
--- a/io/bits/fcntl2.h
+++ b/io/bits/fcntl2.h
@@ -1,5 +1,5 @@
/* Checking macros for fcntl functions.
- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/bits/poll2.h b/io/bits/poll2.h
index a19bd19fd0..137bfaf65f 100644
--- a/io/bits/poll2.h
+++ b/io/bits/poll2.h
@@ -1,5 +1,5 @@
/* Checking macros for poll functions.
- Copyright (C) 2012-2015 Free Software Foundation, Inc.
+ Copyright (C) 2012-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/bug-ftw1.c b/io/bug-ftw1.c
index fe0557779a..6efc4e7123 100644
--- a/io/bug-ftw1.c
+++ b/io/bug-ftw1.c
@@ -1,5 +1,5 @@
/* Test for ftw function searching in root directory.
- Copyright (C) 2001-2015 Free Software Foundation, Inc.
+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
diff --git a/io/bug-ftw2.c b/io/bug-ftw2.c
index 4c1ea87d3c..139b8ff214 100644
--- a/io/bug-ftw2.c
+++ b/io/bug-ftw2.c
@@ -1,5 +1,5 @@
/* Test for ftw function searching in current directory.
- Copyright (C) 2001-2015 Free Software Foundation, Inc.
+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
diff --git a/io/bug-ftw4.c b/io/bug-ftw4.c
index 2d2b43e4f4..c4b72acdd3 100644
--- a/io/bug-ftw4.c
+++ b/io/bug-ftw4.c
@@ -1,5 +1,5 @@
/* Test if ftw function doesn't leak fds.
- Copyright (C) 2003-2015 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
diff --git a/io/chdir.c b/io/chdir.c
index 1003b9d200..16784cbabe 100644
--- a/io/chdir.c
+++ b/io/chdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,8 +21,7 @@
/* Change the current directory to PATH. */
int
-__chdir (path)
- const char *path;
+__chdir (const char *path)
{
if (path == NULL)
{
diff --git a/io/chmod.c b/io/chmod.c
index 3dcc8937b0..cbb3c674e9 100644
--- a/io/chmod.c
+++ b/io/chmod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,9 +22,7 @@
/* Change the protections of FILE to MODE. */
int
-__chmod (file, mode)
- const char *file;
- mode_t mode;
+__chmod (const char *file, mode_t mode)
{
if (file == NULL)
{
diff --git a/io/chown.c b/io/chown.c
index 280f2c1d59..06124c4fbd 100644
--- a/io/chown.c
+++ b/io/chown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,10 +22,7 @@
/* Change the owner and group of FILE. */
int
-__chown (file, owner, group)
- const char *file;
- uid_t owner;
- gid_t group;
+__chown (const char *file, uid_t owner, gid_t group)
{
if (file == NULL)
{
diff --git a/io/close.c b/io/close.c
index 267cfbc7e9..ccbe862e49 100644
--- a/io/close.c
+++ b/io/close.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,8 +20,7 @@
/* Close the file descriptor FD. */
int
-__close (fd)
- int fd;
+__close (int fd)
{
if (fd < 0)
{
diff --git a/io/creat.c b/io/creat.c
index c03810d962..caacb69a9b 100644
--- a/io/creat.c
+++ b/io/creat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,9 +23,7 @@
/* Create FILE with protections MODE. */
int
-creat (file, mode)
- const char *file;
- mode_t mode;
+creat (const char *file, mode_t mode)
{
return __open (file, O_WRONLY|O_CREAT|O_TRUNC, mode);
}
diff --git a/io/creat64.c b/io/creat64.c
index 6be8a77374..7be7903b95 100644
--- a/io/creat64.c
+++ b/io/creat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,9 +22,7 @@
/* Create FILE with protections MODE. */
int
-creat64 (file, mode)
- const char *file;
- mode_t mode;
+creat64 (const char *file, mode_t mode)
{
return __open64 (file, O_WRONLY|O_CREAT|O_TRUNC, mode);
}
diff --git a/io/dup.c b/io/dup.c
index a461a42f68..02969c0568 100644
--- a/io/dup.c
+++ b/io/dup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,8 +21,7 @@
/* Duplicate FD, returning a new file descriptor open on the same file. */
int
-__dup (fd)
- int fd;
+__dup (int fd)
{
__set_errno (ENOSYS);
return -1;
diff --git a/io/dup2.c b/io/dup2.c
index fa3c5d59a5..d16ba54ce5 100644
--- a/io/dup2.c
+++ b/io/dup2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,9 +23,7 @@
/* Duplicate FD to FD2, closing the old FD2 and making FD2 be
open the same file as FD is. Return FD2 or -1. */
int
-__dup2 (fd, fd2)
- int fd;
- int fd2;
+__dup2 (int fd, int fd2)
{
if (fd < 0 || fd2 < 0)
{
diff --git a/io/dup3.c b/io/dup3.c
index 1f7f093204..6b733a8bed 100644
--- a/io/dup3.c
+++ b/io/dup3.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,10 +24,7 @@
open the same file as FD is which setting flags according to
FLAGS. Return FD2 or -1. */
int
-__dup3 (fd, fd2, flags)
- int fd;
- int fd2;
- int flags;
+__dup3 (int fd, int fd2, int flags)
{
if (fd < 0 || fd2 < 0)
{
diff --git a/io/euidaccess.c b/io/euidaccess.c
index 0adead8d7d..c8d25e78be 100644
--- a/io/euidaccess.c
+++ b/io/euidaccess.c
@@ -1,5 +1,5 @@
/* Test for access to FILE using effective UID and GID. Stub version.
- Copyright (C) 1991-2015 Free Software Foundation, Inc.
+ Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,9 +21,7 @@
#include <unistd.h>
int
-__euidaccess (file, type)
- const char *file;
- int type;
+__euidaccess (const char *file, int type)
{
if (file == NULL || (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0)
{
diff --git a/io/faccessat.c b/io/faccessat.c
index 3bf8b79035..e4c2e84eb7 100644
--- a/io/faccessat.c
+++ b/io/faccessat.c
@@ -1,5 +1,5 @@
/* Test for access to file, relative to open directory. Stub version.
- Copyright (C) 2006-2015 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,11 +23,7 @@
#include <sys/types.h>
int
-faccessat (fd, file, type, flag)
- int fd;
- const char *file;
- int type;
- int flag;
+faccessat (int fd, const char *file, int type, int flag)
{
if (file == NULL || (flag & ~(AT_SYMLINK_NOFOLLOW | AT_EACCESS)) != 0
|| (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0)
diff --git a/io/fchdir.c b/io/fchdir.c
index d4ae2bb7d0..31d9ae72ab 100644
--- a/io/fchdir.c
+++ b/io/fchdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/fchmod.c b/io/fchmod.c
index f0aac92225..c00d83fbc4 100644
--- a/io/fchmod.c
+++ b/io/fchmod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,9 +22,7 @@
/* Change the permissions of the file referenced by FD to MODE. */
int
-__fchmod (fd, mode)
- int fd;
- mode_t mode;
+__fchmod (int fd, mode_t mode)
{
if (fd < 0)
{
diff --git a/io/fchmodat.c b/io/fchmodat.c
index 1cd794bf73..1b90899403 100644
--- a/io/fchmodat.c
+++ b/io/fchmodat.c
@@ -1,5 +1,5 @@
/* Change the protections of file relative to open directory. Stub version.
- Copyright (C) 2006-2015 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,11 +24,7 @@
#include <sys/stat.h>
int
-fchmodat (fd, file, mode, flag)
- int fd;
- const char *file;
- mode_t mode;
- int flag;
+fchmodat (int fd, const char *file, mode_t mode, int flag)
{
if (file == NULL || (flag & ~AT_SYMLINK_NOFOLLOW) != 0)
{
diff --git a/io/fchown.c b/io/fchown.c
index 441e55953c..6d326ad246 100644
--- a/io/fchown.c
+++ b/io/fchown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,10 +22,7 @@
/* Change the owner and group of the file referred to by FD. */
int
-__fchown (fd, owner, group)
- int fd;
- uid_t owner;
- gid_t group;
+__fchown (int fd, uid_t owner, gid_t group)
{
if (fd < 0)
{
diff --git a/io/fchownat.c b/io/fchownat.c
index e9e3bd6ffe..1d49dcaf55 100644
--- a/io/fchownat.c
+++ b/io/fchownat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,12 +23,7 @@
/* Change the owner and group of FILE. */
int
-fchownat (fd, file, owner, group, flag)
- int fd;
- const char *file;
- uid_t owner;
- gid_t group;
- int flag;
+fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag)
{
if (file == NULL || (flag & ~AT_SYMLINK_NOFOLLOW) != 0)
{
diff --git a/io/fcntl.c b/io/fcntl.c
index 5b1156d301..e540942c69 100644
--- a/io/fcntl.c
+++ b/io/fcntl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,9 +20,7 @@
/* Perform file control operations on FD. */
int
-__fcntl (fd, cmd)
- int fd;
- int cmd;
+__fcntl (int fd, int cmd, ...)
{
if (fd < 0)
{
diff --git a/io/fcntl.h b/io/fcntl.h
index c6812c467b..1a92a8d738 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/flock.c b/io/flock.c
index fc999ade77..0f6d8e04be 100644
--- a/io/flock.c
+++ b/io/flock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,9 +21,7 @@
/* Apply or remove an advisory lock, according to OPERATION,
on the file FD refers to. */
int
-__flock (fd, operation)
- int fd;
- int operation;
+__flock (int fd, int operation)
{
__set_errno (ENOSYS);
return -1;
diff --git a/io/fstat.c b/io/fstat.c
index 78606c88c9..50f2a4fbfc 100644
--- a/io/fstat.c
+++ b/io/fstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/fstat64.c b/io/fstat64.c
index 57cb60f314..4ede2540ec 100644
--- a/io/fstat64.c
+++ b/io/fstat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/fstatat.c b/io/fstatat.c
index b9c225e410..9d8b370169 100644
--- a/io/fstatat.c
+++ b/io/fstatat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/fstatat64.c b/io/fstatat64.c
index a71ea4deb9..dcdccf87af 100644
--- a/io/fstatat64.c
+++ b/io/fstatat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/fstatfs.c b/io/fstatfs.c
index 535023ee00..efd1fb2321 100644
--- a/io/fstatfs.c
+++ b/io/fstatfs.c
@@ -1,5 +1,5 @@
/* Return information about the filesystem on which FD resides.
- Copyright (C) 1996-2015 Free Software Foundation, Inc.
+ Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/fstatfs64.c b/io/fstatfs64.c
index 378a3c3be8..e00b992da2 100644
--- a/io/fstatfs64.c
+++ b/io/fstatfs64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/fstatvfs.c b/io/fstatvfs.c
index d7124b9130..4e7333d96c 100644
--- a/io/fstatvfs.c
+++ b/io/fstatvfs.c
@@ -1,5 +1,5 @@
/* Return information about the filesystem on which FD resides.
- Copyright (C) 1996-2015 Free Software Foundation, Inc.
+ Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/fstatvfs64.c b/io/fstatvfs64.c
index 9834f0db00..db947292cb 100644
--- a/io/fstatvfs64.c
+++ b/io/fstatvfs64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/fts.c b/io/fts.c
index 46cbb72571..0c5abfcdd6 100644
--- a/io/fts.c
+++ b/io/fts.c
@@ -1,3 +1,21 @@
+/* File tree traversal functions.
+ Copyright (C) 1994-2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
/*-
* Copyright (c) 1990, 1993, 1994
* The Regents of the University of California. All rights reserved.
@@ -53,16 +71,30 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#endif
-static FTSENT *fts_alloc (FTS *, const char *, size_t) internal_function;
-static FTSENT *fts_build (FTS *, int) internal_function;
-static void fts_lfree (FTSENT *) internal_function;
-static void fts_load (FTS *, FTSENT *) internal_function;
+/* Support for the LFS API version. */
+#ifndef FTS_OPEN
+#define FTS_OPEN fts_open
+#define FTS_CLOSE fts_close
+#define FTS_READ fts_read
+#define FTS_SET fts_set
+#define FTS_CHILDREN fts_children
+# define FTSOBJ FTS
+# define FTSENTRY FTSENT
+# define INO_T ino_t
+# define STAT stat
+# define LSTAT lstat
+#endif
+
+static FTSENTRY *fts_alloc (FTSOBJ *, const char *, size_t) internal_function;
+static FTSENTRY *fts_build (FTSOBJ *, int) internal_function;
+static void fts_lfree (FTSENTRY *) internal_function;
+static void fts_load (FTSOBJ *, FTSENTRY *) internal_function;
static size_t fts_maxarglen (char * const *) internal_function;
-static void fts_padjust (FTS *, FTSENT *) internal_function;
-static int fts_palloc (FTS *, size_t) internal_function;
-static FTSENT *fts_sort (FTS *, FTSENT *, int) internal_function;
-static u_short fts_stat (FTS *, FTSENT *, int) internal_function;
-static int fts_safe_changedir (FTS *, FTSENT *, int, const char *)
+static void fts_padjust (FTSOBJ *, FTSENTRY *) internal_function;
+static int fts_palloc (FTSOBJ *, size_t) internal_function;
+static FTSENTRY *fts_sort (FTSOBJ *, FTSENTRY *, int) internal_function;
+static u_short fts_stat (FTSOBJ *, FTSENTRY *, int) internal_function;
+static int fts_safe_changedir (FTSOBJ *, FTSENTRY *, int, const char *)
internal_function;
#ifndef MAX
@@ -84,17 +116,15 @@ static int fts_safe_changedir (FTS *, FTSENT *, int, const char *)
#define BNAMES 2 /* fts_children, names only */
#define BREAD 3 /* fts_read */
-FTS *
-fts_open(argv, options, compar)
- char * const *argv;
- int options;
- int (*compar) (const FTSENT **, const FTSENT **);
+FTSOBJ *
+FTS_OPEN (char * const *argv, int options,
+ int (*compar) (const FTSENTRY **, const FTSENTRY **))
{
- FTS *sp;
- FTSENT *p, *root;
+ FTSOBJ *sp;
+ FTSENTRY *p, *root;
int nitems;
- FTSENT *parent = NULL;
- FTSENT *tmp;
+ FTSENTRY *parent = NULL;
+ FTSENTRY *tmp;
/* Options check. */
if (options & ~FTS_OPTIONMASK) {
@@ -103,9 +133,9 @@ fts_open(argv, options, compar)
}
/* Allocate/initialize the stream */
- if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
+ if ((sp = malloc((u_int)sizeof(FTSOBJ))) == NULL)
return (NULL);
- memset(sp, 0, sizeof(FTS));
+ memset(sp, 0, sizeof(FTSOBJ));
sp->fts_compar = (int (*) (const void *, const void *)) compar;
sp->fts_options = options;
@@ -202,9 +232,7 @@ mem1: free(sp);
static void
internal_function
-fts_load(sp, p)
- FTS *sp;
- FTSENT *p;
+fts_load (FTSOBJ *sp, FTSENTRY *p)
{
int len;
char *cp;
@@ -228,10 +256,9 @@ fts_load(sp, p)
}
int
-fts_close(sp)
- FTS *sp;
+FTS_CLOSE (FTSOBJ *sp)
{
- FTSENT *freep, *p;
+ FTSENTRY *freep, *p;
int saved_errno;
/*
@@ -281,11 +308,10 @@ fts_close(sp)
(p->fts_path[p->fts_pathlen - 1] == '/' \
? p->fts_pathlen - 1 : p->fts_pathlen)
-FTSENT *
-fts_read(sp)
- FTS *sp;
+FTSENTRY *
+FTS_READ (FTSOBJ *sp)
{
- FTSENT *p, *tmp;
+ FTSENTRY *p, *tmp;
int instr;
char *t;
int saved_errno;
@@ -479,10 +505,7 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent);
*/
/* ARGSUSED */
int
-fts_set(sp, p, instr)
- FTS *sp;
- FTSENT *p;
- int instr;
+FTS_SET (FTSOBJ *sp, FTSENTRY *p, int instr)
{
if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
instr != FTS_NOINSTR && instr != FTS_SKIP) {
@@ -493,12 +516,10 @@ fts_set(sp, p, instr)
return (0);
}
-FTSENT *
-fts_children(sp, instr)
- FTS *sp;
- int instr;
+FTSENTRY *
+FTS_CHILDREN(FTSOBJ *sp, int instr)
{
- FTSENT *p;
+ FTSENTRY *p;
int fd;
if (instr != 0 && instr != FTS_NAMEONLY) {
@@ -585,16 +606,14 @@ dirent_not_directory(const struct dirent *dp)
* directories and for any files after the subdirectories in the directory have
* been found, cutting the stat calls by about 2/3.
*/
-static FTSENT *
+static FTSENTRY *
internal_function
-fts_build(sp, type)
- FTS *sp;
- int type;
+fts_build (FTSOBJ *sp, int type)
{
struct dirent *dp;
- FTSENT *p, *head;
+ FTSENTRY *p, *head;
int nitems;
- FTSENT *cur, *tail;
+ FTSENTRY *cur, *tail;
DIR *dirp;
void *oldaddr;
int cderrno, descend, len, level, nlinks, saved_errno,
@@ -852,15 +871,12 @@ mem1: saved_errno = errno;
static u_short
internal_function
-fts_stat(sp, p, follow)
- FTS *sp;
- FTSENT *p;
- int follow;
+fts_stat (FTSOBJ *sp, FTSENTRY *p, int follow)
{
- FTSENT *t;
+ FTSENTRY *t;
dev_t dev;
- ino_t ino;
- struct stat *sbp, sb;
+ INO_T ino;
+ struct STAT *sbp, sb;
int saved_errno;
/* If user needs stat info, stat buffer already allocated. */
@@ -883,18 +899,18 @@ fts_stat(sp, p, follow)
* fail, set the errno from the stat call.
*/
if (ISSET(FTS_LOGICAL) || follow) {
- if (stat(p->fts_accpath, sbp)) {
+ if (STAT(p->fts_accpath, sbp)) {
saved_errno = errno;
- if (!lstat(p->fts_accpath, sbp)) {
+ if (!LSTAT(p->fts_accpath, sbp)) {
__set_errno (0);
return (FTS_SLNONE);
}
p->fts_errno = saved_errno;
goto err;
}
- } else if (lstat(p->fts_accpath, sbp)) {
+ } else if (LSTAT(p->fts_accpath, sbp)) {
p->fts_errno = errno;
-err: memset(sbp, 0, sizeof(struct stat));
+err: memset(sbp, 0, sizeof(struct STAT));
return (FTS_NS);
}
@@ -934,14 +950,11 @@ err: memset(sbp, 0, sizeof(struct stat));
return (FTS_DEFAULT);
}
-static FTSENT *
+static FTSENTRY *
internal_function
-fts_sort(sp, head, nitems)
- FTS *sp;
- FTSENT *head;
- int nitems;
+fts_sort (FTSOBJ *sp, FTSENTRY *head, int nitems)
{
- FTSENT **ap, *p;
+ FTSENTRY **ap, *p;
/*
* Construct an array of pointers to the structures and call qsort(3).
@@ -951,11 +964,11 @@ fts_sort(sp, head, nitems)
* 40 so don't realloc one entry at a time.
*/
if (nitems > sp->fts_nitems) {
- struct _ftsent **a;
+ FTSENTRY **a;
sp->fts_nitems = nitems + 40;
if ((a = realloc(sp->fts_array,
- (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
+ (size_t)(sp->fts_nitems * sizeof(FTSENTRY *)))) == NULL) {
free(sp->fts_array);
sp->fts_array = NULL;
sp->fts_nitems = 0;
@@ -965,21 +978,18 @@ fts_sort(sp, head, nitems)
}
for (ap = sp->fts_array, p = head; p; p = p->fts_link)
*ap++ = p;
- qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
+ qsort((void *)sp->fts_array, nitems, sizeof(FTSENTRY *), sp->fts_compar);
for (head = *(ap = sp->fts_array); --nitems; ++ap)
ap[0]->fts_link = ap[1];
ap[0]->fts_link = NULL;
return (head);
}
-static FTSENT *
+static FTSENTRY *
internal_function
-fts_alloc(sp, name, namelen)
- FTS *sp;
- const char *name;
- size_t namelen;
+fts_alloc (FTSOBJ *sp, const char *name, size_t namelen)
{
- FTSENT *p;
+ FTSENTRY *p;
size_t len;
/*
@@ -990,9 +1000,9 @@ fts_alloc(sp, name, namelen)
* fts_name field is declared to be of size 1, the fts_name pointer is
* namelen + 2 before the first possible address of the stat structure.
*/
- len = sizeof(FTSENT) + namelen;
+ len = sizeof(FTSENTRY) + namelen;
if (!ISSET(FTS_NOSTAT))
- len += sizeof(struct stat) + ALIGNBYTES;
+ len += sizeof(struct STAT) + ALIGNBYTES;
if ((p = malloc(len)) == NULL)
return (NULL);
@@ -1001,7 +1011,7 @@ fts_alloc(sp, name, namelen)
p->fts_name[namelen] = '\0';
if (!ISSET(FTS_NOSTAT))
- p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
+ p->fts_statp = (struct STAT *)ALIGN(p->fts_name + namelen + 2);
p->fts_namelen = namelen;
p->fts_path = sp->fts_path;
p->fts_errno = 0;
@@ -1014,10 +1024,9 @@ fts_alloc(sp, name, namelen)
static void
internal_function
-fts_lfree(head)
- FTSENT *head;
+fts_lfree (FTSENTRY *head)
{
- FTSENT *p;
+ FTSENTRY *p;
/* Free a linked list of structures. */
while ((p = head)) {
@@ -1034,9 +1043,7 @@ fts_lfree(head)
*/
static int
internal_function
-fts_palloc(sp, more)
- FTS *sp;
- size_t more;
+fts_palloc (FTSOBJ *sp, size_t more)
{
char *p;
@@ -1068,11 +1075,9 @@ fts_palloc(sp, more)
*/
static void
internal_function
-fts_padjust(sp, head)
- FTS *sp;
- FTSENT *head;
+fts_padjust (FTSOBJ *sp, FTSENTRY *head)
{
- FTSENT *p;
+ FTSENTRY *p;
char *addr = sp->fts_path;
#define ADJUST(p) do { \
@@ -1095,8 +1100,7 @@ fts_padjust(sp, head)
static size_t
internal_function
-fts_maxarglen(argv)
- char * const *argv;
+fts_maxarglen (char * const *argv)
{
size_t len, max;
@@ -1113,11 +1117,7 @@ fts_maxarglen(argv)
*/
static int
internal_function
-fts_safe_changedir(sp, p, fd, path)
- FTS *sp;
- FTSENT *p;
- int fd;
- const char *path;
+fts_safe_changedir (FTSOBJ *sp, FTSENTRY *p, int fd, const char *path)
{
int ret, oerrno, newfd;
struct stat64 sb;
diff --git a/io/fts.h b/io/fts.h
index 0a070ba8dc..127a0d2721 100644
--- a/io/fts.h
+++ b/io/fts.h
@@ -1,3 +1,21 @@
+/* File tree traversal functions declarations.
+ Copyright (C) 1994-2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -35,12 +53,6 @@
#include <features.h>
#include <sys/types.h>
-/* The fts interface is incompatible with the LFS interface which
- transparently uses the 64-bit file access functions. */
-#ifdef __USE_FILE_OFFSET64
-# error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
-#endif
-
typedef struct {
struct _ftsent *fts_cur; /* current node */
@@ -68,6 +80,21 @@ typedef struct {
int fts_options; /* fts_open options, global flags */
} FTS;
+#ifdef __USE_LARGEFILE64
+typedef struct {
+ struct _ftsent64 *fts_cur; /* current node */
+ struct _ftsent64 *fts_child; /* linked list of children */
+ struct _ftsent64 **fts_array; /* sort array */
+ dev_t fts_dev; /* starting device # */
+ char *fts_path; /* path for this descent */
+ int fts_rfd; /* fd for root */
+ int fts_pathlen; /* sizeof(path) */
+ int fts_nitems; /* elements in the sort array */
+ int (*fts_compar) (const void *, const void *); /* compare fn */
+ int fts_options; /* fts_open options, global flags */
+} FTS64;
+#endif
+
typedef struct _ftsent {
struct _ftsent *fts_cycle; /* cycle node */
struct _ftsent *fts_parent; /* parent directory */
@@ -119,13 +146,70 @@ typedef struct _ftsent {
char fts_name[1]; /* file name */
} FTSENT;
+#ifdef __USE_LARGEFILE64
+typedef struct _ftsent64 {
+ struct _ftsent64 *fts_cycle; /* cycle node */
+ struct _ftsent64 *fts_parent; /* parent directory */
+ struct _ftsent64 *fts_link; /* next file in directory */
+ long fts_number; /* local numeric value */
+ void *fts_pointer; /* local address value */
+ char *fts_accpath; /* access path */
+ char *fts_path; /* root path */
+ int fts_errno; /* errno for this node */
+ int fts_symfd; /* fd for symlink */
+ u_short fts_pathlen; /* strlen(fts_path) */
+ u_short fts_namelen; /* strlen(fts_name) */
+
+ ino64_t fts_ino; /* inode */
+ dev_t fts_dev; /* device */
+ nlink_t fts_nlink; /* link count */
+
+ short fts_level; /* depth (-1 to N) */
+
+ u_short fts_info; /* user flags for FTSENT structure */
+
+ u_short fts_flags; /* private flags for FTSENT structure */
+
+ u_short fts_instr; /* fts_set() instructions */
+
+ struct stat64 *fts_statp; /* stat(2) information */
+ char fts_name[1]; /* file name */
+} FTSENT64;
+#endif
+
__BEGIN_DECLS
+#ifndef __USE_FILE_OFFSET64
FTSENT *fts_children (FTS *, int);
int fts_close (FTS *);
FTS *fts_open (char * const *, int,
int (*)(const FTSENT **, const FTSENT **));
FTSENT *fts_read (FTS *);
int fts_set (FTS *, FTSENT *, int) __THROW;
+#else
+# ifdef __REDIRECT
+FTSENT *__REDIRECT (fts_children, (FTS *, int), fts64_children);
+int __REDIRECT (fts_close, (FTS *), fts64_close);
+FTS *__REDIRECT (fts_open, (char * const *, int,
+ int (*)(const FTSENT **, const FTSENT **)),
+ fts64_open);
+FTSENT *__REDIRECT (fts_read, (FTS *), fts64_read);
+int __REDIRECT (fts_set, (FTS *, FTSENT *, int), fts64_set) __THROW;
+# else
+# define fts_children fts64_children
+# define fts_close fts64_close
+# define fts_open fts64_open
+# define fts_read fts64_read
+# define fts_set fts64_set
+# endif
+#endif
+#ifdef __USE_LARGEFILE64
+FTSENT64 *fts64_children (FTS64 *, int);
+int fts64_close (FTS64 *);
+FTS64 *fts64_open (char * const *, int,
+ int (*)(const FTSENT64 **, const FTSENT64 **));
+FTSENT64 *fts64_read (FTS64 *);
+int fts64_set (FTS64 *, FTSENT64 *, int) __THROW;
+#endif
__END_DECLS
#endif /* fts.h */
diff --git a/io/fts64.c b/io/fts64.c
new file mode 100644
index 0000000000..2ff19778aa
--- /dev/null
+++ b/io/fts64.c
@@ -0,0 +1,30 @@
+/* File tree traversal functions LFS version.
+ Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define FTS_OPEN fts64_open
+#define FTS_CLOSE fts64_close
+#define FTS_READ fts64_read
+#define FTS_SET fts64_set
+#define FTS_CHILDREN fts64_children
+#define FTSOBJ FTS64
+#define FTSENTRY FTSENT64
+#define INO_T ino64_t
+#define STAT stat64
+#define LSTAT lstat64
+
+#include "fts.c"
diff --git a/io/ftw.c b/io/ftw.c
index b95da60bb0..f2bd0a955e 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -1,5 +1,5 @@
/* File tree walker functions.
- Copyright (C) 1996-2015 Free Software Foundation, Inc.
+ Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -817,21 +817,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);
}
@@ -842,11 +835,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))
@@ -867,11 +856,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/io/ftw.h b/io/ftw.h
index 942add1ea0..fd4bc3664a 100644
--- a/io/ftw.h
+++ b/io/ftw.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/ftw64.c b/io/ftw64.c
index 642a346163..016c25862b 100644
--- a/io/ftw64.c
+++ b/io/ftw64.c
@@ -1,5 +1,5 @@
/* File tree walker functions. LFS version.
- Copyright (C) 1996-2015 Free Software Foundation, Inc.
+ Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/io/ftwtest-sh b/io/ftwtest-sh
index 478171db78..db8435ab5a 100644
--- a/io/ftwtest-sh
+++ b/io/ftwtest-sh
@@ -1,6 +1,6 @@
-#! /bin/sh
+#!/bin/sh
# Test for nftw(3).
-# Copyright (C) 1997-2015 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -45,7 +45,7 @@ export LC_ALL
tmp=${objpfx}io
tmpdir=$tmp/ftwtest.d
-trap 'chmod -fR a+x $tmpdir; rm -fr $tmpdir $testout' 1 2 3 15
+trap 'chmod -fR a+x $tmpdir; rm -fr $tmpdir $testout' 0 1 2 3 15
if test -d $tmpdir; then
chmod -fR a+x $tmpdir
@@ -135,7 +135,7 @@ $testprogram --chdir $tmpdir |
sort > $testout
# perhaps $tmp involves some symlinks...
-tmpreal=`cd $tmp; /bin/pwd 2>/dev/null || /usr/bin/pwd`
+tmpreal=`cd $tmp; pwd -P 2>/dev/null`
cat <<EOF | cmp $testout - || exit 1
base = "$tmp/", file = "ftwtest.d", flag = FTW_D, cwd = $tmpreal, level = 0
@@ -153,7 +153,7 @@ base = "$tmp/ftwtest.d/foo/lvl1/lvl2/lvl3/", file = "file@3", flag = FTW_F, cwd
EOF
rm $testout
-curwd=`/bin/pwd 2>/dev/null || /usr/bin/pwd`
+curwd=`pwd -P 2>/dev/null`
cd "$tmp"
$testprogram --chdir ftwtest.d |
sort > $testout
@@ -175,7 +175,7 @@ base = "ftwtest.d/foo/lvl1/lvl2/lvl3/", file = "file@3", flag = FTW_F, cwd = $tm
EOF
rm $testout
-curwd=`/bin/pwd 2>/dev/null || /usr/bin/pwd`
+curwd=`pwd -P`
cd "$tmp"
$testprogram --chdir ftwtest.d/. |
sort > $testout
@@ -197,7 +197,7 @@ base = "ftwtest.d/./foo/lvl1/lvl2/lvl3/", file = "file@3", flag = FTW_F, cwd = $
EOF
rm $testout
-curwd=`/bin/pwd 2>/dev/null || /usr/bin/pwd`
+curwd=`pwd -P 2>/dev/null`
cd "$tmp"
$testprogram --chdir ftwtest.d/foo/lvl1/link@1 |
sort > $testout
@@ -296,4 +296,6 @@ rm $testout
rm -fr $tmpdir
+trap '' 0
+
exit 0
diff --git a/io/futimens.c b/io/futimens.c
index cda95a8cfe..80465ac2df 100644
--- a/io/futimens.c
+++ b/io/futimens.c
@@ -1,5 +1,5 @@
/* Change access and modification times of open file. Linux version.
- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/fxstat.c b/io/fxstat.c
index c91eac5a2d..0e07d48a12 100644
--- a/io/fxstat.c
+++ b/io/fxstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/fxstat64.c b/io/fxstat64.c
index 31ace24c0b..5e1632ced2 100644
--- a/io/fxstat64.c
+++ b/io/fxstat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/fxstatat.c b/io/fxstatat.c
index fbf74d3c7e..3d71896d81 100644
--- a/io/fxstatat.c
+++ b/io/fxstatat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/fxstatat64.c b/io/fxstatat64.c
index 3faf88b50f..ce36159195 100644
--- a/io/fxstatat64.c
+++ b/io/fxstatat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/getcwd.c b/io/getcwd.c
index c6d0443f17..c402ca7484 100644
--- a/io/getcwd.c
+++ b/io/getcwd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/getdirname.c b/io/getdirname.c
index 9e334de98c..2152623c1e 100644
--- a/io/getdirname.c
+++ b/io/getdirname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/getwd.c b/io/getwd.c
index bbda67c6e2..090bda4362 100644
--- a/io/getwd.c
+++ b/io/getwd.c
@@ -1,5 +1,5 @@
/* Obsolete function to get current working directory.
- Copyright (C) 1991-2015 Free Software Foundation, Inc.
+ Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,8 +23,7 @@
char *
-getwd (buf)
- char *buf;
+getwd (char *buf)
{
#ifndef PATH_MAX
#define PATH_MAX 1024
diff --git a/io/have_o_cloexec.c b/io/have_o_cloexec.c
index 0b61a44859..30f79ac40c 100644
--- a/io/have_o_cloexec.c
+++ b/io/have_o_cloexec.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/isatty.c b/io/isatty.c
index ea68464d2b..3f8e3fd5cc 100644
--- a/io/isatty.c
+++ b/io/isatty.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,8 +20,7 @@
/* Return 1 if FD is a terminal, 0 if not. */
int
-__isatty (fd)
- int fd;
+__isatty (int fd)
{
__set_errno (ENOSYS);
return -1;
diff --git a/io/lchmod.c b/io/lchmod.c
index a4a9ca8555..ea34e8a3c9 100644
--- a/io/lchmod.c
+++ b/io/lchmod.c
@@ -1,5 +1,5 @@
/* lchmod -- Change the protections of a file or symbolic link. Stub version.
- Copyright (C) 2002-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/lchown.c b/io/lchown.c
index eceaf62ad2..3594900c3f 100644
--- a/io/lchown.c
+++ b/io/lchown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,10 +22,7 @@
/* Change the owner and group of FILE. */
int
-__lchown (file, owner, group)
- const char *file;
- uid_t owner;
- gid_t group;
+__lchown (const char *file, uid_t owner, gid_t group)
{
if (file == NULL)
{
diff --git a/io/link.c b/io/link.c
index 1a42557dbc..b902d5cb72 100644
--- a/io/link.c
+++ b/io/link.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,9 +22,7 @@
/* Make a link to FROM called TO. */
int
-__link (from, to)
- const char *from;
- const char *to;
+__link (const char *from, const char *to)
{
if (from == NULL || to == NULL)
{
diff --git a/io/linkat.c b/io/linkat.c
index b999f24d73..8db993d431 100644
--- a/io/linkat.c
+++ b/io/linkat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,12 +23,7 @@
/* Make a link to FROM relative to FROMFD called TO relative to TOFD. */
int
-linkat (fromfd, from, tofd, to, flags)
- int fromfd;
- const char *from;
- int tofd;
- const char *to;
- int flags;
+linkat (int fromfd, const char *from, int tofd, const char *to, int flags)
{
if (from == NULL || to == NULL)
{
diff --git a/io/lockf.c b/io/lockf.c
index 6a10bf2830..0d3d19d020 100644
--- a/io/lockf.c
+++ b/io/lockf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/lockf64.c b/io/lockf64.c
index 131b0703d5..229e2619c0 100644
--- a/io/lockf64.c
+++ b/io/lockf64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/lseek.c b/io/lseek.c
index ac90483862..21948ecfbe 100644
--- a/io/lseek.c
+++ b/io/lseek.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,10 +21,7 @@
/* Seek to OFFSET on FD, starting from WHENCE. */
off_t
-__libc_lseek (fd, offset, whence)
- int fd;
- off_t offset;
- int whence;
+__libc_lseek (int fd, off_t offset, int whence)
{
if (fd < 0)
{
diff --git a/io/lseek64.c b/io/lseek64.c
index dab4d5daea..1152bd0302 100644
--- a/io/lseek64.c
+++ b/io/lseek64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/lstat.c b/io/lstat.c
index 17557086bc..cfd94db512 100644
--- a/io/lstat.c
+++ b/io/lstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/lstat64.c b/io/lstat64.c
index e159600eb6..64df63b86e 100644
--- a/io/lstat64.c
+++ b/io/lstat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/lxstat.c b/io/lxstat.c
index e83672f9ab..e08ba3cf6f 100644
--- a/io/lxstat.c
+++ b/io/lxstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/lxstat64.c b/io/lxstat64.c
index 4083c2519d..cecf658c34 100644
--- a/io/lxstat64.c
+++ b/io/lxstat64.c
@@ -1,5 +1,5 @@
/* lxstat64 -- get file metadata, not following symlinks. Stub version.
- Copyright (C) 1991-2015 Free Software Foundation, Inc.
+ Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/mkdir.c b/io/mkdir.c
index e1dfe8400e..b6f84f1ac2 100644
--- a/io/mkdir.c
+++ b/io/mkdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,9 +23,7 @@
/* Create a directory named PATH with protections MODE. */
int
-__mkdir (path, mode)
- const char *path;
- mode_t mode;
+__mkdir (const char *path, mode_t mode)
{
if (path == NULL)
{
diff --git a/io/mkdirat.c b/io/mkdirat.c
index 7ba3145d1b..3d74b7e2c7 100644
--- a/io/mkdirat.c
+++ b/io/mkdirat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,10 +24,7 @@
/* Create a directory named PATH relative to FD with protections MODE. */
int
-mkdirat (fd, path, mode)
- int fd;
- const char *path;
- mode_t mode;
+mkdirat (int fd, const char *path, mode_t mode)
{
if (path == NULL)
{
diff --git a/io/mkfifo.c b/io/mkfifo.c
index fddd6c97b8..1d439e7529 100644
--- a/io/mkfifo.c
+++ b/io/mkfifo.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,9 +23,7 @@
/* Create a named pipe (FIFO) named PATH with protections MODE. */
int
-mkfifo (path, mode)
- const char *path;
- mode_t mode;
+mkfifo (const char *path, mode_t mode)
{
if (path == NULL)
{
diff --git a/io/mkfifoat.c b/io/mkfifoat.c
index 311e0097b0..5ef500ee4f 100644
--- a/io/mkfifoat.c
+++ b/io/mkfifoat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,10 +25,7 @@
/* Create a named pipe (FIFO) named PATH relative to FD with
protections MODE. */
int
-mkfifoat (fd, path, mode)
- int fd;
- const char *path;
- mode_t mode;
+mkfifoat (int fd, const char *path, mode_t mode)
{
if (path == NULL)
{
diff --git a/io/mknod.c b/io/mknod.c
index 1f185cd410..574366d242 100644
--- a/io/mknod.c
+++ b/io/mknod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/mknodat.c b/io/mknodat.c
index 80285e7732..9839d70a6b 100644
--- a/io/mknodat.c
+++ b/io/mknodat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/open.c b/io/open.c
index c0000bacd6..f82ca497a3 100644
--- a/io/open.c
+++ b/io/open.c
@@ -1,5 +1,5 @@
/* Open a file by name. Stub version.
- Copyright (C) 1991-2015 Free Software Foundation, Inc.
+ Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,9 +26,7 @@
/* Open FILE with access OFLAG. If O_CREAT or O_TMPFILE is in OFLAG,
a third argument is the file protection. */
int
-__libc_open (file, oflag)
- const char *file;
- int oflag;
+__libc_open (const char *file, int oflag)
{
int mode;
diff --git a/io/open64.c b/io/open64.c
index f87ee57099..438ba47c1c 100644
--- a/io/open64.c
+++ b/io/open64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,9 +24,7 @@
/* Open FILE with access OFLAG. If O_CREAT or O_TMPFILE is in OFLAG,
a third argument is the file protection. */
int
-__libc_open64 (file, oflag)
- const char *file;
- int oflag;
+__libc_open64 (const char *file, int oflag)
{
int mode;
diff --git a/io/open64_2.c b/io/open64_2.c
index 0fd562dc0f..957fd8c6d9 100644
--- a/io/open64_2.c
+++ b/io/open64_2.c
@@ -1,5 +1,5 @@
/* _FORTIFY_SOURCE wrapper for open64.
- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+ Copyright (C) 2013-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/open_2.c b/io/open_2.c
index f11ebe00bb..4168c117f4 100644
--- a/io/open_2.c
+++ b/io/open_2.c
@@ -1,5 +1,5 @@
/* _FORTIFY_SOURCE wrapper for open.
- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+ Copyright (C) 2013-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/openat.c b/io/openat.c
index 08d61843fa..c7714a99f4 100644
--- a/io/openat.c
+++ b/io/openat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/openat64.c b/io/openat64.c
index 060fdf9045..1557818170 100644
--- a/io/openat64.c
+++ b/io/openat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/openat64_2.c b/io/openat64_2.c
index 8548c3d557..533391fc0c 100644
--- a/io/openat64_2.c
+++ b/io/openat64_2.c
@@ -1,5 +1,5 @@
/* _FORTIFY_SOURCE wrapper for openat64.
- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+ Copyright (C) 2013-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/openat_2.c b/io/openat_2.c
index 54a98bece8..c4f2f755a4 100644
--- a/io/openat_2.c
+++ b/io/openat_2.c
@@ -1,5 +1,5 @@
/* _FORTIFY_SOURCE wrapper for openat.
- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+ Copyright (C) 2013-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/pipe.c b/io/pipe.c
index 8cc20f1ae0..305293f488 100644
--- a/io/pipe.c
+++ b/io/pipe.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,8 +24,7 @@
bytes written on PIPEDES[1] can be read from PIPEDES[0].
Returns 0 if successful, -1 if not. */
int
-__pipe (__pipedes)
- int __pipedes[2];
+__pipe (int __pipedes[2])
{
if (__pipedes == NULL)
{
diff --git a/io/pipe2.c b/io/pipe2.c
index d06ed7af9f..5949ef5c89 100644
--- a/io/pipe2.c
+++ b/io/pipe2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,9 +24,7 @@
PIPEDES[1] can be read from PIPEDES[0]. Apply FLAGS to the new
file descriptors. Returns 0 if successful, -1 if not. */
int
-__pipe2 (pipedes, flags)
- int pipedes[2];
- int flags;
+__pipe2 (int pipedes[2], int flags)
{
if (pipedes == NULL)
{
diff --git a/io/poll.c b/io/poll.c
index dbba44753e..808303bcb2 100644
--- a/io/poll.c
+++ b/io/poll.c
@@ -1,5 +1,5 @@
/* Poll (or wait) for file descriptor I/O availability. Stub version.
- Copyright (C) 1994-2015 Free Software Foundation, Inc.
+ Copyright (C) 1994-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/posix_fadvise.c b/io/posix_fadvise.c
index 9205c6799d..caec5f960c 100644
--- a/io/posix_fadvise.c
+++ b/io/posix_fadvise.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/posix_fadvise64.c b/io/posix_fadvise64.c
index 50cd39af6b..76bdab450d 100644
--- a/io/posix_fadvise64.c
+++ b/io/posix_fadvise64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/posix_fallocate.c b/io/posix_fallocate.c
index 8eefc625fc..317ebc0b43 100644
--- a/io/posix_fallocate.c
+++ b/io/posix_fallocate.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/posix_fallocate64.c b/io/posix_fallocate64.c
index 05922d16e6..e99f9014e0 100644
--- a/io/posix_fallocate64.c
+++ b/io/posix_fallocate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/ppoll.c b/io/ppoll.c
index f64c737913..3e8ad612ae 100644
--- a/io/ppoll.c
+++ b/io/ppoll.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2006.
diff --git a/io/pwd.c b/io/pwd.c
index c2c78441cb..cd19b84498 100644
--- a/io/pwd.c
+++ b/io/pwd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/read.c b/io/read.c
index 7725fda9e0..7498d3c119 100644
--- a/io/read.c
+++ b/io/read.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/readlink.c b/io/readlink.c
index 4516e6401c..48590acb40 100644
--- a/io/readlink.c
+++ b/io/readlink.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,10 +22,7 @@
LEN bytes of BUF. The contents are not null-terminated.
Returns the number of characters read, or -1 for errors. */
ssize_t
-__readlink (path, buf, len)
- const char *path;
- char *buf;
- size_t len;
+__readlink (const char *path, char *buf, size_t len)
{
__set_errno (ENOSYS);
return -1;
diff --git a/io/readlinkat.c b/io/readlinkat.c
index 63b48ea1fe..c955aba604 100644
--- a/io/readlinkat.c
+++ b/io/readlinkat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,11 +23,7 @@
more than LEN bytes of BUF. The contents are not null-terminated.
Returns the number of characters read, or -1 for errors. */
ssize_t
-readlinkat (fd, path, buf, len)
- int fd;
- const char *path;
- char *buf;
- size_t len;
+readlinkat (int fd, const char *path, char *buf, size_t len)
{
if (path == NULL)
{
diff --git a/io/rmdir.c b/io/rmdir.c
index f4ad1662b5..c73dd702a4 100644
--- a/io/rmdir.c
+++ b/io/rmdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,8 +22,7 @@
/* Remove the directory PATH. */
int
-__rmdir (path)
- const char *path;
+__rmdir (const char *path)
{
if (path == NULL)
{
diff --git a/io/sendfile.c b/io/sendfile.c
index 22a0d134b8..29ff4a2b30 100644
--- a/io/sendfile.c
+++ b/io/sendfile.c
@@ -1,5 +1,5 @@
/* sendfile -- copy data directly from one file descriptor to another
- Copyright (C) 2002-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/sendfile64.c b/io/sendfile64.c
index 7126eca0f8..31e0e4b060 100644
--- a/io/sendfile64.c
+++ b/io/sendfile64.c
@@ -1,5 +1,5 @@
/* sendfile -- copy data directly from one file descriptor to another
- Copyright (C) 2002-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/stat.c b/io/stat.c
index c0302e571d..a4ed79a878 100644
--- a/io/stat.c
+++ b/io/stat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/stat64.c b/io/stat64.c
index 2bcb8f09c9..59ad8ee481 100644
--- a/io/stat64.c
+++ b/io/stat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/statfs.c b/io/statfs.c
index fbad09fc10..040cee8b8b 100644
--- a/io/statfs.c
+++ b/io/statfs.c
@@ -1,5 +1,5 @@
/* statfs -- Return information about the filesystem on which FILE resides.
- Copyright (C) 1996-2015 Free Software Foundation, Inc.
+ Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/statfs64.c b/io/statfs64.c
index 8a893e800f..1beda66436 100644
--- a/io/statfs64.c
+++ b/io/statfs64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/statvfs.c b/io/statvfs.c
index a3f210bb12..b55bac5636 100644
--- a/io/statvfs.c
+++ b/io/statvfs.c
@@ -1,5 +1,5 @@
/* Return information about the filesystem on which FILE resides.
- Copyright (C) 1998-2015 Free Software Foundation, Inc.
+ Copyright (C) 1998-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/statvfs64.c b/io/statvfs64.c
index c2203e2ba0..671ad0e44c 100644
--- a/io/statvfs64.c
+++ b/io/statvfs64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/symlink.c b/io/symlink.c
index 77d1203007..f3134914de 100644
--- a/io/symlink.c
+++ b/io/symlink.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,9 +22,7 @@
/* Make a link to FROM called TO. */
int
-__symlink (from, to)
- const char *from;
- const char *to;
+__symlink (const char *from, const char *to)
{
if (from == NULL || to == NULL)
{
diff --git a/io/symlinkat.c b/io/symlinkat.c
index 0c8747d3c2..240c9fcc43 100644
--- a/io/symlinkat.c
+++ b/io/symlinkat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,10 +23,7 @@
/* Make a link to FROM called TO relative to FD. */
int
-symlinkat (from, fd, to)
- const char *from;
- int fd;
- const char *to;
+symlinkat (const char *from, int fd, const char *to)
{
if (from == NULL || to == NULL)
{
diff --git a/io/sys/poll.h b/io/sys/poll.h
index dc097daa29..e751860acd 100644
--- a/io/sys/poll.h
+++ b/io/sys/poll.h
@@ -1,5 +1,5 @@
/* Compatibility definitions for System V `poll' interface.
- Copyright (C) 1994-2015 Free Software Foundation, Inc.
+ Copyright (C) 1994-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/sys/sendfile.h b/io/sys/sendfile.h
index 1d2a698817..d4c14bacde 100644
--- a/io/sys/sendfile.h
+++ b/io/sys/sendfile.h
@@ -1,5 +1,5 @@
/* sendfile -- copy data directly from one file descriptor to another
- Copyright (C) 1998-2015 Free Software Foundation, Inc.
+ Copyright (C) 1998-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/sys/stat.h b/io/sys/stat.h
index 5c571a921e..bf63882c7e 100644
--- a/io/sys/stat.h
+++ b/io/sys/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/sys/statfs.h b/io/sys/statfs.h
index 531b44b3dd..69a228d0fb 100644
--- a/io/sys/statfs.h
+++ b/io/sys/statfs.h
@@ -1,5 +1,5 @@
/* Definitions for getting information about a filesystem.
- Copyright (C) 1996-2015 Free Software Foundation, Inc.
+ Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/sys/statvfs.h b/io/sys/statvfs.h
index 175badcb97..5d96652ac1 100644
--- a/io/sys/statvfs.h
+++ b/io/sys/statvfs.h
@@ -1,5 +1,5 @@
/* Definitions for getting information about a filesystem.
- Copyright (C) 1998-2015 Free Software Foundation, Inc.
+ Copyright (C) 1998-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/test-lfs.c b/io/test-lfs.c
index 539c2a2b14..3088a21fd8 100644
--- a/io/test-lfs.c
+++ b/io/test-lfs.c
@@ -1,5 +1,5 @@
/* Some basic tests for LFS.
- Copyright (C) 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
@@ -56,7 +56,6 @@ do_prepare (int argc, char *argv[])
name = malloc (name_len + sizeof ("/lfsXXXXXX"));
mempcpy (mempcpy (name, test_dir, name_len),
"/lfsXXXXXX", sizeof ("/lfsXXXXXX"));
- add_temp_file (name);
/* Open our test file. */
fd = mkstemp64 (name);
@@ -71,6 +70,7 @@ do_prepare (int argc, char *argv[])
else
error (EXIT_FAILURE, errno, "cannot create temporary file");
}
+ add_temp_file (name);
if (getrlimit64 (RLIMIT_FSIZE, &rlim) != 0)
{
@@ -144,7 +144,7 @@ test_ftello (void)
int
do_test (int argc, char *argv[])
{
- int ret;
+ int ret, fd2;
struct stat64 statbuf;
ret = lseek64 (fd, TWO_GB+100, SEEK_SET);
@@ -195,6 +195,25 @@ do_test (int argc, char *argv[])
error (EXIT_FAILURE, 0, "stat reported size %lld instead of %lld.",
(long long int) statbuf.st_size, (TWO_GB + 100 + 5));
+ fd2 = openat64 (AT_FDCWD, name, O_RDWR);
+ if (fd2 == -1)
+ {
+ if (errno == ENOSYS)
+ {
+ /* Silently ignore this test. */
+ error (0, 0, "openat64 is not supported");
+ }
+ else
+ error (EXIT_FAILURE, errno, "openat64 failed to open big file");
+ }
+ else
+ {
+ ret = close (fd2);
+
+ if (ret == -1)
+ error (EXIT_FAILURE, errno, "error closing file");
+ }
+
test_ftello ();
return 0;
diff --git a/io/test-stat.c b/io/test-stat.c
index a58e1b2868..9d8e6b63ba 100644
--- a/io/test-stat.c
+++ b/io/test-stat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
This file is part of the GNU C Library.
diff --git a/io/test-stat2.c b/io/test-stat2.c
index d2b7f25328..f62f5c1ee0 100644
--- a/io/test-stat2.c
+++ b/io/test-stat2.c
@@ -1,5 +1,5 @@
/* Test consistence of results of stat and stat64.
- Copyright (C) 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2000.
diff --git a/io/test-utime.c b/io/test-utime.c
index 085926cb08..d8d2390757 100644
--- a/io/test-utime.c
+++ b/io/test-utime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/tst-fcntl.c b/io/tst-fcntl.c
index dfdb42eea4..98a642e5fc 100644
--- a/io/tst-fcntl.c
+++ b/io/tst-fcntl.c
@@ -1,5 +1,5 @@
/* Tests for fcntl.
- Copyright (C) 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
@@ -38,6 +38,9 @@ extern int do_test (int argc, char *argv[]);
/* Name of the temporary files. */
static char *name;
+/* File descriptor to temporary file. */
+static int fd;
+
void
do_prepare (int argc, char *argv[])
{
@@ -47,6 +50,13 @@ do_prepare (int argc, char *argv[])
name = malloc (name_len + sizeof ("/fcntlXXXXXX"));
mempcpy (mempcpy (name, test_dir, name_len),
"/fcntlXXXXXX", sizeof ("/fcntlXXXXXX"));
+ /* Create the temporary file. */
+ fd = mkstemp (name);
+ if (fd == -1)
+ {
+ printf ("cannot open temporary file: %m\n");
+ exit (1);
+ }
add_temp_file (name);
}
@@ -54,20 +64,12 @@ do_prepare (int argc, char *argv[])
int
do_test (int argc, char *argv[])
{
- int fd;
int fd2;
int fd3;
struct stat64 st;
int val;
int result = 0;
- /* Create the temporary file. */
- fd = mkstemp (name);
- if (fd == -1)
- {
- printf ("cannot open temporary file: %m\n");
- return 1;
- }
if (fstat64 (fd, &st) != 0)
{
printf ("cannot stat test file: %m\n");
diff --git a/io/tst-fts-lfs.c b/io/tst-fts-lfs.c
new file mode 100644
index 0000000000..bc169342f8
--- /dev/null
+++ b/io/tst-fts-lfs.c
@@ -0,0 +1,2 @@
+#define _FILE_OFFSET_BITS 64
+#include "tst-fts.c"
diff --git a/io/tst-fts.c b/io/tst-fts.c
new file mode 100644
index 0000000000..b7d77143f4
--- /dev/null
+++ b/io/tst-fts.c
@@ -0,0 +1,231 @@
+/* Simple test for some fts functions.
+ Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fts.h>
+
+#include <errno.h>
+#include <error.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+static void prepare (void);
+static int do_test (void);
+#define PREPARE(argc, argv) prepare ()
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
+
+static char *fts_test_dir;
+
+static void
+make_dir (const char *dirname)
+{
+ char *name;
+ if (asprintf (&name, "%s/%s", fts_test_dir, dirname) < 0)
+ {
+ puts ("out of memory");
+ exit (1);
+ }
+
+ if (mkdir (name, 0700) < 0)
+ {
+ printf ("cannot create dir \"%s\": %m\n", name);
+ exit (1);
+ }
+
+ add_temp_file (name);
+}
+
+static void
+make_file (const char *filename)
+{
+ char *name;
+ if (asprintf (&name, "%s/%s", fts_test_dir, filename) < 0)
+ {
+ puts ("out of memory");
+ exit (1);
+ }
+
+ int fd = open (name, O_WRONLY | O_CREAT | O_EXCL, 0600);
+ if (fd < 0)
+ {
+ printf ("cannot create file \"%s\": %m\n", name);
+ exit (1);
+ }
+ close (fd);
+
+ add_temp_file (name);
+}
+
+static void
+prepare (void)
+{
+ char *dirbuf;
+ char dir_name[] = "/tst-fts.XXXXXX";
+
+ if (asprintf (&dirbuf, "%s%s", test_dir, dir_name) < 0)
+ {
+ puts ("out of memory");
+ exit (1);
+ }
+
+ if (mkdtemp (dirbuf) == NULL)
+ {
+ puts ("cannot create temporary directory");
+ exit (1);
+ }
+
+ add_temp_file (dirbuf);
+ fts_test_dir = dirbuf;
+
+ make_file ("12");
+ make_file ("345");
+ make_file ("6789");
+
+ make_dir ("aaa");
+ make_file ("aaa/1234");
+ make_file ("aaa/5678");
+
+ make_dir ("bbb");
+ make_file ("bbb/1234");
+ make_file ("bbb/5678");
+ make_file ("bbb/90ab");
+}
+
+/* Largest name wins, otherwise strcmp. */
+static int
+compare_ents (const FTSENT **ent1, const FTSENT **ent2)
+{
+ short len1 = (*ent1)->fts_namelen;
+ short len2 = (*ent2)->fts_namelen;
+ if (len1 != len2)
+ return len1 - len2;
+ else
+ {
+ const char *name1 = (*ent1)->fts_name;
+ const char *name2 = (*ent2)->fts_name;
+ return strcmp (name1, name2);
+ }
+}
+
+/* Count the number of files seen as children. */
+static int files = 0;
+
+static void
+children (FTS *fts)
+{
+ FTSENT *child = fts_children (fts, 0);
+ if (child == NULL && errno != 0)
+ {
+ printf ("FAIL: fts_children: %m\n");
+ exit (1);
+ }
+
+ while (child != NULL)
+ {
+ short level = child->fts_level;
+ const char *name = child->fts_name;
+ if (child->fts_info == FTS_F || child->fts_info == FTS_NSOK)
+ {
+ files++;
+ printf ("%*s%s\n", 2 * level, "", name);
+ }
+ child = child->fts_link;
+ }
+}
+
+/* Count the number of dirs seen in the test. */
+static int dirs = 0;
+
+static int
+do_test (void)
+{
+ char *paths[2] = { fts_test_dir, NULL };
+ FTS *fts;
+ fts = fts_open (paths, FTS_LOGICAL, &compare_ents);
+ if (fts == NULL)
+ {
+ printf ("FAIL: fts_open: %m\n");
+ exit (1);
+ }
+
+ FTSENT *ent;
+ while ((ent = fts_read (fts)) != NULL)
+ {
+ const char *name = ent->fts_name;
+ short level = ent->fts_level;
+ switch (ent->fts_info)
+ {
+ case FTS_F:
+ /* Don't show anything, children will have on parent dir. */
+ break;
+
+ case FTS_D:
+ printf ("%*s%s =>\n", 2 * level, "", name);
+ children (fts);
+ break;
+
+ case FTS_DP:
+ dirs++;
+ printf ("%*s<= %s\n", 2 * level, "", name);
+ break;
+
+ case FTS_NS:
+ case FTS_ERR:
+ printf ("FAIL: fts_read ent: %s\n", strerror (ent->fts_errno));
+ exit (1);
+ break;
+
+ default:
+ printf ("FAIL: unexpected fts_read ent %s\n", name);
+ exit (1);
+ break;
+ }
+ }
+ /* fts_read returns NULL when done (and clears errno)
+ or when an error occured (with errno set). */
+ if (errno != 0)
+ {
+ printf ("FAIL: fts_read: %m\n");
+ exit (1);
+ }
+
+ if (fts_close (fts) != 0)
+ {
+ printf ("FAIL: fts_close: %m\n");
+ exit (1);
+ }
+
+ if (files != 8)
+ {
+ printf ("FAIL: Unexpected number of files: %d\n", files);
+ return 1;
+ }
+
+ if (dirs != 3)
+ {
+ printf ("FAIL: Unexpected number of dirs: %d\n", dirs);
+ return 1;
+ }
+
+ puts ("PASS");
+ return 0;
+}
diff --git a/io/tst-getcwd.c b/io/tst-getcwd.c
index 858d7ba4dd..ab15b2b0bc 100644
--- a/io/tst-getcwd.c
+++ b/io/tst-getcwd.c
@@ -1,5 +1,5 @@
/* Test of getcwd function.
- Copyright (C) 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
diff --git a/io/ttyname.c b/io/ttyname.c
index 6332d29916..cc7adda415 100644
--- a/io/ttyname.c
+++ b/io/ttyname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,8 +25,7 @@ char *__ttyname = NULL;
/* Return the pathname of the terminal FD is open on, or NULL on errors.
The returned storage is good only until the next call to this function. */
char *
-ttyname (fd)
- int fd;
+ttyname (int fd)
{
__set_errno (ENOSYS);
return NULL;
diff --git a/io/ttyname_r.c b/io/ttyname_r.c
index 50dbd67467..6462b1ff87 100644
--- a/io/ttyname_r.c
+++ b/io/ttyname_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,10 +22,7 @@
/* Store at most BUFLEN characters the pathname of the terminal FD is
open on in BUF. Return 0 on success, otherwise an error number. */
int
-__ttyname_r (fd, buf, buflen)
- int fd;
- char *buf;
- size_t buflen;
+__ttyname_r (int fd, char *buf, size_t buflen)
{
__set_errno (ENOSYS);
return ENOSYS;
diff --git a/io/umask.c b/io/umask.c
index 2afb8372c3..9cf0514b94 100644
--- a/io/umask.c
+++ b/io/umask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,8 +21,7 @@
/* Set the file creation mask to MASK, returning the old mask. */
mode_t
-__umask (mask)
- mode_t mask;
+__umask (mode_t mask)
{
__set_errno (ENOSYS);
return -1;
diff --git a/io/unlink.c b/io/unlink.c
index 65ec5c66ca..5dbcf92874 100644
--- a/io/unlink.c
+++ b/io/unlink.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,8 +22,7 @@
/* Remove the link named NAME. */
int
-__unlink (name)
- const char *name;
+__unlink (const char *name)
{
if (name == NULL)
{
diff --git a/io/unlinkat.c b/io/unlinkat.c
index 9122d73c41..a5ecc0dce1 100644
--- a/io/unlinkat.c
+++ b/io/unlinkat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,10 +23,7 @@
/* Remove the link named NAME. */
int
-unlinkat (fd, name, flag)
- int fd;
- const char *name;
- int flag;
+unlinkat (int fd, const char *name, int flag)
{
if (name == NULL || (flag & AT_REMOVEDIR) != 0)
{
diff --git a/io/utime.c b/io/utime.c
index 830d3414e9..c7b7cfeae8 100644
--- a/io/utime.c
+++ b/io/utime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,9 +23,7 @@
/* Set the access and modification times of FILE to those given in TIMES.
If TIMES is NULL, set them to the current time. */
int
-utime (file, times)
- const char *file;
- const struct utimbuf *times;
+utime (const char *file, const struct utimbuf *times)
{
if (file == NULL)
{
diff --git a/io/utime.h b/io/utime.h
index 9fbfc193aa..3cc0d5e99d 100644
--- a/io/utime.h
+++ b/io/utime.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/utimensat.c b/io/utimensat.c
index 7c878da984..bc7341f84e 100644
--- a/io/utimensat.c
+++ b/io/utimensat.c
@@ -1,5 +1,5 @@
/* Change access and modification times of open file. Stub version.
- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/write.c b/io/write.c
index 2bc8662364..0e1c109064 100644
--- a/io/write.c
+++ b/io/write.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/xmknod.c b/io/xmknod.c
index e5dd951c2e..9f82c0b089 100644
--- a/io/xmknod.c
+++ b/io/xmknod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/xmknodat.c b/io/xmknodat.c
index e92817e3d2..3c2e04ddb1 100644
--- a/io/xmknodat.c
+++ b/io/xmknodat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/xstat.c b/io/xstat.c
index 03c6edeb2b..80ed0b87f7 100644
--- a/io/xstat.c
+++ b/io/xstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/io/xstat64.c b/io/xstat64.c
index 3ef4c42a50..4e09392461 100644
--- a/io/xstat64.c
+++ b/io/xstat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or