8000 libcollectdclient and the core define conflicting types · Issue #1748 · collectd/collectd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
libcollectdclient and the core define conflicting types #1748
Open
@tokkee

Description

@tokkee

For example, both places define value_t with slightly different sub-types. This makes it impossible to use the client library and anything depending on plugin.h at the same time. For example, we couldn't have a plugin using the client lib and it's very hard to have common code between clients and the core without duplicating some of the core types yet another time.

I see these two solutions:

  • Have a common header, say types.h which provides all core types in one place, then use it from wherever it's needed (e.g. plugin.h and client.h). This header should not depend on anything else and any changes to it may affect the library API/ABI (hence, extra care will be required going forward).
  • Use different names for the types in the client lib. For example, use the lcc_ prefix consistently.

I'd prefer the former.

Both of these changes would mean a library API change but I think that's justified (we may then want to clean up some other stuff as well, e.g. I noticed that lcc_flush() only accepts an integer timeout while the daemon support sub-precision resolution or we may want to use char * instead of char[LCC_NAME_LEN]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0