Remove direct _llseek code and require long filesystem libc.
This commit is contained in:
parent
6866f2ba37
commit
3bac4caa2b
4 changed files with 13 additions and 24 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2015-01-22 Felix Janda <felix.janda@posteo.de>
|
||||||
|
|
||||||
|
Remove direct _llseek code and require long filesystem libc.
|
||||||
|
|
||||||
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Remove potential division by 0 in gfxmenu.
|
Remove potential division by 0 in gfxmenu.
|
||||||
|
|
1
INSTALL
1
INSTALL
|
@ -35,6 +35,7 @@ configuring the GRUB.
|
||||||
* GNU binutils 2.9.1.0.23 or later
|
* GNU binutils 2.9.1.0.23 or later
|
||||||
* Flex 2.5.35 or later
|
* Flex 2.5.35 or later
|
||||||
* Other standard GNU/Unix tools
|
* Other standard GNU/Unix tools
|
||||||
|
* a libc with large file support (e.g. glibc 2.1 or later)
|
||||||
|
|
||||||
On GNU/Linux, you also need:
|
On GNU/Linux, you also need:
|
||||||
|
|
||||||
|
|
|
@ -366,6 +366,14 @@ case "$host_os" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case "$host_os" in
|
||||||
|
cygwin | windows* | mingw32* | aros*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_CHECK_SIZEOF(off_t)
|
||||||
|
test x"$ac_cv_sizeof_off_t" = x8 || AC_MSG_ERROR([Large file support is required]);;
|
||||||
|
esac
|
||||||
|
|
||||||
if test x$USE_NLS = xno; then
|
if test x$USE_NLS = xno; then
|
||||||
HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
|
HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -48,11 +48,6 @@
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
# include <sys/ioctl.h> /* ioctl */
|
# include <sys/ioctl.h> /* ioctl */
|
||||||
# include <sys/mount.h>
|
# include <sys/mount.h>
|
||||||
# if !defined(__GLIBC__) || \
|
|
||||||
((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
|
|
||||||
/* Maybe libc doesn't have large file support. */
|
|
||||||
# include <linux/unistd.h> /* _llseek */
|
|
||||||
# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
|
|
||||||
#endif /* __linux__ */
|
#endif /* __linux__ */
|
||||||
|
|
||||||
grub_uint64_t
|
grub_uint64_t
|
||||||
|
@ -79,24 +74,6 @@ grub_util_get_fd_size (grub_util_fd_t fd, const char *name, unsigned *log_secsiz
|
||||||
return st.st_size;
|
return st.st_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__linux__) && (!defined(__GLIBC__) || \
|
|
||||||
((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
|
|
||||||
/* Maybe libc doesn't have large file support. */
|
|
||||||
int
|
|
||||||
grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off)
|
|
||||||
{
|
|
||||||
loff_t offset, result;
|
|
||||||
static int _llseek (uint filedes, ulong hi, ulong lo,
|
|
||||||
loff_t *res, uint wh);
|
|
||||||
_syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo,
|
|
||||||
loff_t *, res, uint, wh);
|
|
||||||
|
|
||||||
offset = (loff_t) off;
|
|
||||||
if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET))
|
|
||||||
return -1;
|
|
||||||
return GRUB_ERR_NONE;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
int
|
int
|
||||||
grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off)
|
grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off)
|
||||||
{
|
{
|
||||||
|
@ -107,7 +84,6 @@ grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Read LEN bytes from FD in BUF. Return less than or equal to zero if an
|
/* Read LEN bytes from FD in BUF. Return less than or equal to zero if an
|
||||||
|
|
Loading…
Reference in a new issue