diff options
author | Josh Stone <jistone@redhat.com> | 2015-10-09 10:10:37 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2015-10-09 10:10:37 -0700 |
commit | 3425454a10d307fae891fb667cf7969e945cde79 (patch) | |
tree | ba30fbaff59ca353f4dad8759770600853fb00c1 /libdw | |
parent | f17d101232d6d40e192e61441aa02a12ee8cf9b8 (diff) | |
download | elfutils-3425454a10d307fae891fb667cf7969e945cde79.tar.gz |
Trust AC_SYS_LARGEFILE to provide large file support
AC_SYS_LARGEFILE defines _FILE_OFFSET_BITS in config.h if needed for
LFS, and this automatically maps things like open to open64. But quite
a few places used explicit 64-bit names, which won't work on platforms
like FreeBSD where off_t is always 64-bit and there are no foo64 names.
It's better to just trust that AC_SYS_LARGEFILE is doing it correctly.
But we can verify this too, as some file could easily forget to include
config.h. The new tests/run-lfs-symbols.sh checks all build targets
against lfs-symbols (taken from lintian) to make sure everything was
implicitly mapped to 64-bit variants when _FILE_OFFSET_BITS is set.
Signed-off-by: Josh Stone <jistone@redhat.com>
Diffstat (limited to 'libdw')
-rw-r--r-- | libdw/ChangeLog | 5 | ||||
-rw-r--r-- | libdw/dwarf_begin.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index efe6ccb8..39c49aa4 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,8 @@ +2015-10-09 Josh Stone <jistone@redhat.com> + + * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat + and fstat. + 2015-10-05 Josh Stone <jistone@redhat.com> * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers. diff --git a/libdw/dwarf_begin.c b/libdw/dwarf_begin.c index d04e5b9f..19d16e5c 100644 --- a/libdw/dwarf_begin.c +++ b/libdw/dwarf_begin.c @@ -73,9 +73,9 @@ dwarf_begin (int fd, Dwarf_Cmd cmd) if (elf == NULL) { /* Test why the `elf_begin" call failed. */ - struct stat64 st; + struct stat st; - if (fstat64 (fd, &st) == 0 && ! S_ISREG (st.st_mode)) + if (fstat (fd, &st) == 0 && ! S_ISREG (st.st_mode)) __libdw_seterrno (DWARF_E_NO_REGFILE); else if (errno == EBADF) __libdw_seterrno (DWARF_E_INVALID_FILE); |