diff options
author | Nicolás Bértolo <nicolasbertolo@gmail.com> | 2020-06-01 19:53:00 -0300 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-06-02 23:25:24 +0100 |
commit | b619339b7a6c7952508bff72f07fc98c04e85f2c (patch) | |
tree | fc2a87a80720a9970b4e3c45b14a7fe4de908ab6 /src/w32common.h | |
parent | 9f6c12be5574060014f91ad6190d79124ea19802 (diff) | |
download | emacs-b619339b7a6c7952508bff72f07fc98c04e85f2c.tar.gz emacs-b619339b7a6c7952508bff72f07fc98c04e85f2c.tar.bz2 emacs-b619339b7a6c7952508bff72f07fc98c04e85f2c.zip |
Fix DLL imports of gccjit version functions.
* src/comp.c (init_gccjit_functions): Use LOAD_DLL_FN_OPT macro to
load gcc_jit_version_major, gcc_jit_version_major and
gcc_jit_version_patchlevel.
* src/w32common.h (LOAD_DLL_FN_OPT): Add macro optionally load a
function from a DLL.
Diffstat (limited to 'src/w32common.h')
-rw-r--r-- | src/w32common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/w32common.h b/src/w32common.h index eb7faa1939a..bd01fd40401 100644 --- a/src/w32common.h +++ b/src/w32common.h @@ -81,6 +81,14 @@ get_proc_addr (HINSTANCE handle, LPCSTR fname) } \ while (false) +/* Load a function from the DLL, and don't fail if it does not exist. */ +#define LOAD_DLL_FN_OPT(lib, func) \ + do \ + { \ + fn_##func = (W32_PFN_##func) get_proc_addr (lib, #func); \ + } \ + while (false) + #ifdef HAVE_HARFBUZZ extern bool hbfont_init_w32_funcs (HMODULE); #endif |