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 neologix
Recipients neologix, pitrou, rosslagerwall, rpointel, vstinner
Date 2011-09-07.19:06:32
SpamBayes Score 0.030331796
Marked as misclassified No
Message-id <1315422393.63.0.657640838519.issue12852@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2011-09-07 19:06:33neologixsetrecipients: + neologix, pitrou, vstinner, rosslagerwall, rpointel
2011-09-07 19:06:33neologixsetmessageid: <1315422393.63.0.657640838519.issue12852@psf.upfronthosting.co.za>
2011-09-07 19:06:33neologixlinkissue12852 messages
2011-09-07 19:06:32neologixcreate