From 72ef277e5a31c89fbd1aa9d1dc7d054223d650e5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Sep 2003 09:26:15 +0000 Subject: Update. 2003-09-03 Ulrich Drepper * grp/Makefile (CFLAGS-getgrent_r.c): Add -fexceptions. (CFLAGS-getgrent.c): Likewise. * pwd/Makefile (CFLAGS-getpwent_r.c): Add -fexceptions. (CFLAGS-getpwent.c): Likewise. * shadow/Makefile (CFLAGS-getspent_r.c): Add -fexceptions. (CFLAGS-getspent.c): Likewise. * inet/Makefile: Add -fexceptions to CFLAGS for the various getXXent and getXXbyYY functions. * locale/loadlocale.c: Use not-cancelable variants of open, close, and read. --- locale/loadlocale.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'locale') diff --git a/locale/loadlocale.c b/locale/loadlocale.c index 32faad57e9..b2d944794f 100644 --- a/locale/loadlocale.c +++ b/locale/loadlocale.c @@ -1,5 +1,5 @@ /* Functions to read locale data files. - Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -30,6 +30,7 @@ #endif #include +#include #include "localeinfo.h" @@ -142,7 +143,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) file->decided = 1; file->data = NULL; - fd = __open (file->filename, O_RDONLY); + fd = open_not_cancel_2 (file->filename, O_RDONLY); if (__builtin_expect (fd, 0) < 0) /* Cannot open the file. */ return; @@ -150,7 +151,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) < 0) { puntfd: - __close (fd); + close_not_cancel_no_status (fd); return; } if (__builtin_expect (S_ISDIR (st.st_mode), 0)) @@ -160,7 +161,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) char *newp; size_t filenamelen; - __close (fd); + close_not_cancel_no_status (fd); filenamelen = strlen (file->filename); newp = (char *) alloca (filenamelen @@ -170,7 +171,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) _nl_category_names[category], _nl_category_name_sizes[category] + 1); - fd = __open (newp, O_RDONLY); + fd = open_not_cancel_2 (newp, O_RDONLY); if (__builtin_expect (fd, 0) < 0) return; @@ -206,7 +207,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) char *p = (char *) filedata; while (to_read > 0) { - nread = __read (fd, p, to_read); + nread = read_not_cancel (fd, p, to_read); if (__builtin_expect (nread, 1) <= 0) { free (filedata); @@ -225,7 +226,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) #endif /* _POSIX_MAPPED_FILES */ /* We have mapped the data, so we no longer need the descriptor. */ - __close (fd); + close_not_cancel_no_status (fd); if (__builtin_expect (filedata == NULL, 0)) /* We failed to map or read the data. */ -- cgit v1.2.3