On Fri, Jan 17, 2003 at 06:03:35PM -0500, John Wehle wrote:
> wine ie5setup reports it can't determine the free disk space.
> truss shows statfs failed with EOVERFLOW and sys/statfs.h
> says:
>
> * Structure returned by statfs(2) and fstatfs(2).
> * This structure and associated system calls have been replaced
> * by statvfs(2) and fstatvfs(2) and will be removed from the system
> * in a near-future release.
>
> This patch allows wine ie5setup to at least startup. A cleaner
> patch would probably use an explict autoconf check for statvfs
> in addition to checking for sys/vfs.h.
>
> ChangeLog:
>
> Fri Jan 17 18:02:37 EST 2003 John Wehle (john(a)feith.com)
>
> * files/drive.c (DRIVE_GetFreeSpace): Use statvfs
> on systems which have sys/vfs.h.
This will break on Linux, it has have sys/vfs.h but no statvfs.
Better use an autoconf check for the 'statvfs' function and use the result.
> + #ifdef HAVE_SYS_VFS_H
Use #ifdef HAVE_STATVFS
> + struct statvfs info;
> + #else
> struct statfs info;
> + #endif
> *** 1297,1305 ****
> return 0;
> }
>
> ! /* FIXME: add autoconf check for this */
> ! #if defined(__svr4__) || defined(_SCO_DS) || defined(__sun)
> ! if (statfs( DOSDrives[drive].root, &info, 0, 0) < 0)
> #else
> if (statfs( DOSDrives[drive].root, &info) < 0)
> #endif
> --- 1301,1308 ----
> return 0;
> }
>
> ! #ifdef HAVE_SYS_VFS_H
Dito.
> ! if (statvfs( DOSDrives[drive].root, &info) < 0)
> #else
Ciao, Marcus