Commit Graph

23 Commits

Author SHA1 Message Date
Steve Ellcey d2e1e97332 Always define XSTAT_IS_XSTAT64
* sysdeps/unix/sysv/linux/generic/kernel_stat.h: Set XSTAT_IS_XSTAT64
	to 0 when in 32 bit mode.
	* sysdeps/unix/sysv/linux/hppa/kernel_stat.h: Set XSTAT_IS_XSTAT64 to 0.
	* sysdeps/unix/sysv/linux/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/microblaze/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/mips/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h: Ditto.
	* sysdeps/unix/sysv/linux/fxstat.c: Replace #ifdef with #if on
	XSTAT_IS_XSTAT64 test.
	* sysdeps/unix/sysv/linux/fxstatat.c: Ditto.
	* sysdeps/unix/sysv/linux/generic/lxstat.c: Ditto.
	* sysdeps/unix/sysv/linux/generic/xstat.c: Ditto.
	* sysdeps/unix/sysv/linux/i386/fxstat.c: Ditto.
	* sysdeps/unix/sysv/linux/i386/fxstatat.c: Ditto.
	* sysdeps/unix/sysv/linux/i386/lxstat.c: Ditto.
	* sysdeps/unix/sysv/linux/i386/xstat.c: Ditto.
	* sysdeps/unix/sysv/linux/lxstat.c: Ditto.
	* sysdeps/unix/sysv/linux/mips/xstatconv.c: Ditto.
	* sysdeps/unix/sysv/linux/xstat.c: Ditto.
	* sysdeps/unix/sysv/linux/xstatconv.c: Ditto.
2016-11-21 08:23:12 -08:00
Joseph Myers f7a9f785e5 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
H.J. Lu 2caca60d06 Use INLINE_SYSCALL_ERROR_RETURN_VALUE
This patch replaces

  {
    __set_errno (ERRNO);
    return -1;
  }

with INLINE_SYSCALL_ERROR_RETURN_VALUE (ERRNO).

	* sysdeps/unix/sysv/linux/adjtime.c (ADJTIME): Use
	INLINE_SYSCALL_ERROR_RETURN_VALUE.
	* sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise.
	* sysdeps/unix/sysv/linux/eventfd.c (eventfd): Likewise.
	* sysdeps/unix/sysv/linux/faccessat.c (faccessat): Likewise.
	* sysdeps/unix/sysv/linux/fchmodat.c (fchmodat): Likewise.
	* sysdeps/unix/sysv/linux/fcntl.c (do_fcntl): Likewise.
	* sysdeps/unix/sysv/linux/futimens.c (futimens): Likewise.
	* sysdeps/unix/sysv/linux/futimes.c (__futimes): Likewise.
	* sysdeps/unix/sysv/linux/fxstat.c (__fxstat): Likewise.
	* sysdeps/unix/sysv/linux/fxstatat.c (__fxstatat): Likewise.
	* sysdeps/unix/sysv/linux/fxstatat64.c (__fxstatat64): Likewise.
	* sysdeps/unix/sysv/linux/lutimes.c (lutimes): Likewise.
	* sysdeps/unix/sysv/linux/lxstat.c (__lxstat): Likewise.
	* sysdeps/unix/sysv/linux/lxstat64.c (___lxstat64): Likewise.
	* sysdeps/unix/sysv/linux/mmap64.c (__mmap64): Likewise.
	* sysdeps/unix/sysv/linux/mq_open.c (__mq_open): Likewise.
	* sysdeps/unix/sysv/linux/mq_unlink.c (mq_unlink): Likewise.
	* sysdeps/unix/sysv/linux/prlimit.c (prlimit): Likewise.
	* sysdeps/unix/sysv/linux/readahead.c (__readahead): Likewise.
	* sysdeps/unix/sysv/linux/shmat.c (shmat): Likewise.
	* sysdeps/unix/sysv/linux/signalfd.c (signalfd): Likewise.
	* sysdeps/unix/sysv/linux/speed.c (cfsetospeed): Likewise.
	* sysdeps/unix/sysv/linux/tcsetattr.c (tcsetattr): Likewise.
	* sysdeps/unix/sysv/linux/ustat.c (ustat): Likewise.
	* sysdeps/unix/sysv/linux/utimensat.c (utimensat): Likewise.
	* sysdeps/unix/sysv/linux/xmknod.c (__xmknod): Likewise.
	* sysdeps/unix/sysv/linux/xmknodat.c (__xmknodat): Likewise.
	* sysdeps/unix/sysv/linux/xstat.c (__xstat): Likewise.
	* sysdeps/unix/sysv/linux/xstatconv.c (__xstat_conv): Likewise.
	(__xstat64_conv): Likewise.
	(__xstat32_conv): Likewise.
