changeset 48283:249d1888e9d8

parsers: don't ask about the exec bit on platforms that don't have it Otherwise the compiler gets quite sad. Differential Revision: https://phab.mercurial-scm.org/D11711
author Raphaël Gomès <rgomes@octobus.net>
date Wed, 20 Oct 2021 18:05:16 +0200
parents fd3d4b7f8e62
children 126feb805247
files mercurial/cext/parsers.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cext/parsers.c	Tue Oct 19 18:06:07 2021 -0700
+++ b/mercurial/cext/parsers.c	Wed Oct 20 18:05:16 2021 +0200
@@ -260,11 +260,16 @@
 {
 	int flags = self->flags;
 	int mode = dirstate_item_c_v1_mode(self);
+#ifdef S_IXUSR
+	/* This is for platforms with an exec bit */
 	if ((mode & S_IXUSR) != 0) {
 		flags |= dirstate_flag_mode_exec_perm;
 	} else {
 		flags &= ~dirstate_flag_mode_exec_perm;
 	}
+#else
+	flags &= ~dirstate_flag_mode_exec_perm;
+#endif
 	if (S_ISLNK(mode)) {
 		flags |= dirstate_flag_mode_is_symlink;
 	} else {