Hi, all,

Here is a patch that makes some cleanup in the way dynamic libraries,
stubs, and stub mappings are handled by Japhar.

  - the various dll checks are moved from arch/dynamic_loading.c
    to arch/dll.h (and not to include/dynamic_loading.h, in order to keep 
    the platform-specific stuff under the arch subdirectory).

    dll.h determines if we *have* dlls (i.e. have headers, have functs),
    if we *can* use them (i.e. not profiling or no working libffi),
    then if we *want* to use them (i.e. shared libs not explicitly disabled).

    This file is also included in include/dynamic_loading.h,
    so the same tests can be applied both to dynamic_loading.c
    and to lib/libnative/*/*stubs.c.

  - a new target is added to lib/libnative/*/Makefile.am,
    in order to build JDK1.1 stubs in a specific _stubs-1.1 subdirectory.

    (yes, there is truly someone that uses a statically-linked Japhar
     with JDK1.1.5...)

  - all stub mappings have been cleaned. 

    The template used for each class looks like:

       MAPPINGS( all_methods_common_to_JDK1.1_and_JDK1.2 );
       #ifdef JDK1_1
       MAPPINGS( methods_specific_to_JDK1.1 );
       #else /* assume JDK1.2 */
       MAPPINGS( methods_specific_to_JDK1.2 );
       #endif

    Classpath-specific methods have not been considered, though.

configure.in has been modified accordingly. Some checks have also
been added to enable static linking on Solaris.

Two minor problems are also fixed:

  - arch/thread_test and arch/monitor_test coredump because
    some code added to arch/threads.c was not protected against
    null 'env' pointers.

  - XtOpenApplication() is not provided by Sun OpenWindows 
    (at least on Solaris/Sparc 2.5.1).
    The one added to lib/libnative/sun.awt.motif/common.c
    comes from XFree86 3.3.3.
    
    (AWT does not work on Solaris, anyway. It seems to loop
    in XtAppPending()...)

The enclosed patch can be applied against the current shapshot.

Hope this helps,

--Christophe    

PS: BTW, on Linux, if an exception is raised, Japhar seems to loop
    repeatedly, dumping stack frames... This avoids to smoothly
    run the test suite. It occurs with the 0.08 release or
    with the current snapshot. Any idea to correct this problem ?

dll-mappings-stubs.patch.gz

Reply via email to