2015-10-13 12:01:10 -07:00
H.J. Lu e5dee2c896 Revert "Add INLINE_SYSCALL_RETURN/INLINE_SYSCALL_ERROR_RETURN"
This reverts commit 0c5b8b5941.
2015-08-21 09:57:15 -07:00
H.J. Lu 0c5b8b5941 Add INLINE_SYSCALL_RETURN/INLINE_SYSCALL_ERROR_RETURN
For ia32 PIC, the first thing of many syscalls does is to call
__x86.get_pc_thunk.reg to load PC into reg in case there is an error,
which is required for setting errno.  In most cases, there are no
errors.  But we still call __x86.get_pc_thunk.reg.  This patch adds
INLINE_SYSCALL_RETURN and INLINE_SYSCALL_ERROR_RETURN so that i386
can optimize setting errno by branching to the internal __syscall_error
without PLT.

INLINE_SYSCALL_ERROR_RETURN is designed to take the negative error
number returned from the majority of Linux kernels for which negating
is a no-op with INTERNAL_SYSCALL_ERRNO.

With i386 INLINE_SYSCALL_RETURN, INLINE_SYSCALL_ERROR_RETURN and
i386 syscall inlining optimization for GCC 5, for
sysdeps/unix/sysv/linux/fchmodat.c with -O2 -march=i686
-mtune=generic, GCC 5.2 now generates:

<fchmodat>:
   0:	push   %ebx
   1:	mov    0x14(%esp),%eax
   5:	mov    0x8(%esp),%ebx
   9:	mov    0xc(%esp),%ecx
   d:	mov    0x10(%esp),%edx
  11:	test   $0xfffffeff,%eax
  16:	jne    38 <fchmodat+0x38>
  18:	test   $0x1,%ah
  1b:	jne    48 <fchmodat+0x48>
  1d:	mov    $0x132,%eax
  22:	call   *%gs:0x10
  29:	cmp    $0xfffff000,%eax
  2e:	ja     58 <fchmodat+0x58>
  30:	pop    %ebx
  31:	ret
  32:	lea    0x0(%esi),%esi
  38:	pop    %ebx
  39:	mov    $0xffffffea,%eax
  3e:	jmp    3f <fchmodat+0x3f>	3f: R_386_PC32	__syscall_error
  43:	nop
  44:	lea    0x0(%esi,%eiz,1),%esi
  48:	pop    %ebx
  49:	mov    $0xffffffa1,%eax
  4e:	jmp    4f <fchmodat+0x4f>	4f: R_386_PC32	__syscall_error
  53:	nop
  54:	lea    0x0(%esi,%eiz,1),%esi
  58:	pop    %ebx
  59:	jmp    5a <fchmodat+0x5a>	5a: R_386_PC32	__syscall_error

instead of

