Merged with HEAD from 8/18 or so. unlabeled-3.7.10
authorcls%seawood.org
Fri, 20 Aug 1999 16:21:40 +0000
branchunlabeled-3.7.10
changeset 774 c9d88f26046bc8beb7ea7bd1a0e236e8b6b15a2c
parent 636 0efe8e13621a704006a0a7e104a2c960d4e8b127
push idunknown
push userunknown
push dateunknown
Merged with HEAD from 8/18 or so.
pr/src/md/mac/mdmac.c
--- a/pr/src/md/mac/mdmac.c
+++ b/pr/src/md/mac/mdmac.c
@@ -102,17 +102,17 @@ static void InstallStackSpacePatch(void)
 {
 	long				systemVersion;
 	OSErr				err;
 	CFragConnectionID	connID;
 	Str255				errMessage;
 	Ptr					interfaceLibAddr;
 	CFragSymbolClass	symClass;
 	UniversalProcPtr	(*getOSTrapAddressProc)(UInt16);
-	void				(*setOSTrapAddressProc)(UniversalProcPtr, UInt16);
+	void				(*setOSTrapAddressProc)(StackSpacePatchUPP, UInt16);
 	UniversalProcPtr	(*newRoutineDescriptorProc)(ProcPtr,ProcInfoType,ISAType);
 	
 
 	err = Gestalt(gestaltSystemVersion,&systemVersion);
 	if (systemVersion >= 0x00000A00)	// we don't need to patch StackSpace()
 		return;
 
 	// open connection to "InterfaceLib"
@@ -336,23 +336,30 @@ void PR_InitMemory(void) {
 
 
 //	THIS IS *** VERY *** IMPORTANT... our CFM Termination proc.
 //	This allows us to deactivate our Time Mananger task even
 //	if we are not totally gracefully exited.  If this is not
 //	done then we will randomly crash at later times when the
 //	task is called after the app heap is gone.
 
-extern TMTask		gTimeManagerTaskElem;
+#if TARGET_CARBON
+extern OTClientContextPtr	clientContext;
+#define CLOSE_OPEN_TRANSPORT()	CloseOpenTransport(clientContext)
+
+#else
+
+#define CLOSE_OPEN_TRANSPORT()	CloseOpenTransport()
+#endif /* TARGET_CARBON */
 
 void CleanupTermProc(void)
 {
-	_MD_StopInterrupts();	
+	_MD_StopInterrupts();	// deactive Time Manager task
 
-	CloseOpenTransport();
+	CLOSE_OPEN_TRANSPORT();
 	
 	__terminate();
 }
 
 
 
 //##############################################################################
 //##############################################################################