Commit Graph

142 Commits

Author SHA1 Message Date
Andrew Borodin
610bf3a9d9 Sync with gnulib cbc85bb67fc628349e0351b835efc9e91cd0482f.
fsusage, mountlist: Remove support for DolphinOS (an SVR3 variant).

* m4.include/gnulib/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments.
* src/filemanager/mountlist.c: Remove MOUNTED_GETMNTTBL case.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
00d3b8a468 Sync with gnulib be9e66b37c948df517ee905b4a9689a50946409c.
mountlist: Remove support for SVR2.

* src/filemanager/mountlist.c: Remove MOUNTED_FREAD case.
* m4.include/gnulib/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't
  define MOUNTED_FREAD.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
25a9aa1d45 Sync with gnulib f7a6286e04209da1bc7b1820002b6a5c32638369.
mountlist: Improve support for Solaris in 64-bit mode.

* m4.include/gnulib/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): On
  Solaris 8 or newer, define MOUNTED_GETEXTMNTENT instead of
  MOUNTED_GETMNTENT2.
* src/filemanager/mountlist.c: Add code for MOUNTED_GETEXTMNTENT case.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
6d593567d1 Sync with gnulib d1327df1f1c9bae26571e6699800c8d1c4712afb.
mountlist: Add support for Minix.

* m4.include/gnulib/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't
  use AC_CHECK_FUNCS to check for 'getmntinfo'.
* src/filemanager/mountlist.c: Update comments.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
5cf5a034ae Sync with gnulib fa3e2ad20d10d648cc74a5d320ce531a80ff7b1f.
Make better use of Autoconf.

* m4.include/gnulib/fsusage.m4: Use AC_CACHE_CHECK where possible.
  Modernize indentation.
* m4.include/gnulib/ls-mntd-fs.m4: Likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
849bfb26f8 Sync with gnulib 74c29c68bba3fe7c2f02eb3fc9f7ef196cec1bc6.
mountlist: Modernize platform lists.

* m4.include/gnulib/ls-mntd-fs.m4: Clarify which MOUNTED_* symbol
  applies to which platforms, deemphasizing the obsolete ones.
* src/filemanager/filegui.c: Likewise.
* src/filemanager/mountlist.c: Likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
a7ff88d24c (init_subshell): use openpty() to open master/slave devices for subshell.
Thanks Jesse R. Gorzinski <jgorzins@us.ibm.com> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
3909ef1bc5 m4.include: move Gnulib modules to their own subdirectory.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
7abd640b41 Sync with gnulib 467061a2014d742a27eb8d4498e8d09fb3225d53.
Remove SVR2 support

SVR2 was obsolete by 1986 and is no longer supported by anybody, and its
code was getting in the way of use of this module by Emacs, which has
its own 'read' function anyway.

  * src/filemanager/mountlist.c: remove SVR2-specific code.
  * m4.include/fsusage.m4: do not test for sys/filsys.h or set
  STAT_READ_FILSYS.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
73979369d1 Support __attribute__((fallthrough)) if possible.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:22 +03:00
Andrew Borodin
fcf5ba5be2 Ticket #3857: avoid glibc 2.25 warnings about major(), minor(), and makedev().
See gnulib a512e041120e9012e69afa2f5c3adc196ec4999a:

glibc 2.25 is deprecating the namespace pollution of <sys/types.h>
injecting major(), minor(), and makedev() into the compilation
environment, with a warning that insists that users include
<sys/sysmacros.h> instead.  However, because the expansion of
AC_HEADER_MAJOR didn't bother checking sys/sysmacros.h until after
probing whether sys/types.h pollutes the namespace, it was not defining
MAJOR_IN_SYSMACROS, with the result that code compiled with -Werror
chokes on the deprecation warnings because it was not including
sysmacros.h.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-01-20 10:57:42 +03:00
Jeroen Roovers
bf771dc8a7 Ticket #3880: fail to link to ncurses built as two libraries: ncurses+tinfo.
https://bugs.gentoo.org/527118

When ncurses library is built with --with-termlib option
the resulting installation contains two libraries:

/lib64/libncurses.so.6
/lib64/libncursesw.so.6
/lib64/libtinfo.so.6
/lib64/libtinfow.so.6

As a result mc build fails as:

$ ./configure --with-screen=ncurses
$ make

  CCLD     mc
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld:
./.libs/libinternal.a(tty-ncurses.o): undefined reference to symbol 'meta'
/lib64/libtinfow.so.6: error adding symbols: DSO missing from command line

Patch: https://gitweb.gentoo.org/repo/gentoo.git/tree/app-misc/mc/files/mc-4.8.13-tinfo.patch

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-02 11:48:16 +03:00
Andrew Borodin
d5f4e631c3 Sync with gnulib 3b1faeb2e29b62588709208f97d34c1787777dcb.
* m4.include/ls-mntd-fs.m4: make sure $host and $host_os are defined
when used.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:30 +03:00
Mooffie
4a559344fb Ticket #3708: fix usability problems with --enable-tests
Signed-off-by: Mooffie <mooffie@gmail.com>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-12-27 16:46:38 +04:00
Andrew Borodin
9a39e35dc3 Use g_assert() instead of assert(3).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
1aefd27a2a Sync with gnulib 5159ac54e0c73df4432a681e2e267df4ffcc04e4.
Simplify "configure: checking ..." messages.

  * m4.include/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update copyright