<fchmodat>:
   0:	sub    $0x8,%esp
   3:	mov    0x18(%esp),%eax
   7:	mov    %ebx,(%esp)
   a:	call   b <fchmodat+0xb>	b: R_386_PC32	__x86.get_pc_thunk.bx
   f:	add    $0x2,%ebx	11: R_386_GOTPC	_GLOBAL_OFFSET_TABLE_
  15:	mov    %edi,0x4(%esp)
  19:	test   $0xfffffeff,%eax
  1e:	jne    70 <fchmodat+0x70>
  20:	test   $0x1,%ah
  23:	jne    88 <fchmodat+0x88>
  25:	mov    0x14(%esp),%edx
  29:	mov    0x10(%esp),%ecx
  2d:	mov    0xc(%esp),%edi
  31:	xchg   %ebx,%edi
  33:	mov    $0x132,%eax
  38:	call   *%gs:0x10
  3f:	xchg   %edi,%ebx
  41:	cmp    $0xfffff000,%eax
  46:	ja     58 <fchmodat+0x58>
  48:	mov    (%esp),%ebx
  4b:	mov    0x4(%esp),%edi
  4f:	add    $0x8,%esp
  52:	ret
  53:	nop
  54:	lea    0x0(%esi,%eiz,1),%esi
  58:	mov    0x0(%ebx),%edx	5a: R_386_TLS_GOTIE	__libc_errno
  5e:	neg    %eax
  60:	mov    %eax,%gs:(%edx)
  63:	mov    $0xffffffff,%eax
  68:	jmp    48 <fchmodat+0x48>
  6a:	lea    0x0(%esi),%esi
  70:	mov    0x0(%ebx),%eax	72: R_386_TLS_GOTIE	__libc_errno
  76:	movl   $0x16,%gs:(%eax)
  7d:	mov    $0xffffffff,%eax
  82:	jmp    48 <fchmodat+0x48>
  84:	lea    0x0(%esi,%eiz,1),%esi
  88:	mov    0x0(%ebx),%eax	8a: R_386_TLS_GOTIE	__libc_errno
  8e:	movl   $0x5f,%gs:(%eax)
  95:	mov    $0xffffffff,%eax
  9a:	jmp    48 <fchmodat+0x48>

	* sysdeps/unix/sysdep.h (INLINE_SYSCALL_RETURN): New.
	(INLINE_SYSCALL_ERROR_RETURN): Likewise.
	* sysdeps/unix/sysv/linux/adjtime.c (ADJTIME): Use
	INLINE_SYSCALL_RETURN and INLINE_SYSCALL_ERROR_RETURN.
	* sysdeps/unix/sysv/linux/aio_sigqueue.c (__aio_sigqueue):
	Likewise.
	* sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise.
	* sysdeps/unix/sysv/linux/eventfd.c (eventfd): Likewise.
	* sysdeps/unix/sysv/linux/faccessat.c (faccessat): Likewise.
	* sysdeps/unix/sysv/linux/fchmodat.c (fchmodat): Likewise.
	* sysdeps/unix/sysv/linux/fcntl.c (do_fcntl): Likewise.
	* sysdeps/unix/sysv/linux/fstatfs64.c (__fstatfs64): Likewise.
	* sysdeps/unix/sysv/linux/ftruncate64.c (__ftruncate64): Likewise.
	* sysdeps/unix/sysv/linux/futimens.c (futimens): Likewise.
	* sysdeps/unix/sysv/linux/futimes.c (__futimes): Likewise.
	* sysdeps/unix/sysv/linux/futimesat.c (futimesat): Likewise.
	* sysdeps/unix/sysv/linux/fxstat.c (__fxstat): Likewise.
	* sysdeps/unix/sysv/linux/fxstat64.c (___fxstat64): Likewise.
	* sysdeps/unix/sysv/linux/fxstatat.c (__fxstatat): Likewise.
	* sysdeps/unix/sysv/linux/fxstatat64.c (__fxstatat64): Likewise.
	* sysdeps/unix/sysv/linux/gai_sigqueue.c (__gai_sigqueue):
	Likewise.
	* sysdeps/unix/sysv/linux/getpriority.c (__getpriority): Likewise.
	* sysdeps/unix/sysv/linux/getrlimit64.c (__getrlimit64): Likewise.
	* sysdeps/unix/sysv/linux/llseek.c (__llseek): Likewise.
	* sysdeps/unix/sysv/linux/lutimes.c (lutimes): Likewise.
	* sysdeps/unix/sysv/linux/lxstat.c (__lxstat): Likewise.
	* sysdeps/unix/sysv/linux/lxstat64.c (___lxstat64): Likewise.
	* sysdeps/unix/sysv/linux/mmap64.c (__mmap64): Likewise.
	* sysdeps/unix/sysv/linux/mq_close.c (mq_close): Likewise.
	* sysdeps/unix/sysv/linux/mq_open.c (__mq_open): Likewise.
	* sysdeps/unix/sysv/linux/mq_unlink.c (mq_unlink): Likewise.
	* sysdeps/unix/sysv/linux/msgget.c (msgget): Likewise.
	* sysdeps/unix/sysv/linux/prlimit.c (prlimit): Likewise.
	* sysdeps/unix/sysv/linux/pt-raise.c (raise): Likewise.
	* sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
	* sysdeps/unix/sysv/linux/readahead.c (__readahead): Likewise.
	* sysdeps/unix/sysv/linux/reboot.c (reboot): Likewise.
	* sysdeps/unix/sysv/linux/semget.c (semget): Likewise.
	* sysdeps/unix/sysv/linux/semop.c (semop): Likewise.
	* sysdeps/unix/sysv/linux/semtimedop.c (semtimedop): Likewise.
	* sysdeps/unix/sysv/linux/setrlimit64.c (setrlimit64): Likewise.
	* sysdeps/unix/sysv/linux/shmat.c (shmat): Likewise.
	* sysdeps/unix/sysv/linux/shmdt.c (shmdt): Likewise.
	* sysdeps/unix/sysv/linux/shmget.c (shmget): Likewise.
	* sysdeps/unix/sysv/linux/signalfd.c (signalfd): Likewise.
	* sysdeps/unix/sysv/linux/sigpending.c (sigpending): Likewise.
	* sysdeps/unix/sysv/linux/sigprocmask.c ( __sigprocmask): Likewise.
	* sysdeps/unix/sysv/linux/sigqueue.c (__sigqueue): Likewise.
	* sysdeps/unix/sysv/linux/speed.c (cfsetospeed): Likewise.
	* sysdeps/unix/sysv/linux/statfs64.c (__statfs64): Likewise.
	* sysdeps/unix/sysv/linux/sysctl.c (__sysctl): Likewise.
	* sysdeps/unix/sysv/linux/tcsendbrk.c (tcsendbreak): Likewise.
	* sysdeps/unix/sysv/linux/tcsetattr.c (tcsetattr): Likewise.
	* sysdeps/unix/sysv/linux/timer_getoverr.c (timer_getoverrun):
	Likewise.
	* sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime):
	Likewise.
	* sysdeps/unix/sysv/linux/timer_settime.c (timer_settime):
	Likewise.
	* sysdeps/unix/sysv/linux/truncate64.c (truncate64): Likewise.
	* sysdeps/unix/sysv/linux/ustat.c (ustat): Likewise.
	* sysdeps/unix/sysv/linux/utimensat.c (utimensat): Likewise.
	* sysdeps/unix/sysv/linux/utimes.c (__utimes): Likewise.
	* sysdeps/unix/sysv/linux/xmknod.c (__xmknod): Likewise.
	* sysdeps/unix/sysv/linux/xmknodat.c (__xmknodat): Likewise.
	* sysdeps/unix/sysv/linux/xstat.c (__xstat): Likewise.
	* sysdeps/unix/sysv/linux/xstat64.c (___xstat64): Likewise.
	* sysdeps/unix/sysv/linux/xstatconv.c (__xstat_conv): Likewise.
	(__xstat64_conv): Likewise.
	(__xstat32_conv): Likewise.
	* sysdeps/unix/sysv/linux/sched_getaffinity.c
	(__sched_getaffinity_new): Add libc_hidden_proto and
	libc_hidden_def.  Use INLINE_SYSCALL_ERROR_RETURN.
