about summary refs log tree commit diff
path: root/iconv
diff options
context:
space:
mode:
Diffstat (limited to 'iconv')
-rw-r--r--iconv/gconv_cache.c10
-rw-r--r--iconv/iconv.h17
2 files changed, 17 insertions, 10 deletions
diff --git a/iconv/gconv_cache.c b/iconv/gconv_cache.c
index 882acc6fa4..8038f5fd99 100644
--- a/iconv/gconv_cache.c
+++ b/iconv/gconv_cache.c
@@ -1,5 +1,5 @@
 /* Cache handling for iconv modules.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
 
@@ -19,6 +19,7 @@
    02111-1307 USA.  */
 
 #include <dlfcn.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <stdlib.h>
 #include <string.h>
@@ -28,6 +29,7 @@
 
 #include <gconv_int.h>
 #include <iconvconfig.h>
+#include <not-cancel.h>
 
 #include "../intl/hash-string.h"
 
@@ -58,7 +60,7 @@ __gconv_load_cache (void)
     return -1;
 
   /* See whether the cache file exists.  */
-  fd = __open (GCONV_MODULES_CACHE, O_RDONLY);
+  fd = open_not_cancel (GCONV_MODULES_CACHE, O_RDONLY);
   if (__builtin_expect (fd, 0) == -1)
     /* Not available.  */
     return -1;
@@ -70,7 +72,7 @@ __gconv_load_cache (void)
       || (size_t) st.st_size < sizeof (struct gconvcache_header))
     {
     close_and_exit:
-      __close (fd);
+      close_not_cancel_no_status (fd);
       return -1;
     }
 
@@ -107,7 +109,7 @@ __gconv_load_cache (void)
     }
 
   /* We don't need the file descriptor anymore.  */
-  __close (fd);
+  close_not_cancel_no_status (fd);
 
   /* Check the consistency.  */
   header = (struct gconvcache_header *) gconv_cache;
diff --git a/iconv/iconv.h b/iconv/iconv.h
index 5a795dc5df..9aebf9bc7b 100644
--- a/iconv/iconv.h
+++ b/iconv/iconv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2003 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
@@ -31,9 +31,11 @@ typedef void *iconv_t;
 
 
 /* Allocate descriptor for code conversion from codeset FROMCODE to
-   codeset TOCODE.  */
-extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode)
-     __THROW;
+   codeset TOCODE.
+
+   This function is a possible cancellation points and therefore not
+   marked with __THROW.  */
+extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
 
 /* Convert at most *INBYTESLEFT bytes from *INBUF according to the
    code conversion algorithm specified by CD and place up to
@@ -43,8 +45,11 @@ extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
 		     char **__restrict __outbuf,
 		     size_t *__restrict __outbytesleft);
 
-/* Free resources allocated for descriptor CD for code conversion.  */
-extern int iconv_close (iconv_t __cd) __THROW;
+/* Free resources allocated for descriptor CD for code conversion.
+
+   This function is a possible cancellation points and therefore not
+   marked with __THROW.  */
+extern int iconv_close (iconv_t __cd);
 
 __END_DECLS