#ifndef done_dns_h
#define done_dns_h 1
#include "dns_use.h"
#ifdef ISAIX
#define ISDNS2 TRUE
#endif
#ifdef ISSOLARISX86
#define ISDNS2 TRUE
#endif

#ifdef ISSOLARIS
#define NOINTS 1
#endif

#ifdef ISDNS2
/* don't know if this is right for aix, hope it is. */
#include <errno.h>
#include <time.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#define __P(x) x

#ifdef NOINTS /*and ISDNS2*/
typedef unsigned int u_int32_t;
typedef unsigned short u_int16_t;
typedef unsigned char u_int8_t;
typedef int int32_t;
typedef short int16_t;
typedef char int8_t;
#endif

int strcasecmp(const char *s1,const char *s2);
#define NETDB_INTERNAL 0
#define EMSGSIZE 200
#define EAFNOSUPPORT 201
#include "nameser.h"
#include "nameser2.h"
#include "resolv.h"

#else /*ISDNS2*/

#include <errno.h>
#include <time.h>

#ifdef unix
#define ISUNIX TRUE
#endif

#ifdef ISLINUX /*but not ISDNS2*/
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <resolv.h>
#include <unistd.h>
#else /*ISLINUX*/

#ifdef ISUNIX
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <resolv.h>
#include <unistd.h>
#ifdef NS8_OSX
#include <nameser8_compat.h>
#endif

#ifdef NOINTS
typedef unsigned int u_int32_t;
typedef unsigned short u_int16_t;
typedef unsigned char u_int8_t;
typedef int int32_t;
typedef short int16_t;
typedef char int8_t;
#endif

#else/*ISUNIX*/
#include <winsock.h>
#undef h_errno
#define __P(x) x
typedef unsigned int u_int32_t;
typedef unsigned short u_int16_t;
typedef unsigned char u_int8_t;
typedef int int32_t;
typedef short int16_t;
typedef char int8_t;
int strcasecmp(const char *s1,const char *s2);
#define NETDB_INTERNAL 0
#define s_errno WSAGetLastError()

//#define EMSGSIZE 200
//#define EAFNOSUPPORT 201
#include "nameser.h"
#include "nameser2.h"
#include "resolv.h"
#endif/*ISUNIX*/
#endif/*ISLINUX*/
#endif/*ISDNS2*/

#ifndef NS_INT16SZ
#define NS_INT16SZ 2
#endif
#endif
