Get rid of stdbool.h

This commit is contained in:
Willem Toorop 2013-12-06 14:10:28 +01:00
parent ab25acbd6f
commit 1ecf9d9ef8
8 changed files with 15 additions and 17 deletions

View File

@ -155,7 +155,6 @@ fi
AC_CHECK_HEADERS([inttypes.h netinet/in.h stdint.h stdlib.h string.h event2/event.h],,, [AC_INCLUDES_DEFAULT])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T

View File

@ -51,7 +51,7 @@
* @return NULL if additnotfnd == FALSE and key is not in dictionary
*/
struct getdns_dict_item *
getdns_dict_find(struct getdns_dict *dict, char *key, bool addifnotfnd)
getdns_dict_find(struct getdns_dict *dict, char *key, int addifnotfnd)
{
struct getdns_dict_item *item;
@ -108,7 +108,7 @@ getdns_dict_get_data_type(struct getdns_dict * dict, char *name,
if (!dict || !name || !answer)
return GETDNS_RETURN_NO_SUCH_DICT_NAME;
item = getdns_dict_find(dict, name, false);
item = getdns_dict_find(dict, name, 0);
if (!item)
return GETDNS_RETURN_NO_SUCH_DICT_NAME;
@ -126,7 +126,7 @@ getdns_dict_get_dict(struct getdns_dict * dict, char *name,
if (!dict || !name || !answer)
return GETDNS_RETURN_NO_SUCH_DICT_NAME;
item = getdns_dict_find(dict, name, false);
item = getdns_dict_find(dict, name, 0);
if (!item || item->dtype != t_dict)
return GETDNS_RETURN_NO_SUCH_DICT_NAME;
@ -144,7 +144,7 @@ getdns_dict_get_list(struct getdns_dict * dict, char *name,
if (!dict || !name || !answer)
return GETDNS_RETURN_NO_SUCH_DICT_NAME;
item = getdns_dict_find(dict, name, false);
item = getdns_dict_find(dict, name, 0);
if (!item || item->dtype != t_list)
return GETDNS_RETURN_WRONG_TYPE_REQUESTED;
@ -162,7 +162,7 @@ getdns_dict_get_bindata(struct getdns_dict * dict, char *name,
if (!dict || !name || !answer)
return GETDNS_RETURN_NO_SUCH_DICT_NAME;
item = getdns_dict_find(dict, name, false);
item = getdns_dict_find(dict, name, 0);
if (!item || item->dtype != t_bindata)
return GETDNS_RETURN_WRONG_TYPE_REQUESTED;
@ -179,7 +179,7 @@ getdns_dict_get_int(struct getdns_dict * dict, char *name, uint32_t * answer)
if (!dict || !name || !answer)
return GETDNS_RETURN_NO_SUCH_DICT_NAME;
item = getdns_dict_find(dict, name, false);
item = getdns_dict_find(dict, name, 0);
if (!item || item->dtype != t_int)
return GETDNS_RETURN_WRONG_TYPE_REQUESTED;
@ -350,7 +350,7 @@ getdns_dict_set_dict(struct getdns_dict * dict, char *name,
if (retval != GETDNS_RETURN_GOOD)
return retval;
item = getdns_dict_find(dict, name, true);
item = getdns_dict_find(dict, name, 0);
if (!item) {
getdns_dict_destroy(newdict);
return GETDNS_RETURN_NO_SUCH_DICT_NAME;
@ -376,7 +376,7 @@ getdns_dict_set_list(struct getdns_dict * dict, char *name,
if (retval != GETDNS_RETURN_GOOD)
return retval;
item = getdns_dict_find(dict, name, true);
item = getdns_dict_find(dict, name, 0);
if (!item) {
getdns_list_destroy(newlist);
return GETDNS_RETURN_NO_SUCH_DICT_NAME;
@ -402,7 +402,7 @@ getdns_dict_set_bindata(struct getdns_dict * dict, char *name,
if (!newbindata)
return GETDNS_RETURN_NO_SUCH_DICT_NAME;
item = getdns_dict_find(dict, name, true);
item = getdns_dict_find(dict, name, 0);
if (!item) {
getdns_bindata_destroy(dict->free, newbindata);
return GETDNS_RETURN_NO_SUCH_DICT_NAME;
@ -422,7 +422,7 @@ getdns_dict_set_int(struct getdns_dict * dict, char *name,
if (!dict || !name)
return GETDNS_RETURN_NO_SUCH_DICT_NAME;
item = getdns_dict_find(dict, name, true);
item = getdns_dict_find(dict, name, 0);
if (!item)
return GETDNS_RETURN_NO_SUCH_DICT_NAME;

View File

@ -111,7 +111,7 @@ main()
/* 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_context_create(&this_context, 1);
if (context_create_return != GETDNS_RETURN_GOOD) {
fprintf(stderr, "Trying to create the context failed: %d",
context_create_return);

View File

@ -49,7 +49,7 @@ main()
getdns_return_t this_ret;
/* Create the DNS context for this call */
context_create_return = getdns_context_create(&this_context, true);
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);

View File

@ -122,7 +122,7 @@ main()
/* 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_context_create(&this_context, 1);
if (context_create_return != GETDNS_RETURN_GOOD) {
fprintf(stderr, "Trying to create the context failed: %d",
context_create_return);

View File

@ -39,7 +39,6 @@
#include <stdint.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <stdbool.h>
struct event_base;

View File

@ -67,7 +67,7 @@ main(int argc, char** argv)
/* 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_context_create(&this_context, 1);
if (context_create_return != GETDNS_RETURN_GOOD) {
fprintf(stderr, "Trying to create the context failed: %d",
context_create_return);

View File

@ -48,7 +48,7 @@ main()
/* 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_context_create(&this_context, 1);
if (context_create_return != GETDNS_RETURN_GOOD) {
fprintf(stderr, "Trying to create the context failed: %d",
context_create_return);