Commit Graph

118 Commits

Author SHA1 Message Date
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
Andrew Borodin
d5afda1188 Clarify check of C compiler flags.
AC_TRY_COMPILE macro is obsolete. Use AC_COMPILE_IFELSE instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:34 +04:00
Andrew Borodin
dbbfe5d070 Enable -Wunused-but-set-variable flag by default.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:34 +04:00
Sergei Trofimovich
4b3d88f07c m4.include/mc-cflags.m4: report real compiler in MC_CHECK_ONE_CFLAG instead of 'gcc'
Example use: CC=clang ./configure

Before the patch configure reported 'gcc' is being used:

    checking whether gcc accepts -Wcomment... yes
    checking whether gcc accepts -Wdeclaration-after-statement... yes
    checking whether gcc accepts -Wfloat-equal... yes
    checking whether gcc accepts -Wformat... yes

(config.log used proper ${CC})

After the patch it lies a bit less:

    checking whether clang accepts -Wcomment... yes
    checking whether clang accepts -Wdeclaration-after-statement... yes
    checking whether clang accepts -Wfloat-equal... yes
    checking whether clang accepts -Wformat... yes

Reported-by: Agostino Sarubbo <ago@gentoo.org>
Gentoo-bug: http://bugs.gentoo.org/449752
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2013-01-02 16:22:21 +03:00
Andrew Borodin
17cadc50ec Portability: use g_ascii_strtoll instead of strtoll, atoll and atof.
Set minimal version of GLib up to 2.12 because of g_ascii_strtoll.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Slava Zanko
bc8658b9de Increase version of Check utility to 0.9.8
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-12-20 13:13:40 +03:00
Andrew Borodin
7b184ddea4 PCRE_CFLAGS are CPPFLAGS, actually.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-18 16:27:49 +04:00
Andrew Borodin
f7bc3e5c21 m4.include/mc-with-screen-slang.m4: clarify usage of CPPFLAGS, CFLAGS and LDFLAGS
...in s-lang library checking.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-18 16:27:49 +04:00
Andrew Borodin
49a0b83adf Ticket #2926: fail to check ncurses library
...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>
2012-12-18 16:27:49 +04:00
Andrew Borodin
42499480bd Ticket #2918: cygwin test failure.
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>
2012-11-14 13:32:55 +04:00
Andrew Borodin
3f8e561e17 Tweak sources for --with-x/--without-x option.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
b2f97443e2 Refactoring of subshell support.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-21 18:19:47 +04:00
Andrew Borodin
099052efc7 Sync with gnulib 0a6dafee2bb8f69a931345a1f67d835ee5062967
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>
2012-10-12 11:52:52 +04:00
Andrew Borodin
37873e6df4 Sync with gnulib b1fac377605c0eef8844fc8d3818d360f37d6fa4:
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>
2012-10-12 11:52:52 +04:00
Andrew Borodin
4db9168a93 Ticket #2906: crash on Solaris while trying to copy a file.
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>
2012-10-12 11:52:52 +04:00
Andrew Borodin
c34fdcf946 Reorder checks in configure.ac.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-10 14:29:52 +03:00
Andrew Borodin
d84e462b89 Cleanup of screen library detection m4 code.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-06 13:19:19 +04:00
Andrew Borodin
e3b36c8b3d Ticket #2845: code cleanup before 4.8.4 release.
Sync with gnulib 06b335ade65c8fe60fee8b9e18b670bb54ed924a:

Write "Mac OS X" instead of "MacOS X".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Ilia Maslakov
1d4ca9608a Ticket #2788 (aspell support)
Add aspell support for internal editor.
The aspell library is dinamycally loaded.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-07-12 16:00:45 +04:00
Sergei Trofimovich
bd59cea6ad Ticket #1535: configure: don't fail if 'sftp' support was not requested explicitly
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>
2012-07-05 10:34:30 +03:00
Andrew Borodin
3cf76f69bf Ticket #2825: obtain FS name from stat info: sync with coreutils.
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>
2012-07-02 20:50:19 +04:00
Sergei Trofimovich
b10a3995e8 ./configure: cleanup '--enable-background' option description
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>
2012-06-22 12:51:22 +03:00
Slava Zanko
da03697e84 Ticket #1535: SFTP support
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-06-21 14:29:32 +03:00
Andrew Borodin
c7bde637f9 Tweak background operations support.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:04:57 +03:00
Egmont Koblinger
33bc4cea27 Ticket #2689 (fix fallocate detection for xBSD)
fixed macros 'mc-get-fs-info.m4' for correct 'fallocate' detection under xBSD

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-01-19 16:36:46 +04:00