On Tue, Mar 17, 2015 at 3:02 PM, Niels Möller <[email protected]> wrote: > Nikos Mavrogiannopoulos <[email protected]> writes: >> +#include "nettle-types.h" > Why this include?
Not needed. >> +/* The combined version in hex */ >> +#define NETTLE_VERSION @NUMBER_VERSION@ > Any motivation for this particular grouping, and the corresponding > > AC_SUBST([NUMBER_VERSION], `printf "0x%02x%02x" $MAJOR_VERSION > $MINOR_VERSION`) > > Is it a common convention with other libraries? Is there some reason it > has to be a hex literal, and not just constructed as > #define NETTLE_VERSION (((NETTLE_VERSION_MAJOR) << 8) | > (NETTLE_VERSION_MINOR)) > which should produce the same integer? My gut feeling is still that it > is better to leave the construction of a combined version number to the > applications that need it. I see that in gcc and every application uses different ways to detect its version. Most code is copy paste from others projects, some nasty some pretty good. Is there a reason not to simplify things for the developers? It is just a preprocessor macro it doesn't take any space. Anyway for my purposes I only need the major part to distinguish between 2 and 3, I'll drop the combined macro if you don't want it. regards, Nikos _______________________________________________ nettle-bugs mailing list [email protected] http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs
