Porting CPython

perl_monkey at my-deja.com perl_monkey at my-deja.com
Fri Jun 9 14:08:01 EDT 2000


Hello,

First, I don't mean to start a flamewar with my nick, it was created
long ago on Deja.  :)

I am currently porting CPython to IBM's OS/390 Unix System Services.  I
wanted to point out a few issues that I've had regarding this port, and
ask for some advice from anybody currently involved in ports or anyone
who has ported python in the past.  OS/390 is a mainframe platform, and
Unix System Services is a fully functioning (albeit intensely weird)
UNIX running on top of the mainframe OS in an LPAR.

If you respond to this, please respond to s2mdalle at titan.vcu.edu (David
Allen)

- SIGMAX in Modules/signalmodule.c

  SIGMAX is not defined in any headers I am able to find on my system,
so I looked through signalmodule.c attempting to determine what it was
used for.  As it turns out, it's part of another macro, NSIG which as
far as I can tell ONLY is good for bounds checking on signal numbers.  I
checked /usr/include/signal.h, found that the highest numbered signal I
could see was 28, so I #define SIGMAX 28 in signalmodule.c

- Modules/pwdmodule.c

This is what I'm currently having problems with.  As it turns out, the
struct passwd on this machine is defined as this: (from
/usr/include/pwd.h):

       struct passwd {
             char  *pw_name;
             uid_t  pw_uid;
             gid_t  pw_gid;
             char  *pw_dir;
             char  *pw_shell;
       };

which of course is missing pw_gecos, and pw_passwd that are usually
found there.  Now, if I can get somebody to definitively say that it's
OK to replace references to somepasswdstruct->pw_gecos with (char *)NULL
or some such thing, then that's what I'll do.  As it stands, any
solution I can come up with may break some really obscure things down
the line, and I'd rather not deal with that.

(BTW, the system security on OS/390 machines is done by a separate
package on the MVS side of things, so there isn't a passwd file on this
UNIX.  And trust me, that's only the tip of the iceberg with regard to
the weirdness of this UNIX)

- Excluding Modules

What is the build procedure for omitting certain built in C modules?
(I"m talking about the stuff in Modules/)

Any help on any of these issues would be appreciated.  Also, when/if I
finish this, I'd be willing to diff the source and put it into the main
python branch if that's something people would be interested in.
There's quite a few more details to porting this that I'm leaving out,
(silly things like the way the compiler works with flag ordering, macros
that have to be defined to get to socket headers, things like that) but
that I'd be willing to share if anyone is interested.

As I said earlier, please post to this thread or reply to
s2mdalle at titan.vcu.edu in response.  This is a throwaway Deja account
that I'm using because I don't have access to anything else at the
moment.

-- David Allen
-- s2mdalle at titan.vcu.edu



Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list