summaryrefslogtreecommitdiffstats
path: root/src/openvpn/options.c
diff options
context:
space:
mode:
authorJames Yonan <james@openvpn.net>2014-05-08 16:50:36 -0600
committerGert Doering <gert@greenie.muc.de>2014-05-20 10:37:49 +0200
commita91a2d6ad7b139ec78d61c8616b8447847e9ecc6 (patch)
treeff38f61ac6b0cea6c68de9e3e87ec3b689393267 /src/openvpn/options.c
parent3e8e496008f6634234d5867a22d7a1c03a5bf164 (diff)
downloadopenvpn-a91a2d6ad7b139ec78d61c8616b8447847e9ecc6.tar.gz
openvpn-a91a2d6ad7b139ec78d61c8616b8447847e9ecc6.tar.xz
openvpn-a91a2d6ad7b139ec78d61c8616b8447847e9ecc6.zip
Fixed some compile issues with show_library_versions()
* Refactored show_library_versions to work around the fact that some compilers (such as MSVC 2008) can't handle #ifdefs inside of macro references. * Declare show_library_versions() in options.h because it's referenced by other files such as openvpn.c. * Declare get_ssl_library_version() as returning const char *, to avoid loss of const qualifier in ssl_openssl.c. Signed-off-by: James Yonan <james@openvpn.net> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1399589436-8730-7-git-send-email-james@openvpn.net> URL: http://article.gmane.org/gmane.network.openvpn.devel/8711 Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/options.c')
-rw-r--r--src/openvpn/options.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 1c0edbc..035d3aa 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -3439,18 +3439,21 @@ usage_small (void)
void
show_library_versions(const unsigned int flags)
{
- msg (flags, "library versions: %s%s%s",
#ifdef ENABLE_SSL
- get_ssl_library_version(),
+#define SSL_LIB_VER_STR get_ssl_library_version()
#else
- "",
+#define SSL_LIB_VER_STR ""
#endif
#ifdef ENABLE_LZO
- ", LZO ", lzo_version_string()
+#define LZO_LIB_VER_STR ", LZO ", lzo_version_string()
#else
- "", ""
+#define LZO_LIB_VER_STR "", ""
#endif
- );
+
+ msg (flags, "library versions: %s%s%s", SSL_LIB_VER_STR, LZO_LIB_VER_STR);
+
+#undef SSL_LIB_VER_STR
+#undef LZO_LIB_VER_STR
}
static void