2015-08-21 04:46:53 -07:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Joseph Myers 809fdf0d23 Remove __ASSUME_ATFCTS conditionals in sysdeps/unix/sysv/linux/.
This patch cleans up for __ASSUME_ATFCTS now always being true for the
supported Linux kernel versions by removing conditional code in
sysdeps/unix/sysv/linux.  Several fchownat.c files that were only
present because of differences in the fallback syscalls used
(depending on the architecture-specific names of chown-related
syscalls for 32-bit uids) are removed.  Files that looks like they
could be replaced by syscalls.list entries have the standard "Consider
moving to syscalls.list." comment (see bug 14138) added.  Conditionals
on the relevant __NR_* syscall numbers being defined are also removed,
since my analysis indicated that the relevant syscalls are always
defined for all relevant kernel versions using any affected file.
Much of the removed fallback code had unbounded stack allocations, so
this reduces the number of cases to consider for anyone reviewing uses
of alloca and VLAs in glibc.

There remain tests of __ASSUME_ATFCTS in io/openat.c (to determine
whether to define __have_atfcts) and sysdeps/posix/getcwd.c (which
also uses __have_atfcts); thus, the definition of __ASSUME_ATFCTS
remains in kernel-features.h.  The logical condition relevant there is
whether openat64_not_cancel_3 is known to work.  Hurd doesn't use this
version of getcwd at all, so the conditionals in getcwd.c are always
true in glibc.  However, this code is also used in gnulib.  So the
best way to deal with the conditionals there may be for gnulib people
to deal with merging all relevant changes in both directions between
the glibc and gnulib versions of this file, at the end of which the
openat conditionals should be in whatever form is best for gnulib, and
hardcoded in the _LIBC case to having openat supported.

