NSPR changes for OS/2 VisualAge build

VERIFIED FIXED in 4.0.2

Status

P3
normal
VERIFIED FIXED
19 years ago
18 years ago

People

(Reporter: snizinsk, Assigned: wtc)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

19 years ago
Wan-teh,

Here's the bug you requested for the NSPR changes. Thanks!

To answer your questions: 
1. EMX does not use Optlink, but the patch only redefines PR_CALLBACK inside of 
an existing XP_OS2_VACPP ifdef, so no additional ifdef is required. 
2. /Mp sets the default calling convention to Optlink. This is the default to 
VisualAge but we would like to make it explicit, even though it is not 
necessary.
3. It provides stricmp.



Skip Nizinsk (IBM)

Please respond to wtc@netscape.com 
To:	Skip Nizinski/Austin/IBM@IBMUS
cc:	 
Subject:	Re: please review NSPR changes for OS/2 VisualAge build




snizinsk@us.ibm.com wrote:

> Wan-teh,
>
> We are working on the OS/2 port of Mozilla and need to make the following
> changes to build with the VisualAge C++ compiler which uses the Optlink
> calling convention. Let me know what you think. Thanks.
>
> Skip Nizinski (IBM)
>
> Index: prtypes.h
> ===================================================================
> RCS file: /cvsroot/mozilla/nsprpub/pr/include/prtypes.h,v
> retrieving revision 3.15
> diff -r3.15 prtypes.h
> 161c161
> < #define PR_CALLBACK
> ---
> > #define PR_CALLBACK     _Optlink

Is _Optlink only required by VisualAge C++ compiler?
Do you know if the other compiler (EMX?) also need
_Optlink?  If not, then this needs to be ifdef'd with XP_OS2_VACPP.

> 163,167c163
> < #ifndef XP_OS2_VACPP
> < #define PR_STATIC_CALLBACK(__x) static __x
> < #else
> < #define PR_STATIC_CALLBACK(__x) static __x _Optlink
> < #endif
> ---
> > #define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK

This is good.

> Index: OS2.mk
> ===================================================================
> RCS file: /cvsroot/mozilla/nsprpub/config/OS2.mk,v
> retrieving revision 3.7
> diff -r3.7 OS2.mk
> 70,71c70,71
> < OS_CFLAGS              = -W3 -Wcnd- -gm -gd+ -sd- -su4 -ge-
> < OS_EXE_CFLAGS          = -W3 -Wcnd- -gm -gd+ -sd- -su4
> ---
> > OS_CFLAGS              = -W3 -Wcnd- -gm -gd+ -sd- -su4 -ge- /Mp
> > OS_EXE_CFLAGS          = -W3 -Wcnd- -gm -gd+ -sd- -su4 /Mp

Just curious: what does the /Mp flag do?

> Index: prlog.c
> ===================================================================
> RCS file: /cvsroot/mozilla/nsprpub/pr/src/io/prlog.c,v
> retrieving revision 3.14
> diff -r3.14 prlog.c
> 58c58
> < #if defined(XP_PC) && !defined(XP_OS2_VACPP)
> ---
> > #if defined(XP_PC)

This is good.  So VACPP also has stricmp?

Could you open a bug report and attach the patch to it?  Thanks.
I will check this in next Monday.

Wan-Teh
(Assignee)

Comment 1

19 years ago
Thanks for opening the bug reports and
answering my questions.

Are these all the changes you want to
make to prtypes.h now?  The header prtypes.h
is included by a lot of files.  Changing it
will force a recompilation of all those files.
So I want to accumulate as many fixes as
possible.  I should be able to check in when
the tree opens today or tomorrow.
Status: NEW → ASSIGNED
(Reporter)

Comment 2

19 years ago
These are all the changes we are planning, for now anyway.
(Assignee)

Comment 3

19 years ago
Larry, what is the macro PR_CALLBACK_DECL for?
It is only used in the definition of the function
type PRTimeParamFn in prtime.h.
(Assignee)

Comment 4

19 years ago
Checked in the patch on the main trunk.
/cvsroot/mozilla/nsprpub/pr/include/prtypes.h, revision 3.18
/cvsroot/mozilla/nsprpub/config/OS2.mk, revision 3.8
/cvsroot/mozilla/nsprpub/pr/src/io/prlog.c, revision 3.15

Checked in on the NSPRPUB_RELEASE_4_0_BRANCH.
/cvsroot/mozilla/nsprpub/pr/include/prtypes.h, revision 3.15.4.1
/cvsroot/mozilla/nsprpub/config/OS2.mk, revision 3.7.4.1
/cvsroot/mozilla/nsprpub/pr/src/io/prlog.c, revision 3.14.10.1

Will check it in on the NSPRPUB_CLIENT_BRANCH (which
the Mozilla client pulls) when the mozilla tree opens.
(Assignee)

Comment 5

19 years ago
Checked in the patch on the NSPRPUB_CLIENT_BRANCH.
/cvsroot/mozilla/nsprpub/pr/include/prtypes.h, revision 3.17.2.1
/cvsroot/mozilla/nsprpub/config/OS2.mk, revision 3.7.18.1
/cvsroot/mozilla/nsprpub/pr/src/io/prlog.c, revision 3.14.24.1
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED

Comment 6

19 years ago
PR_CALLBACK_DECL? I don't recall with certainty. It may have been there to 
accomodate a bug in the MSVC 1.52 compiler. ... "It's a 'load ds' problem".

(Assignee)

Updated

18 years ago
Target Milestone: --- → 4.0.1
(Assignee)

Updated

18 years ago
Target Milestone: 4.0.1 → 4.0.2

Comment 7

18 years ago
Verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.