Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condition on USE_STATVFS in src/filemanager/filegui.c desynchronized with one in m4.include/mc-get-fs-info.m4 #4664

Open
2 tasks done
wjaguar opened this issue Mar 6, 2025 · 4 comments
Labels
prio: medium Has the potential to affect progress state: in review If not using PRs: associated branch is being reviewed ver: 4.8.27 Reproducible in version 4.8.27
Milestone

Comments

@wjaguar
Copy link

wjaguar commented Mar 6, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Midnight Commander version

GNU Midnight Commander 4.8.27
Built with GLib 2.70.3
Built with S-Lang 2.3.2 with terminfo database
With builtin Editor and Aspell support
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
With ext2fs attributes support
Virtual File Systems:
 cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish, smbfs
Data types:
 char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

Operating system

Slackware 15

Is this issue reproducible using the latest version of Midnight Commander?

  • I confirm the issue is still reproducible with the latest version of Midnight Commander

Current behavior

The conditions in configure script do not match the conditions in the corresponding C code.
Despite the comment in coreutils clearly saying:
"/* Keep this conditional in sync with the similar conditional in
../m4/stat-prog.m4. */"
The failure to follow that advice means, that some setups can fall in the crack, with neither USE_STATVFS nor !USE_STATVFS working.

Expected behavior

The code in filegui.c need be updated to match what is currently in coreutils' stat.c :

/* Keep this conditional in sync with the similar conditional in
   m4.include/mc-get-fs-info.m4  */
#if ((STAT_STATVFS || STAT_STATVFS64)                                       \
     && (HAVE_STRUCT_STATVFS_F_BASETYPE || HAVE_STRUCT_STATVFS_F_FSTYPENAME \
         || (! HAVE_STRUCT_STATFS_F_FSTYPENAME && HAVE_STRUCT_STATVFS_F_TYPE)))
# define USE_STATVFS 1
#else
# define USE_STATVFS 0
#endif

Additional context

No response

@wjaguar wjaguar added needs triage Needs triage by maintainers prio: medium Has the potential to affect progress labels Mar 6, 2025
@zyv zyv added the ver: 4.8.27 Reproducible in version 4.8.27 label Mar 6, 2025
@github-actions github-actions bot added this to the Future Releases milestone Mar 6, 2025
@zyv
Copy link
Member

zyv commented Mar 6, 2025

"uname -a" does not tell you the distro and version, BTW.

Mostly I want to know the kernel version and architecture, which is what uname -a is for. Distribution and release can usually be deduced from this if needed for most common distributions. "Slackware 15" does not reveal the architecture, which is often relevant.

Do not be cute. [...] The problem YOU are experiencing [...] where you lifted it all from [...]

I would like to ask you to change your tone to a more friendly and relaxed one. I'm working on this project for fun, and I'm not enjoying this interaction.

@wjaguar

This comment was marked as abuse.

@mc-worker

This comment has been minimized.

@zyv
Copy link
Member

zyv commented Mar 7, 2025

@aborodin, can we maybe just move it to mc-get-fs-info.m4 and mention where this logic comes from? The comment is gone in the current master as far as I can see.

aborodin added a commit that referenced this issue Mar 9, 2025
 * src/filemanager/filegui.c: sync with coreutils: use
   HAVE_STRUCT_STATVFS_F_TYPE to define USE_STATVFS. Restore conmment.
 * m4.include: restore comment. Don't test struct statvfs.f_namemax:
   mc doesn't use it.

Signed-off-by: Andrew Borodin <[email protected]>
@mc-worker mc-worker added state: in review If not using PRs: associated branch is being reviewed and removed needs triage Needs triage by maintainers labels Mar 9, 2025
@mc-worker mc-worker modified the milestones: Future Releases, 4.8.34 Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio: medium Has the potential to affect progress state: in review If not using PRs: associated branch is being reviewed ver: 4.8.27 Reproducible in version 4.8.27
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants