[gnutls-dev] gnutls 0.3.0

Neil Spring nspring at cs.washington.edu
Tue Dec 18 01:28:01 CET 2001

Would it be useful to add numeric #defines of the gnutls
library version number?  This would make it easier to write
source code that supports multiple versions of gnutls at
compile time.  gnutls currently has a string representation
"0.3.0", but I can't use that to express the differences
between versions, like:

  gnutls_read(sd, state...)

As an example, ALSA has a numeric version defined in

   *  version.h
  #define SND_LIB_MAJOR           0 /**< major number of library version */
  #define SND_LIB_MINOR           9 /**< minor number of library version */
  #define SND_LIB_SUBMINOR        0 /**< subminor number of library version */
  /** library version */
  #define SND_LIB_VERSION         ((SND_LIB_MAJOR<<16)|\
  /** library version (string) */
  #define SND_LIB_VERSION_STR     "0.9.0beta9"

alternately, linux-style versions would be ok too:

  #define UTS_RELEASE "2.4.9"
  #define LINUX_VERSION_CODE 132105
  #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

btw, the 0.3.0 interface looks cleaner.

More information about the Gnutls-devel mailing list