summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2013-09-30 18:57:25 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-09-30 18:57:25 +0200
commit9090ac02cde85e5613bf88fda0b019dfcfbc0435 (patch)
tree0801ccdd7fddba39b5ca26978597b7d5d459f60d /doc
parentf27d6be073c761463f01065733551dd498557820 (diff)
downloadgnutls-9090ac02cde85e5613bf88fda0b019dfcfbc0435.tar.gz
document the version macros
Diffstat (limited to 'doc')
-rw-r--r--doc/cha-gtls-app.texi10
1 files changed, 10 insertions, 0 deletions
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