From b1979946c4be4060588a8bcb48ac824f3e907bd7 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Fri, 2 Nov 2018 11:29:00 +0000 Subject: [PATCH] Update: Added extern "C" {}-blocks --- include/igloo/encoding.h | 8 ++++++++ include/igloo/httpp.h | 8 ++++++++ include/igloo/igloo.h | 8 ++++++++ include/igloo/log.h | 8 ++++++++ include/igloo/resolver.h | 8 ++++++++ include/igloo/sock.h | 8 ++++++++ include/igloo/thread.h | 8 ++++++++ include/igloo/timing.h | 8 ++++++++ 8 files changed, 64 insertions(+) diff --git a/include/igloo/encoding.h b/include/igloo/encoding.h index c79aa44..801134c 100644 --- a/include/igloo/encoding.h +++ b/include/igloo/encoding.h @@ -25,6 +25,10 @@ #ifndef _LIBIGLOO__ENCODING_H_ #define _LIBIGLOO__ENCODING_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include /* known encodings */ @@ -86,4 +90,8 @@ ssize_t igloo_httpp_encoding_pending(igloo_httpp_encoding_t *self); */ int igloo_httpp_encoding_append_meta(igloo_httpp_encoding_t *self, httpp_meta_t *meta); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/igloo/httpp.h b/include/igloo/httpp.h index 35e1ca6..39f8796 100644 --- a/include/igloo/httpp.h +++ b/include/igloo/httpp.h @@ -27,6 +27,10 @@ #ifndef _LIBIGLOO__HTTPP_H_ #define _LIBIGLOO__HTTPP_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #define igloo_HTTPP_VAR_PROTOCOL "__protocol" @@ -124,4 +128,8 @@ int igloo_httpp_release(igloo_http_parser_t *parser); /* util functions */ igloo_httpp_request_type_e igloo_httpp_str_to_method(const char * method); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/igloo/igloo.h b/include/igloo/igloo.h index 64149e0..a3a959f 100644 --- a/include/igloo/igloo.h +++ b/include/igloo/igloo.h @@ -23,6 +23,14 @@ * Put a good description of this file here */ +#ifdef __cplusplus +extern "C" { +#endif + /* Put stuff here */ +#ifdef __cplusplus +} +#endif + #endif /* ! IGLOO_H */ diff --git a/include/igloo/log.h b/include/igloo/log.h index b8c1620..3016323 100644 --- a/include/igloo/log.h +++ b/include/igloo/log.h @@ -29,6 +29,10 @@ #ifndef _LIBIGLOO__LOG_H_ #define _LIBIGLOO__LOG_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #define igloo_LOG_EINSANE -1 @@ -62,4 +66,8 @@ void igloo_log_write(int log_id, unsigned priority, const char *cat, const char const char *fmt, ...); void igloo_log_write_direct(int log_id, const char *fmt, ...); +#ifdef __cplusplus +} +#endif + #endif /* __LOG_H__ */ diff --git a/include/igloo/resolver.h b/include/igloo/resolver.h index 1edbf54..070c8e2 100644 --- a/include/igloo/resolver.h +++ b/include/igloo/resolver.h @@ -27,6 +27,10 @@ #ifndef _LIBIGLOO__RESOLVER_H_ #define _LIBIGLOO__RESOLVER_H_ +#ifdef __cplusplus +extern "C" { +#endif + /* ** resolver_lookup @@ -45,6 +49,10 @@ void igloo_resolver_shutdown(void); char *igloo_resolver_getname(const char *ip, char *buff, int len); char *igloo_resolver_getip(const char *name, char *buff, int len); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/igloo/sock.h b/include/igloo/sock.h index f75c604..2404f88 100644 --- a/include/igloo/sock.h +++ b/include/igloo/sock.h @@ -28,6 +28,10 @@ #ifndef _LIBIGLOO__SOCK_H_ #define _LIBIGLOO__SOCK_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #include @@ -120,4 +124,8 @@ igloo_sock_t igloo_sock_accept(igloo_sock_t serversock, char *ip, size_t len); int inet_aton(const char *s, struct in_addr *a); #endif +#ifdef __cplusplus +} +#endif + #endif /* __SOCK_H */ diff --git a/include/igloo/thread.h b/include/igloo/thread.h index 9af9011..33beafd 100644 --- a/include/igloo/thread.h +++ b/include/igloo/thread.h @@ -27,6 +27,10 @@ #ifndef _LIBIGLOO__THREAD_H_ #define _LIBIGLOO__THREAD_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #include @@ -178,4 +182,8 @@ void igloo_thread_rename(const char *name); /* waits until thread_exit is called for another thread */ void igloo_thread_join(igloo_thread_type *thread); +#ifdef __cplusplus +} +#endif + #endif /* __THREAD_H__ */ diff --git a/include/igloo/timing.h b/include/igloo/timing.h index 490eb7f..70fb7c2 100644 --- a/include/igloo/timing.h +++ b/include/igloo/timing.h @@ -28,6 +28,10 @@ #ifndef _LIBIGLOO__TIMING_H_ #define _LIBIGLOO__TIMING_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #include @@ -45,4 +49,8 @@ typedef unsigned __int64 uint64_t; uint64_t igloo_timing_get_time(void); void igloo_timing_sleep(uint64_t sleeptime); +#ifdef __cplusplus +} +#endif + #endif /* __TIMING_H__ */