Commit Graph

182 Commits

Author SHA1 Message Date
Andrew Borodin fe89441f3d gl_POSIX_FALLOCATE: rename to POSIX_FALLOCATE.
Remove the gl_ prefix because this macro isn't from Gnulib.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:23 +03:00
Florian Weimer b7e4fb9ef6 Ticket #4438: autoconf: fix C99 compatibility issue in mc_GET_FS_INFO check.
Include <fcntl.h> for the declaration of posix_fallocate.  This
avoids an implicit function declaration and build issues with future
compilers.

Signed-off-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:23 +03:00
Kian-Meng Ang 5001232704 Fix various typos in the source code (closes MidnightCommander/mc#177).
Found via `codespell -S
po,doc,./misc/syntax,./src/vfs/extfs/helpers/README.it -L
parm,rouge,sav,ect,vie,te,dum,clen,wee,dynamc,childs,ths,fo,nin,unx,nd,iif,iterm,ser,makrs,wil`

Co-authored-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Kian-Meng Ang <kianmeng@cpan.org>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2023-01-28 21:38:05 +03:00
Andrew Borodin b69168cfb5 Ticket #4420: fail to build with only SFTP network VFS enabled.
* m4.include/mc-vfs.m4: use $enable_vfs_sftp to test functions
    required for network VFSes. Define ENABLE_VFS_NET preprocessor
    macro here...
  * lib/vfs/vfs.h: ...not here.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-12-30 08:08:47 +03:00
Andrew Borodin 39e7a048f7 tests/lib/strutil/filevercmp.c: minor improvements.
Use ck_assert_int_lt() and ck_assert_int_gt() to check integer values.

Increase minimal version of Check up to 0.9.10.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin 62d2580302 Reimplement compiler options checking. 2021-11-21 15:00:39 +03:00
Andrew Borodin 89d8fa4ac1 Ticket #1: remove SMB suport.
The mc's built-in samba library which is used to access data across
smb links is taken from an old samba version.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-09-26 10:03:49 +03:00
Andrew Borodin b0450a1e18 Ticket #4259: SFTPFS VFS: verify server fingerprint (CVE-2021-36370).
This vulnerability was discovered by AUT-milCERT during an audit of open
source software.

Initial changeset: set minimal version of libssh2 to 1.2.8.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-07-26 20:33:48 +03:00
Andrew Borodin 4ed3e4b0f6 Sync with gnulib 80a344e3237b878734295cbe696b7f1e4a8541f0.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-06-20 15:14:56 +03:00
Andrew Borodin 5fc84f2cfe m4.include/mc-subshell.m4: minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-06-20 15:14:55 +03:00
Andrew Borodin 0a26014ca4 m4.include/mc-with-screen-slang.m4: check S-Lang using pkg-config only.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-06-20 15:14:55 +03:00
Andrew Borodin 3b16728742 Rename DISTR_VERSION macro to MAN_VERSION.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-04-11 16:58:31 +03:00
Andrew Borodin 30480df7c9 Rename version.h to mc-version.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-04-11 16:58:31 +03:00
Andreas Mohr 1409eddde3 Ticket #3603: configure.ac: proper AC_INIT and AM_INIT_AUTOMAKE usage.
Fix deprecate warning
configure.ac:13: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:13: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation

Support of m4_esyscmd_s() since autoconf-2.64 (release 2009-07-26).

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-28 19:37:58 +03:00
Andrew Borodin 63d50df5d9 Ticket #4217: remove OS/distro-specific stuff.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-21 20:30:30 +03:00
Andrew Borodin f5b813a0ab undelfs simplifications.
m4.include/vfs/mc-vfs-undelfs.m4: simplify test of required libraries.
Don't test Linux kernel specific header.

src/vfs/undelfs/undelfs.c: don't include Linux kernel specific header.
Use headers from ext2fs library only.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin 6af68462dd Sync with gnulib 1b357ec51ac32ebc6262373a354ffd33e5bba8c0.
Remove some of the support for obsolete IRIX 4 and 5.

* m4.include/gnulib/mountlist.m4 (AC_FUNC_GETMNTENT): Don't test for
getmntent in libsun.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin d640a1630a m4.include/gnulib/stat-size.m4: shorten https://lists.gnu.org/archive/html/... link.
Sync with gnulib 2a3dbe99a2aeb058ecb033d7d830e6600e16c91c.

/archive/html/ part can be replace with /r/.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:37:41 +03:00
Andrew Borodin b0dba0a2b5 m4.include/gnulib/fsusage.m4: produce more regular configure output.
Sync with gnulib 875dff5812cb9de949727e1aa399a06b07a886a9.

Remove AC_MSG_CHECKING without corresponding AC_MSG_RESULT.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin d21c5946ce Sync with gnulib 85d1d48f6fa89de6a5de9e7794bda3255f0f32aa.
Fix quoting of AC_LANG_PROGRAM arguments.

* m4.include/gnulib//mountlist.m4 (gl_MOUNTLIST): Quote the
AC_LANG_PROGRAM arguments through [[...]].

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin e14d44c839 Ticket #3847: chattr command implementattion.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-05-05 19:06:18 +03:00
Andrew Borodin 91688ab76e Ticket #4052: reimplement SIGWINCH handling.
Bump minimum GLib requirenment to 2.30.0.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-02-08 19:35:36 +03:00
Andrew Borodin dd8c827987 Replace [] in AS_HELP_STRING.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Sergei Trofimovich f30e6ff283 Ticket #3629: configure.ac: drop bundled gettext
Bundled libintl did not support linking to internal static
libraries (libmc in our case): directly specified static
libraries are not pulled by libtool and are not usable for
dynamic libraries as PIC-related flags are not passed for
compilation.

This renders bundled libintl library unusable.

The change drops libintl bundling support and always relies
on external libintl (or falls back to disabled NLS).

On a related note gettext-0.20 drops support for bundling
or libintl and this change will ease migration to newer version.

The change is tested on x86_64-gentoo-linux-musl: mc builds
and links all tests successfully. A few tests fail for lack
of NLS support.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-22 13:10:46 +03:00
Andrew Borodin 76a5f70f5b Ticket #3992: improve support of Windows 1251 encoding on Solaris.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-07-13 08:58:27 +03:00
Andrew Borodin 4f06ba9346 Ticket #3971: clarify sighandler_t usage in non-GNU OSes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 09:38:53 +03:00
Andrew Borodin 8388de9b50 m4.include/mc-tests.m4: fix bash-isms.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin dc999a23eb (mc_AC_GET_FS_INFO): rename to mc_GET_FS_INFO...
since it is not from Autoconf.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:01 +03:00
Andrew Borodin 392a9b6f92 Sync with gnulib 5d6ca1aeeb04b9b0cd760529d548ac26675ef9b9.
Merge m4.include/gnuluib/{mountlist,ls-mntd-fs}.m4 files.
Remove m4.include/gnuluib/ls-mntd-fs.m4.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:01 +03:00
Andrew Borodin 1c621d1a86 Sync with gnulib a3d1c7849936e481ae10dea5312a36a448a5d5bf.
src/filemanager/mountlist.c: use Linux code on Android.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin 5505ed054d Sync with gnulib 248cb6a2499ffa5a9e652d05e61c4a959fbae605.
src/filemanager/mountlist.c: port better to Android.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andreas Mohr a4e9e6191a autoconf: remove obsolete ac_onceonly.m4 file
Mininum requirement is autoconf 2.60
This file is only needed for autoconf <= 2.59

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andreas Mohr 217fd64afd autoconf: AC_TRY_LINK is obsolete, use AC_LINK_IFELSE instead.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andreas Mohr 8e12753bfc autoconf: AC_ERROR is obsolete, use AC_MSG_ERROR instead.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin 9c6a8e6c24 Sync with gnulib 844f63f9576ebb74fde62e5017bf838c69db22c4.
* m4.include/gnulib/ls-mntd-fs.m4: Require Autoconf >= 2.60. Update
comments.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin 03e69e1f36 Sync with gnulib 1ff0e9684bb83a8277ffe22ac125ce7e90f6702b.
mountlist: Remove support for Cray with UNICOS 9.

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

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin 93f790dc7c Sync with gnulib e96dcbcbc5142bd04c6c2e9e4595d9bea910fb3b.
* m4.include/gnulib/fsusage.m4: (gl_FILE_SYSTEM_USAGE): Don't define
  STAT_STATFS2_FS_DATA.
* m4.include/gnulib/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't
  define MOUNTED_GETMNT.
* src/filemanager/filegui.c: remove Ultrix related includes.
* src/filemanager/mountlist.c: Remove STAT_STATFS2_FS_DATA case.
  Remove MOUNTED_GETMNT case.
* lib/tty/tty-internal.h: remove Ultrix-related define.
* src/vfs/smbfs/helpers/include/includes.h: Likewize
* doc/FAQ: Update OS list.
* doc/INSTALL: Likewize.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin 654b58d2b5 Sync with gnulib 23671eec22f5221a2dff50942f24c41bcf9caeaf.
fsusage, mountlist: Remove support for Dynix/ptx.

* m4.include/gnulib/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments.
* m4.include/gnulib/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Don't test for
  libseq.
  (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't test for MNTTABNAME.
* lib/stat-size.h: Don't mention the Sequent bug.
* src/filemanager/mountlist.c: Don't test for MNTTABNAME. Remove
  _SEQUENT_ case

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin 0f3d0ea511 Sync with gnulib 8ae091f7c8cd35cc7dff82c544d04da6fd095e11.
Remove support for AIX 3.

* m4.include/gnulib/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Update comments.
* src/filemanager/mountlist.c: Likewise.
* doc/FAQ: Update OS list.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin 792d25a48b Sync with gnulib 4d4877e6c2123c4862c321f3eab28a55bf886216.
Remove support for AIX PS/2.

* m4.include/gnulib/fsusage.m4: (gl_PREREQ_FSUSAGE_EXTRA): Don't check
  for dustat.h.
* lib/unixcompat.h: Remove code for AIX PS/2.
* lib/stat-size.h (ST_NBLOCKSIZE): Likewise.
* lib/vfs/vfs.c: Likewise.
* src/filemanager/mountlist.c: Likewise.
* src/vfs/smbfs/helpers/include/includes.h: Likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
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