summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2019-02-26 21:39:52 -0800
committerGarrett D'Amore <garrett@damore.org>2019-02-26 21:39:52 -0800
commitddeac617c9914284038241870cb99ae174fb3755 (patch)
treeb1391a298e0e3fd18daee5759073e33f2eec3a8c /include
parent8562cbbc7d533c09cfc4dafb34c6475e9733ba00 (diff)
downloadnng-ddeac617c9914284038241870cb99ae174fb3755.tar.gz
nng-ddeac617c9914284038241870cb99ae174fb3755.tar.bz2
nng-ddeac617c9914284038241870cb99ae174fb3755.zip
fixes #896 undefined reference to `nng_inproc_register()'
We forgot to have __cplusplus guards on the protocol header files.
Diffstat (limited to 'include')
-rw-r--r--include/nng/transport/inproc/inproc.h12
-rw-r--r--include/nng/transport/ipc/ipc.h10
-rw-r--r--include/nng/transport/tcp/tcp.h14
-rw-r--r--include/nng/transport/tls/tls.h12
-rw-r--r--include/nng/transport/ws/websocket.h12
-rw-r--r--include/nng/transport/zerotier/zerotier.h12
6 files changed, 65 insertions, 7 deletions
diff --git a/include/nng/transport/inproc/inproc.h b/include/nng/transport/inproc/inproc.h
index bfd6e1ca..80a83883 100644
--- a/include/nng/transport/inproc/inproc.h
+++ b/include/nng/transport/inproc/inproc.h
@@ -1,5 +1,5 @@
//
-// Copyright 2017 Garrett D'Amore <garrett@damore.org>
+// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2017 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -11,8 +11,18 @@
#ifndef NNG_TRANSPORT_INPROC_INPROC_H
#define NNG_TRANSPORT_INPROC_INPROC_H
+#include <nng/nng.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// inproc transport. This is used for intra-process communication.
NNG_DECL int nng_inproc_register(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif // NNG_TRANSPORT_INPROC_INPROC_H
diff --git a/include/nng/transport/ipc/ipc.h b/include/nng/transport/ipc/ipc.h
index c69c4dc9..18d2046d 100644
--- a/include/nng/transport/ipc/ipc.h
+++ b/include/nng/transport/ipc/ipc.h
@@ -11,9 +11,19 @@
#ifndef NNG_TRANSPORT_IPC_IPC_H
#define NNG_TRANSPORT_IPC_IPC_H
+#include <nng/nng.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// ipc transport. This is used for inter-process communication on
// the same host computer.
NNG_DECL int nng_ipc_register(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif // NNG_TRANSPORT_IPC_IPC_H
diff --git a/include/nng/transport/tcp/tcp.h b/include/nng/transport/tcp/tcp.h
index c2277e4b..2ca40b70 100644
--- a/include/nng/transport/tcp/tcp.h
+++ b/include/nng/transport/tcp/tcp.h
@@ -1,5 +1,5 @@
//
-// Copyright 2017 Garrett D'Amore <garrett@damore.org>
+// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2017 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -11,10 +11,18 @@
#ifndef NNG_TRANSPORT_TCP_TCP_H
#define NNG_TRANSPORT_TCP_TCP_H
-// TCP transport. This is used for communication over TCP/IP.
-
#include <nng/nng.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// TCP transport. This is used for communication over TCP/IP.
+
NNG_DECL int nng_tcp_register(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif // NNG_TRANSPORT_TCP_TCP_H
diff --git a/include/nng/transport/tls/tls.h b/include/nng/transport/tls/tls.h
index a3fa0eb9..700d5fff 100644
--- a/include/nng/transport/tls/tls.h
+++ b/include/nng/transport/tls/tls.h
@@ -1,5 +1,5 @@
//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -11,8 +11,18 @@
#ifndef NNG_TRANSPORT_TLS_TLS_H
#define NNG_TRANSPORT_TLS_TLS_H
+#include <nng/nng.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// TLS transport. This is used for communication via TLS v1.2 over TCP/IP.
NNG_DECL int nng_tls_register(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif // NNG_TRANSPORT_TLS_TLS_H
diff --git a/include/nng/transport/ws/websocket.h b/include/nng/transport/ws/websocket.h
index 3d0d4fee..69577107 100644
--- a/include/nng/transport/ws/websocket.h
+++ b/include/nng/transport/ws/websocket.h
@@ -1,5 +1,5 @@
//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -11,6 +11,12 @@
#ifndef NNG_TRANSPORT_WS_WEBSOCKET_H
#define NNG_TRANSPORT_WS_WEBSOCKET_H
+#include <nng/nng.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// WebSocket transport. This is used for communication via WebSocket.
NNG_DECL int nng_ws_register(void);
@@ -21,4 +27,8 @@ NNG_DECL int nng_ws_register(void);
NNG_DECL int nng_wss_register(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif // NNG_TRANSPORT_WS_WEBSOCKET_H
diff --git a/include/nng/transport/zerotier/zerotier.h b/include/nng/transport/zerotier/zerotier.h
index ab4d8511..ea73fea7 100644
--- a/include/nng/transport/zerotier/zerotier.h
+++ b/include/nng/transport/zerotier/zerotier.h
@@ -1,5 +1,5 @@
//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -11,6 +11,8 @@
#ifndef NNG_TRANSPORT_ZEROTIER_ZEROTIER_H
#define NNG_TRANSPORT_ZEROTIER_ZEROTIER_H
+#include <nng/nng.h>
+
// ZeroTier Transport. This sits on the ZeroTier L2 network, which itself
// is implemented on top of UDP. This requires the 3rd party
// libzerotiercore library (which is GPLv3!) and platform specific UDP
@@ -129,6 +131,10 @@
// option takes no argument really.
#define NNG_OPT_ZT_CLEAR_LOCAL_ADDRS "zt:clear-local-addrs"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// Network status values.
// These values are supplied to help folks checking status. They are the
// return values from zt_opt_status. We avoid hard coding them as defines,
@@ -146,4 +152,8 @@ enum nng_zt_status {
NNG_DECL int nng_zt_register(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif // NNG_TRANSPORT_ZEROTIER_ZEROTIER_H