[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 92842e347d98 by Victor Stinner in branch 'default': Issue #12852: Set _POSIX_C_SOURCE to 200809 to get POSIX 2008 http://hg.python.org/cpython/rev/92842e347d98 -- ___ Python tracker

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread STINNER Victor
STINNER Victor added the comment: > I know, but I think it's better to be consistent an also bump > _POSIX_C_SOURCE to POSIX 2008 Oh, I missed AC_DEFINE(_POSIX_C_SOURCE, ...) after AC_DEFINE(_XOPEN_SOURCE, ...). Fixed. -- ___ Python tracker

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread Remi Pointel
Remi Pointel added the comment: > @rpointel: Does the fix work for you? If yes, I will close the issue. Hi, yes it sounds good for me: $ hg pull -u $ ./configure && make $ ./python Lib/test/test_posix.py [...] test_fdlistdir (__main__.PosixTester) ... ok [...] Ran 79 tests in 0.097s OK (skippe

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread Charles-François Natali
Charles-François Natali added the comment: > _POSIX_C_SOURCE value is set automatically depending on _XOPEN_SOURCE > value. I know, but I think it's better to be consistent an also bump _POSIX_C_SOURCE to POSIX 2008, and follow POSIX's recommandation (http://pubs.opengroup.org/onlinepubs/9699

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread STINNER Victor
STINNER Victor added the comment: > try with _POSIX_C_SOURCE set to 200809L and _XOPEN_SOURCE to 700 _POSIX_C_SOURCE value is set automatically depending on _XOPEN_SOURCE value. I chose to set _XOPEN_SOURCE to 700, instead of 600: it works on OpenBSD 5.0. I don't know if _XOPEN_SOURCE=700 is

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf66578d03d1 by Victor Stinner in branch 'default': Issue #12852: Set _XOPEN_SOURCE to 700 to get POSIX 2008 http://hg.python.org/cpython/rev/cf66578d03d1 -- nosy: +python-dev ___ Python tracker

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread Charles-François Natali
Charles-François Natali added the comment: > this is the result of gcc -E on Modules/posixmodule.o, asked by haypo. And this confirms that __POSIX_VISIBLE < 200809 when is included, hence the missing prototype. > I suppose that there is a conflict between Python's _POSIX_C_SOURCE and > othe

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-02 Thread Remi Pointel
Remi Pointel added the comment: > It would be nice if you could find out in which header file fdopendir() is > defined. Hi, fdopendir() is in /usr/include/dirent.h: #if __POSIX_VISIBLE >= 200809 DIR *fdopendir(int); #endif You could find the file dirent.h here: http://www.openbsd.org/cgi-b

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > And this command now works: > > $ ./python -c 'import os; print(os.fdlistdir(os.open("/tmp", os.O_RDONLY)))' > ['.X11-unix', '.ICE-unix', 'orbit-remi', '.X0-lock', 'dbus-WWfX2JhDtb'] > > Attached file patch-Modules_posixmodule_c is the patch to do this. Tha

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-01 Thread Remi Pointel
Remi Pointel added the comment: > Rémi : what happens if you manually add > extern DIR *fdopendir(int fd); > at the beginning of posixmodule.c? Hello, it seems to correctly work: ./python Lib/test/test_posix.py testNoArgFunctions (__main__.PosixTester) ... ok test_access (__main__.PosixTeste

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Rémi : what happens if you manually add extern DIR *fdopendir(int fd); at the beginning of posixmodule.c? -- nosy: +pitrou ___ Python tracker ___

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-01 Thread STINNER Victor
Changes by STINNER Victor : -- title: test_posix.test_fdlistdir() segfault on OpenBSD -> POSIX level issues in posixmodule.c on OpenBSD 5.0 ___ Python tracker ___ __