Ticket #1642: filegui.c contains Linux-specific things
commit1551db2f9fa3ff6a9f7558aff8846d14b49c54c5
authorsfionov <fionov@gmail.com>
Mon, 19 Oct 2009 22:22:43 +0000 (20 01:22 +0300)
committerSlava Zanko <slavazanko@gmail.com>
Wed, 28 Oct 2009 08:38:20 +0000 (28 10:38 +0200)
tree98853781dad35703955d6fed787fabe391095e52
parentff860abd7080ae9cd8c22687597ae96fe30635db
Ticket #1642: filegui.c contains Linux-specific things

mc 4.7.0-pre1 introduced dynamic "Save attributes" checkbox value in Copy/Move dialog.
But code is Linux-specific, and not even isolated by macros.

I suggest to add code specific for BSD and SVR4 systems.

In BSD systems (MacOS X, NetBSD, FreeBSD) there is statfs.f_fstypename which contains name of filesystem.
Valid FS names are: msdos, msdosfs (FreeBSD), ntfs, smbfs, procfs, fusefs (BSD), fusefs_subfstype (Mac)

In SVR4 systems (Solaris and other SVR4 Unixes) there are statvfs.f_basetype and statvfs
syscall instead of statfs and also autotools define STAT_STATVFS.
Valid FS names are: pcfs, proc, ntfs, fuse, smbfs

(Note that NetBSD 3.0+ also use statvfs but with BSD syntax.)

For all other OSes we simply return 1.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
m4.include/ac-get-fs-info.m4
src/filegui.c