aboutsummaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-09-03 09:26:15 +0000
committerUlrich Drepper <drepper@redhat.com>2003-09-03 09:26:15 +0000
commit72ef277e5a31c89fbd1aa9d1dc7d054223d650e5 (patch)
treedfc2682d001edb282774ade807d8a9be7271e3d9 /locale
parent4a244f0dcec00a37e8023851ab8ddc503b4aec7e (diff)
downloadglibc-72ef277e5a31c89fbd1aa9d1dc7d054223d650e5.tar
glibc-72ef277e5a31c89fbd1aa9d1dc7d054223d650e5.tar.gz
glibc-72ef277e5a31c89fbd1aa9d1dc7d054223d650e5.tar.bz2
glibc-72ef277e5a31c89fbd1aa9d1dc7d054223d650e5.zip
Update.
2003-09-03 Ulrich Drepper <drepper@redhat.com> * 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.
Diffstat (limited to 'locale')
-rw-r--r--locale/loadlocale.c15
1 files changed, 8 insertions, 7 deletions
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 <drepper@cygnus.com>, 1996.
@@ -30,6 +30,7 @@
#endif
#include <sys/stat.h>
+#include <not-cancel.h>
#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. */