aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-02-03 07:01:11 +0000
committerUlrich Drepper <drepper@redhat.com>2001-02-03 07:01:11 +0000
commit0c7dfa144bf36cde60287483f0163455e961c2af (patch)
tree6b000a30ea284ffdb7e8823108ba4454ed60cded
parente4c785c8d771f50c4c7a059b545976301bd2508c (diff)
downloadglibc-0c7dfa144bf36cde60287483f0163455e961c2af.tar
glibc-0c7dfa144bf36cde60287483f0163455e961c2af.tar.gz
glibc-0c7dfa144bf36cde60287483f0163455e961c2af.tar.bz2
glibc-0c7dfa144bf36cde60287483f0163455e961c2af.zip
Update.
* hesiod/hesiod.c (hesiod_resolve): Also search HS records is errno is ECONNREFUSED. * posix/Makefile: Define MBS_SUPPORT for regex.c.
-rw-r--r--ChangeLog4
-rw-r--r--hesiod/hesiod.c14
-rw-r--r--posix/Makefile4
3 files changed, 13 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c182e0dc1..b1fa25dca7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2001-02-02 Ulrich Drepper <drepper@redhat.com>
+ * hesiod/hesiod.c (hesiod_resolve): Also search HS records is
+ errno is ECONNREFUSED.
+
+ * posix/Makefile: Define MBS_SUPPORT for regex.c.
* posix/regex.c: Implement multibyte character handling.
Patch by Isamu Hasegawa <isamu@yamato.ibm.co.jp>.
diff --git a/hesiod/hesiod.c b/hesiod/hesiod.c
index 3a01fd076b..0d68319b48 100644
--- a/hesiod/hesiod.c
+++ b/hesiod/hesiod.c
@@ -134,7 +134,7 @@ hesiod_init(void **context) {
__set_errno(ENOEXEC);
goto cleanup;
}
-
+
#if 0
if (res_ninit(ctx->res) < 0)
goto cleanup;
@@ -248,8 +248,8 @@ hesiod_resolve(void *context, const char *name, const char *type) {
free(bindname);
return (retvec);
}
-
- if (errno != ENOENT)
+
+ if (errno != ENOENT && errno != ECONNREFUSED)
return (NULL);
retvec = get_txt_records(ctx, C_HS, bindname);
@@ -290,7 +290,7 @@ parse_config_file(struct hesiod_p *ctx, const char *filename) {
*/
if (!(fp = fopen(filename, "r")))
return (-1);
-
+
while (fgets(buf, sizeof(buf), fp) != NULL) {
cp = buf;
if (*cp == '#' || *cp == '\n' || *cp == '\r')
@@ -301,7 +301,7 @@ parse_config_file(struct hesiod_p *ctx, const char *filename) {
while(*cp != ' ' && *cp != '\t' && *cp != '=')
cp++;
*cp++ = '\0';
-
+
while(*cp == ' ' || *cp == '\t' || *cp == '=')
cp++;
data = cp;
@@ -325,7 +325,7 @@ parse_config_file(struct hesiod_p *ctx, const char *filename) {
}
fclose(fp);
return (0);
-
+
cleanup:
fclose(fp);
if (ctx->RHS)
@@ -494,7 +494,7 @@ __hesiod_res_set(void *context, struct __res_state *res,
static int
init(struct hesiod_p *ctx) {
-
+
if (!ctx->res && !__hesiod_res_get(ctx))
return (-1);
diff --git a/posix/Makefile b/posix/Makefile
index a83996f0b4..c3ff0dd10a 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1991-1999, 2000, 2001 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
@@ -107,7 +107,7 @@ $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
endif
endif
-CFLAGS-regex.c = -Wno-strict-prototypes
+CFLAGS-regex.c = -Wno-strict-prototypes -DMBS_SUPPORT
CFLAGS-getaddrinfo.c = -DRESOLVER
tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
--none random --col --color --colour