Closed Bug 42100 Opened 20 years ago Closed 18 years ago

Mozilla/NS6 Should be Carbonized


(SeaMonkey :: General, defect, P3)



(Not tracked)



(Reporter: beard, Assigned: beard)



(Whiteboard: [dogfood-])

We need to embrace Apple's new development strategy, whereby a Macintosh
application can built as a single binary that can run under Mac OS 8, 9 and X
(which will be available in public beta this summer). This strategy is called
"carbonization" of the application, and involves using a subset of the class Mac
OS toolbox APIs.

I have completed most of the work to carbonize Mozilla and NS6 and am filing
this bug to make these checkins possible.
Whiteboard: [dogfood] [nsbeta2] fix should be ready by 6/12.
Whiteboard: [dogfood] [nsbeta2] fix should be ready by 6/12. → [dogfood+] [nsbeta2] fix should be ready by 6/19.
Whiteboard: [dogfood+] [nsbeta2] fix should be ready by 6/19. → [dogfood] [nsbeta2] fix should be ready by 6/19.
Says [dogfood] [nsbeta2] minus' no pluses...removiing this.  Putting on 
nsbeta3 nominee radar.  Need to check with marketing to see if this is in for 
Keywords: nsbeta3
Whiteboard: [dogfood] [nsbeta2] fix should be ready by 6/19. → fix should be ready by 6/19.
We really need to get this finalized before we ship. I keep seeing bitrot in the 
TARGET_CARBON builds. Perhaps we should set up a Tinderbox for this build.
Whiteboard: fix should be ready by 6/19. → [nsbeta3+] Preparing for Carbon kitchen
so what's the deal with this?
beard - do you mean you need allowance for this to be checked in?  cc: lchiang,
who is now qa head I understand at netscape.
I'll check into this Monday/Tuesday with Marketing as per leger's earlier 
I have emailed michaell and waiting to hear back.
Not holding PR3 for this. Marking nsbeta3-. Please nominate for rtm if we need
to do this before we ship.
Whiteboard: [nsbeta3+] Preparing for Carbon kitchen → [nsbeta3-] Preparing for Carbon kitchen
What's the status of this?  It would be nice if Netscape6 could run on MacOS X.
 But if it can't go into NS6, then let's at least put it in before moz0.9.
Keywords: mozilla0.9, rtm
Reassigning to Mike Pinkerton.
Assignee: beard → pinkerton
need to get this marked dogfood+ so i can land changes on the trunk. I have
many, they are all safe and wrapped w/in TARGET_CARBON ifdefs, which are off for
normal mac builds.

