From 991f536edcadba1128a26ed85f1f4541aef4deb2 Mon Sep 17 00:00:00 2001 From: Sean Middleditch Date: Fri, 22 Jan 2010 16:12:13 -0800 Subject: add C++ include wrappers --- libtelnet.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) */ -- cgit v1.2.3