years. Use AC_MSG_CHECKING instead of AC_MSG_NOTICE.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
40b00b5800 Add -Wformat-signedness option.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
ec296b2c9f Clarify text of screen_msg message.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Mooffie
17706ad9f3 Configure summary omits "S-Lang" when used as screen library.
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>
2016-05-07 16:19:02 +03:00
Andrew Borodin
e7c01c7781 Ticket #2193: use Coreutils way to define buffer size to copy file.
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>
2016-04-25 13:12:51 +03:00
Mooffie
0e89375772 Ticket #3617: (mc_open): handle varargs mode_t promotion issue.
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.)
2016-03-28 08:59:14 +03:00
Andrew Borodin
4bd1008a03 Add -Wassign-enum compiler wirning.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:37 +03:00
Andrew Borodin
cca1dd2ac3 Add three new compiler warnings:
Wconditional-uninitialized
Wfloat-conversion
Wlogical-not-parentheses

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:37 +03:00
Andrew Borodin
0eae2cb8dc Unify m4 macro names.
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>
2016-03-04 09:23:36 +03:00
Andrew Borodin
cc34f778ed rename: m4.include/ac-glib.m4 -> m4.include/mc-glib.m4
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andrew Borodin
d9ad3d2e32 Clarify __attribute ((format (printf))) usage.
Thanks Andreas Mohr <and@gmx.li> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-11-05 14:33:20 +03:00
Andrey Tataranovich
87a1354c32 Ticket #3449: bump minimum glib2 requirement to 2.26.x
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2015-10-20 21:36:28 +02:00
Andreas Mohr
f023a83502 Ticket #3467: add -Wunreachable-code option and fix relative warnings.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:19 +03:00
Andreas Mohr
dd8521b92d Ticket #3466: add -Wpointer-arith option and fix relative warnings.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andreas Mohr
f1b73ffe6e Ticket #3465: add -Wmissing-variable-declarations option...
...and fix relative warnings.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andreas Mohr
d2713adbc6 Ticket #3463: enable -Wbad-function-cast option and fix relative warnings.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andrew Borodin
2789e6e390 Ticket #3431: add missing default cases.
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>
2015-05-03 19:43:50 +03:00
Andreas Mohr
495b4d662f Ticket #3134: fix cflags check when using clang compiler.
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>
2015-05-03 19:43:49 +03:00
Andreas Mohr
850073cbbb Add -Wundef compiler option for future compile checks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:49 +03:00
Andrew Borodin
e3a3424c28 Use #ifdef for autoconf provided marcos (continue).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:49 +03:00
Andreas Mohr
1a5015aa87 Ticket #3429: fix -Wstrict-prototypes compiler warnings...
...and use compiler option for future compile checks.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andreas Mohr
ca95dec659 Ticket #3428: fix -Wredundant-decls compiler warnings...
...and use compiler option for future compile checks.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andreas Mohr
e9b41e5215 Ticket #3427: fix -Wmissing-field-initializers compiler warnings...
...and use compiler option for future compile checks.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andreas Mohr
24f0e19ac6 Ticket #3426: fix -Wmaybe-uninitialized compiler warnings...
...and use compiler option for future compiles.
Since gcc 4.7.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andrew Borodin
5ceb5e2bef Ticket #3441: fix Linux kernel-specific segfault on startup.
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>
2015-05-03 18:45:02 +03:00
Andrew Borodin
1fa8bd3d62 Minimal version of GLib is 2.14.0
...because of g_unichar_ismark().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:20:54 +03:00
Slava Zanko
0eca32a852 Ticket #2309: "Shell patterns" broken beyond repair.
Fix tests execution. Add new test which covers current functionality of glob2regexp.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-02-23 16:31:37 +03:00
Andrew Borodin
12fac096ed Sync with gnulib 3ea43e02541ece750ffc6cd1dfe34195421b4ef3.
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>
2014-12-10 12:57:47 +03:00
Andrew Borodin
a8d46f29d3 Sync with gnulib 6da37d4814fb6d1c61169de4092205a056a04a21.
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>
2014-07-22 13:12:07 +04:00
Andrew Borodin
5260d6612c Ticket #2995: do not link GModule if it is not required (save space on embedded systems).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-08-02 21:53:17 +04:00
Andrew Borodin
45d8b20ad9 --with-edit: rename to --with-internal-edit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-02 15:29:35 +03:00
Veres Lajos
805703523d Misspellings fixes by https://github.com/vlajos/misspell_fixer
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-15 11:10:41 +04:00
Andrew Borodin
e7dc599e42 Use "'" instead of "`" for messages and comments quoting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:03 +03:00
Slava Zanko
1c6d859629 Reorder files in maint/ subdirectory.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-06-03 10:58:14 +03:00
Slava Zanko
389b55ae6f Add the hint-files synchronization with Transifex.
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>
2013-04-02 11:24:16 +03:00