This makes using libtls easier to include by including dependent headers,
making something like this work as expected:
#include <iostream>
#include <tls.h>
int main()
{
std::cout << "tls_init: " << tls_init() << "\n";
}
This also makes building a standalone libtls-portable simpler.
ok doug@, jsing@
-/* $OpenBSD: tls.h,v 1.12 2015/03/31 14:03:38 jsing Exp $ */
+/* $OpenBSD: tls.h,v 1.13 2015/06/19 06:20:11 bcook Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
#ifndef HEADER_TLS_H
#define HEADER_TLS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stddef.h>
+#include <stdint.h>
+
#define TLS_API 20141031
#define TLS_PROTOCOL_TLSv1_0 (1 << 1)
uint8_t *tls_load_file(const char *_file, size_t *_len, char *_password);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* HEADER_TLS_H */