]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
document the version macros
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 30 Sep 2013 16:57:25 +0000 (18:57 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 30 Sep 2013 16:57:25 +0000 (18:57 +0200)
doc/cha-gtls-app.texi

index 789dc1c34fb570edcdeb5841c5bafac1b1dd10d5..b6bf4948e7b7c7dd42b6147fe337f8e97416c9ae 100644 (file)
@@ -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