Charles-François Natali <neolo...@free.fr> 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 <dirent.h> is included, 
hence the missing prototype.

> I suppose that there is a conflict between Python's _POSIX_C_SOURCE and 
> other defines related to the POSIX level.

Lookie here:
http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/cdefs.h?rev=1.31
"""
#ifdef _XOPEN_SOURCE
# if (_XOPEN_SOURCE - 0 >= 700)
#  define __XPG_VISIBLE         700
#  undef _POSIX_C_SOURCE
#  define _POSIX_C_SOURCE       200809L
# elif (_XOPEN_SOURCE - 0 >= 600)
#  define __XPG_VISIBLE         600
#  undef _POSIX_C_SOURCE
#  define _POSIX_C_SOURCE       200112L
"""

configure.in defines _XOPEN_SOURCE to 600:
if test $define_xopen_source = yes
then
  AC_DEFINE(_XOPEN_SOURCE, 600,
            Define to the level of X/Open that your system supports)


So, try with _POSIX_C_SOURCE set to 200809L and _XOPEN_SOURCE to 700 (see 
http://pubs.opengroup.org/onlinepubs/9699919799/), and it should work.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12852>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to