summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2010-11-11 14:57:05 +0100
committerLinus Nordberg <linus@nordu.net>2010-11-11 14:57:05 +0100
commit61010c7b868bb7ceef4a04af23e2b139163dd431 (patch)
tree425592a98e6c5380f298a0692ff534cbc8117b07
parent8f48dfbad11382b92fc9abaa6fa41756ec087194 (diff)
Add extern "C" guards to all header files.
-rw-r--r--lib/debug.h8
-rw-r--r--lib/include/radsec/radsec-impl.h8
-rw-r--r--lib/include/radsec/radsec.h8
-rw-r--r--lib/include/radsec/request-impl.h8
-rw-r--r--lib/include/radsec/request.h8
-rw-r--r--lib/rsp_debug.h8
-rw-r--r--lib/rsp_hash.h8
-rw-r--r--lib/rsp_list.h8
-rw-r--r--lib/rsp_tlscommon.h8
-rw-r--r--lib/rsp_util.h7
-rw-r--r--lib/tls.h10
11 files changed, 89 insertions, 0 deletions
diff --git a/lib/debug.h b/lib/debug.h
index 1dada4e..09a6529 100644
--- a/lib/debug.h
+++ b/lib/debug.h
@@ -7,5 +7,13 @@
if (i % 16 == 0) printf ("\n"); } \
printf ("\n"); }
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
void rs_dump_packet (const struct rs_packet *pkt);
void rs_dump_attr (const struct rs_attr *attr);
+
+#if defined (__cplusplus)
+}
+#endif
diff --git a/lib/include/radsec/radsec-impl.h b/lib/include/radsec/radsec-impl.h
index 2b3d878..14801ab 100644
--- a/lib/include/radsec/radsec-impl.h
+++ b/lib/include/radsec/radsec-impl.h
@@ -19,6 +19,10 @@ enum rs_cred_type {
};
typedef unsigned int rs_cred_type_t;
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
struct rs_packet;
struct rs_credentials {
@@ -108,6 +112,10 @@ int _rs_err_conn_push_err(struct rs_connection *conn,
struct rs_error *err);
+#if defined (__cplusplus)
+}
+#endif
+
/* Convenience macros. */
#define rs_calloc(h, nmemb, size) \
(h->alloc_scheme.calloc ? h->alloc_scheme.calloc : calloc)(nmemb, size)
diff --git a/lib/include/radsec/radsec.h b/lib/include/radsec/radsec.h
index d80c296..c54180b 100644
--- a/lib/include/radsec/radsec.h
+++ b/lib/include/radsec/radsec.h
@@ -33,6 +33,10 @@ enum rs_conn_type {
typedef unsigned int rs_conn_type_t;
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
/* Data types. */
struct rs_context; /* radsec-impl.h */
struct rs_connection; /* radsec-impl.h */
@@ -146,6 +150,10 @@ void rs_err_free(struct rs_error *err);
char *rs_err_msg(struct rs_error *err, int dofree_flag);
int rs_err_code(struct rs_error *err, int dofree_flag);
+#if defined (__cplusplus)
+}
+#endif
+
/* Local Variables: */
/* c-file-style: "stroustrup" */
/* End: */
diff --git a/lib/include/radsec/request-impl.h b/lib/include/radsec/request-impl.h
index 339dfea..02b7713 100644
--- a/lib/include/radsec/request-impl.h
+++ b/lib/include/radsec/request-impl.h
@@ -1,5 +1,9 @@
/* See the file COPYING for licensing information. */
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
struct rs_request
{
struct rs_connection *conn;
@@ -8,3 +12,7 @@ struct rs_request
struct rs_packet *resp;
struct rs_conn_callbacks saved_cb;
};
+
+#if defined (__cplusplus)
+}
+#endif
diff --git a/lib/include/radsec/request.h b/lib/include/radsec/request.h
index 939345e..fed06b5 100644
--- a/lib/include/radsec/request.h
+++ b/lib/include/radsec/request.h
@@ -2,6 +2,14 @@
struct rs_request;
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
int rs_request_create(struct rs_connection *conn, struct rs_request **req_out);
void rs_request_destroy(struct rs_request *request);
int rs_request_send(struct rs_request *request, struct rs_packet *req, struct rs_packet **resp);
+
+#if defined (__cplusplus)
+}
+#endif
diff --git a/lib/rsp_debug.h b/lib/rsp_debug.h
index 803f406..382d900 100644
--- a/lib/rsp_debug.h
+++ b/lib/rsp_debug.h
@@ -16,6 +16,10 @@
#define DBG_WARN 64
#define DBG_ERR 128
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
void debug_init(char *ident);
void debug_set_level(uint8_t level);
void debug_timestamp_on();
@@ -27,6 +31,10 @@ void debugerrnox(int err, uint8_t level, char *format, ...);
int debug_set_destination(char *dest);
void debug_reopen_log();
+#if defined (__cplusplus)
+}
+#endif
+
/* Local Variables: */
/* c-file-style: "stroustrup" */
/* End: */
diff --git a/lib/rsp_hash.h b/lib/rsp_hash.h
index 48f54a3..10968b1 100644
--- a/lib/rsp_hash.h
+++ b/lib/rsp_hash.h
@@ -10,6 +10,10 @@
#include <stdint.h>
#endif
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
struct hash {
struct list *hashlist;
pthread_mutex_t mutex;
@@ -43,6 +47,10 @@ struct hash_entry *hash_first(struct hash *hash);
/* returns the next entry after the argument */
struct hash_entry *hash_next(struct hash_entry *entry);
+#if defined (__cplusplus)
+}
+#endif
+
/* Local Variables: */
/* c-file-style: "stroustrup" */
/* End: */
diff --git a/lib/rsp_list.h b/lib/rsp_list.h
index 80c0128..83e8cb5 100644
--- a/lib/rsp_list.h
+++ b/lib/rsp_list.h
@@ -12,6 +12,10 @@
#include <stdint.h>
#endif
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
struct list_node {
struct list_node *next;
void *data;
@@ -46,6 +50,10 @@ struct list_node *list_next(struct list_node *node);
/* returns number of nodes */
uint32_t list_count(struct list *list);
+#if defined (__cplusplus)
+}
+#endif
+
/* Local Variables: */
/* c-file-style: "stroustrup" */
/* End: */
diff --git a/lib/rsp_tlscommon.h b/lib/rsp_tlscommon.h
index d7e0930..6819cd0 100644
--- a/lib/rsp_tlscommon.h
+++ b/lib/rsp_tlscommon.h
@@ -8,6 +8,10 @@
#include <openssl/ssl.h>
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
struct tls {
char *name;
char *cacertfile;
@@ -35,6 +39,10 @@ int conftls_cb(struct gconffile **cf, void *arg, char *block, char *opt, char *v
int addmatchcertattr(struct clsrvconf *conf);
#endif
+#if defined (__cplusplus)
+}
+#endif
+
/* Local Variables: */
/* c-file-style: "stroustrup" */
/* End: */
diff --git a/lib/rsp_util.h b/lib/rsp_util.h
index d8d002c..35ecc9e 100644
--- a/lib/rsp_util.h
+++ b/lib/rsp_util.h
@@ -9,6 +9,10 @@
sizeof(struct sockaddr_in) : \
sizeof(struct sockaddr_in6))
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
char *stringcopy(const char *s, int len);
char *addr2string(struct sockaddr *addr);
struct sockaddr *addr_copy(struct sockaddr *in);
@@ -19,6 +23,9 @@ void disable_DF_bit(int socket, struct addrinfo *res);
int bindtoaddr(struct addrinfo *addrinfo, int family, int reuse, int v6only);
int connecttcp(struct addrinfo *addrinfo, struct addrinfo *src, uint16_t timeout);
+#if defined (__cplusplus)
+}
+#endif
/* Local Variables: */
/* c-file-style: "stroustrup" */
diff --git a/lib/tls.h b/lib/tls.h
index 7e10a46..5dcbc47 100644
--- a/lib/tls.h
+++ b/lib/tls.h
@@ -1 +1,11 @@
+/* See the file COPYING for licensing information. */
+
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
int rs_tls_init (struct rs_connection *conn);
+
+#if defined (__cplusplus)
+}
+#endif