The stat structure (filled by stat() calls) on FreeBSD and OSX (probably Darwin, too) contains an st_flags attribute which contains the file's special flags. That attribute isn't seen by vanilla Python, but having it available will avoid us to have to use bsd_chflags module to call stat and get that value. The attached patch applied over 2.3 and 2.4 sources adds support for st_flags attribute. Thanks in advance, Diego
Created attachment 60283 [details, diff] python-2.3.5-st_flags.patch
a 'small' note ... alpha is the only linux arch which has st_flags defined in asm/stat.h ... the thing to be aware of though (again, only applies to alpha): - linux 2.6 introduced the 'stat' and 'stat64' structs - st_flags is *only* in 'stat' in asm/stat.h, 'stat64' has no such member - glibc is stupid and defines st_flags in both 'stat' and 'stat64' - when using autoconf's AC_CHECK_MEMBERS, it tends to read sys/stat.h before asm/stat.h ... that means the configure process will find glibc's stat64 which has st_flags and say 'system has st_flags !' ... but if your source code includes asm/stat.h, stat64 will not have st_flags and you'll get a build failure :P
... i hate glibc!... SpanKY.. suggestions?
Can anyone in alpha team find a way to fix the st_flags problem there? The patch as-is it's applied on Python tree now.
Added to portage.
As said on IRC, the current patch requires to autoreconf to be run. I'm going to attach a version which also changes configure avoiding this requirement.
Created attachment 61569 [details, diff] python-2.4.1-st_flags.patch
Thanks Diego, patch updated.