sed -e "s@^RES=\(.*\)@RES=res_skipname.o@" Makefile > Makefile.tmp
cp Makefile.tmp Makefile
$RM -f Makefile.tmp
-else
- $RM -f Makefile.tmp
- sed -e "s@^RES=\(.*\)@RES=res_init.o@" Makefile > Makefile.tmp
- cp Makefile.tmp Makefile
- $RM -f Makefile.tmp
fi
$RM -f $EXEC $TMP
cat > $TMP <<__EOF__
#RES=res_init.o res_comp.o res_mkquery.o
# BSDI systems want this.
#RES=res_skipname.o
-# Recent Linux systems seem to expect this:
-RES=res_init.o
# The rest are perfectly content with this.
-#RES=
+RES=
# [CHANGEME]
# If you get a compile-time error dealing with u_int32_t, comment out
* @(#)nameser.h 5.24 (Berkeley) 6/1/90
*/
+#include <limits.h>
+#ifndef __GLIBC__
+
/*
* Define constants based on rfc883
*/
(cp)[0] = l >> 8; \
(cp) += sizeof(u_long); \
}
+
+#endif
+
-/*
- * Copyright (c) 1983, 1987, 1989 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement: ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#)resolv.h 5.10.1 (Berkeley) 6/1/90
- */
-
-/*
- * Resolver configuration file.
- * Normally not present, but may contain the address of the
- * inital name server(s) to query and the domain search list.
- */
-
-#ifndef _PATH_RESCONF
-#define _PATH_RESCONF "/etc/resolv.conf"
-#endif
-
-/*
- * Global defines and variables for resolver stub.
- */
-#define MAXNS 3 /* max # name servers we'll track */
-#define MAXDFLSRCH 3 /* # default domain levels to try */
-#define MAXDNSRCH 6 /* max # domains in search path */
-#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
-#define MAXSERVICES 2 /* max # of services to search */
-
-#define RES_TIMEOUT 5 /* min. seconds between retries */
-
-struct state {
- int retrans; /* retransmition time interval */
- int retry; /* number of times to retransmit */
- long options; /* option flags - see below. */
- int nscount; /* number of name servers */
- struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */
-#define nsaddr nsaddr_list[0] /* for backward compatibility */
- unsigned short id; /* current packet id */
- char defdname[MAXDNAME]; /* default domain */
- char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
- unsigned short order[MAXSERVICES+1]; /* search service order */
-};
-
-#define RES_SERVICE_NONE 0
-#define RES_SERVICE_BIND 1
-#define RES_SERVICE_LOCAL 2
-
-/*
- * Resolver options
- */
-#define RES_INIT 0x0001 /* address initialized */
-#define RES_DEBUG 0x0002 /* print debug messages */
-#define RES_AAONLY 0x0004 /* authoritative answers only */
-#define RES_USEVC 0x0008 /* use virtual circuit */
-#define RES_PRIMARY 0x0010 /* query primary server only */
-#define RES_IGNTC 0x0020 /* ignore trucation errors */
-#define RES_RECURSE 0x0040 /* recursion desired */
-#define RES_DEFNAMES 0x0080 /* use default domain name */
-#define RES_STAYOPEN 0x0100 /* Keep TCP socket open */
-#define RES_DNSRCH 0x0200 /* search up local domain tree */
-
-#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
-
-extern struct state _res;
-extern char *p_cdname(), *p_rr(), *p_type(), *p_class(), *p_time();
-
--- /dev/null
+/*
+ * Copyright (c) 1983, 1987, 1989 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that: (1) source distributions retain this entire copyright
+ * notice and comment, and (2) distributions including binaries display
+ * the following acknowledgement: ``This product includes software
+ * developed by the University of California, Berkeley and its contributors''
+ * in the documentation or other materials provided with the distribution
+ * and in all advertising materials mentioning features or use of this
+ * software. Neither the name of the University nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @(#)resolv.h 5.10.1 (Berkeley) 6/1/90
+ */
+
+#include <limits.h>
+#ifndef __GLIBC__
+
+/*
+ * Resolver configuration file.
+ * Normally not present, but may contain the address of the
+ * inital name server(s) to query and the domain search list.
+ */
+
+#ifndef _PATH_RESCONF
+#define _PATH_RESCONF "/etc/resolv.conf"
+#endif
+
+/*
+ * Global defines and variables for resolver stub.
+ */
+#define MAXNS 3 /* max # name servers we'll track */
+#define MAXDFLSRCH 3 /* # default domain levels to try */
+#define MAXDNSRCH 6 /* max # domains in search path */
+#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
+#define MAXSERVICES 2 /* max # of services to search */
+
+#define RES_TIMEOUT 5 /* min. seconds between retries */
+
+struct state {
+ int retrans; /* retransmition time interval */
+ int retry; /* number of times to retransmit */
+ long options; /* option flags - see below. */
+ int nscount; /* number of name servers */
+ struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */
+#define nsaddr nsaddr_list[0] /* for backward compatibility */
+ unsigned short id; /* current packet id */
+ char defdname[MAXDNAME]; /* default domain */
+ char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
+ unsigned short order[MAXSERVICES+1]; /* search service order */
+};
+
+#define RES_SERVICE_NONE 0
+#define RES_SERVICE_BIND 1
+#define RES_SERVICE_LOCAL 2
+
+/*
+ * Resolver options
+ */
+#define RES_INIT 0x0001 /* address initialized */
+#define RES_DEBUG 0x0002 /* print debug messages */
+#define RES_AAONLY 0x0004 /* authoritative answers only */
+#define RES_USEVC 0x0008 /* use virtual circuit */
+#define RES_PRIMARY 0x0010 /* query primary server only */
+#define RES_IGNTC 0x0020 /* ignore trucation errors */
+#define RES_RECURSE 0x0040 /* recursion desired */
+#define RES_DEFNAMES 0x0080 /* use default domain name */
+#define RES_STAYOPEN 0x0100 /* Keep TCP socket open */
+#define RES_DNSRCH 0x0200 /* search up local domain tree */
+
+#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
+
+extern struct state _res;
+extern char *p_cdname(), *p_rr(), *p_type(), *p_class(), *p_time();
+
+#endif
+
../include/setup.h ../include/common.h \
../include/sys.h ../include/class.h ../include/dbuf.h \
../include/whowas.h ../include/res.h ../include/numeric.h \
- ../include/h.h ../include/nameser.h ../include/resolv.h \
+ ../include/h.h ../include/nameser.h ../include/resolv_legacy.h \
../include/inet.h
masking.o: masking.c ../include/struct.h ../include/config.h \
../include/setup.h ../include/common.h \
../include/sys.h ../include/class.h ../include/dbuf.h \
../include/whowas.h ../include/res.h ../include/numeric.h \
../include/patchlevel.h ../include/inet.h ../include/nameser.h \
- ../include/resolv.h ../include/sock.h ../include/h.h
+ ../include/resolv_legacy.h ../include/sock.h ../include/h.h
s_conf.o: s_conf.c ../include/struct.h ../include/config.h \
../include/setup.h ../include/common.h \
../include/sys.h ../include/class.h ../include/dbuf.h \
#include <signal.h>
#include <sys/time.h>
#include <sys/socket.h>
+#include <limits.h>
+#include <resolv.h>
#include "nameser.h"
-#include "resolv.h"
+#include "resolv_legacy.h"
#include "inet.h" /* inet_addr() */
#undef DEBUG /* because there is a lot of debug code in here :-) */
+#ifndef __GLIBC__
extern int dn_expand PROTO ((char *, char *, char *, char *, int));
extern int dn_skipname PROTO ((char *, char *));
extern int res_mkquery PROTO ((int, char *, int, int, char *, int,
struct rrec *, char *, int));
+#endif
extern int errno, h_errno;
extern int highest_fd;
class = (int) _getshort (cp);
cp += sizeof (short);
rptr->ttl = _getlong (cp);
- cp += sizeof (rptr->ttl);
+ cp += 4;
dlen = (int) _getshort (cp);
cp += sizeof (short);
rptr->type = type;
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
+#include <resolv.h>
#include "config.h" /* To get #define SOL20 Vesa */
#include "sys.h"
#include "common.h"
#include "nameser.h"
-#include "resolv.h"
+#include "resolv_legacy.h"
/*
* Resolver state default settings
#include "config.h"
#include "sys.h"
#include "nameser.h"
-#include "resolv.h"
+#include "resolv_legacy.h"
/*
* Form all types of queries.
#else
#include "nameser.h"
#endif
-#include "resolv.h"
+#include "resolv_legacy.h"
#include "sock.h" /* If FD_ZERO isn't define up to this point, */
/* define it (BSD4.2 needs this) */
#include "h.h"