[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] STAT bits - Ouch!
On Wed, 2010-12-08 at 15:14 +0100, Konrad Kokoszkiewicz wrote:
> > There are at least two programs I know of which expect these to be
> > defined as above, they are python and git, there may well be others we
> > haven't noticed. We patch python, but git is not so easily patched.
>
> Could you give an example, why a program must stick to fixed values and
> cannot use the defined masks, like S_IFDIR, and macros, like S_ISDIR()?
Here's a diff from python....
diff -ur Python-2.7.1/Lib/stat.py Python-2.7.1-mint//Lib/stat.py
--- Python-2.7.1/Lib/stat.py 2008-03-20 07:25:55.000000000 +0000
+++ Python-2.7.1-mint//Lib/stat.py 2010-12-03 08:34:06.000000000 +0000
@@ -31,9 +31,9 @@
S_IFCHR = 0020000
S_IFBLK = 0060000
S_IFREG = 0100000
-S_IFIFO = 0010000
-S_IFLNK = 0120000
-S_IFSOCK = 0140000
+S_IFIFO = 0120000
+S_IFLNK = 0160000
+S_IFSOCK = 0010000
# Functions to test for each file type
Alan.