[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: python3.3 build failure on kfreebsd and the hurd



Hi,

I'd say the test at Modules/posixmodule.c:114 is wrong:

> #if defined(HAVE_SYS_XATTR_H) && defined(__GLIBC__)
> #define USE_XATTRS
> #endif

Because GLIBC doesn't imply a working xattr interface (traditionally a
Linux thing?).  There seem to be implementations only for Linux,
GNU/Hurd and as part of NetBSD Linux compatibility layer.

On GNU/kFreeBSD there is only a stub for setxattr, returning -ENOSYS
(not implemented).  Hence there is no XATTR_SIZE_MAX defined either.

For now, maybe it would be better as:

> #if defined(HAVE_SYS_XATTR_H) && (defined(__linux__) || defined(__GNU__))


The other problem is that GNU/Hurd doesn't enforce a maximum size and so
still doesn't define XATTR_SIZE_MAX;  on NetBSD they define it like this
for compatibility it seems:

http://fxr.watson.org/fxr/source/sys/xattr.h?v=NETBSD5#L52
> #define XATTR_SIZE_MAX          65536   /* NetBSD does not enforce this */

So, GNU/Hurd could maybe add something like that if it helps with
porting;  or better still, upstream could do as Pino suggested in
http://bugs.python.org/issue13669

Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org


Reply to: