emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] [WIP] Port feature/native-comp to Windows.


From: Eli Zaretskii
Subject: Re: [PATCH] [WIP] Port feature/native-comp to Windows.
Date: Mon, 11 May 2020 20:05:47 +0300

> From: Nicolas Bértolo <address@hidden>
> Date: Mon, 11 May 2020 13:44:03 -0300
> Cc: Andrea Corallo <address@hidden>, address@hidden
> 
> I have seen that the way to declare DLL functions to be used in Windows is to
> use the DEF_DLL_FN macro. This only works in Windows though. Is there a 
> library
> that is loaded through dlopen() in Posix too? I would like to use it as an
> example.

We have some facilities in dynlib.c, but I think they stop short of
what DEF_DLL_FN etc. do.

My advice is not to try to solve too many problems at once.  Let's
solve the Windows specific parts, and worry about extending the Posix
platforms to dynamically load *.eln files later.  So I suggest to use
DEF_DLL_FN and LOAD_DLL_FN in Windows-specific code fragments, and
leave the rest to a later day.

(Please keep in mind that DEF_DLL_FN and LOAD_DLL_FN cannot be used
for functions that use stdcall calling convention, they can only be
used with cdecl functions.  Forgetting that cost me a few hours of
hair-pulling not so long time ago ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]