[Python-Dev] Python and POSIX
Martin v. Löwis
martin at v.loewis.de
Mon Sep 15 18:05:12 EDT 2003
Marc Recht <recht at netbsd.org> writes:
> On all systems I'm aware of this is the same feature-set you get if
> you don't set any macro at all, but unfortunately not all systems
> support such a macro.
You should take a look at Solaris, then. Depending on whether you
define XPG macros (I forgot which ones specifically), the socket
functions mutate from BSD (e.g. connect(3BSD)) to XPG functions
(connect(3XPG)). This is implemented by exposing
#pragma redefine_extname connect __xpg_connect
or some such in socket.h, if the XPG macro is defined.
Likewise, on HP-UX, you select one of the three (!) curses libraries
on the system through these macros.
> So, why not split pyconfig.h up into an external and internal header?
That would be possible if one would
a) provide a patch, and
b) could demonstrate that, on all relevant systems, lack of such macros
cannot possible have an effect on proper operation of extension modules.
In particular, don't try to make LFS support "internal": Extensions
modules are known to break if they use a different "struct stat" from
the one that the core uses.
Regards,
Martin
More information about the Python-Dev
mailing list