-#define RES_INIT 0x001 /* address initialized */
-#define RES_DEBUG 0x002 /* print debug messages */
-#define RES_AAONLY 0x004 /* authoritative answers only */
-#define RES_USEVC 0x008 /* use virtual circuit */
-#define RES_PRIMARY 0x010 /* query primary server only */
-#define RES_IGNTC 0x020 /* ignore trucation errors */
-#define RES_RECURSE 0x040 /* recursion desired */
-#define RES_DEFNAMES 0x080 /* use default domain name */
-
-extern struct state _res;
-extern char *p_cdname(), *p_rr(), *p_type(), *p_class();
+#define RES_PRF_STATS 0x0001
+/* 0x0002 */
+#define RES_PRF_CLASS 0x0004
+#define RES_PRF_CMD 0x0008
+#define RES_PRF_QUES 0x0010
+#define RES_PRF_ANS 0x0020
+#define RES_PRF_AUTH 0x0040
+#define RES_PRF_ADD 0x0080
+#define RES_PRF_HEAD1 0x0100
+#define RES_PRF_HEAD2 0x0200
+#define RES_PRF_TTLID 0x0400
+#define RES_PRF_HEADX 0x0800
+#define RES_PRF_QUERY 0x1000
+#define RES_PRF_REPLY 0x2000
+#define RES_PRF_INIT 0x4000
+/* 0x8000 */
+
+#include <sys/cdefs.h>
+#include <stdio.h>
+
+extern struct __res_state _res;
+
+/* Private routines shared between libc/net, named, nslookup and others. */
+#define dn_skipname __dn_skipname
+#define fp_query __fp_query
+#define hostalias __hostalias
+#define putlong __putlong
+#define putshort __putshort
+#define p_class __p_class
+#define p_time __p_time
+#define p_type __p_type
+__BEGIN_DECLS
+int __dn_skipname __P((const u_char *, const u_char *));
+void __fp_resstat __P((struct __res_state *, FILE *));
+void __fp_query __P((char *, FILE *));
+char *__hostalias __P((const char *));
+void __putlong __P((u_int32_t, u_char *));
+void __putshort __P((u_short, u_char *));
+char *__p_class __P((int));
+char *__p_time __P((u_int32_t));
+char *__p_type __P((int));
+
+int dn_comp __P((const u_char *, u_char *, int, u_char **, u_char **));
+int dn_expand __P((const u_char *, const u_char *, const u_char *,
+ u_char *, int));
+int res_init __P((void));
+int res_mkquery __P((int, const char *, int, int, const char *, int,
+ const char *, char *, int));
+int res_send __P((const char *, int, char *, int));
+__END_DECLS
+
+#endif /* !_RESOLV_H_ */