Tested by comparing before-and-after disassembly of installed
(stripped) shared libraries, on x86_64 and x86.  On x86 the patch made
no change to the disassembly; on x86_64, the only changes were in
readlinkat, where formerly the return value from the readlinkat
syscall was stored in an int variable before being converted to
ssize_t for the return, and now the return value is returned directly
without truncation to int.  I think it's clearly correct not to
truncate the return value (although I also think the truncation would
not have been a user-visible bug because the kernel would never have
returned a value it could have affected).

	* include/fcntl.h (__atfct_seterrno): Remove prototype.
	(__atfct_seterrno_2): Likewise.
	* sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c: Do not include
	<kernel-features.h>.
	(__ASSUME_ATFCTS): Do not undefine and redefine.
	* sysdeps/unix/sysv/linux/alpha/fxstatat.c [__ASSUME_ATFCTS]
	(__have_atfcts): Remove conditional definition.
	(__fxstatat([__NR_fstatat64]: Make code unconditional.
	(__fxstatat) [!__ASSUME_ATFCTS]: Remove conditional code and code
	unreachable if [__ASSUME_ATFCTS].
	* sysdeps/unix/sysv/linux/dl-fxstatat64.c (__ASSUME_ATFCTS): Do
	not undefine and redefine.
	* sysdeps/unix/sysv/linux/faccessat.c: Do not include
	<kernel-features.h>.
	(faccessat) [__NR_faccessat]: Make code unconditional.
	(faccessat) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/fchmodat.c: Do not include
	<kernel-features.h>.
	(fchmodat) [__NR_fchmodat]: Make code unconditional.
	(fchmodat) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/fchownat.c: Do not include
	<kernel-features.h>.
	(fchownat) [__NR_fchownat]: Make code unconditional.
	(fchownat) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/futimesat.c: Do not include
	<kernel-features.h>.
	(futimesat) [__NR_futimesat]: Make code unconditional.
	(futimesat) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/fxstatat.c: Do not include
	<kernel-features.h>.
	(__fxstatat) [__NR_newfstatat]: Make code unconditional.
	(__fxstatat) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/fxstatat64.c: Do not include
	<kernel-features.h>.
	(__fxstatat64) [__NR_fstatat64]: Make code unconditional.
	(__fxstatat64) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/i386/fchownat.c: Remove file.
	* sysdeps/unix/sysv/linux/i386/fxstatat.c: Do not include
	<kernel-features.h>.
	(__fxstatat) [__NR_fstatat64]: Make code unconditional.
	(__fxstatat) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/linkat.c: Do not include
	<kernel-features.h>.
	(linkat) [__NR_linkat]: Make code unconditional.
	(linkat) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/m68k/fchownat.c: Remove file.
	* sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c: Do not include
	<kernel-features.h>.
	(__fxstatat64) [__NR_newfstatat]: Make code unconditional.
	(__fxstatat64) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/mkdirat.c: Do not include
	<kernel-features.h>.
	(mkdirat) [__NR_mkdirat]: Make code unconditional.
	(mkdirat) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/openat.c: Do not include
	<kernel-features.h>.
	[!__ASSUME_ATFCTS] (__atfct_seterrno): Remove function.
	[!__ASSUME_ATFCTS] (__have_atfcts): Remove variable.
	(OPENAT_NOT_CANCEL) [__NR_openat]: Make code unconditional.
	(OPENAT_NOT_CANCEL) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/powerpc/fchownat.c: Remove file.
	* sysdeps/unix/sysv/linux/readlinkat.c: Do not include
	<kernel-features.h>.
	(readlinkat) [__NR_readlinkat]: Make code unconditional.
	(readlinkat) [!__ASSUME_ATFCTS]: Remove conditional code.  Return
	result of INLINE_SYSCALL directly, not via int variable.
	* sysdeps/unix/sysv/linux/renameat.c: Do not include
	<kernel-features.h>.
	[!__ASSUME_ATFCTS] (__atfct_seterrno_2): Remove function.
	(renameat) [__NR_renameat]: Make code unconditional.
	(renameat) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: Remove file.
	* sysdeps/unix/sysv/linux/sh/fchownat.c: Remove file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c: Remove file.
	* sysdeps/unix/sysv/linux/sparc/sparc64/dl-fxstatat64.c
	(__ASSUME_ATFCTS): Do not undefine and redefine.
	* sysdeps/unix/sysv/linux/symlinkat.c: Do not include
	<kernel-features.h>.
	(symlinkat) [__NR_symlinkat]: Make code unconditional.
	(symlinkat) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/unlinkat.c: Do not include
	<kernel-features.h>.
	(unlinkat) [__NR_unlinkat]: Make code unconditional.
	(unlinkat) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/wordsize-64/dl-fxstatat64.c
	(__ASSUME_ATFCTS): Do not undefine and redefine.
	* sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Do not include
	<kernel-features.h>.
	(__fxstatat) [__NR_newfstatat]: Make code unconditional.
	(__fxstatat) [!__ASSUME_ATFCTS]: Remove conditional code.
	* sysdeps/unix/sysv/linux/xmknodat.c: Do not include
	<kernel-features.h>.
	(__xmknodat) [__NR_mknodat]: Make code unconditional.
	(__xmknodat) [!__ASSUME_ATFCTS]: Remove conditional code.
2014-06-20 15:41:35 +00:00
Ondřej Bílka a1ffb40e32 Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Joseph Myers 70d9946a44 Remove __ptrvalue, __bounded and __unbounded. 2013-02-13 23:30:40 +00:00
Joseph Myers f3aae3f3eb Remove CHECK_1 and CHECK_1_NULL_OK. 2013-02-08 01:12:11 +00:00
Joseph Myers 6277fdabc0 Remove CHECK_STRING, CHECK_STRING_NULL_OK and __ubp_memchr. 2013-02-04 16:29:39 +00:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Joseph Myers 12df29e2d2 Include string.h in sysdeps/unix/sysv/linux/fxstatat.c. 2012-11-17 03:43:53 +00:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Ulrich Drepper 801720e63b Fix compat handling in *at functions.
When passed an empty string for the filename, the compat code
using /proc in all *at functions did the wrong thing.
2009-10-29 21:33:26 -07:00
Ulrich Drepper f8de5057b9 * nscd/servicescache.c: Include kernel-features.h.
* nscd/gai.c: Likewise.
	* sysdeps/unix/sysv/linux/statfs64.c: Likewise.
	* sysdeps/unix/sysv/linux/fstatfs64.c: Likewise.
	* sysdeps/unix/sysv/linux/fxstatat.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/mmap.S: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S: Likewise.
	* sysdeps/unix/sysv/linux/xstatconv.c: Likewise.
	* sysdeps/unix/sysv/linux/if_index.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c: Likewise.
	* sysdeps/unix/sysv/linux/ifaddrs.c: Likewise.
2007-08-13 18:33:31 +00:00
Ulrich Drepper d369ad760d [BZ #2226]
2006-02-12  Ulrich Drepper  <drepper@redhat.com>
	* io/ftw.c: Start using *at functions.
	* io/ftw64.c: Likewise.

	* sysdeps/generic/not-cancel.h: Define openat_not_cancel,
	openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
	* sysdeps/unix/sysv/linux/not-cancel.h: Likewise.

	* sysdeps/unix/sysv/linux/openat.c: Create separate _nocancel
	functions.

	* io/fxstatat.c: Add __fxstatat alias.
	* sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Likewise.
	* sysdeps/unix/sysv/linux/fxstatat.c: Likewise.  Add support for
	newfstatat syscall.
	* sysdeps/unix/sysv/linux/i386/fxstatat.c: Add __fxstatat alias.
	Add support for fstatat64 syscall.
	* include/sys/stat.h: Declare __fxstatat.
	* io/fxstatat64.c: Add __fxstatat64 alias.
	* sysdeps/unix/sysv/linux/fxstatat64.c: Add support for fstatat64
	syscall.

	* dirent/fdopendir.c: Add __fdopendir alias.
	* sysdeps/unix/fdopendir.c: Likewise.
	* sysdeps/mach/hurd/fdopendir.c: Likewise.
	* include/dirent.h: Add __fdopendir declaration.

	[BZ #2226]
	* libio/wgenops.c (_IO_wsetb): Use correct size of wide char
	buffer in FREE_BUF call.
2006-02-12 21:41:44 +00:00
Roland McGrath d224299090 * sysdeps/unix/sysv/linux/i386/fxstatat.c [XSTAT_IS_STAT64]
(__fxstatat64): Add libc_hidden_ver.
	* sysdeps/unix/sysv/linux/fxstatat.c [XSTAT_IS_STAT64] (__fxstatat64):
	Likewise.

	* sysdeps/sparc/sparc64/jmpbuf-unwind.h: Remove jmpbuf-offsets.h
	include.
2006-02-01 02:22:54 +00:00
Ulrich Drepper 536d1a8d50 * sysdeps/unix/sysv/linux/fxstatat.c [STAT_IS_KERNEL_STAT]
(__fxstatat): Correct handling of invalid vers values.
2006-01-19 06:18:04 +00:00
Ulrich Drepper 26cec518ac * io/Makefile (routines): Add fstatat, fstatat64, fxstatat, fxstatat64,
fchownat, and unlinkat.
	(static-only-routines): Add fstatat and fstatat64.
	(tests): Add tst-unlinkat, tst-fstatat, tst-futimesat, tst-renameat,
	and tst-fchownat.
	* io/Versions [GLIBC_2.4]: Add fchownat, __fxstatat, __fxstatat64,
	and unlinkat.
	* io/fcntl.h: Define AT_FDCWD, AT_SYMLINK_NOFOLLOW, and AT_REMOVEDIR.
	* io/fstatat.c: New file.
	* io/fstatat64.c: New file.
	* io/sys/stat.h: Declare fstatat, fstatat64, __fxstatat, __fxstatat64
	and define fstatat and fstatat64 inline functions.
	* libio/stdio.h: Declare renameat.
	* misc/Makefile (routines): Add futimesat.
	* misc/Versions [GLIBC_2.4]: Add futimesat.
	* posix/unistd.h: Declare fchownat and unlinkat.
	* stdio-common/Makefile (routines): Add renameat.
	* stdio-common/Versions [GLIBC_2.4]: Add renameat.
	* sysdeps/generic/fchownat.c: New file.
	* sysdeps/generic/futimesat.c: New file.
	* sysdeps/generic/fxstatat.c: New file.
	* sysdeps/generic/fxstatat64.c: New file.
	* sysdeps/generic/renameat.c: New file.
	* sysdeps/generic/unlinkat.c: New file.
	* sysdeps/unix/sysv/linux/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/futimesat.c: New file.
	* sysdeps/unix/sysv/linux/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/fxstatat64.c: New file.
	* sysdeps/unix/sysv/linux/renameat.c: New file.
	* sysdeps/unix/sysv/linux/unlinkat.c: New file.
	* sysdeps/unix/sysv/linux/alpha/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/i386/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/i386/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/m68k/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/m68k/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/powerpc/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/s390/s390-32/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/sh/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/sh/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc64/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/fxstatat64.c: New file.
	* time/sys/time.h: Declare futimesat.
	* include/fcntl.h: Declare __atfct_seterrno.
	* sysdeps/unix/sysv/linux/openat.c (__atfct_seterrno): New function.
	Split out from openat code and called.
	(do_test): Allow openat to fail with ENOSYS.  Handle AT_FDCWD.
	* sysdeps/generic/openat.c: Handle AT_FDCWD.
	* sysdeps/generic/openat64.c: Likewise.
	* io/tst-unlinkat.c: New file.
	* io/tst-fstatat.c: New file.
	* io/tst-futimesat.c: New file.
	* io/tst-renameat.c: New file.
	* io/tst-fchownat.c: New file.
	* io/tst-openat.c: Don't fail if openat is not implemented.

	* sysdeps/unix/sysv/linux/powerpc/chown.c: Don't provide backward
	compatibility code if new kernel is guaranteed.

	* time/sys/time.h: Add a few nonnull attributes.
2005-11-11 20:02:07 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00