[Patches] [ python-Patches-1203329 ] workaround deprecated ostat structure in <sys/stat.h>
SourceForge.net
noreply at sourceforge.net
Thu May 19 04:14:41 CEST 2005
Patches item #1203329, was opened at 2005-05-17 06:02
Message generated for change (Comment added) made by supercusp
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1203329&group_id=5470
Category: Macintosh
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: J. J. Snitow (supercusp)
Assigned to: Jack Jansen (jackjansen)
Summary: workaround deprecated ostat structure in <sys/stat.h>
Initial Comment:
This is a patch to python/python/dist/src/Include/pyport.h, CVS
revision 2.70.
On Mac OS X 10.4 (Tiger), the file /usr/include/sys/stat.h contains
the ostat structure, which the in-file comments call "XXX So
deprecated, it would make your head spin". This structure is not
used by the kernel and should not be used by user programs (so the
comments say).
An "#ifndef _POSIX_C_SOURCE" protects #includers of sys/stat.h
from this horrible struct (which doesn't even compile). This patch to
Include/pyport.h makes sure that _POSIX_C_SOURCE is always
defined before including sys/stat.h.
Notably, this patch enables the stock Darwinports port of PyOpenGL
(py-opengl) to compile and run just fine on Tiger.
----------------------------------------------------------------------
>Comment By: J. J. Snitow (supercusp)
Date: 2005-05-19 02:14
Message:
Logged In: YES
user_id=14233
Looking at 1171767,
http://sourceforge.net/tracker/index.php?
func=detail&aid=1171767&group_id=5470&atid=305470
it appears that the _POSIX_C_SOURCE issue isn't so simple.
Fortunately, my patch here is quite polite, in that it only defines
_POSIX_C_SOURCE during the inclusion of <sys/stat.h>, where it is
sorely needed, then promptly gets rid of it if and only if it wasn't defined
before. It seems to work nicely.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1203329&group_id=5470
More information about the Patches
mailing list