This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: [PATCH] Use FFI_DECLARE macros
- From: Dan Witte <dwitte at mozilla dot com>
- To: Mladen Turk <mturk at redhat dot com>
- Cc: libffi-discuss at sourceware dot org
- Date: Wed, 24 Feb 2010 09:59:22 -0800 (PST)
- Subject: 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