mirror of
https://github.com/darlinghq/darling-libresolv.git
synced 2025-02-17 02:28:45 +00:00
Update Source To libresolv-68
This commit is contained in:
parent
a37864f881
commit
aa9f15d74f
6
dns.c
6
dns.c
@ -728,7 +728,7 @@ _pdns_check_search_list(pdns_handle_t *pdns)
|
||||
}
|
||||
}
|
||||
|
||||
__private_extern__ void
|
||||
__attribute__((__visibility__("hidden"))) void
|
||||
_check_cache(sdns_handle_t *sdns)
|
||||
{
|
||||
int i, n, status, refresh, sc_dns_count;
|
||||
@ -1405,7 +1405,7 @@ _pdns_query(sdns_handle_t *sdns, pdns_handle_t *pdns, const char *name, uint32_t
|
||||
return res_nquery_soa_min(pdns->res, name, class, type, (u_char *)buf, len, from, (int32_t *)fromlen, min);
|
||||
}
|
||||
|
||||
__private_extern__ int
|
||||
__attribute__((__visibility__("hidden"))) int
|
||||
_pdns_search(sdns_handle_t *sdns, pdns_handle_t *pdns, const char *name, uint32_t class, uint32_t type, char *buf, uint32_t len, struct sockaddr *from, uint32_t *fromlen)
|
||||
{
|
||||
char *dot, *qname;
|
||||
@ -1520,7 +1520,7 @@ _sdns_send(sdns_handle_t *sdns, const char *name, uint32_t class, uint32_t type,
|
||||
return n;
|
||||
}
|
||||
|
||||
__private_extern__ int
|
||||
__attribute__((__visibility__("hidden"))) int
|
||||
_sdns_search(sdns_handle_t *sdns, const char *name, uint32_t class, uint32_t type, uint32_t fqdn, uint32_t recurse, char *buf, uint32_t len, struct sockaddr *from, uint32_t *fromlen, int *min)
|
||||
{
|
||||
pdns_handle_t *primary, **pdns;
|
||||
|
2
dns.h
2
dns.h
@ -110,7 +110,7 @@ extern void dns_set_debug(dns_handle_t dns, uint32_t flag);
|
||||
/*
|
||||
* Returns the number of names in the search list.
|
||||
*/
|
||||
extern uint32_t dns_search_list_domain_count(dns_handle_t dns);
|
||||
extern uint32_t dns_search_list_count(dns_handle_t dns);
|
||||
|
||||
/*
|
||||
* Returns the domain name at index i in the search list.
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef __DNS_PRIVATE_H__
|
||||
#define __DNS_PRIVATE_H__
|
||||
|
||||
#include <dns.h>
|
||||
#include <resolv.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#define MDNS_HANDLE_NAME "*MDNS*"
|
||||
|
55
dns_util.c
55
dns_util.c
@ -74,9 +74,6 @@
|
||||
|
||||
#define MAXPACKET 1024
|
||||
|
||||
extern void res_client_close(res_state res);
|
||||
extern int __res_nquery(res_state statp, const char *name, int class, int type, u_char *answer, int anslen);
|
||||
extern int dns_res_send(res_state statp, const u_char *buf, int buflen, u_char *ans, int *anssiz, struct sockaddr *from, int *fromlen);
|
||||
extern void _check_cache(sdns_handle_t *sdns);
|
||||
extern int _sdns_search(sdns_handle_t *sdns, const char *name, uint32_t class, uint32_t type, uint32_t fqdn, uint32_t recurse, char *buf, uint32_t len, struct sockaddr *from, uint32_t *fromlen, int *min);
|
||||
extern int _pdns_search(sdns_handle_t *sdns, pdns_handle_t *pdns, const char *name, uint32_t class, uint32_t type, char *buf, uint32_t len, struct sockaddr *from, uint32_t *fromlen);
|
||||
@ -316,6 +313,7 @@ _dns_parse_domain_name(const char *p, char **x, int32_t *remaining)
|
||||
return name;
|
||||
}
|
||||
|
||||
static
|
||||
dns_resource_record_t *
|
||||
_dns_parse_resource_record_internal(const char *p, char **x, int32_t *remaining)
|
||||
{
|
||||
@ -742,6 +740,7 @@ dns_parse_resource_record(const char *buf, uint32_t len)
|
||||
return _dns_parse_resource_record_internal(buf, &x, &remaining);
|
||||
}
|
||||
|
||||
static
|
||||
dns_question_t *
|
||||
_dns_parse_question_internal(const char *p, char **x, int32_t *remaining)
|
||||
{
|
||||
@ -1159,55 +1158,6 @@ _dns_append_resource_record(dns_resource_record_t *r, char **s, uint16_t *l)
|
||||
}
|
||||
}
|
||||
|
||||
char *
|
||||
dns_build_reply(dns_reply_t *dnsr, uint16_t *rl)
|
||||
{
|
||||
uint16_t i, len;
|
||||
dns_header_t *h;
|
||||
char *s, *x;
|
||||
|
||||
if (dnsr == NULL) return NULL;
|
||||
|
||||
len = NS_HFIXEDSZ;
|
||||
|
||||
s = malloc(len);
|
||||
x = s + len;
|
||||
|
||||
memset(s, 0, len);
|
||||
*rl = len;
|
||||
|
||||
h = (dns_header_t *)s;
|
||||
|
||||
h->xid = htons(dnsr->header->xid);
|
||||
h->flags = htons(dnsr->header->flags);
|
||||
h->qdcount = htons(dnsr->header->qdcount);
|
||||
h->ancount = htons(dnsr->header->ancount);
|
||||
h->nscount = htons(dnsr->header->nscount);
|
||||
h->arcount = htons(dnsr->header->arcount);
|
||||
|
||||
for (i = 0; i < dnsr->header->qdcount; i++)
|
||||
{
|
||||
_dns_append_question(dnsr->question[i], &s, rl);
|
||||
}
|
||||
|
||||
for (i = 0; i < dnsr->header->ancount; i++)
|
||||
{
|
||||
_dns_append_resource_record(dnsr->answer[i], &s, rl);
|
||||
}
|
||||
|
||||
for (i = 0; i < dnsr->header->nscount; i++)
|
||||
{
|
||||
_dns_append_resource_record(dnsr->authority[i], &s, rl);
|
||||
}
|
||||
|
||||
for (i = 0; i < dnsr->header->arcount; i++)
|
||||
{
|
||||
_dns_append_resource_record(dnsr->additional[i], &s, rl);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
void
|
||||
dns_free_question(dns_question_t *q)
|
||||
{
|
||||
@ -1247,6 +1197,7 @@ dns_get_buffer_size(dns_handle_t d)
|
||||
return dns->recvsize;
|
||||
}
|
||||
|
||||
static
|
||||
dns_reply_t *
|
||||
dns_lookup_soa_min(dns_handle_t d, const char *name, uint32_t class, uint32_t type, int *min)
|
||||
{
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <dns.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* Status returned in a dns_reply_t
|
||||
|
4
dst.h
4
dst.h
@ -1,6 +1,8 @@
|
||||
#ifndef DST_H
|
||||
#define DST_H
|
||||
|
||||
#pragma GCC visibility push(hidden)
|
||||
|
||||
#ifndef HAS_DST_KEY
|
||||
#define DST_KEY RES_9_DST_KEY
|
||||
typedef struct dst_key {
|
||||
@ -153,4 +155,6 @@ u_int16_t dst_s_id_calc(const u_char *key_data, const int key_len);
|
||||
#define MISSING_KEY_OR_SIGNATURE (-30)
|
||||
#define UNSUPPORTED_KEYALG (-31)
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
#endif /* DST_H */
|
||||
|
@ -466,16 +466,10 @@ dst_hmac_md5_init()
|
||||
}
|
||||
|
||||
#else
|
||||
#include "dst_internal.h"
|
||||
#define dst_hmac_md5_init res_9_dst_hmac_md5_init
|
||||
int
|
||||
dst_hmac_md5_init(){
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THE SOFTWARE.
|
||||
*/
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/param.h>
|
||||
#if (!defined(BSD)) || (BSD < 199306)
|
||||
# include <sys/bitypes.h>
|
||||
@ -55,6 +56,8 @@ typedef struct dst_key {
|
||||
#include <isc/dst.h>
|
||||
#endif
|
||||
|
||||
#pragma GCC visibility push(hidden)
|
||||
|
||||
/*
|
||||
* define what crypto systems are supported for RSA,
|
||||
* BSAFE is prefered over RSAREF; only one can be set at any time
|
||||
@ -183,6 +186,6 @@ void
|
||||
dst_s_dump(const int mode, const u_char *data, const int size,
|
||||
const char *msg);
|
||||
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
#endif /* DST_INTERNAL_H */
|
||||
|
@ -1 +0,0 @@
|
||||
../dns.h
|
13
installapi.h
Normal file
13
installapi.h
Normal file
@ -0,0 +1,13 @@
|
||||
#include <sys/cdefs.h>
|
||||
#include <mach/mach.h>
|
||||
#include <netdb.h>
|
||||
#include <resolv.h>
|
||||
|
||||
// These are declared in Libinfo's headers. These declarations should eventually move into headers provided by libresolv.
|
||||
|
||||
typedef void (*dns_async_callback)(int32_t status, char *buf, uint32_t len, struct sockaddr *from, int fromlen, void *context);
|
||||
int32_t dns_async_start(mach_port_t *p, const char *name, uint16_t dnsclass, uint16_t dnstype, uint32_t do_search, dns_async_callback callback, void *context);
|
||||
int32_t dns_async_send(mach_port_t *p, const char *name, uint16_t dnsclass, uint16_t dnstype, uint32_t do_search);
|
||||
int32_t dns_async_receive(mach_port_t p, char **buf, uint32_t *len, struct sockaddr **from, uint32_t *fromlen);
|
||||
int32_t dns_async_handle_reply(void *msg);
|
||||
void dns_async_cancel(mach_port_t p);
|
@ -237,7 +237,6 @@
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "sh \"$PROJECT_DIR\"/xcodescripts/headers.sh\nsh \"$PROJECT_DIR\"/xcodescripts/manpages.sh\nsh \"$PROJECT_DIR\"/xcodescripts/links.sh";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
|
@ -638,7 +638,7 @@ ns_name_skip(const u_char **ptrptr, const u_char *eom)
|
||||
{
|
||||
const u_char *cp;
|
||||
u_int n;
|
||||
int l;
|
||||
int l = 0;
|
||||
|
||||
cp = *ptrptr;
|
||||
while (cp < eom && (n = *cp++) != 0) {
|
||||
@ -648,7 +648,7 @@ ns_name_skip(const u_char **ptrptr, const u_char *eom)
|
||||
cp += n;
|
||||
continue;
|
||||
case NS_TYPE_ELT: /* EDNS0 extended label */
|
||||
if ((l = labellen(cp - 1)) < 0) {
|
||||
if (cp < eom && (l = labellen(cp - 1)) < 0) {
|
||||
errno = EMSGSIZE; /* XXX */
|
||||
return(-1);
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ struct __res_9_state _res_9;
|
||||
|
||||
extern int __res_vinit(res_state, int);
|
||||
|
||||
__attribute__((__visibility__("hidden")))
|
||||
const char *__res_opcodes[] = {
|
||||
"QUERY",
|
||||
"IQUERY",
|
||||
|
20
res_debug.c
20
res_debug.c
@ -364,6 +364,7 @@ p_fqname(const u_char *cp, const u_char *msg, FILE *file) {
|
||||
* that ns_c_any is a qclass but not a class. (You can ask for records of class
|
||||
* ns_c_any, but you can't have any records of that class in the database.)
|
||||
*/
|
||||
static
|
||||
const struct res_sym __res_p_class_syms[] = {
|
||||
{ns_c_in, "IN", (char *)0},
|
||||
{ns_c_chaos, "CHAOS", (char *)0},
|
||||
@ -399,24 +400,6 @@ const struct res_sym __res_p_update_section_syms[] = {
|
||||
{0, (char *)0, (char *)0}
|
||||
};
|
||||
|
||||
const struct res_sym __res_p_key_syms[] = {
|
||||
{NS_ALG_MD5RSA, "RSA", "RSA KEY with MD5 hash"},
|
||||
{NS_ALG_DH, "DH", "Diffie Hellman"},
|
||||
{NS_ALG_DSA, "DSA", "Digital Signature Algorithm"},
|
||||
{NS_ALG_EXPIRE_ONLY, "EXPIREONLY", "No algorithm"},
|
||||
{NS_ALG_PRIVATE_OID, "PRIVATE", "Algorithm obtained from OID"},
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
|
||||
const struct res_sym __res_p_cert_syms[] = {
|
||||
{cert_t_pkix, "PKIX", "PKIX (X.509v3) Certificate"},
|
||||
{cert_t_spki, "SPKI", "SPKI certificate"},
|
||||
{cert_t_pgp, "PGP", "PGP certificate"},
|
||||
{cert_t_url, "URL", "URL Private"},
|
||||
{cert_t_oid, "OID", "OID Private"},
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
|
||||
/*
|
||||
* Names of RR types and qtypes. Types and qtypes are the same, except
|
||||
* that T_ANY is a qtype but not a type. (You can ask for records of type
|
||||
@ -478,6 +461,7 @@ const struct res_sym __p_type_syms[] = {
|
||||
/*
|
||||
* Names of DNS rcodes.
|
||||
*/
|
||||
static
|
||||
const struct res_sym __res_p_rcode_syms[] = {
|
||||
{ns_r_noerror, "NOERROR", "no error"},
|
||||
{ns_r_formerr, "FORMERR", "format error"},
|
||||
|
@ -130,6 +130,7 @@ static u_int32_t net_mask __P((struct in_addr));
|
||||
* Resolver state default settings.
|
||||
*/
|
||||
|
||||
__attribute__((__visibility__("hidden")))
|
||||
res_state
|
||||
res_build_start(res_state x)
|
||||
{
|
||||
@ -172,6 +173,7 @@ res_build_start(res_state x)
|
||||
return res;
|
||||
}
|
||||
|
||||
__attribute__((__visibility__("hidden")))
|
||||
int
|
||||
res_build_finish(res_state res, uint32_t timeout, uint16_t port)
|
||||
{
|
||||
@ -207,6 +209,7 @@ res_build_finish(res_state res, uint32_t timeout, uint16_t port)
|
||||
return 0;
|
||||
}
|
||||
|
||||
__attribute__((__visibility__("hidden")))
|
||||
int
|
||||
res_build_sortlist(res_state res, struct in_addr addr, struct in_addr mask)
|
||||
{
|
||||
@ -225,6 +228,7 @@ res_build_sortlist(res_state res, struct in_addr addr, struct in_addr mask)
|
||||
return 0;
|
||||
}
|
||||
|
||||
__attribute__((__visibility__("hidden")))
|
||||
char *
|
||||
res_next_word(char **p)
|
||||
{
|
||||
@ -256,6 +260,7 @@ res_next_word(char **p)
|
||||
return s;
|
||||
}
|
||||
|
||||
__attribute__((__visibility__("hidden")))
|
||||
int
|
||||
res_build(res_state res, uint16_t port, uint32_t *nsrch, char *key, char *val)
|
||||
{
|
||||
@ -518,7 +523,7 @@ res_build(res_state res, uint16_t port, uint32_t *nsrch, char *key, char *val)
|
||||
*
|
||||
* Return 0 if completes successfully, -1 on error
|
||||
*/
|
||||
|
||||
static
|
||||
int
|
||||
res_vinit_from_file(res_state statp, int preinit, char *resconf_file)
|
||||
{
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <sys/time.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC visibility push(hidden)
|
||||
|
||||
/*
|
||||
* status codes from dns_res_xxx SPIs
|
||||
* positive numbers are ns_rcode values.
|
||||
@ -107,4 +109,10 @@ void res_interrupt_request(void *token);
|
||||
void *res_init_interrupt_token(void);
|
||||
void res_delete_interrupt_token(void *token);
|
||||
|
||||
extern void res_client_close(res_state res);
|
||||
extern int __res_nquery(res_state statp, const char *name, int class, int type, u_char *answer, int anslen);
|
||||
extern int dns_res_send(res_state statp, const u_char *buf, int buflen, u_char *ans, int *anssiz, struct sockaddr *from, int *fromlen);
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
#endif
|
||||
|
10
res_query.c
10
res_query.c
@ -101,8 +101,8 @@ static const char rcsid[] = "$Id: res_query.c,v 1.1 2006/03/01 19:01:38 majka Ex
|
||||
#endif
|
||||
|
||||
/* interrupt mechanism is implemented in res_send.c */
|
||||
__private_extern__ int interrupt_pipe_enabled;
|
||||
__private_extern__ pthread_key_t interrupt_pipe_key;
|
||||
extern int interrupt_pipe_enabled;
|
||||
extern pthread_key_t interrupt_pipe_key;
|
||||
|
||||
/* Options. Leave them on. */
|
||||
#define DEBUG
|
||||
@ -584,7 +584,7 @@ res_soa_minimum(const u_char *msg, int len)
|
||||
*
|
||||
* Caller must parse answer and determine whether it answers the question.
|
||||
*/
|
||||
__private_extern__ int
|
||||
__attribute__((__visibility__("hidden"))) int
|
||||
res_nquery_soa_min(res_state statp, const char *name, int class, int type, u_char *answer, int anslen, struct sockaddr *from, int *fromlen, int *min)
|
||||
{
|
||||
u_char buf[MAXPACKET];
|
||||
@ -676,6 +676,7 @@ again:
|
||||
return (n);
|
||||
}
|
||||
|
||||
__attribute__((__visibility__("hidden")))
|
||||
int
|
||||
res_nquery_2(res_state statp, const char *name, int class, int type, u_char *answer, int anslen, struct sockaddr *from, int *fromlen)
|
||||
{
|
||||
@ -699,6 +700,7 @@ res_nquery(res_state statp, const char *name, int class, int type, u_char *answe
|
||||
* Perform a call on res_query on the concatenation of name and domain,
|
||||
* removing a trailing dot from name if domain is NULL.
|
||||
*/
|
||||
__attribute__((__visibility__("hidden")))
|
||||
int
|
||||
res_nquerydomain_2(res_state statp, const char *name, const char *domain, int class, int type, u_char *answer, int anslen, struct sockaddr *from, int *fromlen)
|
||||
{
|
||||
@ -766,6 +768,7 @@ res_nquerydomain(res_state statp, const char *name, const char *domain, int clas
|
||||
* If enabled, implement search rules until answer or unrecoverable failure
|
||||
* is detected. Error code, if any, is left in H_ERRNO.
|
||||
*/
|
||||
__attribute__((__visibility__("hidden")))
|
||||
int
|
||||
res_nsearch_2(res_state statp, const char *name, int class, int type, u_char *answer, int anslen, struct sockaddr *from, int *fromlen)
|
||||
{
|
||||
@ -897,6 +900,7 @@ res_nsearch_2(res_state statp, const char *name, int class, int type, u_char *an
|
||||
return (-1);
|
||||
}
|
||||
|
||||
__attribute__((__visibility__("hidden")))
|
||||
int
|
||||
__res_nsearch_list_2(res_state statp, const char *name, int class, int type, u_char *answer, int anslen, struct sockaddr *from, int *fromlen, int nsearch, char **search)
|
||||
{
|
||||
|
33
res_send.c
33
res_send.c
@ -159,15 +159,18 @@ static int dns_pselect(int, void *, void *, void *, struct timespec *, const si
|
||||
static const int niflags = NI_NUMERICHOST | NI_NUMERICSERV;
|
||||
|
||||
/* interrupt mechanism is shared with res_query.c */
|
||||
int interrupt_pipe_enabled = 0;
|
||||
pthread_key_t interrupt_pipe_key;
|
||||
__attribute__((__visibility__("hidden"))) int interrupt_pipe_enabled = 0;
|
||||
__attribute__((__visibility__("hidden"))) pthread_key_t interrupt_pipe_key;
|
||||
|
||||
static int
|
||||
bind_random(int sock)
|
||||
bind_random(int sock, int family)
|
||||
{
|
||||
int i, status;
|
||||
uint16_t src_port;
|
||||
struct sockaddr_in local;
|
||||
struct sockaddr_storage local;
|
||||
struct sockaddr_in *sin;
|
||||
struct sockaddr_in6 *sin6;
|
||||
struct sockaddr *sa;
|
||||
|
||||
src_port = 0;
|
||||
status = -1;
|
||||
@ -176,10 +179,24 @@ bind_random(int sock)
|
||||
{
|
||||
/* random port in the range RANDOM_BIND_FIRST to RANDOM_BIND_LAST */
|
||||
src_port = (res_randomid() % (RANDOM_BIND_LAST - RANDOM_BIND_FIRST)) + RANDOM_BIND_FIRST;
|
||||
memset(&local, 0, sizeof(struct sockaddr_in));
|
||||
local.sin_port = htons(src_port);
|
||||
memset(&local, 0, sizeof(local));
|
||||
switch (family) {
|
||||
case AF_INET:
|
||||
sin = (struct sockaddr_in *)&local;
|
||||
sin->sin_len = sizeof(struct sockaddr_in);
|
||||
sin->sin_family = family;
|
||||
sin->sin_port = htons(src_port);
|
||||
break;
|
||||
case AF_INET6:
|
||||
sin6 = (struct sockaddr_in6 *)&local;
|
||||
sin6->sin6_len = sizeof(struct sockaddr_in6);
|
||||
sin6->sin6_family = family;
|
||||
sin6->sin6_port = htons(src_port);
|
||||
break;
|
||||
}
|
||||
|
||||
status = bind(sock, (struct sockaddr *)&local, sizeof(struct sockaddr_in));
|
||||
sa = (struct sockaddr *)&local;
|
||||
status = bind(sock, sa, sa->sa_len);
|
||||
}
|
||||
|
||||
return status;
|
||||
@ -1191,7 +1208,7 @@ send_dg(res_state statp, const u_char *buf, int buflen, u_char *ans, int *anssiz
|
||||
return DNS_RES_STATUS_SYSTEM_ERROR;
|
||||
}
|
||||
|
||||
bind_random(EXT(statp).nssocks[ns]);
|
||||
bind_random(EXT(statp).nssocks[ns], nsap->sa_family);
|
||||
|
||||
#ifndef CANNOT_CONNECT_DGRAM
|
||||
/*
|
||||
|
@ -79,6 +79,8 @@
|
||||
#endif
|
||||
#include <resolv.h>
|
||||
|
||||
#pragma GCC visibility push(hidden)
|
||||
|
||||
/*
|
||||
* This RR-like structure is particular to UPDATE.
|
||||
*/
|
||||
@ -114,4 +116,6 @@ void res_freeupdrec __P((ns_updrec *));
|
||||
int res_nmkupdate __P((res_state, ns_updrec *, u_char *, int));
|
||||
int res_nupdate __P((res_state, ns_updrec *, ns_tsig_key *));
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
#endif /*_RES_UPDATE_H_*/
|
||||
|
13
resolv.h
13
resolv.h
@ -303,7 +303,7 @@ union res_sockaddr_union {
|
||||
/* 0x00010000 */
|
||||
|
||||
/* Things involving an internal (static) resolver context. */
|
||||
#ifndef __BIND_NOSTATIC
|
||||
#if !defined(__BIND_NOSTATIC) && !defined(__BIND_INSTALLAPI)
|
||||
extern struct __res_state _res;
|
||||
#endif
|
||||
|
||||
@ -351,17 +351,8 @@ __END_DECLS
|
||||
*
|
||||
*/
|
||||
#define res_sym res_9_sym
|
||||
#define __p_key_syms __res_9_p_key_syms
|
||||
#define __p_cert_syms __res_9_p_cert_syms
|
||||
#define __p_class_syms __res_9_p_class_syms
|
||||
#define __p_type_syms __res_9_p_type_syms
|
||||
#define __p_rcode_syms __res_9_p_rcode_syms
|
||||
|
||||
extern const struct res_sym __p_key_syms[];
|
||||
extern const struct res_sym __p_cert_syms[];
|
||||
extern const struct res_sym __p_class_syms[];
|
||||
extern const struct res_sym __p_type_syms[];
|
||||
extern const struct res_sym __p_rcode_syms[];
|
||||
#endif /* SHARED_LIBBIND */
|
||||
|
||||
#define b64_ntop res_9_b64_ntop
|
||||
@ -472,8 +463,6 @@ int res_findzonecut __P((res_state, const char *, ns_class, int, char *, size_t
|
||||
int res_findzonecut2 __P((res_state, const char *, ns_class, int, char *, size_t, union res_sockaddr_union *, int));
|
||||
void res_nclose __P((res_state));
|
||||
int res_nopt __P((res_state, int, u_char *, int, int));
|
||||
void res_send_setqhook __P((res_send_qhook hook));
|
||||
void res_send_setrhook __P((res_send_rhook hook));
|
||||
int __res_vinit __P((res_state, int));
|
||||
void res_destroyservicelist __P((void));
|
||||
const char * res_servicename __P((u_int16_t port, const char *proto));
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e -x
|
||||
|
||||
DSTROOT="$DSTROOT$INSTALL_PATH_PREFIX"
|
||||
DIR="$DSTROOT"/usr/include/arpa
|
||||
install -d -m 0755 -o "$INSTALL_OWNER" -g "$INSTALL_GROUP" \
|
||||
"$DIR"
|
||||
|
@ -1,16 +1,15 @@
|
||||
#include "<DEVELOPER_DIR>/Makefiles/CoreOS/Xcode/BSD.xcconfig"
|
||||
#include "<DEVELOPER_DIR>/AppleInternal/XcodeConfig/SimulatorSupport.xcconfig"
|
||||
|
||||
VERSION_INFO_PREFIX=__attribute__((visibility("hidden")))
|
||||
PRODUCT_NAME = $(TARGET_NAME).$(FRAMEWORK_VERSION)
|
||||
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
|
||||
CODE_SIGN_IDENTITY = -
|
||||
PROVISIONING_PROFILE =
|
||||
INSTALL_PATH_ACTUAL = /usr/lib
|
||||
INSTALL_PATH[sdk=macosx*] = $(INSTALL_PATH_ACTUAL)
|
||||
INSTALL_PATH = /usr/lib
|
||||
COPY_PHASE_STRIP = YES
|
||||
FRAMEWORK_VERSION = 9
|
||||
PRIVATE_HEADERS_FOLDER_PATH = $(INSTALL_PATH_PREFIX)/usr/local/include
|
||||
PUBLIC_HEADERS_FOLDER_PATH = $(INSTALL_PATH_PREFIX)/usr/include
|
||||
PRIVATE_HEADERS_FOLDER_PATH = /usr/local/include
|
||||
PUBLIC_HEADERS_FOLDER_PATH = /usr/include
|
||||
ALWAYS_SEARCH_USER_PATHS = NO
|
||||
OTHER_CFLAGS = -fno-common
|
||||
WARNING_CFLAGS = -Wall
|
||||
@ -23,3 +22,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES
|
||||
GCC_WARN_UNUSED_VARIABLE = YES
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES
|
||||
INSTALLHDRS_SCRIPT_PHASE = YES
|
||||
IS_ZIPPERED = YES
|
||||
SUPPORTS_TEXT_BASED_API = YES
|
||||
TAPI_VERIFY_MODE = Pedantic
|
||||
OTHER_TAPI_FLAGS = -D__BIND_INSTALLAPI -extra-public-header $(SRCROOT)/installapi.h
|
||||
|
@ -3,9 +3,17 @@ set -e -x
|
||||
|
||||
if [ "$ACTION" = installhdrs ]; then exit 0; fi
|
||||
|
||||
DSTROOT="$DSTROOT$INSTALL_PATH_PREFIX"
|
||||
|
||||
LIBDIR="$DSTROOT"/usr/lib
|
||||
|
||||
# installapi runs the script *before* calling tapi... sigh...
|
||||
mkdir -p "$LIBDIR"
|
||||
|
||||
ln -s libresolv.9.tbd "$LIBDIR"/libresolv.tbd
|
||||
chown -h "$INSTALL_OWNER:$INSTALL_GROUP" "$LIBDIR"/libresolv.tbd
|
||||
|
||||
# don't install man pages for installhdrs, installapi, or iOS builds
|
||||
if [ "$ACTION" = installapi ]; then exit 0; fi
|
||||
|
||||
ln -s libresolv.9.dylib "$LIBDIR"/libresolv.dylib
|
||||
chown -h "$INSTALL_OWNER:$INSTALL_GROUP" "$LIBDIR"/libresolv.dylib
|
||||
chmod -h 0755 "$LIBDIR"/libresolv.dylib
|
||||
|
@ -1,9 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -e -x
|
||||
|
||||
# don't install man pages for installhdrs or iOS builds
|
||||
# don't install man pages for installhdrs, installapi, or iOS builds
|
||||
if [ "$ACTION" = installapi ]; then exit 0; fi
|
||||
if [ "$ACTION" = installhdrs ]; then exit 0; fi
|
||||
if [ "${PLATFORM_NAME/iphone/}" != "${PLATFORM_NAME}" ]; then exit 0; fi
|
||||
if [ "${PLATFORM_NAME}" != "macosx" ]; then exit 0; fi
|
||||
|
||||
MANDIR="$DSTROOT"/usr/share/man
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user