Sync with gnulib 3fb6e360363744462ce15c381f0b116c6fc4ce82.
src/filemanager/mountlist.c: remove dependency on libmount.
Parse /proc/self/mountinfo directly, rather than depending on libmount,
which has many dependencies due to its dependence on libselinux, as
detailed at:
http://lists.gnu.org/archive/html/bug-gnulib/2015-01/msg00063.html.
Note we restrict this to __linux__ as that's probably where this
interface will remain. If ever porting, it would be best to first pull
the makedev() wrapper from coreutils to a gnulib module.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
mountlist: use /proc/self/mountinfo when available
Use libmount to propagate device IDs provided by Linux in
/proc/self/mountinfo. This will give more accurate output when using df
in chroot'ed environments as the device IDs are not determined by stat()
which may be inaccurate within the chroot.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Do not classify a bind-mounted dir entry as "dummy".
* m4.include/ls-mntd-fs.m4: Check for hasmntopt() on platforms with
1-argument getmntent() (instead of assuming absence).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
For upload English hint-file to transifex, type:
cd doc/hints/po && make to-transifex
For download translation from Transifex type:
cd doc/hints/po && make from-transifex && \
git add ../l10n/mc.hints.* && \
git commit -s -m 'Update hints files from Transifex'
WARNING! For the functionality you should have installed 'tx' and 'po4a'
utilities. These utilities isn't required for compile and install mc
(you may install these utilities only if you want to interact with Transifex).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
...if --with-ncurses-inc and --with-ncurses-libs options are used.
m4.include/mc-with-screen-ncurses.m4: clarify usage of LDFLAGS in
ncurses library checking: add $ac_curses_lib_path.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
In
tests/lib/mcconfig/Makefile.am
tests/lib/vfs/Makefile.am
tests/src/filemanager/Makefile.am
AM_LDFLAGS = -Wl,-z,muldefs
is used, but on cygwin the linker does not accept the "-z" option and
AM_LDFLAGS = -Wl,--allow-multiple-definition
is required instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Avoid needless check on GNU/Linux.
* m4.include/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Omit STAT_STATFS3_OSF1 check
on GNU/Linux systems, since it can't possibly work.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
fs usage: fix block size returned on older Linux 2.6.
* src/filemanager/mountlist.c: Fall back to (struct statfs).f_frsize
which is available since Linux 2.6.
* m4.include/fsusage.m4 (STAT_STATFS2_FRSIZE): Always define
when the member is available so it can be used as a fallback.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Sync with gnulib c25bdbae48977a527dff69150f59fb0746d31b51:
fs usage: check for GNU/Linux statvfs problem dynamically.
* src/filemanager/mountlist.c [STAT_STATVFS && __linux__ && (__GLIBC__||__UCLIBC__)]:
Define STAT_STATFS2_BSIZE too, since in this case the code now
checks dynamically whether statvfs is reliable, falling back on
Linux-style statfs otherwise.
(statvfs_works): New function, for dynamically testing statvfs.
(get_fs_usage) [STAT_STATVFS]: Use it.
* src/filemanager/filegui.c (filegui__check_attrs_on_fs): apply the same
statvfs_works function.
* m4.include/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Remove static check for
statvfs on GNU/Linux hosts, since it's now done dynamically.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Before the patch default ./configure led to configure crash:
checking for LIBSSH... no
configure: error: libssh2 >= 1.2.5 library not found
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
src/filemanager/filegui.c does not compile on Solaris due to missing macros.
AVE_STRUCT_STATVFS_F_BASETYPE and HAVE_STRUCT_STATVFS_F_FSTYPENAME macros
are not set or even defined in config.h. configure scrips does not even
check for those members.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Before the patch ./configure --help shown:
--enable-background Support for background file operations [[yes]]
After the patch:
--enable-background Support for background file operations [yes]
Changed whitespace: converted tabs to spaces.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* moved from lib/vfs/mc-vfs to lib/vfs;
* split by directories for VFS-plugins and moved to src/vfs;
* lib/vfs/vfs-impl.h was merged into lib/vfs/vfs.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
lib/vfs/mc-vfs/samba/configure can't set the value of SAMBA_CFLAGS
in lib/vfs/mc-vfs/Makefile.am.
The solution: to avoid configuration code duplication, use environment
variables SMBCONFIGDIR and SMBCODEPAGEDIR to set up values of configdir
and codepagedir variables in lib/vfs/mc-vfs/samba/Makefile because
samba configure is child process of main configure.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Don't mix GLib and GModule compiler and linker options.
Use gmodule-no-export if present to avoid use -Wl,--export-dynamic
option with some linkers. If gmodule-no-export is not available,
use generic gmodule.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* m4: AC_CONFIG_SUBDIRS() macros should be always called without relation to enable/disable samba support
* vfs/samba: configure.ac: renamed --with-configdir to --with-smb-configdir
* vfs/samba: configure.ac: renamed --with-codepagedir to --with-smb-codepagedir
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Removed mcserver and mcfs support.
Reasons:
(1) no longer builds
(2) no one is willing to support it
(3) possibly contains unfixed security holes
(4) makes no sense in view of the availability of FISH
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* split m4.include/mc-with-screen.m4 file in two files: mc-with-screen-slang.m4 and mc-with-screen.m4
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
We have several AC_TRY_RUN's in the configure/m4 stuff,
which obviously breaks crosscompiling.
This changeset contain fixies for S-Lang library. First try to search
library via 'pkg-config slang' and then try to go in old search way.
Macro AC_TRY_RUN() now replaced by AC_RUN_IFELSE()
Also, next changes was made:
* Removed AC_TRY_RUN() from gmodule checking code.
* More accuracy in grepping of SLANG_VERSION defined constant
* avoid autoconf error 'suspicious presence of an AC_DEFINE in the second argument, where no actions should be taken'
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
configure: line 2188: 0: command not found
This error occurs due to incorrect processing of grep command output.
This commit fixed that issue.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
We have a problem with the current mc-x.y.z-preW versioning scheme for
both Redhat and Debian. The problem is that
(1) mc-1:4.7.0-1.fc12.x86_64
(2) mc-1:4.7.0.pre4.231.g8cfffc5-1.fc12.x86_64
(1) is considered to be older than (2)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
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>