]> sigrok.org Git - libserialport.git/commitdiff
libserialport: Allow C++ frontends to use the lib easily.
authorUwe Hermann <redacted>
Thu, 14 Nov 2013 20:58:03 +0000 (21:58 +0100)
committerUwe Hermann <redacted>
Thu, 14 Nov 2013 23:42:40 +0000 (00:42 +0100)
libserialport.h

index c5d3b9c5621c626e079df25d95e6fdab55e1c7b8..d60c2dab2f6f52425effbf8f45e44f51a011556b 100644 (file)
 #ifndef LIBSERIALPORT_H
 #define LIBSERIALPORT_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <stddef.h>
 #ifdef _WIN32
 #include <windows.h>
@@ -95,4 +99,8 @@ int sp_last_error_code(void);
 char *sp_last_error_message(void);
 void sp_free_error_message(char *message);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LIBSERIALPORT_H */