]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix to Rename ub_callback_t to ub_callback_type, because POSIX
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 19 Jan 2017 09:08:15 +0000 (09:08 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 19 Jan 2017 09:08:15 +0000 (09:08 +0000)
  reserves _t typedefs.

git-svn-id: file:///svn/unbound/trunk@3988 be551aaa-1e26-0410-a405-d3ace91eadb9

configure
configure.ac
doc/Changelog
doc/libunbound.3.in
libunbound/context.c
libunbound/context.h
libunbound/libunbound.c
libunbound/unbound.h

index 97b32e6af11c8f86282c0731a0b7dab92184bc4f..be12baaef529ab09ebcf4929f650810f04704e68 100755 (executable)
--- a/configure
+++ b/configure
@@ -2805,7 +2805,7 @@ LIBUNBOUND_AGE=4
 # 1.5.9 had 6:1:4
 # 1.5.10 had 6:2:4
 # 1.6.0 had 6:3:4
-# 1.6.1 had 6:4:4
+# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
 
 #   Current  -- the number of the binary API that we're implementing
 #   Revision -- which iteration of the implementation of the binary
index abb37360c8508316a79099ace8a1ecab6d09e644..fd1c2771df0d2796c0483cf12a48583c9d75ff33 100644 (file)
@@ -68,7 +68,7 @@ LIBUNBOUND_AGE=4
 # 1.5.9 had 6:1:4
 # 1.5.10 had 6:2:4
 # 1.6.0 had 6:3:4
-# 1.6.1 had 6:4:4
+# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
 
 #   Current  -- the number of the binary API that we're implementing
 #   Revision -- which iteration of the implementation of the binary
index e6c5768ecedd5661640e25b5646a23dbda8f919c..1f9d3460fc1493dab2745d00b252f13c1690be3a 100644 (file)
@@ -1,3 +1,7 @@
+19 January 2017: Wouter
+       - Fix to Rename ub_callback_t to ub_callback_type, because POSIX
+         reserves _t typedefs.
+
 12 January 2017: Wouter
        - Fix to also block meta types 128 through to 248 with formerr. 
        - Fix #1206: Some view-related commands are missing from 'unbound-control -h'
index 4bdf7fd86249179559eb390dbdac1926f438c172..ac6939646eecf4ee7956e8b95246d79c48e71df2 100644 (file)
@@ -12,7 +12,7 @@
 .B unbound.h,
 .B ub_ctx,
 .B ub_result,
-.B ub_callback_t,
+.B ub_callback_type,
 .B ub_ctx_create,
 .B ub_ctx_delete,
 .B ub_ctx_set_option,
 .br
                  \fIint\fR rrtype, \fIint\fR rrclass, \fIvoid*\fR mydata, 
 .br
-                 \fIub_callback_t\fR callback, \fIint*\fR async_id);
+                 \fIub_callback_type\fR callback, \fIint*\fR async_id);
 .LP
 \fIint\fR
 \fBub_cancel\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR async_id);
index 94a2472ae5313a495b5a84fdaf5d8eededa2e1f5..e203111b70d8afd7651bb3048af81ed9b9506d9e 100644 (file)
@@ -127,7 +127,7 @@ find_id(struct ub_ctx* ctx, int* id)
 
 struct ctx_query* 
 context_new(struct ub_ctx* ctx, const char* name, int rrtype, int rrclass, 
-       ub_callback_t cb, void* cbarg)
+       ub_callback_type cb, void* cbarg)
 {
        struct ctx_query* q = (struct ctx_query*)calloc(1, sizeof(*q));
        if(!q) return NULL;
index d32c0b00aa033bc4a506ebc743c286925ee3ec08..0e363ebc3c260b22e21ab7a8cb718e473e232a69 100644 (file)
@@ -149,7 +149,7 @@ struct ctx_query {
        int cancelled;
 
        /** for async query, the callback function */
-       ub_callback_t cb;
+       ub_callback_type cb;
        /** for async query, the callback user arg */
        void* cb_arg;
 
@@ -242,7 +242,7 @@ void context_query_delete(struct ctx_query* q);
  * @return new ctx_query or NULL for malloc failure.
  */
 struct ctx_query* context_new(struct ub_ctx* ctx, const char* name, int rrtype,
-        int rrclass, ub_callback_t cb, void* cbarg);
+        int rrclass, ub_callback_type cb, void* cbarg);
 
 /**
  * Get a new alloc. Creates a new one or uses a cached one.
index aaaaec08ce9ee2b6d74dcb66150cf53d9c765ae2..7992b671ea8206baddd7dbd9fee5b700e4b73bf2 100644 (file)
@@ -500,7 +500,7 @@ ub_fd(struct ub_ctx* ctx)
 /** process answer from bg worker */
 static int
 process_answer_detail(struct ub_ctx* ctx, uint8_t* msg, uint32_t len,
-       ub_callback_t* cb, void** cbarg, int* err,
+       ub_callback_type* cb, void** cbarg, int* err,
        struct ub_result** res)
 {
        struct ctx_query* q;
@@ -567,7 +567,7 @@ static int
 process_answer(struct ub_ctx* ctx, uint8_t* msg, uint32_t len)
 {
        int err;
-       ub_callback_t cb;
+       ub_callback_type cb;
        void* cbarg;
        struct ub_result* res;
        int r;
@@ -610,7 +610,7 @@ int
 ub_wait(struct ub_ctx* ctx)
 {
        int err;
-       ub_callback_t cb;
+       ub_callback_type cb;
        void* cbarg;
        struct ub_result* res;
        int r;
@@ -734,7 +734,7 @@ ub_resolve_event(struct ub_ctx* ctx, const char* name, int rrtype,
        ub_comm_base_now(ctx->event_worker->base);
 
        /* create new ctx_query and attempt to add to the list */
-       q = context_new(ctx, name, rrtype, rrclass, (ub_callback_t)callback,
+       q = context_new(ctx, name, rrtype, rrclass, (ub_callback_type)callback,
                mydata);
        if(!q)
                return UB_NOMEM;
@@ -748,7 +748,7 @@ ub_resolve_event(struct ub_ctx* ctx, const char* name, int rrtype,
 
 int 
 ub_resolve_async(struct ub_ctx* ctx, const char* name, int rrtype, 
-       int rrclass, void* mydata, ub_callback_t callback, int* async_id)
+       int rrclass, void* mydata, ub_callback_type callback, int* async_id)
 {
        struct ctx_query* q;
        uint8_t* msg = NULL;
index 9c828fc292bce0c570c9749d633fbc0a7c963acc..9a076927f9a6705ba53b3202e2dd06baf27c1809 100644 (file)
@@ -223,7 +223,7 @@ struct ub_result {
  *             This structure is allocated on the heap and needs to be
  *             freed with ub_resolve_free(result);
  */
-typedef void (*ub_callback_t)(void*, int, struct ub_result*);
+typedef void (*ub_callback_type)(void*, int, struct ub_result*);
 
 /**
  * Create a resolving and validation context.
@@ -519,7 +519,7 @@ int ub_resolve(struct ub_ctx* ctx, const char* name, int rrtype,
  * @return 0 if OK, else error.
  */
 int ub_resolve_async(struct ub_ctx* ctx, const char* name, int rrtype, 
-       int rrclass, void* mydata, ub_callback_t callback, int* async_id);
+       int rrclass, void* mydata, ub_callback_type callback, int* async_id);
 
 /**
  * Cancel an async query in progress.