From: Nikos Mavrogiannopoulos Date: Mon, 30 Sep 2013 16:57:25 +0000 (+0200) Subject: document the version macros X-Git-Tag: gnutls_3_2_5~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9090ac02cde85e5613bf88fda0b019dfcfbc0435;p=thirdparty%2Fgnutls.git document the version macros --- diff --git a/doc/cha-gtls-app.texi b/doc/cha-gtls-app.texi index 789dc1c34f..b6bf4948e7 100644 --- a/doc/cha-gtls-app.texi +++ b/doc/cha-gtls-app.texi @@ -262,6 +262,16 @@ with the dynamic linker an old version is actually used. So you may want to check that the version is okay right after program start-up. See the function @funcref{gnutls_check_version}. +On the other hand, it is often desirable to support more than one +versions of the library. In that case you could utilize compile-time +feature checks using the the @code{GNUTLS_VERSION_NUMBER} macro. +For example, to conditionally add code for GnuTLS 3.2.1 or later, you may use: +@example +#if GNUTLS_VERSION_NUMBER >= 0x030201 + ... +#endif +@end example + @node Building the source @subsection Building the source