On Sun, Jan 11, 2015 at 3:14 PM, Niels Möller nisse@lysator.liu.se wrote:
Nikos Mavrogiannopoulos nmav@gnutls.org writes:
This patch adds a definition in nettle-meta.h with nettle's version number. That way applications can be easily modified to support both the 2.7 and the 3.x API. I didn't add for hogweed because it didn't seem to make sense, the API version is fully determined by nettle only.
Sorry for the late reply. It seems reasonable to me to include the package version in some header file. However, I'm not sure nettle-meta.h is the right file.
I'd prefer either a separate file nettle/version.h [...] And I'm also not sure I like the way major and minor numbers are combined into a single value. Can't they be kept separate, say NETTLE_VERSION, NETTLE_MINOR_VERSION, NETTLE_PATCHLEVEL or so? What do other packages do? E.g., gcc uses
I went this path, and now there is a version.h which defines, NETTLE_VERSION (combo), NETTLE_VERSION_MAJOR and NETTLE_VERSION_MINOR.
regards, Nikos