[Libguestfs] [PATCH nbdkit 8/9] include: Prefix all exports with NBDKIT_DLLEXPORT.

Richard W.M. Jones rjones at redhat.com
Tue Aug 18 14:09:31 UTC 2020


On Tue, Aug 18, 2020 at 08:33:36AM -0500, Eric Blake wrote:
> On 8/18/20 5:50 AM, Richard W.M. Jones wrote:
> >This is #defined as empty at the moment, but it allows the Windows
> >port to define this __declspec(dllexport), which is necessary for
> >symbols to be exported in DLLs.
> >---
> >  include/nbdkit-common.h | 86 ++++++++++++++++++++++++-----------------
> >  include/nbdkit-filter.h | 42 +++++++++++++-------
> >  include/nbdkit-plugin.h |  6 +--
> >  server/main.c           |  2 +
> >  4 files changed, 83 insertions(+), 53 deletions(-)
> 
> ACK.
> 
> 
> >+extern NBDKIT_DLLEXPORT int nbdkit_parse_unsigned (const char *what,
> >+                                                   const char *str,
> >+                                                   unsigned *r);
> 
> This leads to some awkward-looking hanging.  Should we reformat
> differently, similar to:
> 
> extern NBDKIT_DLLEXPORT int
> nbdkit_parse_unsigned (const char *what, const char *str,
>                        unsigned *r);
> 

I'm trying to reserve function name at start of line for the
definition, so you can do:

git grep ^where_is_this_function_defined

to find the definition ...

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list