Bug#745902: libvarnishapi-dev: 'struct VSC_C_main' not defined

2014-04-30 Thread Stig Sandbeck Mathisen
Control: tag -1 + confirmed

On Sat, Apr 26, 2014 at 03:24:08PM +0200, Sebastian Harl wrote:
 I'm not sure what the files in /usr/share/varnish/include/ are supposed to be
 used for but they are fairly unusable. 

Hello, and thanks for the bug report.

It looks like a packaging bug.  I do not think .h files should be located in
/usr/share/varnish/

-- 
Stig Sandbeck Mathisen


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#745902: libvarnishapi-dev: 'struct VSC_C_main' not defined

2014-04-26 Thread Sebastian Harl
Package: libvarnishapi-dev
Version: 4.0.0-1
Severity: serious

Hi,

/usr/include/varnish/vapi/vsc.h includes the following function:

  struct VSC_C_main *VSC_Main(const struct VSM_data *vd,
  struct VSM_fantom *fantom);

struct VSC_C_main is not defined in any of the headers shipped in
/usr/include/. Instead, it is defined in
/usr/share/varnish/include/common/common.h.

I'm not sure what the files in /usr/share/varnish/include/ are supposed
to be used for but they are fairly unusable. For example, common.h
includes /usr/share/varnish/include/vas.h which unconditionally defines
assert(), thus conflicting with /usr/include/assert.h. Also, the files
in /usr/share/ redefine various things which are also defined in headers
in /usr/include/, for example:

  In file included from /usr/share/varnish/include/common/common.h:42:0,
   from varnish.c:35:
  /usr/include/varnish/vapi/vsc_int.h:34:6: error: nested redefinition of 'enum 
VSC_level_e'
   enum VSC_level_e {
^
  /usr/include/varnish/vapi/vsc_int.h:34:6: error: redeclaration of 'enum 
VSC_level_e'
  In file included from /usr/include/varnish/vapi/vsc.h:38:0,
   from varnish.c:32:
  /usr/include/varnish/vapi/vsc_int.h:34:6: note: originally defined here
   enum VSC_level_e {
^

That's the point where I stopped trying to migrate code in collectd to
varnish 4.

I think it's fine to have the code in /usr/share/ conflict with
/usr/include/. After all, /usr/share/ seems to be used for Varnish
modules only. However, /usr/include/ needs to be self-containing.

Thanks,
Sebastian

-- 
Sebastian tokkee Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin



signature.asc
Description: Digital signature