This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use FFI_DECLARE macros


----- "Mladen Turk" <mturk@redhat.com> wrote:

> > This should be a substitution in ffi.h.in, no? Just like
> >
> > #define @TARGET@
> >
> > for the target arch. Perhaps called @LINKAGE@, with FFI_DECLARE and
> FFI_EXPORT #defined appropriately immediately afterward.
> >
> 
> Right this is one of the options.
> Using define in client code allows to ship the dynamic
> and static lib with the same set of headers.

Ah, OK. That's certainly not a use case for us (and probably anyone who's embedding libffi in their app), so perhaps you could have the substitution "do the right thing" for the common case, and have additional FFI_FORCE_STATIC/FFI_FORCE_SHARED to override that people can #define before #including ffi.h?

Dan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]