[Patches] [ python-Patches-473749 ] compile under OS/2 VA C++

noreply@sourceforge.net noreply@sourceforge.net
Sun, 04 Nov 2001 18:48:10 -0800


Patches item #473749, was opened at 2001-10-22 12:00
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=473749&group_id=5470

Category: Build
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Michael Muller (mikemuller)
Assigned to: Tim Peters (tim_one)
Summary: compile under OS/2 VA C++

Initial Comment:
This is the minimal set of changes I found necessary to
get the latest Python CVS image built under OS/2 Visual
Age C++.

I'm pretty sure that some of these changes will
conflict with changes submitted by Andrew MacIntyre for
OS/2 EMX.  If his changes are checked in before mine,
I'd be happy to resolve the conflicts and resubmit this
patch.


----------------------------------------------------------------------

>Comment By: Tim Peters (tim_one)
Date: 2001-11-04 18:48

Message:
Logged In: YES 
user_id=31435

Patch accepted, with thanks, and checked in:

Modules/socketmodule.c; new revision: 1.193
PC/os2vacpp/config.c; new revision: 1.7
PC/os2vacpp/makefile; new revision: 1.5
PC/os2vacpp/pyconfig.h; new revision: 1.3
PC/os2vacpp/python.def; new revision: 1.4
Python/bltinmodule.c; new revision: 2.244
Python/importdl.h; new revision: 2.17

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-11-04 18:40

Message:
Logged In: YES 
user_id=31435

Assigned to me.

----------------------------------------------------------------------

Comment By: Michael Muller (mikemuller)
Date: 2001-11-02 13:35

Message:
Logged In: YES 
user_id=353708

> - Why did you drop Tkinter support?

Because AFAIK it doesn't work.  I asked Jeff Rush about this
back in the 1.5.2 days, and I think he said that he had
gotten it to compile but was not able to run it.  I had
similar experiences linking directly against the Tcl/Tk
libraries that have been distributed for OS/2.  I have just
sent him a note to confirm this.

I have released 1.5.1 and 1.5.2 versions of Tkinter for OS/2
based on heavily hacked versions of the EMX Tcl/Tk port and
of _tkinter.c itself.  I'd like to see it back in the main
build, but I don't really have the time to make that happen
right now, so I hope to distribute Tkinter-OS/2 seperately
again for 2.1.1 (and probably 2.2 as well).

> - The symbol list in python.def is way too short. 

As I said, this was the minimal set of changes necessary to
compile.  When I came up with an "unresolved external"
linking python and PGen, I added the unresolved function
name to the def file.

What I'd like to do (and have been experimenting with in
2.1.1) is to generate the def file automatically from the
object modules.  However, it seemed to me that restructuring
the makefile goes way beyond the minimal changes necessary
to get the build working again.


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2001-11-02 11:26

Message:
Logged In: YES 
user_id=21627

The patch looks fine to me. A few comments:
- Why did you drop Tkinter support?
- The symbol list in python.def is way too short. 
Essentially, every function that has a DL_IMPORT in 
Include/* must be listed in the .def file (or, if not - 
why is the .def file necessary in the first place?)
For example, all the Unicode functions are missing.




----------------------------------------------------------------------

Comment By: Michael Muller (mikemuller)
Date: 2001-10-30 10:46

Message:
Logged In: YES 
user_id=353708

1) "#ifdef __BEOS__" vs. "#if defined(__BEOS_)"

  This is not necessary.  I was under the mistaken impression that #ifdef ... #elif caused problems
under VAC++.

3) positive case first

  I agree.

I have posted another patch which addresses these issues.

----------------------------------------------------------------------

Comment By: Andrew I MacIntyre (aimacintyre)
Date: 2001-10-30 04:50

Message:
Logged In: YES 
user_id=250749

1) in Modules/socketmodule.c, is changing "#ifdef __BEOS__" to "#if defined(__BEOS__)" absolutely necessary?
While I would also do this, others view such apparently cosmetic changes with suspicion.
2) the changes to the files in PC/os2vacpp look OK.
3) in Python/bltinmodule.c,  I would have suggested using

#if <OS/2 defs>
  <OS/2 specific code>
#else
  <generic code>
#endif

rather than

#if !<OS/2 defs>
  <generic code>
#else
  <OS/2 specific code>
#endif

Negated #ifdefs seem to be considerably in the minority in the Python source tree AFAICS.

4) change to Python/importdl.h is OK as its in an #ifdef OS2

The changes noted in 2) & 4) look good to go.  Feedback from anyone else about the stylistics noted in 1) & 3)?

----------------------------------------------------------------------

Comment By: Michael Muller (mikemuller)
Date: 2001-10-26 05:37

Message:
Logged In: YES 
user_id=353708

Resubmitted to resolve conflict with changes to bltinmodule.c

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=473749&group_id=5470