Skip to contentSkip to conversation

cleanup: plugin: support C++ plugin

PATCH In review Alon Bar-Lev 3 participants 3 messages Apr 7, 2012 – Apr 26, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cleanup: plugin: support C++ plugin

---
 include/openvpn-plugin.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
include/openvpn-plugin.h +8 -0
index f82f61f..1c80eec 100644
@@ -43,6 +43,10 @@ typedef X509 openvpn_x509_cert_t;
 #endif
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Plug-in types.  These types correspond to the set of script callbacks
  * supported by OpenVPN.
@@ -724,4 +728,8 @@ OPENVPN_PLUGIN_DEF openvpn_plugin_handle_t OPENVPN_PLUGIN_FUNC(openvpn_plugin_op
 OPENVPN_PLUGIN_DEF int OPENVPN_PLUGIN_FUNC(openvpn_plugin_func_v1)
      (openvpn_plugin_handle_t handle, const int type, const char *argv[], const char *envp[]);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* OPENVPN_PLUGIN_H_ */
Signature · 1 line
1.7.3.4
#1 lore raw

Hi Alon,

2012/4/7 Alon Bar-Lev <[email protected]...>:

Quoted 21 lines

---
 include/openvpn-plugin.h |    8 ++++++++

 1 files changed, 8 insertions(+), 0 deletions(-)
include/openvpn-plugin.h +4 -0
index f82f61f..1c80eec 100644
@@ -43,6 +43,10 @@ typedef X509 openvpn_x509_cert_t;
  #endif
  #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
  /*
  * Plug-in types.  These types correspond to the set of script callbacks
  * supported by OpenVPN.

include/openvpn-plugin.h OPENVPN_PLUGIN_DEF openvpn_plugin_handle_t OPENVPN_PLUGIN_FUNC(openvpn_plugin_op · line 735

Quoted 8 lines
include/openvpn-plugin.h +4 -0
@@ -724,4 +728,8 @@ OPENVPN_PLUGIN_DEF openvpn_plugin_handle_t OPENVPN_PLUGIN_FUNC(openvpn_plugin_op
  OPENVPN_PLUGIN_DEF int OPENVPN_PLUGIN_FUNC(openvpn_plugin_func_v1)
      (openvpn_plugin_handle_t handle, const int type, const char *argv[], const char *envp[]);
 
+#ifdef __cplusplus
+}
+#endif
+
  #endif /* OPENVPN_PLUGIN_H_ */

ACK. (Although I haven't tried compiling a C++ plugin, the change looks fine.)

Cheers
Fabian

#2 lore raw
In reply to Alon Bar-Lev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 3 lines · Alon Bar-Lev

include/openvpn-plugin.h | 8 ++++++++ 1 files changed, 8
insertions(+), 0 deletions(-)

ACK and applied to master on -testing and stable trees.

commit 13663f206dbd036add82b1fef7d51074c80de3c9

Author: Alon Bar-Lev <[email protected]...>
Date:   Sat Apr 7 20:40:40 2012 +0300
    cleanup: plugin: support C++ plugin

    Signed-off-by: Alon Bar-Lev <[email protected]...>
    Acked-by: Fabian Knittel <[email protected]...>
    Acked-by: David Sommerseth <[email protected]...>
    Signed-off-by: David Sommerseth <[email protected]...>

kind regards,

David Sommerseth

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+ZnxcACgkQDC186MBRfro6qACdG4MkeG9kQsIdfYRjsr1Mh5UC FQwAn1Lr2S0UxYbsDUQJmcx1Cg6txFh8
=huaU
-----END PGP SIGNATURE-----