mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* configure.ac: Determine the size of long',
long long' and
off_t. * vfs/fish.c (fish_linear_start): Use strtol() or strtoll() to retrieve the size of the file being retrieved.
This commit is contained in:
parent
f6a49ff8e3
commit
56eccaadb4
@ -1,3 +1,8 @@
|
||||
2007-10-11 Pavel Tsekov <ptsekov@gmx.net>
|
||||
|
||||
* configure.ac: Determine the size of `long', `long long' and
|
||||
off_t.
|
||||
|
||||
2007-09-26 Pavel Tsekov <ptsekov@gmx.net>
|
||||
|
||||
* NEWS: Revert last change - it is invalid.
|
||||
|
@ -222,8 +222,11 @@ dnl
|
||||
dnl Missing typedefs and replacements
|
||||
dnl
|
||||
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AC_TYPE_MODE_T
|
||||
AC_CHECK_TYPE(off_t, long)
|
||||
AC_TYPE_OFF_T
|
||||
AC_CHECK_SIZEOF(off_t)
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_UID_T
|
||||
AC_CHECK_TYPE(nlink_t, unsigned int)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-10-11 Pavel Tsekov <ptsekov@gmx.net>
|
||||
|
||||
* fish.c (fish_linear_start): Use strtol() or strtoll() to retrieve
|
||||
the size of the file being retrieved.
|
||||
|
||||
2007-09-24 Andrew Borodin <aborodin@vmail.ru>
|
||||
|
||||
* direntry.c (vfs_s_free_super): Remove redundant code.
|
||||
|
@ -633,11 +633,13 @@ fish_linear_start (struct vfs_class *me, struct vfs_s_fh *fh, off_t offset)
|
||||
if (offset != PRELIM) ERRNOR (E_REMOTE, 0);
|
||||
fh->linear = LS_LINEAR_OPEN;
|
||||
fh->u.fish.got = 0;
|
||||
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 || (defined _LARGE_FILES && _LARGE_FILES)
|
||||
if (sscanf( reply_str, "%llu", &fh->u.fish.total )!=1)
|
||||
errno = 0;
|
||||
#if SIZEOF_OFF_T == SIZEOF_LONG
|
||||
fh->u.fish.total = strtol (reply_str, NULL, 10);
|
||||
#else
|
||||
if (sscanf( reply_str, "%u", &fh->u.fish.total )!=1)
|
||||
fh->u.fish.total = strtoll (reply_str, NULL, 10);
|
||||
#endif
|
||||
if (errno != 0)
|
||||
ERRNOR (E_REMOTE, 0);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user