[Python-Dev] PyConfig.h On Solaris

Martin v. L÷wis martin@v.loewis.de
22 Jul 2003 00:25:36 +0200


John Abel <johnfabel@btinternet.com> writes:

> Is there a way, to tell Python to compile a module in 32bit mode?

You could edit pyconfig.h after configuring but before compiling
Python. I would advise against doing so.

> Or, is there a workaround for this Solaris oddity?

You could split your code into two files, with LFS-independent data
structures in-between them. IOW, define JA_psinfo_t, which has just
the fields of psinfo_t that you are interested in, using
LFS-independent data types. In the source file opening /proc, copy all
interesting fields in the data structure pointed-to by the caller, and
compile this without LFS. Then, in the Python module proper, call
these helper functions, passing JA_psinfo_t.

AFAICT, it is only priovec_t, anyway, which is affected by the
incompatibility, so if you don't use that, you could just pass
psinfo_t through. I might be wrong here, though.

Regards,
Martin