Patchwork D11712: parsers: don't ask about symlinks on platforms that don't support them

login
register
mail settings
Submitter phabricator
Date Oct. 20, 2021, 5:07 p.m.
Message ID <differential-rev-PHID-DREV-s4wprq4u3uyycuu2q22y-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50036/
State Superseded
Headers show

Comments

phabricator - Oct. 20, 2021, 5:07 p.m.
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Otherwise the compiler gets quite sad.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11712

AFFECTED FILES
  mercurial/cext/parsers.c

CHANGE DETAILS




To: Alphare, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c
--- a/mercurial/cext/parsers.c
+++ b/mercurial/cext/parsers.c
@@ -270,11 +270,16 @@ 
 #else
 	flags &= ~dirstate_flag_mode_exec_perm;
 #endif
+#ifdef S_ISLNK
+	/* This is for plaforms with support for symlinks */
 	if (S_ISLNK(mode)) {
 		flags |= dirstate_flag_mode_is_symlink;
 	} else {
 		flags &= ~dirstate_flag_mode_is_symlink;
 	}
+#else
+	flags &= ~dirstate_flag_mode_is_symlink;
+#endif
 	return Py_BuildValue("iiii", flags, self->size, self->mtime_s,
 	                     self->mtime_ns);
 };