homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ngie
Recipients ngie
Date 2010年05月18日.09:05:15
SpamBayes Score 2.980879e-09
Marked as misclassified No
Message-id <1274173521.53.0.771933425772.issue8746@psf.upfronthosting.co.za>
In-reply-to
Content
os.chflags isn't `available' even though chflags support is available on the system:
>>> filter(lambda x: x.startswith('chflags'), dir(os))
[]
>>> platform.uname()
('FreeBSD', 'bayonetta.local', '9.0-CURRENT', 'FreeBSD 9.0-CURRENT #0 r206173M: Mon Apr 26 22:45:06 PDT 2010 root@bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA.ata', 'amd64', 'amd64')
>>> filter(lambda x: x.startswith('chflags'), dir(os))
[]
>>> sys.version
'2.6.5 (r265:79063, May 16 2010, 23:37:42) \n[GCC 4.2.1 20070719 [FreeBSD]]'
I'm looking into why this is not properly detected via configure (here's the snippet though):
configure:17257: checking for chflags
configure:17288: cc -o conftest -O2 -pipe -fno-strict-aliasing -pipe -O2 -march=nocona -D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x100000 -pthread conftest.c >&5
conftest.c:173: error: expected identifier or '(' before '[' token
In file included from /usr/include/sys/_types.h:33,
 from /usr/include/sys/_timespec.h:37,
 from /usr/include/sys/stat.h:42,
 from conftest.c:174:
/usr/include/machine/_types.h:75: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__int_least8_t'
In file included from /usr/include/sys/time.h:37,
 from /usr/include/sys/stat.h:99,
 from conftest.c:174:
/usr/include/sys/types.h:64: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int8_t'
conftest.c:182: error: expected identifier or '(' before ']' token
configure:17291: $? = 1
Compiling the standalone test works:
$ cat ~/test_chflags.c 
#include <sys/stat.h>
#include <unistd.h>
int main(int argc, char*argv[])
{
 if(chflags(argv[0], 0) != 0)
 return 1;
 return 0;
}
$ gcc -o ~/test_chflags ~/test_chflags.c
$ echo $?
0
Also, another sidenote: nowhere is *chflags(2) considered a POSIX feature (I doublechecked opengroup.org and Google). It is strictly a _Unix_ feature. I say this because the POSIX functionality tester explicitly looks for this `POSIX' compatible feature.
History
Date User Action Args
2010年05月18日 09:05:22ngiesetrecipients: + ngie
2010年05月18日 09:05:21ngiesetmessageid: <1274173521.53.0.771933425772.issue8746@psf.upfronthosting.co.za>
2010年05月18日 09:05:18ngielinkissue8746 messages
2010年05月18日 09:05:15ngiecreate

AltStyle によって変換されたページ (->オリジナル) /