diff --git a/spec/example-all-functions.c b/spec/example-all-functions.c
index 5f41e516..f9dab153 100644
--- a/spec/example-all-functions.c
+++ b/spec/example-all-functions.c
@@ -3,7 +3,6 @@
#include The call to getdns_context_create
immediately returns a context that can
be used with other API calls; that context contains the API's default values. Most applications will
-want set_from_os
set to true
.set_from_os
set to 1
.
To clean up the context, including cleaning up all outstanding transactions that were called using this context, use the function:
@@ -1385,7 +1385,7 @@ function. { /* Create the DNS context for this call */ struct getdns_context_t *this_context = NULL; - getdns_return_t context_create_return = getdns_context_create(&this_context, true); + getdns_return_t context_create_return = getdns_context_create(&this_context, 1); if (context_create_return != GETDNS_RETURN_GOOD) { fprintf(stderr, "Trying to create the context failed: %d", context_create_return); @@ -1533,7 +1533,7 @@ their TTLs. { /* Create the DNS context for this call */ struct getdns_context_t *this_context = NULL; - getdns_return_t context_create_return = getdns_context_create(&this_context, true); + getdns_return_t context_create_return = getdns_context_create(&this_context, 1); if (context_create_return != GETDNS_RETURN_GOOD) { fprintf(stderr, "Trying to create the context failed: %d", context_create_return); @@ -1626,7 +1626,7 @@ as it is for the synchronous example, it is just done inmain()
.getdns_return_t this_ret; /* Holder for all function returns */
/* Create the DNS context for this call */
struct getdns_context_t *this_context = NULL;
- getdns_return_t context_create_return = getdns_context_create(&this_context, true);
+ getdns_return_t context_create_return = getdns_context_create(&this_context, 1);
if (context_create_return != GETDNS_RETURN_GOOD)
{
fprintf(stderr, "Trying to create the context failed: %d", context_create_return);
@@ -1769,10 +1769,10 @@ a single thread.
See above for the method for creating and destroying
contexts. When the context is used in the API for the first time and set_from_os
is
-true
, the API starts replacing some of the values with values from the OS, such as
+1
, the API starts replacing some of the values with values from the OS, such as
those that would be found in res_query(3), /etc/resolv.conf, and so on, then proceeds with the new
function. Some advanced users will not want the API to change the values to the OS's defaults; if
-set_from_os
is false
, the API will not do any updates to the initial
+set_from_os
is 0
, the API will not do any updates to the initial
values based on changes in the OS. For example, this might be useful if the API is acting
as a stub resolver that is using a specific upstream recursive resolver chosen by the
application, not the one that might come back from DHCP.
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