Mercurial > hg
comparison mercurial/cext/parsers.c @ 48280:126feb805247
parsers: don't ask about symlinks on platforms that don't support them
Otherwise the compiler gets quite sad.
Differential Revision: https://phab.mercurial-scm.org/D11712
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 20 Oct 2021 18:25:49 +0200 |
parents | 249d1888e9d8 |
children | 3620ab28882d |
comparison
equal
deleted
inserted
replaced
48279:249d1888e9d8 | 48280:126feb805247 |
---|---|
268 flags &= ~dirstate_flag_mode_exec_perm; | 268 flags &= ~dirstate_flag_mode_exec_perm; |
269 } | 269 } |
270 #else | 270 #else |
271 flags &= ~dirstate_flag_mode_exec_perm; | 271 flags &= ~dirstate_flag_mode_exec_perm; |
272 #endif | 272 #endif |
273 #ifdef S_ISLNK | |
274 /* This is for platforms with support for symlinks */ | |
273 if (S_ISLNK(mode)) { | 275 if (S_ISLNK(mode)) { |
274 flags |= dirstate_flag_mode_is_symlink; | 276 flags |= dirstate_flag_mode_is_symlink; |
275 } else { | 277 } else { |
276 flags &= ~dirstate_flag_mode_is_symlink; | 278 flags &= ~dirstate_flag_mode_is_symlink; |
277 } | 279 } |
280 #else | |
281 flags &= ~dirstate_flag_mode_is_symlink; | |
282 #endif | |
278 return Py_BuildValue("iiii", flags, self->size, self->mtime_s, | 283 return Py_BuildValue("iiii", flags, self->size, self->mtime_s, |
279 self->mtime_ns); | 284 self->mtime_ns); |
280 }; | 285 }; |
281 | 286 |
282 static PyObject *dirstate_item_v1_state(dirstateItemObject *self) | 287 static PyObject *dirstate_item_v1_state(dirstateItemObject *self) |