diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-07-17 08:32:35 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-07-17 08:32:35 +0000 |
commit | 2706ee382341eb1c2e5f96c7d90f346696dbd0d8 (patch) | |
tree | c29690519bcb43604d9e0affa936aa7a2798660a /resolv | |
parent | 23700036397721389b90ac41571d68df2f26ad67 (diff) | |
download | glibc-2706ee382341eb1c2e5f96c7d90f346696dbd0d8.tar.gz glibc-2706ee382341eb1c2e5f96c7d90f346696dbd0d8.tar.xz glibc-2706ee382341eb1c2e5f96c7d90f346696dbd0d8.zip |
Update.
2001-07-17 Ulrich Drepper <drepper@redhat.com> * inet/rcmd.c (iruserfopen): Disable implicit locking for the stream. * inet/ruserpass.c (ruserpass): Likewise. * nss/nsswitch.c (nss_parse_file): Likewise. * resolv/res_hconf.c (_res_hconf_init): Likewise. * resolv/res_init.c (__res_vinit): Likewise. * gmon/bb_exit_func.c (__bb_exit_func): Likewise. * misc/getpass.c (getpass): Likewise. * misc/getusershell.c (initshells): Likewise. * misc/getttyent.c (setttyent): Likewise. * misc/mntent_r.c (__setmntent): Likewise. * time/getdate.c (__getdate_r): Likewise. * time/tzfile.c (__tzfile_read): Likewise. * iconv/gconv_conf.c (read_conf_file): Likewise. * intl/localealias.c (read_alias_file): Disable implicit locking for the stream. Use _unlocked functions for glibc. * sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Disable implicit locking for the stream. (__get_nprocs_conf): Likewise. (phys_pages_info): Likewise.
Diffstat (limited to 'resolv')
-rw-r--r-- | resolv/res_hconf.c | 6 | ||||
-rw-r--r-- | resolv/res_init.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c index 50e49830f5..ab97e39554 100644 --- a/resolv/res_hconf.c +++ b/resolv/res_hconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1993,95,96,97,98,99,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger (davidm@azstarnet.com). @@ -33,6 +33,7 @@ #include <ctype.h> #include <memory.h> #include <stdio.h> +#include <stdio_ext.h> #include <stdlib.h> #include <string.h> #include <net/if.h> @@ -338,6 +339,9 @@ _res_hconf_init (void) _res_hconf.service[_res_hconf.num_services++] = SERVICE_BIND; else { + /* No threads using this stream. */ + __fsetlocking (fp, FSETLOCKING_BYCALLER); + while (fgets_unlocked (buf, sizeof (buf), fp)) { ++line_num; diff --git a/resolv/res_init.c b/resolv/res_init.c index 1b14f94e76..bb66b02b6c 100644 --- a/resolv/res_init.c +++ b/resolv/res_init.c @@ -81,6 +81,7 @@ static const char rcsid[] = "$BINDId: res_init.c,v 8.16 2000/05/09 07:10:12 vixi #include <ctype.h> #include <resolv.h> #include <stdio.h> +#include <stdio_ext.h> #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -226,6 +227,8 @@ __res_vinit(res_state statp, int preinit) { line[sizeof(name) - 1] == '\t')) if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) { + /* No threads use this stream. */ + __fsetlocking (fp, FSETLOCKING_BYCALLER); /* read the config file */ while (fgets_unlocked(buf, sizeof(buf), fp) != NULL) { /* skip comments */ |