these changes are dogfood for people trying to help/build mozilla for MacOS X.
Keywords: nsbeta3, rtmdogfood
Whiteboard: [nsbeta3-] Preparing for Carbon kitchen
cc self
would it be possible for this to get into rtm?  Probably not...
nope, not possible. i'm having a hard time even landing it on the trunk. It
appears that if I wasn't a nscp employee, I could check it in, but since I am,
my hands are tied.
The carbonization stuff is cool... but as Pink noted, Netscaper's are still
scurrying back and forth trying to land stuff on the N6 branch at the same time
as onto the trunk.  For Netscaper's, as a courtesy to other members on the team
racing with us to to ship N6, it would be a Real Nice Thing if we didn't do
anything to further the divergence between trunk and branch (making it Real Easy
for N6 contributors to quickly land in both places).
The rate of checkin (and size) should be going down RSN.  As a result, in about
2 weeks, this will become a non-problem (meaning that Netscaper's will be
working on the trunk more regularly, and this carbonization can then land when

IF possible, it would be nice to hold off on the trunk landing until that point.

Also note that several ports are talking about making a release based around
the  N6 final RTM tag.  There will probably be a branch from our N6 branch for
landing a pile of porting changes (re: OS2 make file changes, 64 bit pointer
issues, etc. etc.).  It would probably be nice to be able to land these carbon
porting changes there so that folks can get something very much akin to the N6
pinkerton, could you attach patches? a bunch of us outsiders are working on 
getting the various macos[x] builds working, and it would be very helpful those 
who are outsiders.
Marking dogfood minus as it does stop day-to-day use.
Whiteboard: [dogfood-]
jar: I assume you meant it does NOT prevent daily use. sigh.
Here are the diffs, submitted with mozilla on OSX:

Index: mozilla/gfx/src/mac/nsDeviceContextMac.cpp
RCS file: /m/pub/mozilla/gfx/src/mac/nsDeviceContextMac.cpp,v
retrieving revision 1.82
diff -u -2 -r1.82 nsDeviceContextMac.cpp
--- nsDeviceContextMac.cpp	2000/09/21 10:22:14	1.82
+++ nsDeviceContextMac.cpp	2000/10/12 22:25:21
@@ -865,5 +865,6 @@

		unicodeFontName[actualOutputLength / sizeof(PRUnichar)] = '\0';

-    		FontNameKey key(unicodeFontName);
		nsString temp(unicodeFontName);
+    		FontNameKey key(temp);

		gFontInfoList->Put(&key, (void*)fontFamily);

Index: mozilla/security/nss/lib/util/mac_rand.c
RCS file: /m/pub/mozilla/security/nss/lib/util/mac_rand.c,v
retrieving revision 1.1
diff -u -2 -r1.1 mac_rand.c
--- mac_rand.c	2000/03/31 19:38:15	1.1
+++ mac_rand.c	2000/10/12 22:25:41
@@ -181,8 +181,10 @@
 /* Heap */

	THz zone = LMGetTheZone();

	RNG_RandomUpdate( &zone, sizeof(zone));
 /* Screen */
@@ -213,4 +215,5 @@
 /* Event queue */

	EvQElPtr		eventQ;
@@ -220,4 +223,5 @@

		RNG_RandomUpdate( &eventQ->evtQWhat, sizeof(EventRecord));

Index: mozilla/widget/src/mac/nsFilePicker.cpp
RCS file: /m/pub/mozilla/widget/src/mac/nsFilePicker.cpp,v
retrieving revision 1.25
diff -u -2 -r1.25 nsFilePicker.cpp
--- nsFilePicker.cpp	2000/10/06 00:57:24	1.25
+++ nsFilePicker.cpp	2000/10/12 22:26:06
@@ -497,4 +497,5 @@
 	// grab the IC mappingDB so that it's a little faster looping over the file
 	// types.
 	icErr = ICStart(&icInstance, 'MOZZ');
 	if (icErr == noErr)
@@ -511,4 +512,5 @@

	goto bail_wo_IC;
Index: mozilla/widget/src/mac/nsMenu.cpp
RCS file: /m/pub/mozilla/widget/src/mac/nsMenu.cpp,v
retrieving revision 1.86
diff -u -2 -r1.86 nsMenu.cpp
--- nsMenu.cpp	2000/10/06 01:17:22	1.86
+++ nsMenu.cpp	2000/10/12 22:27:27
@@ -1515,5 +1515,9 @@
         MenuHandle   nextHandle;
         nextVisibleMenu->GetNativeData((void **)&nextHandle);
-        nextMenuID = (nextHandle) ? (**nextHandle).menuID : mMacMenuID + 1;

+        #if TARGET_CARBON
+        nextMenuID = (nextHandle) ? ::GetMenuID(nextHandle) : mMacMenuID + 1;

+        #else
+        nextMenuID = (nextHandle) ? (**nextHandle).menuID : mMacMenuID + 1;
+        #endif
@@ -1560,5 +1564,9 @@
             MenuHandle   nextHandle;
             nextVisibleMenu->GetNativeData((void **)&nextHandle);
-            nextMenuID = (nextHandle) ? (**nextHandle).menuID : mMacMenuID + 1;

        #if TARGET_CARBON
        nextMenuID = (nextHandle) ? ::GetMenuID(nextHandle) : mMacMenuID + 1;

        nextMenuID = (nextHandle) ? (**nextHandle).menuID : mMacMenuID + 1;

Index: mozilla/gfx/src/mac/nsWatchTask.cpp
RCS file: /m/pub/mozilla/gfx/src/mac/nsWatchTask.cpp,v
retrieving revision 1.2
diff -u -2 -r1.2 nsWatchTask.cpp
--- nsWatchTask.cpp	2000/10/06 00:57:38	1.2
+++ nsWatchTask.cpp	2000/10/12 22:29:14
@@ -53,6 +53,8 @@
 nsWatchTask :: ~nsWatchTask ( )
   if ( mInstallSucceeded )
     ::VRemove ( (QElemPtr)&mTask );
@@ -69,7 +71,8 @@
 nsWatchTask :: Start ( )
   // setup the task
   mTask.qType = vType;
mTask.vblAddr = NewVBLProc((VBLProcPtr)DoWatchTask);
+  mTask.vblAddr = NewVBLProc((VBLProcPtr)DoWatchTask);
   mTask.vblCount = kRepeatInterval;
   mTask.vblPhase = 0;
@@ -77,4 +80,5 @@
   // install it
   mInstallSucceeded = ::VInstall((QElemPtr)&mTask) == noErr;

 } // Start
@@ -97,5 +101,10 @@
   if ( inSelf->mChecksum == 'mozz' ) {
     if ( !inSelf->mSuspended  ) {
-      if ( !inSelf->mBusy && !LMGetCrsrBusy() ) {
+      #if TARGET_CARBON
+ 	  PRBool busy = inSelf->mBusy;
+ 	  #else
+ 	  PRBool busy = inSelf->mBusy && LMGetCrsrBusy();
+ 	  #endif
+      if ( !busy ) {
         if ( ::TickCount() - inSelf->mTicks > kTicksToShowWatch ) {
           ::SetAnimatedThemeCursor(kThemeWatchCursor, inSelf->mAnimation);

Index: mozilla/modules/libimg/src/xpcompat.cpp
RCS file: /m/pub/mozilla/modules/libimg/src/xpcompat.cpp,v
retrieving revision 3.22
diff -u -2 -r3.22 xpcompat.cpp
--- xpcompat.cpp	2000/08/07 22:12:06	3.22
+++ xpcompat.cpp	2000/10/12 22:29:34
@@ -30,4 +30,7 @@
 #include "xpcompat.h"
+# include <time.h>
 #include <stdlib.h>
 #include "prlog.h"

OS: All
Target Milestone: --- → mozilla0.9
looked over the changes, it just so happens that I attempted a carbon build the
last day or two, so I've done these changes myself, r=pchen
sr=sfraser on the code patches. I think we need to resolve some weak linking 
issues before landing the project changes.
ok, all my patches except mac_rand.c and gfx.mcp have landed. I'll ask the sec
folks about the mac_rand diffs, and post to npm.mac about our weak-link issues.
giving this to beard who is currently doing the bulk of the work. cc'ing sdagley
cuz he says he's working on it too.
Assignee: pinkerton → beard
Target Milestone: mozilla0.9 → ---
giving this to beard. i think this is a dupe of one of his current bugs.
Keywords: nsdogfood-
Keywords: nsdogfood
Target Milestone: --- → mozilla1.0
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 
(you can query for this string to delete spam or retrieve the list of bugs I've 
Target Milestone: mozilla1.0 → mozilla1.0.1
Closed: 18 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.