From e34b0f2902588bbbfaf55829692e32c3c7134b74 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 24 Nov 1997 02:08:40 +0000 Subject: Update. 1997-11-24 03:01 Ulrich Drepper * elf/dl-support.c: Call __libc_init_secure to make sure __libc_enable_secure is defined early. * sysdeps/generic/enbl-secure.c: Change function name to __libc_init_secure and make it global instead of a constructor. * iconv/gconv.c: Fix lots of bugs. * iconv/gconv.h: Likewise. * iconv/gconv_builtin.h: Likewise. * iconv/gconv_close.c: Likewise. * iconv/gconv_conf.c: Likewise. * iconv/gconv_db.c: Likewise. * iconv/gconv_dl.c: Likewise. * iconv/gconv_open.c: Likewise. * iconv/gconv_simple.c: Likewise. * iconv/iconv.c: Likewise. * iconv/iconv_close.c: Likewise. * iconv/iconv_open.c: Likewise. * wcsmbs/Makefile (routines): Add wmemrtowcs and wmemrtombs. * wcsmbs/wchar.h: Add prototypes for wmemrtowcs and wmemrtombs. * wcsmbs/wmemrtombs.c: New file. * wcsmbs/wmemrtowcs.c: New file. --- iconv/iconv_close.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'iconv/iconv_close.c') diff --git a/iconv/iconv_close.c b/iconv/iconv_close.c index d3123e2..ccd9d5f 100644 --- a/iconv/iconv_close.c +++ b/iconv/iconv_close.c @@ -18,6 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include @@ -26,5 +27,11 @@ int iconv_close (iconv_t cd) { + if (cd == (iconv_t *) -1L) + { + __set_errno (EBADF); + return -1; + } + return __gconv_close ((gconv_t) cd) ? -1 : 0; } -- cgit v1.1