diff --git a/spec/example-reverse.c b/spec/example-reverse.c index bf4bd524..de1a58da 100644 --- a/spec/example-reverse.c +++ b/spec/example-reverse.c @@ -14,9 +14,10 @@ void this_callbackfn(struct getdns_context *this_context, void *this_userarg, getdns_transaction_t this_transaction_id) { + getdns_return_t this_ret; /* Holder for all function returns */ UNUSED_PARAM(this_userarg); /* Not looking at the userarg for this example */ UNUSED_PARAM(this_context); /* Not looking at the context for this example */ - getdns_return_t this_ret; /* Holder for all function returns */ + UNUSED_PARAM(this_ret); /* Set, but not read */ if (this_callback_type == GETDNS_CALLBACK_COMPLETE) /* This is a callback with data */ { /* Be sure the search returned something */ @@ -57,7 +58,7 @@ void this_callbackfn(struct getdns_context *this_context, struct getdns_bindata * this_dname; this_ret = getdns_dict_get_bindata(this_rdata, "rdata_raw", &this_dname); - char *this_dname_str = getdns_convert_dns_name_to_fqdn(this_dname->data); + char *this_dname_str = getdns_convert_dns_name_to_fqdn((char *)this_dname->data); printf("The dname is %s\n", this_dname_str); free(this_dname_str); diff --git a/spec/getdns-0.376.tgz b/spec/getdns-0.376.tgz deleted file mode 100644 index 3594ad1d..00000000 Binary files a/spec/getdns-0.376.tgz and /dev/null differ diff --git a/spec/getdns-0.379.tgz b/spec/getdns-0.379.tgz new file mode 100644 index 00000000..351c128e Binary files /dev/null and b/spec/getdns-0.379.tgz differ diff --git a/spec/getdns_core_only.h b/spec/getdns_core_only.h index a3dfd424..87e57d08 100644 --- a/spec/getdns_core_only.h +++ b/spec/getdns_core_only.h @@ -1,10 +1,13 @@ -/* Created at 2014-01-20-16-01-49*/ +/* Created at 2014-01-22-10-48-59*/ #ifndef GETDNS_H #define GETDNS_H #include #include -#include + +#ifdef __cplusplus +extern "C" { +#endif #define GETDNS_COMPILATION_COMMENT The API implementation should fill in something here, such as a compilation version string and date, and change it each time the API is compiled. @@ -595,4 +598,7 @@ getdns_context_set_extended_memory_functions( void (*free)(void *userarg, void *ptr) ); +#ifdef __cplusplus +} +#endif #endif /* GETDNS_H */ diff --git a/spec/index.html b/spec/index.html index 92e59e16..32fd5f16 100644 --- a/spec/index.html +++ b/spec/index.html @@ -2210,7 +2210,7 @@ The response dicts inherit the custom memory management functions and the value

9. The Generated Files

-

There is a tarball that includes the .h files, +

There is a tarball that includes the .h files, the examples, and so on. The examples all make, even though there is no API implementation, based on a pseudo-implementation in the tarball; see make-examples-PLATFORM.sh. Note that this currently builds fine on the Macintosh and Ubuntu; help is definitely appreciated on making the build process diff --git a/src/example/example-reverse.c b/src/example/example-reverse.c index bf4bd524..de1a58da 100644 --- a/src/example/example-reverse.c +++ b/src/example/example-reverse.c @@ -14,9 +14,10 @@ void this_callbackfn(struct getdns_context *this_context, void *this_userarg, getdns_transaction_t this_transaction_id) { + getdns_return_t this_ret; /* Holder for all function returns */ UNUSED_PARAM(this_userarg); /* Not looking at the userarg for this example */ UNUSED_PARAM(this_context); /* Not looking at the context for this example */ - getdns_return_t this_ret; /* Holder for all function returns */ + UNUSED_PARAM(this_ret); /* Set, but not read */ if (this_callback_type == GETDNS_CALLBACK_COMPLETE) /* This is a callback with data */ { /* Be sure the search returned something */ @@ -57,7 +58,7 @@ void this_callbackfn(struct getdns_context *this_context, struct getdns_bindata * this_dname; this_ret = getdns_dict_get_bindata(this_rdata, "rdata_raw", &this_dname); - char *this_dname_str = getdns_convert_dns_name_to_fqdn(this_dname->data); + char *this_dname_str = getdns_convert_dns_name_to_fqdn((char *)this_dname->data); printf("The dname is %s\n", this_dname_str); free(this_dname_str); diff --git a/src/getdns/getdns.h b/src/getdns/getdns.h index 8073fc87..4c461d7c 100644 --- a/src/getdns/getdns.h +++ b/src/getdns/getdns.h @@ -38,7 +38,10 @@ #include #include -#include + +#ifdef __cplusplus +extern "C" { +#endif struct event_base; @@ -884,4 +887,7 @@ getdns_return_t getdns_extension_set_libevent_base(struct getdns_context *context, struct event_base *this_event_base); +#ifdef __cplusplus +} +#endif #endif /* GETDNS_H */ diff --git a/src/types-internal.h b/src/types-internal.h index 893dfb8d..4c5170d9 100644 --- a/src/types-internal.h +++ b/src/types-internal.h @@ -37,6 +37,7 @@ #define TYPES_INTERNAL_H_ #include +#include #include struct getdns_context;