<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[24811] trunk/WebKit</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/24811">24811</a></dd>
<dt>Author</dt> <dd>darin</dd>
<dt>Date</dt> <dd>2007-08-01 18:15:23 -0700 (Wed, 01 Aug 2007)</dd>
</dl>

<h3>Log Message</h3>
<pre>        Reviewed by Anders Carlsson and Kevin Decker.

        - fix &lt;rdar://problem/5377432&gt; Removal of MakeDataExecutable from 64-bit breaks WebKit build

        The trick was to ifdef out more of the code that's only needed to support CFM, which exists
        only for 32-bit PowerPC.

        * Plugins/WebNetscapePluginPackage.h: Define a SUPPORT_CFM symbol in this internal header when
        we support CFM. We support it only on 32-bit PowerPC. Only define the isBundle, isCFM, and
        connID fields when SUPPORT_CFM is on. Also use ResFileRefNum instead of SInt16.
        * Plugins/WebNetscapePluginPackage.m: Only compile the function pointer and transition vector
        functions when SUPPORT_CFM is on.
        (-[WebNetscapePluginPackage openResourceFile]): Put the non-bundle case inside a SUPPORT_CFM
        ifdef, since all non-CFM plug-ins are bundles.
        (-[WebNetscapePluginPackage closeResourceFile:]): Ditto.
        (-[WebNetscapePluginPackage _initWithPath:]): Use SUPPORT_CFM to compile out the code for
        non-bundle and bundle-based CFM plug-ins, and code that sets isBundle and isCFM.
        (-[WebNetscapePluginPackage executableType]): Put the CFM case inside SUPPORT_CFM.
        (-[WebNetscapePluginPackage load]): Put the non-bundle and CFM cases inside SUPPORT_CFM.
        There was a bit of dead code here.
        (-[WebNetscapePluginPackage _unloadWithShutdown:]): Put the non-bundle case inside
        SUPPORT_CFM.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebKitChangeLog">trunk/WebKit/ChangeLog</a></li>
