aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Middleditch <sean@middleditch.us>2010-01-22 16:12:13 -0800
committerSean Middleditch <sean@middleditch.us>2010-01-22 16:12:13 -0800
commit991f536edcadba1128a26ed85f1f4541aef4deb2 (patch)
tree6e38c75bd1b683638a82d28df4fc4b003d43c43d
parent4b3c7fd19a5ff22cb8e7c714b431bd206b26ec87 (diff)
add C++ include wrappers
-rw-r--r--libtelnet.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libtelnet.h b/libtelnet.h
index 277311e..eae0a86 100644
--- a/libtelnet.h
+++ b/libtelnet.h
@@ -14,6 +14,11 @@
#if !defined(LIBTELNET_INCLUDE)
#define LIBTELNET_INCLUDE 1
+/* C++ support */
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
/* printf type checking feature in GCC and some other compilers */
#if __GNUC__
# define TELNET_GNU_PRINTF(f,a) __attribute__((format(printf, f, a)))
@@ -235,4 +240,9 @@ extern void telnet_format_sb(telnet_t *telnet, unsigned char telopt,
extern void telnet_send_zmp(telnet_t *telnet, size_t argc, const char **argv);
extern void telnet_send_zmpv(telnet_t *telnet, ...) TELNET_GNU_SENTINEL;
+/* C++ support */
+#if defined(__cplusplus)
+} /* extern "C" */
+#endif
+
#endif /* !defined(LIBTELNET_INCLUDE) */