1999-03-07 Mark Kettenis <kettenis@gnu.org>
[kopensolaris-gnu/glibc.git] / resolv / resolv.h
index fe90ab5..c9a056f 100644 (file)
  *     $Id$
  */
 
-#ifndef _RESOLV_H_
-#define        _RESOLV_H_
+#ifndef _RESOLV_H
+#define        _RESOLV_H 1
+
+#include <features.h>
 
 #include <sys/param.h>
 #if (!defined(BSD)) || (BSD < 199306)
@@ -67,8 +69,8 @@
 #else
 # include <sys/types.h>
 #endif
-#include <sys/cdefs.h>
 #include <stdio.h>
+#include <netinet/in.h>
 
 /*
  * Revision information.  This is the release date in YYYYMMDD format.
@@ -83,7 +85,7 @@
 /*
  * Resolver configuration file.
  * Normally not present, but may contain the address of the
- * inital name server(s) to query and the domain search list.
+ * initial name server(s) to query and the domain search list.
  */
 
 #ifndef _PATH_RESCONF
 #define        RES_MAXNDOTS            15      /* should reflect bit field size */
 
 struct __res_state {
-       int     retrans;                /* retransmition time interval */
+       int     retrans;                /* retransmission time interval */
        int     retry;                  /* number of times to retransmit */
        u_long  options;                /* option flags - see below. */
        int     nscount;                /* number of name servers */
@@ -168,19 +170,19 @@ struct __res_state {
 typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
        res_sendhookact;
 
-typedef res_sendhookact (*res_send_qhook)__P((struct sockaddr_in * const *ns,
-                                             const u_char **query,
-                                             int *querylen,
-                                             u_char *ans,
-                                             int anssiz,
-                                             int *resplen));
+typedef res_sendhookact (*res_send_qhook)__PMT((struct sockaddr_in * const *ns,
+                                               const u_char **query,
+                                               int *querylen,
+                                               u_char *ans,
+                                               int anssiz,
+                                               int *resplen));
 
-typedef res_sendhookact (*res_send_rhook)__P((const struct sockaddr_in *ns,
-                                             const u_char *query,
-                                             int querylen,
-                                             u_char *ans,
-                                             int anssiz,
-                                             int *resplen));
+typedef res_sendhookact (*res_send_rhook)__PMT((const struct sockaddr_in *ns,
+                                               const u_char *query,
+                                               int querylen,
+                                               u_char *ans,
+                                               int anssiz,
+                                               int *resplen));
 
 struct res_sym {
        int     number;         /* Identifying number, like T_MX */
@@ -224,18 +226,22 @@ extern const struct res_sym __p_type_syms[];
 #define        p_secstodate    __p_secstodate
 #define        dn_count_labels __dn_count_labels
 #define        dn_comp         __dn_comp
-#define        dn_expand       __dn_expand
-#define        res_init        __res_init
 #define        res_randomid    __res_randomid
-#define        res_query       __res_query
-#define        res_search      __res_search
-#define        res_querydomain __res_querydomain
-#define        res_mkquery     __res_mkquery
 #define        res_send        __res_send
 #define        res_isourserver __res_isourserver
 #define        res_nameinquery __res_nameinquery
 #define        res_queriesmatch __res_queriesmatch
 #define        res_close       __res_close
+
+#ifdef BIND_RES_POSIX3
+#define        dn_expand       __dn_expand
+#define        res_init        __res_init
+#define        res_query       __res_query
+#define        res_search      __res_search
+#define        res_querydomain __res_querydomain
+#define        res_mkquery     __res_mkquery
+#endif
+
 __BEGIN_DECLS
 int            res_hnok __P((const char *));
 int            res_ownok __P((const char *));
@@ -289,4 +295,4 @@ int         res_queriesmatch __P((const u_char *, const u_char *,
 void           res_close __P((void));
 __END_DECLS
 
-#endif /* !_RESOLV_H_ */
+#endif /* resolv.h */