mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: 纳兰融雪 <lidehu@codinggirl.net>
Cc: musl <musl@lists.openwall.com>
Subject: Re: [musl] About the glibc libresolv vs musl network resolver routines signature
Date: Fri, 23 Oct 2020 13:08:25 -0400	[thread overview]
Message-ID: <20201023170824.GB534@brightrain.aerifal.cx> (raw)
In-Reply-To: <tencent_773946B73F37AC7F1F7AD837C4A254DE0708@qq.com>

On Fri, Oct 23, 2020 at 05:25:44PM +0800, 纳兰融雪 wrote:
> I work with any third party code written with glic, and I need
> compile and run it in a musl runtime.The code use `res_ninit`, but I
> cloud not find it in musl's resolv.h file.I noticed that glibc use
> `res_ninit`, `res_nclose`, `res_nquery`, etc, and marked `res_init`,
> `res_query`, etc as deprecated, but musl still using the old
> signature.I'm wondering:- How do I compile the code that use the
> `res_ninit` routine signature?- Is there a standard for the sinature
> for `resolv.h` (/usr/include/resolv.h)?- Will musl will use the new
> `res_ninit` glibc current using or the `res_init` style still?

resolv.h defines the __RES version macro to indicate the API level
provided, and its meaning is consistent across different libcs. __RES
>= 19991006 indicates support for the res_n* functions. musl's
resolver is stateless and does not have them, and defines __RES
appropriately to indicate that it doesn't.

Rich

      reply	other threads:[~2020-10-23 17:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23  9:25 =?gb18030?B?xMnAvMja0ak=?=
2020-10-23 17:08 ` Rich Felker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201023170824.GB534@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=lidehu@codinggirl.net \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).