Check-in [a5d3b172d5]
Overview
SHA1:a5d3b172d5ded338b742241e3bf41cd3268ea015
Date: 2016-03-20 08:23:54
User: rkeene
Comment:Better attempt at handling dlclose() on Win32 for static builds
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-03-20
08:39
[63577d4012] tcc4tcl 0.25 (user: rkeene, tags: trunk, 0.25)
08:23
[a5d3b172d5] Better attempt at handling dlclose() on Win32 for static builds (user: rkeene, tags: trunk)
07:51
[04e5469fb6] tcc4tcl 0.24 (user: rkeene, tags: trunk, 0.24)
Changes

Modified build/tcc-patches/0.9.26/tcc-0.9.26-dlopenoptional.diff from [0780fc4d9c] to [438169d89a].

     1      1   diff -uNr tcc-0.9.26.orig/libtcc.c tcc-0.9.26-1dlopenoptional/libtcc.c
     2      2   --- tcc-0.9.26.orig/libtcc.c	2013-02-15 08:24:00.000000000 -0600
     3         -+++ tcc-0.9.26-1dlopenoptional/libtcc.c	2016-03-20 02:48:46.246782000 -0500
     4         -@@ -114,8 +114,8 @@
            3  ++++ tcc-0.9.26-1dlopenoptional/libtcc.c	2016-03-20 03:08:47.546782000 -0500
            4  +@@ -114,11 +114,9 @@
     5      5    }
     6      6    #endif
     7      7    
     8      8   -#ifndef CONFIG_TCC_STATIC
     9      9   -void dlclose(void *p)
           10  +-{
           11  +-    FreeLibrary((HMODULE)p);
           12  +-}
    10     13   +#if !defined(CONFIG_TCC_STATIC) || (defined(CONFIG_TCC_STATIC) && defined(CONFIG_TCC_STATIC_NODLOPEN))
    11         -+static void dlclose(void *p)
    12         - {
    13         -     FreeLibrary((HMODULE)p);
    14         - }
           14  ++#undef dlclose
           15  ++#define dlclose(p) FreeLibrary((HMODULE)p)
           16  + #endif
           17  + 
           18  + #ifdef LIBTCC_AS_DLL
    15     19   diff -uNr tcc-0.9.26.orig/tccrun.c tcc-0.9.26-1dlopenoptional/tccrun.c
    16     20   --- tcc-0.9.26.orig/tccrun.c	2013-02-15 08:24:00.000000000 -0600
    17     21   +++ tcc-0.9.26-1dlopenoptional/tccrun.c	2014-05-21 23:33:35.056517000 -0500
    18     22   @@ -674,6 +674,7 @@
    19     23    /* ------------------------------------------------------------- */
    20     24    #ifdef CONFIG_TCC_STATIC
    21     25