This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/4] generic/wordsize-32: don't duplicate stat syscalls if not needed


Modern 32-bit architectures introduce stat and statfs structures layouts
identical to 64-bit versions. It means there's no difference between
corresponding syscalls and their 64-bit versions. But for generic/wordsize-32
glibc generates both 32- and 64-bit functions. Under sysdeps/unix/sysv/linux
it's controlled by XSTAT_IS_XSTAT64, namely if it's enabled 32-bit syscalls are
aliased to 64-bit ones. 

This series does the same for generic/wordsize-32. Patches 1-3 are generic and
may be applied in common tree. Patch 4 is for referrence. It's part of aarch64/ilp32
series, and here to demonstrate how modern ports will work with this series.

The whole aarc64/ilp32 series with this patches is here:
https://github.com/norov/glibc/tree/glibc-stat2
https://github.com/norov/linux/tree/linux-stat

Yury Norov (4):
  generic/wordsize-32: don't duplicate lxstat, xstat if XSTAT_IS_XSTAT64
    is enabled
  generic/wordsize-32: don't duplicate statfs syscalls if not needed
  generic/wordsize-32: don't duplicate fxstat syscall family if not
    needed
  [AARCH64] ILP32: stat syscalls

 sysdeps/unix/sysv/linux/aarch64/bits/stat.h        | 166 +++++++++++++++++++++
 .../unix/sysv/linux/aarch64/ilp32/kernel_stat.h    |   2 +
 sysdeps/unix/sysv/linux/fstatfs64.c                |   9 ++
 sysdeps/unix/sysv/linux/generic/bits/statfs.h      |  16 +-
 .../unix/sysv/linux/generic/wordsize-32/fstatfs.c  |   2 +
 .../unix/sysv/linux/generic/wordsize-32/fxstat.c   |   2 +
 .../unix/sysv/linux/generic/wordsize-32/fxstat64.c |  31 ++++
 .../unix/sysv/linux/generic/wordsize-32/fxstatat.c |   2 +
 .../sysv/linux/generic/wordsize-32/fxstatat64.c    |  30 ++++
 .../unix/sysv/linux/generic/wordsize-32/lxstat.c   |   2 +
 .../unix/sysv/linux/generic/wordsize-32/lxstat64.c |   7 +
 .../unix/sysv/linux/generic/wordsize-32/statfs.c   |   2 +
 .../unix/sysv/linux/generic/wordsize-32/xstat.c    |   2 +
 .../unix/sysv/linux/generic/wordsize-32/xstat64.c  |   7 +
 sysdeps/unix/sysv/linux/statfs64.c                 |  11 +-
 15 files changed, 289 insertions(+), 2 deletions(-)
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/bits/stat.h
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/kernel_stat.h
 create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat64.c
 create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat64.c

-- 
2.7.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]