<div dir="ltr">Hi,<div><br></div><div>I'm perfectly fine if we skip this patch, and to my understanding there is no benefits and only corresponds to external linkage.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014/1/14 Tom Gundersen <span dir="ltr"><<a href="mailto:teg@jklm.no" target="_blank">teg@jklm.no</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi Daniel,<br>
<br>
I guess we should only do this once we decide to export the API. I<br>
guess we won't be doing that for a few releases (we'll use it<br>
internally first to make sure it is the way we want it).<br>
<br>
Or are there any benefits to these annotations even when the symbols<br>
are not exported?<br>
<br>
-t<br>
<div><div class="h5"><br>
On Tue, Jan 14, 2014 at 3:04 PM, Daniel Buch <<a href="mailto:boogiewasthere@gmail.com">boogiewasthere@gmail.com</a>> wrote:<br>
> ---<br>
> src/libsystemd/sd-resolv.c | 38 +++++++++++++++++++-------------------<br>
> 1 file changed, 19 insertions(+), 19 deletions(-)<br>
><br>
> diff --git a/src/libsystemd/sd-resolv.c b/src/libsystemd/sd-resolv.c<br>
> index b8288ba..cd79a6c 100644<br>
> --- a/src/libsystemd/sd-resolv.c<br>
> +++ b/src/libsystemd/sd-resolv.c<br>
> @@ -414,7 +414,7 @@ static void* thread_worker(void *p) {<br>
> return NULL;<br>
> }<br>
><br>
> -sd_resolv_t* sd_resolv_new(unsigned n_proc) {<br>
> +_public_ sd_resolv_t* sd_resolv_new(unsigned n_proc) {<br>
> sd_resolv_t *resolv = NULL;<br>
> int i, r;<br>
><br>
> @@ -468,7 +468,7 @@ fail:<br>
> return NULL;<br>
> }<br>
><br>
> -void sd_resolv_free(sd_resolv_t *resolv) {<br>
> +_public_ void sd_resolv_free(sd_resolv_t *resolv) {<br>
> int i;<br>
> int saved_errno = errno;<br>
> unsigned p;<br>
> @@ -511,7 +511,7 @@ void sd_resolv_free(sd_resolv_t *resolv) {<br>
> errno = saved_errno;<br>
> }<br>
><br>
> -int sd_resolv_fd(sd_resolv_t *resolv) {<br>
> +_public_ int sd_resolv_fd(sd_resolv_t *resolv) {<br>
> assert(resolv);<br>
><br>
> return resolv->fds[RESPONSE_RECV_FD];<br>
> @@ -709,7 +709,7 @@ static int handle_response(sd_resolv_t *resolv, const packet_t *packet, size_t l<br>
> return 0;<br>
> }<br>
><br>
> -int sd_resolv_wait(sd_resolv_t *resolv, int block) {<br>
> +_public_ int sd_resolv_wait(sd_resolv_t *resolv, int block) {<br>
> int handled = 0;<br>
> assert(resolv);<br>
><br>
> @@ -787,7 +787,7 @@ static sd_resolv_query_t *alloc_query(sd_resolv_t *resolv) {<br>
> return q;<br>
> }<br>
><br>
> -sd_resolv_query_t* sd_resolv_getaddrinfo(sd_resolv_t *resolv, const char *node, const char *service, const struct addrinfo *hints) {<br>
> +_public_ sd_resolv_query_t* sd_resolv_getaddrinfo(sd_resolv_t *resolv, const char *node, const char *service, const struct addrinfo *hints) {<br>
> addrinfo_request_t data[BUFSIZE/sizeof(addrinfo_request_t) + 1] = {};<br>
> addrinfo_request_t *req = data;<br>
> sd_resolv_query_t *q;<br>
> @@ -840,7 +840,7 @@ fail:<br>
> return NULL;<br>
> }<br>
><br>
> -int sd_resolv_getaddrinfo_done(sd_resolv_t *resolv, sd_resolv_query_t* q, struct addrinfo **ret_res) {<br>
> +_public_ int sd_resolv_getaddrinfo_done(sd_resolv_t *resolv, sd_resolv_query_t* q, struct addrinfo **ret_res) {<br>
> int ret;<br>
> assert(resolv);<br>
> assert(q);<br>
> @@ -871,7 +871,7 @@ int sd_resolv_getaddrinfo_done(sd_resolv_t *resolv, sd_resolv_query_t* q, struct<br>
> return ret;<br>
> }<br>
><br>
> -sd_resolv_query_t* sd_resolv_getnameinfo(sd_resolv_t *resolv, const struct sockaddr *sa, socklen_t salen, int flags, int gethost, int getserv) {<br>
> +_public_ sd_resolv_query_t* sd_resolv_getnameinfo(sd_resolv_t *resolv, const struct sockaddr *sa, socklen_t salen, int flags, int gethost, int getserv) {<br>
> nameinfo_request_t data[BUFSIZE/sizeof(nameinfo_request_t) + 1] = {};<br>
> nameinfo_request_t *req = data;<br>
> sd_resolv_query_t *q;<br>
> @@ -917,7 +917,7 @@ fail:<br>
> return NULL;<br>
> }<br>
><br>
> -int sd_resolv_getnameinfo_done(sd_resolv_t *resolv, sd_resolv_query_t* q, char *ret_host, size_t hostlen, char *ret_serv, size_t servlen) {<br>
> +_public_ int sd_resolv_getnameinfo_done(sd_resolv_t *resolv, sd_resolv_query_t* q, char *ret_host, size_t hostlen, char *ret_serv, size_t servlen) {<br>
> int ret;<br>
> assert(resolv);<br>
> assert(q);<br>
> @@ -1002,15 +1002,15 @@ fail:<br>
> return NULL;<br>
> }<br>
><br>
> -sd_resolv_query_t* sd_resolv_res_query(sd_resolv_t *resolv, const char *dname, int class, int type) {<br>
> +_public_ sd_resolv_query_t* sd_resolv_res_query(sd_resolv_t *resolv, const char *dname, int class, int type) {<br>
> return resolv_res(resolv, REQUEST_RES_QUERY, dname, class, type);<br>
> }<br>
><br>
> -sd_resolv_query_t* sd_resolv_res_search(sd_resolv_t *resolv, const char *dname, int class, int type) {<br>
> +_public_ sd_resolv_query_t* sd_resolv_res_search(sd_resolv_t *resolv, const char *dname, int class, int type) {<br>
> return resolv_res(resolv, REQUEST_RES_SEARCH, dname, class, type);<br>
> }<br>
><br>
> -int sd_resolv_res_done(sd_resolv_t *resolv, sd_resolv_query_t* q, unsigned char **answer) {<br>
> +_public_ int sd_resolv_res_done(sd_resolv_t *resolv, sd_resolv_query_t* q, unsigned char **answer) {<br>
> int ret;<br>
> assert(resolv);<br>
> assert(q);<br>
> @@ -1043,17 +1043,17 @@ int sd_resolv_res_done(sd_resolv_t *resolv, sd_resolv_query_t* q, unsigned char<br>
> return ret < 0 ? -errno : ret;<br>
> }<br>
><br>
> -sd_resolv_query_t* sd_resolv_getnext(sd_resolv_t *resolv) {<br>
> +_public_ sd_resolv_query_t* sd_resolv_getnext(sd_resolv_t *resolv) {<br>
> assert(resolv);<br>
> return resolv->done_head;<br>
> }<br>
><br>
> -int sd_resolv_getnqueries(sd_resolv_t *resolv) {<br>
> +_public_ int sd_resolv_getnqueries(sd_resolv_t *resolv) {<br>
> assert(resolv);<br>
> return resolv->n_queries;<br>
> }<br>
><br>
> -void sd_resolv_cancel(sd_resolv_t *resolv, sd_resolv_query_t* q) {<br>
> +_public_ void sd_resolv_cancel(sd_resolv_t *resolv, sd_resolv_query_t* q) {<br>
> int i;<br>
> int saved_errno = errno;<br>
><br>
> @@ -1089,7 +1089,7 @@ void sd_resolv_cancel(sd_resolv_t *resolv, sd_resolv_query_t* q) {<br>
> errno = saved_errno;<br>
> }<br>
><br>
> -void sd_resolv_freeaddrinfo(struct addrinfo *ai) {<br>
> +_public_ void sd_resolv_freeaddrinfo(struct addrinfo *ai) {<br>
> int saved_errno = errno;<br>
><br>
> while (ai) {<br>
> @@ -1105,7 +1105,7 @@ void sd_resolv_freeaddrinfo(struct addrinfo *ai) {<br>
> errno = saved_errno;<br>
> }<br>
><br>
> -void sd_resolv_freeanswer(unsigned char *answer) {<br>
> +_public_ void sd_resolv_freeanswer(unsigned char *answer) {<br>
> int saved_errno = errno;<br>
><br>
> if (!answer)<br>
> @@ -1116,7 +1116,7 @@ void sd_resolv_freeanswer(unsigned char *answer) {<br>
> errno = saved_errno;<br>
> }<br>
><br>
> -int sd_resolv_isdone(sd_resolv_t *resolv, sd_resolv_query_t*q) {<br>
> +_public_ int sd_resolv_isdone(sd_resolv_t *resolv, sd_resolv_query_t*q) {<br>
> assert(resolv);<br>
> assert(q);<br>
> assert(q->resolv == resolv);<br>
> @@ -1124,7 +1124,7 @@ int sd_resolv_isdone(sd_resolv_t *resolv, sd_resolv_query_t*q) {<br>
> return q->done;<br>
> }<br>
><br>
> -void sd_resolv_setuserdata(sd_resolv_t *resolv, sd_resolv_query_t *q, void *userdata) {<br>
> +_public_ void sd_resolv_setuserdata(sd_resolv_t *resolv, sd_resolv_query_t *q, void *userdata) {<br>
> assert(q);<br>
> assert(resolv);<br>
> assert(q->resolv = resolv);<br>
> @@ -1132,7 +1132,7 @@ void sd_resolv_setuserdata(sd_resolv_t *resolv, sd_resolv_query_t *q, void *user<br>
> q->userdata = userdata;<br>
> }<br>
><br>
> -void* sd_resolv_getuserdata(sd_resolv_t *resolv, sd_resolv_query_t *q) {<br>
> +_public_ void* sd_resolv_getuserdata(sd_resolv_t *resolv, sd_resolv_query_t *q) {<br>
> assert(q);<br>
> assert(resolv);<br>
> assert(q->resolv = resolv);<br>
> --<br>
> 1.8.5.2<br>
><br>
</div></div>> _______________________________________________<br>
> systemd-devel mailing list<br>
> <a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
</blockquote></div><br></div></div>