#14 Inability to detect libpkgconf version

Closed
opened 1 year ago by karen-arutyunov · 2 comments

We are trying to make our project buildable with different versions of the libpkgconf library. The problem is that it is impossible to reliably detect the library version to properly call the API functions.

Specifically, we are calling the pkgconf_client_new() function that was accepting 2 arguments in libpkgconf 1.4.2 and requires 3 arguments in 1.5.4. In the absence of the library version macro we can't compile the code conditionally.

Could you add the following macros to libpkgconf.h:

#define LIBPKGCONF_VERSION     (A * 10000 + B * 100 + C)
#define LIBPKGCONF_VERSION_STR "A.B.C"

where A is a major, B is a minor and C is a bugfix version numbers.

So for the version 1.5.4 the macros would be defined as:

#define LIBPKGCONF_VERSION     10504
#define LIBPKGCONF_VERSION_STR "1.5.4"
We are trying to make our project buildable with different versions of the libpkgconf library. The problem is that it is impossible to reliably detect the library version to properly call the API functions. Specifically, we are calling the pkgconf_client_new() function that was accepting 2 arguments in libpkgconf 1.4.2 and requires 3 arguments in 1.5.4. In the absence of the library version macro we can't compile the code conditionally. Could you add the following macros to libpkgconf.h: ``` #define LIBPKGCONF_VERSION (A * 10000 + B * 100 + C) #define LIBPKGCONF_VERSION_STR "A.B.C" ``` where A is a major, B is a minor and C is a bugfix version numbers. So for the version 1.5.4 the macros would be defined as: ``` #define LIBPKGCONF_VERSION 10504 #define LIBPKGCONF_VERSION_STR "1.5.4" ```
kaniini commented 1 year ago
Owner

yeah, i'll add it to 1.5.5.

yeah, i'll add it to 1.5.5.
kaniini commented 10 months ago
Owner

There is now LIBPKGCONF_VERSION macro in 1.6.0.

There is now LIBPKGCONF_VERSION macro in 1.6.0.
Sign in to join this conversation.
No Label
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.