nativeGetSelection = (void (*) (JNIEnv *env, jobject obj, jint webShellPtr, jobject selection)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetSelection"); if (!nativeGetSelection) { PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror())); return -1; }  nativeHighlightSelection = (void (*) (JNIEnv *env, jobject obj, jint webShellPtr, jobject startContainer, jobject endContainer, jint startOffset, jint endOffset)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeHighlightSelection"); if (!nativeHighlightSelection) { PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror())); return -1; }  nativeClearAllSelections = (void (*) (JNIEnv *env, jobject obj, jint webShellPtr)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeClearAllSelections"); if (!nativeClearAllSelections) { PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror())); return -1; }
int locateStubFunctions(void *dll){    PR_LOG(webclientStubLog, PR_LOG_DEBUG,            ("GtkBrowserControlCanvasStub_locateStubFunctions: entering\n"));    // See PENDING comments in StubFunctions.h    createTopLevelWindow = (jint (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_gtk_GtkBrowserControlCanvas_createTopLevelWindow");    if (!createTopLevelWindow) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        getHandleToPeer = (jint (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_gtk_GtkBrowserControlCanvas_getHandleToPeer");    if (!getHandleToPeer) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        createContainerWindow = (jint (*) (JNIEnv *, jobject, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_gtk_GtkBrowserControlCanvas_createContainerWindow");    if (!createContainerWindow) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        reparentWindow = (void (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_gtk_GtkBrowserControlCanvas_reparentWindow");    if (!reparentWindow) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        processEvents = (void (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_gtk_GtkBrowserControlCanvas_processEvents");    if (!processEvents) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        setGTKWindowSize = (void (*) (JNIEnv *, jobject, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_gtk_GtkBrowserControlCanvas_setGTKWindowSize");    if (!setGTKWindowSize) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        getGTKWinID = (jint (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_gtk_GtkBrowserControlCanvas_getGTKWinID");    if (!getGTKWinID) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeDoesImplement = (jboolean (*) (JNIEnv *, jobject, jstring)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeDoesImplement");    if (!nativeDoesImplement) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeAppInitialize = (void (*) (JNIEnv *, jobject, jstring)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeAppInitialize");    if (!nativeAppInitialize) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeTerminate = (void (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeTerminate");    if (!nativeTerminate) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        nativeDestroyInitContext = (void(*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeDestroyInitContext");    if (!nativeDestroyInitContext) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeCreateInitContext = (jint (*) (JNIEnv *, jobject, jint, jint, jint, jint, jint, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeCreateInitContext");    if (!nativeCreateInitContext) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeMoveWindowTo = (void (*) (JNIEnv *, jobject, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeMoveWindowTo");    if (!nativeMoveWindowTo) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeRemoveFocus = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeRemoveFocus");    if (!nativeRemoveFocus) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeRepaint = (void (*) (JNIEnv *, jobject, jint, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeRepaint");    if (!nativeRepaint) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeSetBounds = (void (*) (JNIEnv *, jobject, jint, jint, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetBounds");    if (!nativeSetBounds) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeSetFocus = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetFocus");    if (!nativeSetFocus) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeSetVisible = (void (*) (JNIEnv *, jobject, jint, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetVisible");    if (!nativeSetVisible) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        nativeGetChildAt = (jint (*) (JNIEnv *, jobject, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeGetChildAt");    if (!nativeGetChildAt) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeGetChildCount = (jint (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeGetChildCount");    if (!nativeGetChildCount) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeGetIndex = (jint (*) (JNIEnv *, jobject, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeGetIndex");    if (!nativeGetIndex) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeInsertElementAt = (void (*) (JNIEnv *, jobject, jint, jint, jint, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeInsertElementAt");    if (!nativeInsertElementAt) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeNewFolder = (jint (*) (JNIEnv *, jobject, jint, jint, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeNewFolder");    if (!nativeNewFolder) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeIsContainer = (jboolean (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeIsContainer");    if (!nativeIsContainer) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeIsLeaf = (jboolean (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeIsLeaf");    if (!nativeIsLeaf) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeToString = (jstring (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeToString");    if (!nativeToString) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        nativeFinalize = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeFinalize");    if (!nativeFinalize) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeHasMoreElements = (jboolean (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeHasMoreElements");    if (!nativeHasMoreElements) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeNextElement = (jint (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeNextElement");    if (!nativeNextElement) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        nativeLoadURL = (void (*) (JNIEnv *, jobject, jint, jstring)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeLoadURL");    if (!nativeLoadURL) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeLoadFromStream = (void (*) (JNIEnv *, jobject, jint, jobject, jstring, jstring, jint, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeLoadFromStream");    if (!nativeLoadFromStream) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeRefresh = (void (*) (JNIEnv *, jobject, jint, jlong)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeRefresh");    if (!nativeRefresh) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeStop = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeStop");    if (!nativeStop) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeSetPrompt = (void (*) (JNIEnv *, jobject, jint, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeSetPrompt");    if (!nativeSetPrompt) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        nativeAddRef = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_ISupportsPeer_nativeAddRef");    if (!nativeAddRef) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeRelease = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_ISupportsPeer_nativeRelease");    if (!nativeRelease) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        nativeBack = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeBack");    if (!nativeBack) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeCanBack = (jboolean (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeCanBack");    if (!nativeCanBack) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeCanForward = (jboolean (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeCanForward");    if (!nativeCanForward) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeClearHistory = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeClearHistory");    if (!nativeClearHistory) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeForward = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeForward");    if (!nativeForward) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeGetBackList = (jobjectArray (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetBackList");    if (!nativeGetBackList) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeGetCurrentHistoryIndex = (jint (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetCurrentHistoryIndex");    if (!nativeGetCurrentHistoryIndex) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeGetForwardList = (jobjectArray (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetForwardList");    if (!nativeGetForwardList) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeGetHistory = (jobjectArray (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistory");    if (!nativeGetHistory) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeGetHistoryEntry = (jobject (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistoryEntry");    if (!nativeGetHistoryEntry) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeGetHistoryLength = (jint (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistoryLength");    if (!nativeGetHistoryLength) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeGetURLForIndex = (jstring (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetURLForIndex");    if (!nativeGetURLForIndex) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeSetCurrentHistoryIndex = (void (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeSetCurrentHistoryIndex");    if (!nativeSetCurrentHistoryIndex) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        nativeCopyCurrentSelectionToSystemClipboard = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeCopyCurrentSelectionToSystemClipboard");    if (!nativeCopyCurrentSelectionToSystemClipboard) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;  }    nativeFindInPage = (void (*) (JNIEnv *, jobject, jint, jstring, jboolean, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeFindInPage");    if (!nativeFindInPage) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeFindNextInPage = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeFindNextInPage");    if (!nativeFindNextInPage) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeGetCurrentURL = (jstring (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetCurrentURL");    if (!nativeGetCurrentURL) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeResetFind = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeResetFind");    if (!nativeResetFind) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeSelectAll = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeSelectAll");    if (!nativeSelectAll) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        nativeGetDOM = (jobject (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetDOM");    if (!nativeGetDOM) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        nativeGetBookmarks = (jint (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_BookmarksImpl_nativeGetBookmarks");    if (!nativeGetBookmarks) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeNewRDFNode = (jint (*) (JNIEnv *, jobject, jint, jstring, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_BookmarksImpl_nativeNewRDFNode");    if (!nativeNewRDFNode) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeSetUnicharPref = (void (*) (JNIEnv *, jobject, jint, jstring, jstring)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_PreferencesImpl_nativeSetUnicharPref");    if (!nativeSetUnicharPref) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeSetIntPref = (void (*) (JNIEnv *, jobject, jint, jstring, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_PreferencesImpl_nativeSetIntPref");    if (!nativeSetIntPref) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeSetBoolPref = (void (*) (JNIEnv *, jobject, jint, jstring, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_PreferencesImpl_nativeSetBoolPref");    if (!nativeSetBoolPref) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeGetPrefs = (jobject (*) (JNIEnv *env, jobject obj, jint webShellPtr, jobject props)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_PreferencesImpl_nativeGetPrefs");    if (!nativeGetPrefs) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeRegisterPrefChangedCallback = (void (*) (JNIEnv *env, jobject obj, jint webShellPtr, jobject callback, jstring prefName, jobject closure)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_PreferencesImpl_nativeRegisterPrefChangedCallback");    if (!nativeRegisterPrefChangedCallback) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeAddListener = (void (*) (JNIEnv *, jobject, jint, jobject, jstring)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeAddListener");    if (!nativeAddListener) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeRemoveListener = (void (*) (JNIEnv *, jobject, jint, jobject, jstring)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeRemoveListener");    if (!nativeRemoveListener) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeRemoveAllListeners = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeRemoveAllListeners");    if (!nativeRemoveAllListeners) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeInitialize = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeInitialize");    if (!nativeInitialize) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }    nativeProcessEvents = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeProcessEvents");    if (!nativeProcessEvents) {        PR_LOG(webclientStubLog, PR_LOG_ERROR, ("got dlsym error %s\n", dlerror()));        return -1;    }        PR_LOG(webclientStubLog, PR_LOG_DEBUG,            ("GtkBrowserControlCanvasStub_locateStubFunctions: exiting\n"));    return 0;}