aboutsummaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-01-07 10:00:21 +0000
committerRoland McGrath <roland@gnu.org>1996-01-07 10:00:21 +0000
commita2e1b046f6891ac76830353f7afc97b0c6d27a64 (patch)
tree4bc169458c918fe9a19aa2946de81ced9ade1124 /resolv
parentc4b7291877252d1a0b2e2afbc90bab7fe6965a38 (diff)
downloadglibc-a2e1b046f6891ac76830353f7afc97b0c6d27a64.tar
glibc-a2e1b046f6891ac76830353f7afc97b0c6d27a64.tar.gz
glibc-a2e1b046f6891ac76830353f7afc97b0c6d27a64.tar.bz2
glibc-a2e1b046f6891ac76830353f7afc97b0c6d27a64.zip
Sat Jan 6 16:39:14 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>cvs/libc-960108cvs/libc-960107
* Makefile (subdirs): Added db. * resolv/Makefile (routines): Add res_data. * resolv/res_data.c, resolv/res_debug.c, resolv/resolv.h: Updated from BIND 4.9.3 final release. * elf/dynamic-link.h (elf_get_dynamic_info): Handle processor-specific tags. (ELF_DYNAMIC_DO_REL, ELF_DYNAMIC_DO_RELA): Handle absent DT_PLTREL tag. * elf/elf.h (DT_MIPS_NUM, DT_PROCNUM): New macros. * elf/link.h (struct link_map): Extend `l_info' by DT_PROCNUM. * sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): Take new arg LAZY. Only do our work if LAZY and there is a DT_JMPREL record. * elf/dl-reloc.c (_dl_relocate_object): Call elf_machine_runtime_setup unconditionally, and pass it LAZY flag. * elf/dl-load.c: Fixed ELFMAG check to work for either byte order. Align end of load segment only to page size, not to segment alignment.
Diffstat (limited to 'resolv')
-rw-r--r--resolv/Makefile4
-rw-r--r--resolv/res_data.c114
-rw-r--r--resolv/res_debug.c47
-rw-r--r--resolv/resolv.h3
4 files changed, 124 insertions, 44 deletions
diff --git a/resolv/Makefile b/resolv/Makefile
index f1a8701017..db90dc7e4b 100644
--- a/resolv/Makefile
+++ b/resolv/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@ headers := resolv.h netdb.h arpa/nameser.h sys/bitypes.h
distribute := ../conf/portability.h
routines := gethnamaddr getnetbyaddr getnetbyname getnetent getnetnamadr \
- herror nsap_addr res_comp res_debug res_init res_mkquery \
+ herror nsap_addr res_comp res_debug res_data res_init res_mkquery \
res_query res_send sethostent inet_addr
include ../Rules
diff --git a/resolv/res_data.c b/resolv/res_data.c
new file mode 100644
index 0000000000..18dbc83477
--- /dev/null
+++ b/resolv/res_data.c
@@ -0,0 +1,114 @@
+/*
+ * ++Copyright++ 1995
+ * -
+ * Copyright (c) 1995
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * -
+ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies, and that
+ * the name of Digital Equipment Corporation not be used in advertising or
+ * publicity pertaining to distribution of the document or software without
+ * specific, written prior permission.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ * -
+ * --Copyright--
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char rcsid[] = "$Id$";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+
+#include <stdio.h>
+#include <ctype.h>
+#include <resolv.h>
+#if defined(BSD) && (BSD >= 199103)
+# include <unistd.h>
+# include <stdlib.h>
+# include <string.h>
+#else
+# include "../conf/portability.h"
+#endif
+
+const char *_res_opcodes[] = {
+ "QUERY",
+ "IQUERY",
+ "CQUERYM",
+ "CQUERYU", /* experimental */
+ "NOTIFY", /* experimental */
+ "5",
+ "6",
+ "7",
+ "8",
+ "UPDATEA",
+ "UPDATED",
+ "UPDATEDA",
+ "UPDATEM",
+ "UPDATEMA",
+ "ZONEINIT",
+ "ZONEREF",
+};
+
+const char *_res_resultcodes[] = {
+ "NOERROR",
+ "FORMERR",
+ "SERVFAIL",
+ "NXDOMAIN",
+ "NOTIMP",
+ "REFUSED",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "11",
+ "12",
+ "13",
+ "14",
+ "NOCHANGE",
+};
diff --git a/resolv/res_debug.c b/resolv/res_debug.c
index c5e68e36e9..b3dfcdf8f6 100644
--- a/resolv/res_debug.c
+++ b/resolv/res_debug.c
@@ -76,43 +76,8 @@ static char rcsid[] = "$Id$";
# include "../conf/options.h"
#endif
-const char *_res_opcodes[] = {
- "QUERY",
- "IQUERY",
- "CQUERYM",
- "CQUERYU", /* experimental */
- "NOTIFY", /* experimental */
- "5",
- "6",
- "7",
- "8",
- "UPDATEA",
- "UPDATED",
- "UPDATEDA",
- "UPDATEM",
- "UPDATEMA",
- "ZONEINIT",
- "ZONEREF",
-};
-
-const char *_res_resultcodes[] = {
- "NOERROR",
- "FORMERR",
- "SERVFAIL",
- "NXDOMAIN",
- "NOTIMP",
- "REFUSED",
- "6",
- "7",
- "8",
- "9",
- "10",
- "11",
- "12",
- "13",
- "14",
- "NOCHANGE",
-};
+extern const char *_res_opcodes[];
+extern const char *_res_resultcodes[];
/* XXX: we should use getservbyport() instead. */
static const char *
@@ -310,7 +275,7 @@ __fp_nquery(msg, len, file)
putc('\n', file);
}
if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX))
- putc(';', file);
+ putc(';', file);
if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEAD2)) {
fprintf(file, "; flags:");
if (hp->qr)
@@ -342,10 +307,10 @@ __fp_nquery(msg, len, file)
fprintf(file, ";; QUESTIONS:\n");
while (--n >= 0) {
if ((!_res.pfcode) || (_res.pfcode & RES_PRF_QUES))
- fprintf(file, ";;\t");
+ fprintf(file, ";;\t");
TruncTest(cp);
if ((!_res.pfcode) || (_res.pfcode & RES_PRF_QUES))
- cp = p_cdnname(cp, msg, len, file);
+ cp = p_cdnname(cp, msg, len, file);
else {
int n;
char name[MAXDNAME];
@@ -368,7 +333,7 @@ __fp_nquery(msg, len, file)
__p_class(_getshort((u_char*)cp)));
cp += INT16SZ;
if ((!_res.pfcode) || (_res.pfcode & RES_PRF_QUES))
- putc('\n', file);
+ putc('\n', file);
}
}
/*
diff --git a/resolv/resolv.h b/resolv/resolv.h
index af92be4c05..fb3de282b2 100644
--- a/resolv/resolv.h
+++ b/resolv/resolv.h
@@ -78,7 +78,7 @@
* is new enough to contain a certain feature.
*/
-#define __RES 19950621
+#define __RES 19951031
/*
* Resolver configuration file.
@@ -121,6 +121,7 @@ struct __res_state {
struct in_addr addr;
u_int32_t mask;
} sort_list[MAXRESOLVSORT];
+ char pad[72]; /* On an i38this means 512b total. */
};
/*