<li><a href="#trunkWebKitPluginsWebNetscapePluginPackageh">trunk/WebKit/Plugins/WebNetscapePluginPackage.h</a></li>
<li><a href="#trunkWebKitPluginsWebNetscapePluginPackagem">trunk/WebKit/Plugins/WebNetscapePluginPackage.m</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/ChangeLog (24810 => 24811)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/ChangeLog        2007-08-02 00:35:29 UTC (rev 24810)
+++ trunk/WebKit/ChangeLog        2007-08-02 01:15:23 UTC (rev 24811)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2007-08-01  Darin Adler  &lt;darin@apple.com&gt;
+
+        Reviewed by Anders Carlsson and Kevin Decker.
+
+        - fix &lt;rdar://problem/5377432&gt; Removal of MakeDataExecutable from 64-bit breaks WebKit build
+
+        The trick was to ifdef out more of the code that's only needed to support CFM, which exists
+        only for 32-bit PowerPC.
+
+        * Plugins/WebNetscapePluginPackage.h: Define a SUPPORT_CFM symbol in this internal header when
+        we support CFM. We support it only on 32-bit PowerPC. Only define the isBundle, isCFM, and
+        connID fields when SUPPORT_CFM is on. Also use ResFileRefNum instead of SInt16.
+        * Plugins/WebNetscapePluginPackage.m: Only compile the function pointer and transition vector
+        functions when SUPPORT_CFM is on.
+        (-[WebNetscapePluginPackage openResourceFile]): Put the non-bundle case inside a SUPPORT_CFM
+        ifdef, since all non-CFM plug-ins are bundles.
+        (-[WebNetscapePluginPackage closeResourceFile:]): Ditto.
+        (-[WebNetscapePluginPackage _initWithPath:]): Use SUPPORT_CFM to compile out the code for
+        non-bundle and bundle-based CFM plug-ins, and code that sets isBundle and isCFM.
+        (-[WebNetscapePluginPackage executableType]): Put the CFM case inside SUPPORT_CFM.
+        (-[WebNetscapePluginPackage load]): Put the non-bundle and CFM cases inside SUPPORT_CFM.
+        There was a bit of dead code here.
+        (-[WebNetscapePluginPackage _unloadWithShutdown:]): Put the non-bundle case inside
+        SUPPORT_CFM.
+
</ins><span class="cx"> 2007-07-31  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Oliver and Beth.
</span></span></pre></div>
<a id="trunkWebKitPluginsWebNetscapePluginPackageh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/Plugins/WebNetscapePluginPackage.h (24810 => 24811)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/Plugins/WebNetscapePluginPackage.h        2007-08-02 00:35:29 UTC (rev 24810)
+++ trunk/WebKit/Plugins/WebNetscapePluginPackage.h        2007-08-02 01:15:23 UTC (rev 24811)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -26,8 +26,16 @@
</span><span class="cx">  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#import &lt;WebKit/WebBasePluginPackage.h&gt;
</del><ins>+#import &quot;WebBasePluginPackage.h&quot;
</ins><span class="cx"> 
</span><ins>+#ifdef BUILDING_ON_TIGER
+typedef short ResFileRefNum;
+#endif
+
+#if defined(__ppc__) &amp;&amp; !defined(__LP64__)
+#define SUPPORT_CFM
+#endif
+
</ins><span class="cx"> typedef enum {
</span><span class="cx">     WebCFMExecutableType,
</span><span class="cx">     WebMachOExecutableType
</span><span class="lines">@@ -35,21 +43,13 @@
</span><span class="cx"> 
</span><span class="cx"> @interface WebNetscapePluginPackage : WebBasePluginPackage
</span><span class="cx"> {
</span><del>-    BOOL isBundle;
-    BOOL isCFM;
-    
</del><span class="cx">     NPPluginFuncs pluginFuncs;
</span><span class="cx">     NPNetscapeFuncs browserFuncs;
</span><span class="cx">     
</span><span class="cx">     uint16 pluginSize;
</span><span class="cx">     uint16 pluginVersion;
</span><del>-        
-#ifndef __LP64__
-    // CFM is not supported in 64-bit
-    CFragConnectionID connID;
-#endif
</del><span class="cx">     
</span><del>-    SInt16 resourceRef;
</del><ins>+    ResFileRefNum resourceRef;
</ins><span class="cx">     
</span><span class="cx">     NPP_NewProcPtr NPP_New;
</span><span class="cx">     NPP_DestroyProcPtr NPP_Destroy;
</span><span class="lines">@@ -70,6 +70,12 @@
</span><span class="cx">     BOOL isLoaded;
</span><span class="cx">     BOOL needsUnload;
</span><span class="cx">     unsigned int instanceCount;
</span><ins>+        
+#ifdef SUPPORT_CFM
+    BOOL isBundle;
+    BOOL isCFM;
+    CFragConnectionID connID;
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Netscape plug-in packages must be explicitly opened and closed by each plug-in instance.
</span></span></pre></div>
<a id="trunkWebKitPluginsWebNetscapePluginPackagem"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/Plugins/WebNetscapePluginPackage.m (24810 => 24811)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/Plugins/WebNetscapePluginPackage.m        2007-08-02 00:35:29 UTC (rev 24810)
+++ trunk/WebKit/Plugins/WebNetscapePluginPackage.m        2007-08-02 01:15:23 UTC (rev 24811)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -26,20 +26,20 @@
</span><span class="cx">  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#import &lt;WebKit/WebNetscapePluginPackage.h&gt;
</del><ins>+#import &quot;WebNetscapePluginPackage.h&quot;
</ins><span class="cx"> 
</span><del>-#import &lt;WebKit/WebKitLogging.h&gt;
-#import &lt;WebKit/WebKitNSStringExtras.h&gt;
-#import &lt;WebKit/WebNSObjectExtras.h&gt;
-
</del><ins>+#import &quot;WebKitLogging.h&quot;
+#import &quot;WebKitNSStringExtras.h&quot;
+#import &quot;WebNSObjectExtras.h&quot;
</ins><span class="cx"> #import &quot;WebNetscapeDeprecatedFunctions.h&quot;
</span><del>-
</del><span class="cx"> #import &lt;JavaScriptCore/npruntime_impl.h&gt;
</span><span class="cx"> 
</span><del>-typedef void (* FunctionPointer) (void);
-typedef void (* TransitionVector) (void);
</del><ins>+#ifdef SUPPORT_CFM
+typedef void (* FunctionPointer)(void);
+typedef void (* TransitionVector)(void);
</ins><span class="cx"> static FunctionPointer functionPointerForTVector(TransitionVector);
</span><span class="cx"> static TransitionVector tVectorForFunctionPointer(FunctionPointer);
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> #define PluginNameOrDescriptionStringNumber     126
</span><span class="cx"> #define MIMEDescriptionStringNumber             127
</span><span class="lines">@@ -82,28 +82,32 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-- (SInt16)openResourceFile
</del><ins>+- (ResFileRefNum)openResourceFile
</ins><span class="cx"> {
</span><del>-    FSRef fref;
-    OSErr err;
-    
-    if (isBundle)
-        return CFBundleOpenBundleResourceMap(cfBundle);
-    else {
-        err = FSPathMakeRef((const UInt8 *)[path fileSystemRepresentation], &amp;fref, NULL);
</del><ins>+#ifdef SUPPORT_CFM
+    if (!isBundle) {
+        FSRef fref;
+        OSErr err = FSPathMakeRef((const UInt8 *)[path fileSystemRepresentation], &amp;fref, NULL);
</ins><span class="cx">         if (err != noErr)
</span><span class="cx">             return -1;
</span><span class="cx">         
</span><span class="cx">         return FSOpenResFile(&amp;fref, fsRdPerm);
</span><span class="cx">     }
</span><ins>+#endif
+
+    return CFBundleOpenBundleResourceMap(cfBundle);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)closeResourceFile:(SInt16)resRef
</del><ins>+- (void)closeResourceFile:(ResFileRefNum)resRef
</ins><span class="cx"> {
</span><del>-    if (isBundle)
-        CFBundleCloseBundleResourceMap(cfBundle, resRef);
-    else
</del><ins>+#ifdef SUPPORT_CFM
+    if (!isBundle) {
</ins><span class="cx">         CloseResFile(resRef);
</span><ins>+        return;
+    }
+#endif
+
+    CFBundleCloseBundleResourceMap(cfBundle, resRef);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (NSString *)stringForStringListID:(SInt16)stringListID andIndex:(SInt16)index
</span><span class="lines">@@ -196,14 +200,15 @@
</span><span class="cx">     
</span><span class="cx">     OSType type = 0;
</span><span class="cx"> 
</span><del>-    // Bundle
</del><span class="cx">     if (bundle) {
</span><ins>+        // Bundle
+        CFBundleGetPackageInfo(cfBundle, &amp;type, NULL);
+#ifdef SUPPORT_CFM
</ins><span class="cx">         isBundle = YES;
</span><del>-        CFBundleGetPackageInfo(cfBundle, &amp;type, NULL);
-    }
-    // Single-file plug-in with resource fork
-    else {
-#ifdef __ppc__
</del><ins>+#endif
+    } else {
+#ifdef SUPPORT_CFM
+        // Single-file plug-in with resource fork
</ins><span class="cx">         type = [[[NSFileManager defaultManager] fileAttributesAtPath:path traverseLink:YES] fileHFSTypeCode];
</span><span class="cx">         isBundle = NO;
</span><span class="cx">         isCFM = YES;
</span><span class="lines">@@ -223,10 +228,11 @@
</span><span class="cx">         // Check the length of the data before calling memcmp. We think this fixes 3782543.
</span><span class="cx">         if (data == nil || [data length] &lt; 8)
</span><span class="cx">             return NO;
</span><del>-        isCFM = memcmp([data bytes], &quot;Joy!peff&quot;, 8) == 0;
-#ifndef __ppc__
-        // CFM is PPC-only.
-        if (isCFM)
</del><ins>+        BOOL hasCFMHeader = memcmp([data bytes], &quot;Joy!peff&quot;, 8) == 0;
+#ifdef SUPPORT_CFM
+        isCFM = hasCFMHeader;
+#else
+        if (hasCFMHeader)
</ins><span class="cx">             return NO;
</span><span class="cx"> #endif
</span><span class="cx">         if (![self isNativeLibraryData:data])
</span><span class="lines">@@ -257,10 +263,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (WebExecutableType)executableType
</span><span class="cx"> {
</span><ins>+#ifdef SUPPORT_CFM
</ins><span class="cx">     if (isCFM)
</span><span class="cx">         return WebCFMExecutableType;
</span><del>-    else
-        return WebMachOExecutableType;
</del><ins>+#endif
+    return WebMachOExecutableType;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)launchRealPlayer
</span><span class="lines">@@ -295,43 +302,49 @@
</span><span class="cx"> {    
</span><span class="cx">     NP_GetEntryPointsFuncPtr NP_GetEntryPoints = NULL;
</span><span class="cx">     NP_InitializeFuncPtr NP_Initialize = NULL;
</span><del>-    MainFuncPtr pluginMainFunc = NULL;
</del><span class="cx">     NPError npErr;
</span><span class="cx"> 
</span><ins>+#ifdef SUPPORT_CFM
+    MainFuncPtr pluginMainFunc = NULL;
+#endif
+
</ins><span class="cx"> #if !LOG_DISABLED
</span><span class="cx">     CFAbsoluteTime start = CFAbsoluteTimeGetCurrent();
</span><ins>+    CFAbsoluteTime currentTime;
+    CFAbsoluteTime duration;
</ins><span class="cx"> #endif
</span><span class="cx">     LOG(Plugins, &quot;%f Load timing started for: %@&quot;, start, [self name]);
</span><span class="cx"> 
</span><span class="cx">     if (isLoaded)
</span><span class="cx">         return YES;
</span><span class="cx">     
</span><ins>+#ifdef SUPPORT_CFM
</ins><span class="cx">     if (isBundle) {
</span><ins>+#endif
</ins><span class="cx">         if (!CFBundleLoadExecutable(cfBundle))
</span><span class="cx">             goto abort;
</span><span class="cx"> #if !LOG_DISABLED
</span><del>-        CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();
-        CFAbsoluteTime duration = currentTime - start;
</del><ins>+        currentTime = CFAbsoluteTimeGetCurrent();
+        duration = currentTime - start;
</ins><span class="cx"> #endif
</span><span class="cx">         LOG(Plugins, &quot;%f CFBundleLoadExecutable took %f seconds&quot;, currentTime, duration);
</span><span class="cx">         isLoaded = YES;
</span><span class="cx">         
</span><ins>+#ifdef SUPPORT_CFM
</ins><span class="cx">         if (isCFM) {
</span><span class="cx">             pluginMainFunc = (MainFuncPtr)CFBundleGetFunctionPointerForName(cfBundle, CFSTR(&quot;main&quot;) );
</span><span class="cx">             if (!pluginMainFunc)
</span><span class="cx">                 goto abort;
</span><span class="cx">         } else {
</span><ins>+#endif
</ins><span class="cx">             NP_Initialize = (NP_InitializeFuncPtr)CFBundleGetFunctionPointerForName(cfBundle, CFSTR(&quot;NP_Initialize&quot;));
</span><span class="cx">             NP_GetEntryPoints = (NP_GetEntryPointsFuncPtr)CFBundleGetFunctionPointerForName(cfBundle, CFSTR(&quot;NP_GetEntryPoints&quot;));
</span><span class="cx">             NPP_Shutdown = (NPP_ShutdownProcPtr)CFBundleGetFunctionPointerForName(cfBundle, CFSTR(&quot;NP_Shutdown&quot;));
</span><span class="cx">             if (!NP_Initialize || !NP_GetEntryPoints || !NPP_Shutdown)
</span><span class="cx">                 goto abort;
</span><ins>+#ifdef SUPPORT_CFM
</ins><span class="cx">         }
</span><span class="cx">     } else {
</span><del>-#ifdef __LP64__
-        // CFM is not supported in 64-bit
-        goto abort;
-#else
</del><span class="cx">         // single CFM file
</span><span class="cx">         FSSpec spec;
</span><span class="cx">         FSRef fref;
</span><span class="lines">@@ -353,8 +366,8 @@
</span><span class="cx">             goto abort;
</span><span class="cx">         }
</span><span class="cx"> #if !LOG_DISABLED
</span><del>-        CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();
-        CFAbsoluteTime duration = currentTime - start;
</del><ins>+        currentTime = CFAbsoluteTimeGetCurrent();
+        duration = currentTime - start;
</ins><span class="cx"> #endif
</span><span class="cx">         LOG(Plugins, &quot;%f WebGetDiskFragment took %f seconds&quot;, currentTime, duration);
</span><span class="cx">         isLoaded = YES;
</span><span class="lines">@@ -366,9 +379,9 @@
</span><span class="cx"> 
</span><span class="cx">         // NOTE: pluginMainFunc is freed after it is called. Be sure not to return before that.
</span><span class="cx">         
</span><del>-        isCFM = TRUE;
-#endif /* __LP64__ */
</del><ins>+        isCFM = YES;
</ins><span class="cx">     }
</span><ins>+#endif /* SUPPORT_CFM */
</ins><span class="cx">     
</span><span class="cx">     // Plugins (at least QT) require that you call UseResFile on the resource file before loading it.
</span><span class="cx">     resourceRef = [self openResourceFile];
</span><span class="lines">@@ -377,6 +390,7 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     // swap function tables
</span><ins>+#ifdef SUPPORT_CFM
</ins><span class="cx">     if (isCFM) {
</span><span class="cx">         browserFuncs.version = NP_VERSION_MINOR;
</span><span class="cx">         browserFuncs.size = sizeof(NPNetscapeFuncs);
</span><span class="lines">@@ -443,8 +457,8 @@
</span><span class="cx">             goto abort;
</span><span class="cx">         }
</span><span class="cx"> #if !LOG_DISABLED
</span><del>-        CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();
-        CFAbsoluteTime duration = currentTime - mainStart;
</del><ins>+        currentTime = CFAbsoluteTimeGetCurrent();
+        duration = currentTime - mainStart;
</ins><span class="cx"> #endif
</span><span class="cx">         LOG(Plugins, &quot;%f main took %f seconds&quot;, currentTime, duration);
</span><span class="cx">         
</span><span class="lines">@@ -475,7 +489,10 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">     } else {
</span><del>-        // no function pointer conversion necessary for mach-o
</del><ins>+
+#endif
+
+        // no function pointer conversion necessary for Mach-O
</ins><span class="cx">         browserFuncs.version = NP_VERSION_MINOR;
</span><span class="cx">         browserFuncs.size = sizeof(NPNetscapeFuncs);
</span><span class="cx">         browserFuncs.geturl = NPN_GetURL;
</span><span class="lines">@@ -530,8 +547,8 @@
</span><span class="cx">         if (npErr != NPERR_NO_ERROR)
</span><span class="cx">             goto abort;
</span><span class="cx"> #if !LOG_DISABLED
</span><del>-        CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();
-        CFAbsoluteTime duration = currentTime - initializeStart;
</del><ins>+        currentTime = CFAbsoluteTimeGetCurrent();
+        duration = currentTime - initializeStart;
</ins><span class="cx"> #endif
</span><span class="cx">         LOG(Plugins, &quot;%f NP_Initialize took %f seconds&quot;, currentTime, duration);
</span><span class="cx"> 
</span><span class="lines">@@ -563,11 +580,14 @@
</span><span class="cx">         } else {
</span><span class="cx">             LOG(LiveConnect, &quot;%@:  no entry point for NPP_GetJavaClass&quot;, [self name]);
</span><span class="cx">         }
</span><ins>+
+#ifdef SUPPORT_CFM
</ins><span class="cx">     }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> #if !LOG_DISABLED
</span><del>-    CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();
-    CFAbsoluteTime duration = currentTime - start;
</del><ins>+    currentTime = CFAbsoluteTimeGetCurrent();
+    duration = currentTime - start;
</ins><span class="cx"> #endif
</span><span class="cx">     LOG(Plugins, &quot;%f Total load time: %f seconds&quot;, currentTime, duration);
</span><span class="cx"> 
</span><span class="lines">@@ -676,6 +696,7 @@
</span><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span><ins>+#ifdef SUPPORT_CFM
</ins><span class="cx"> 
</span><span class="cx"> // function pointer converters
</span><span class="cx"> 
</span><span class="lines">@@ -711,6 +732,8 @@
</span><span class="cx">     return (TransitionVector)newGlue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#endif
+
</ins><span class="cx"> @implementation WebNetscapePluginPackage (Internal)
</span><span class="cx"> 
</span><span class="cx"> - (void)_unloadWithShutdown:(BOOL)shutdown
</span><span class="lines">@@ -732,13 +755,13 @@
</span><span class="cx">     if (resourceRef != -1)
</span><span class="cx">         [self closeResourceFile:resourceRef];
</span><span class="cx"> 
</span><ins>+#ifdef SUPPORT_CFM
</ins><span class="cx">     if (isBundle)
</span><ins>+#endif
</ins><span class="cx">         CFBundleUnloadExecutable(cfBundle);
</span><del>-#ifndef __LP64__
-    else {
-        // CFM is not supported in 64-bit
</del><ins>+#ifdef SUPPORT_CFM
+    else
</ins><span class="cx">         WebCloseConnection(&amp;connID);
</span><del>-    }
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     LOG(Plugins, &quot;Plugin Unloaded&quot;);
</span></span></pre>
</div>
</div>

</body>
</html>