When using slang, 'configure' prints blank in the "Screen library" name:
...
File system: Midnight Commander Virtual Filesystem
cpio, extfs, fish, ftp, sfs, sftp, smb, tar
Screen library:
Mouse support: gpm and xterm
X11 events support: yes
...
This occurs when slang is found using pkg-config (as opposed to explicit path
search). The patch fixes this by moving the 'screen_msg' assignment one level
up, to the controlling function (mc_WITH_SLANG) so that it's effective for
however method the library was found.
The problem was mentioned on our mailing list:
https://mail.gnome.org/archives/mc-devel/2016-March/msg00021.html
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
m4.include/stat-size.m4, lib/stat-size.h: get these files from Gnulib.
src/filemanager/ioblksize.h: get this file from Coreutils.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
On systems where 'mode_t' is smaller than 'int', doing 'va_arg (ap, mode_t)' is
wrong because of C's "default argument promotions". GCC 4 creates crashing code
in this case.
The "va_arg" page of Gnulib's manual describes the problem and a simple solution:
https://www.gnu.org/software/gnulib/manual/html_node/va_005farg.html
However, since that solution reportedly (see thread at next link) still causes
GCC to print warnings (for no good reason; perhaps this was fixed in newer
GCCs), we pick a solution that defines a PROMOTED_MODE_T at the configuration
stage:
https://lists.gnu.org/archive/html/bug-gnulib/2009-05/msg00231.html
(We take our 'mode_t.m4' from the most recent Gnulib source.)
(If any of the URLs above no longer works, simply search the web for the
mentioned words.)
Macros get from other projects keep their original names:
gl_FSTYPENAME, AX_PATH_LIB_PCRE, etc.
Macros initially writtem for MC have original names with prefix mc_:
mc_VERSION, mc_CHECK_GLIB, etc
Macros get from other projects and modified for MC keep their
original names with prefix mc_:
mc_cu_PREREQ_STAT_PROG, mc_AC_GET_FS_INFO.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Introduce -Wswitch-default check.
Some minor cosmetics.
Thanks Andreas Mohr <and at gmx dot li> for original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
With clang invalid cflags usage result in exit 0, we expect exit 1.
$ clang -c -Wmaybe-uninitialized conftest.c ; echo $?
warning: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Wunknown-warning-option]
1 warning generated.
0
solution with -Werror on cflags check
$ clang -c -Werror -Wmaybe-uninitialized conftest.c ; echo $?
error: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Werror,-Wunknown-warning-option]
1
(Tested with clang 3.6.)
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
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>