* The function pthread_yield has been deprecated; programs should use
the equivalent standard function sched_yield instead.
+* The function inet_neta declared in <arpa/inet.h> has been deprecated.
+
+* Various rarely-used functions declared in <resolv.h> and
+ <arpa/nameser.h> have been deprecated. Applications are encouraged to
+ use dedicated DNS processing libraries if applicable. For <resolv.h>,
+ this affects the functions dn_count_labels, fp_nquery, fp_query,
+ fp_resstat, hostalias, loc_aton, loc_ntoa, p_cdname, p_cdnname,
+ p_class, p_fqname, p_fqnname, p_option, p_query, p_rcode, p_time,
+ p_type, putlong, putshort, res_hostalias, res_isourserver,
+ res_nameinquery, res_queriesmatch, res_randomid, sym_ntop, sym_ntos,
+ sym_ston. For <arpa/nameser.h>, the functions ns_datetosecs,
+ ns_format_ttl, ns_makecanon, ns_parse_ttl, ns_samedomain, ns_samename,
+ ns_sprintrr, ns_sprintrrf, ns_subdomain have been deprecated.
+
* The pthread cancellation handler is now installed with SA_RESTART and
pthread_cancel will always send the internal SIGCANCEL on a cancellation
request. It should not be visible to application since the cancellation
#include <sys/types.h>
#include <stdint.h>
+#ifdef _LIBC
+# define __NAMESER_DEPRECATED
+#else
+# define __NAMESER_DEPRECATED __attribute_deprecated__
+#endif
+
/*
* Define constants based on RFC 883, RFC 1034, RFC 1035
*/
int ns_parserr (ns_msg *, ns_sect, int, ns_rr *) __THROW;
int ns_sprintrr (const ns_msg *, const ns_rr *,
const char *, const char *, char *, size_t)
- __THROW;
+ __THROW __NAMESER_DEPRECATED;
int ns_sprintrrf (const unsigned char *, size_t, const char *,
ns_class, ns_type, unsigned long,
const unsigned char *, size_t, const char *,
- const char *, char *, size_t) __THROW;
-int ns_format_ttl (unsigned long, char *, size_t) __THROW;
-int ns_parse_ttl (const char *, unsigned long *) __THROW;
-uint32_t ns_datetosecs (const char *, int *) __THROW;
+ const char *, char *, size_t)
+ __THROW __NAMESER_DEPRECATED;
+int ns_format_ttl (unsigned long, char *, size_t)
+ __THROW __NAMESER_DEPRECATED;
+int ns_parse_ttl (const char *, unsigned long *)
+ __THROW __NAMESER_DEPRECATED;
+uint32_t ns_datetosecs (const char *, int *)
+ __THROW __NAMESER_DEPRECATED;
int ns_name_ntol (const unsigned char *, unsigned char *, size_t)
__THROW;
int ns_name_ntop (const unsigned char *, char *, size_t) __THROW;
void ns_name_rollback (const unsigned char *,
const unsigned char **,
const unsigned char **) __THROW;
-int ns_samedomain (const char *, const char *) __THROW;
-int ns_subdomain (const char *, const char *) __THROW;
-int ns_makecanon (const char *, char *, size_t) __THROW;
-int ns_samename (const char *, const char *) __THROW;
+
+int ns_samedomain (const char *, const char *) __THROW
+ __NAMESER_DEPRECATED;
+int ns_subdomain (const char *, const char *) __THROW
+ __NAMESER_DEPRECATED;
+int ns_makecanon (const char *, char *, size_t) __THROW
+ __NAMESER_DEPRECATED;
+int ns_samename (const char *, const char *) __THROW
+ __NAMESER_DEPRECATED;
__END_DECLS
#include <arpa/nameser_compat.h>
#define res_search __res_search
#define res_send __res_send
+#ifdef _LIBC
+# define __RESOLV_DEPRECATED
+# define __RESOLV_DEPRECATED_MSG(msg)
+#else
+# define __RESOLV_DEPRECATED __attribute_deprecated__
+# define __RESOLV_DEPRECATED_MSG(msg) __attribute_deprecated_msg__ (msg)
+#endif
+
__BEGIN_DECLS
-void fp_nquery (const unsigned char *, int, FILE *) __THROW;
-void fp_query (const unsigned char *, FILE *) __THROW;
-const char * hostalias (const char *) __THROW;
-void p_query (const unsigned char *) __THROW;
+void fp_nquery (const unsigned char *, int, FILE *) __THROW
+ __RESOLV_DEPRECATED;
+void fp_query (const unsigned char *, FILE *) __THROW
+ __RESOLV_DEPRECATED;
+const char * hostalias (const char *) __THROW
+ __RESOLV_DEPRECATED_MSG ("use getaddrinfo instead");
+void p_query (const unsigned char *) __THROW
+ __RESOLV_DEPRECATED;
void res_close (void) __THROW;
int res_init (void) __THROW;
-int res_isourserver (const struct sockaddr_in *) __THROW;
+int res_isourserver (const struct sockaddr_in *) __THROW
+ __RESOLV_DEPRECATED;
int res_mkquery (int, const char *, int, int,
const unsigned char *, int, const unsigned char *,
unsigned char *, int) __THROW;
int res_ownok (const char *) __THROW;
int res_mailok (const char *) __THROW;
int res_dnok (const char *) __THROW;
-int sym_ston (const struct res_sym *, const char *, int *) __THROW;
-const char * sym_ntos (const struct res_sym *, int, int *) __THROW;
-const char * sym_ntop (const struct res_sym *, int, int *) __THROW;
+int sym_ston (const struct res_sym *, const char *, int *) __THROW
+ __RESOLV_DEPRECATED;
+const char * sym_ntos (const struct res_sym *, int, int *) __THROW
+ __RESOLV_DEPRECATED;
+const char * sym_ntop (const struct res_sym *, int, int *) __THROW
+ __RESOLV_DEPRECATED;
int b64_ntop (const unsigned char *, size_t, char *, size_t)
- __THROW;
+ __THROW;
int b64_pton (char const *, unsigned char *, size_t) __THROW;
-int loc_aton (const char *__ascii, unsigned char *__binary) __THROW;
-const char * loc_ntoa (const unsigned char *__binary, char *__ascii) __THROW;
+int loc_aton (const char *__ascii, unsigned char *__binary) __THROW
+ __RESOLV_DEPRECATED;
+const char * loc_ntoa (const unsigned char *__binary, char *__ascii) __THROW
+ __RESOLV_DEPRECATED;
int dn_skipname (const unsigned char *, const unsigned char *)
- __THROW;
-void putlong (uint32_t, unsigned char *) __THROW;
-void putshort (uint16_t, unsigned char *) __THROW;
-const char * p_class (int) __THROW;
-const char * p_time (uint32_t) __THROW;
-const char * p_type (int) __THROW;
-const char * p_rcode (int) __THROW;
-const unsigned char * p_cdnname (const unsigned char *,
- const unsigned char *, int, FILE *) __THROW;
+ __THROW;
+void putlong (uint32_t, unsigned char *) __THROW
+ __RESOLV_DEPRECATED_MSG ("use NS_PUT16 instead");
+void putshort (uint16_t, unsigned char *) __THROW
+ __RESOLV_DEPRECATED_MSG ("use NS_PUT32 instead");
+const char * p_class (int) __THROW __RESOLV_DEPRECATED;
+const char * p_time (uint32_t) __THROW __RESOLV_DEPRECATED;
+const char * p_type (int) __THROW __RESOLV_DEPRECATED;
+const char * p_rcode (int) __THROW __RESOLV_DEPRECATED;
+const unsigned char * p_cdnname (const unsigned char *, const unsigned char *,
+ int, FILE *) __THROW __RESOLV_DEPRECATED;
const unsigned char * p_cdname (const unsigned char *, const unsigned char *,
- FILE *) __THROW;
+ FILE *) __THROW __RESOLV_DEPRECATED;
const unsigned char * p_fqnname (const unsigned char *__cp,
const unsigned char *__msg,
- int, char *, int) __THROW;
-const unsigned char * p_fqname (const unsigned char *,
- const unsigned char *, FILE *) __THROW;
-const char * p_option (unsigned long __option) __THROW;
-int dn_count_labels (const char *) __THROW;
+ int, char *, int) __THROW __RESOLV_DEPRECATED;
+const unsigned char * p_fqname (const unsigned char *, const unsigned char *,
+ FILE *) __THROW __RESOLV_DEPRECATED;
+const char * p_option (unsigned long __option) __THROW __RESOLV_DEPRECATED;
+int dn_count_labels (const char *) __THROW __RESOLV_DEPRECATED;
int dn_comp (const char *, unsigned char *, int, unsigned char **,
unsigned char **) __THROW;
int dn_expand (const unsigned char *, const unsigned char *,
const unsigned char *, char *, int) __THROW;
-unsigned int res_randomid (void) __THROW;
+unsigned int res_randomid (void) __THROW
+ __RESOLV_DEPRECATED_MSG ("use getentropy instead");
int res_nameinquery (const char *, int, int,
const unsigned char *,
- const unsigned char *) __THROW;
+ const unsigned char *) __THROW
+ __RESOLV_DEPRECATED;
int res_queriesmatch (const unsigned char *,
const unsigned char *,
const unsigned char *,
- const unsigned char *) __THROW;
+ const unsigned char *) __THROW
+ __RESOLV_DEPRECATED;
/* Things involving a resolver context. */
int res_ninit (res_state) __THROW;
-void fp_resstat (const res_state, FILE *) __THROW;
+void fp_resstat (const res_state, FILE *) __THROW
+ __RESOLV_DEPRECATED;
const char * res_hostalias (const res_state, const char *, char *, size_t)
- __THROW;
+ __THROW __RESOLV_DEPRECATED_MSG ("use getaddrinfo instead");
int res_nquery (res_state, const char *, int, int,
unsigned char *, int) __THROW;
int res_nsearch (res_state, const char *, int, int,