[Updated] D11763: cext: define S_IFLNK on Python 2.7 and Windows

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Tue Nov 16 06:24:09 UTC 2021


Closed by commit rHG3620ab28882d: cext: define S_IFLNK on Python 2.7 and Windows (authored by indygreg).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11763?vs=31077&id=31078

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11763/new/

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

AFFECTED FILES
  mercurial/cext/parsers.c

CHANGE DETAILS

diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c
--- a/mercurial/cext/parsers.c
+++ b/mercurial/cext/parsers.c
@@ -25,6 +25,12 @@
 #define PyInt_FromLong PyLong_FromLong
 #define PyInt_FromSsize_t PyLong_FromSsize_t
 #define PyInt_AsLong PyLong_AsLong
+#else
+/* Windows on Python 2.7 doesn't define S_IFLNK. Python 3+ defines via
+ * pyport.h. */
+#ifndef S_IFLNK
+#define S_IFLNK 0120000
+#endif
 #endif
 
 static const char *const versionerrortext = "Python minor version mismatch";



To: indygreg, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211116/aea20b61/attachment-0002.html>


More information about the Mercurial-patches mailing list