=================================================================== RCS file: /cvs/glibc/libc/iconv/gconv_db.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- libc/iconv/gconv_db.c 2005/12/19 07:25:25 1.52 +++ libc/iconv/gconv_db.c 2006/04/25 17:45:02 1.53 @@ -1,5 +1,5 @@ /* Provide access to the collection of available transformation modules. - Copyright (C) 1997-2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1997-2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -227,7 +227,7 @@ step->__shlib_handle = NULL; #endif } - else + else if (step->__shlib_handle == NULL) /* Builtin modules should not have end functions. */ assert (step->__end_fct == NULL); } =================================================================== RCS file: /cvs/glibc/libc/iconvdata/Makefile,v retrieving revision 1.144 retrieving revision 1.145 diff -u -r1.144 -r1.145 --- libc/iconvdata/Makefile 2006/04/04 07:08:07 1.144 +++ libc/iconvdata/Makefile 2006/04/25 17:43:23 1.145 @@ -65,7 +65,8 @@ include ../Makeconfig ifeq (yes,$(build-shared)) -tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 +tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \ + tst-iconv6 ifeq ($(have-thread-library),yes) tests += bug-iconv3 endif --- /dev/null 2006-05-19 09:36:15.392921104 +0200 +++ libc/iconvdata/tst-iconv6.c 2006-05-19 15:46:23.000000000 +0200 @@ -0,0 +1,35 @@ +/* BZ #2569 */ + +#include +#include + +static int +do_test (void) +{ + iconv_t cd0 = iconv_open ("ISO-8859-7", "UTF-16LE"); + if (cd0 == (iconv_t) -1) + { + puts ("first iconv_open failed"); + return 1; + } + iconv_t cd1 = iconv_open ("ISO-8859-7", "UTF-16LE"); + if (cd1 == (iconv_t) -1) + { + puts ("second iconv_open failed"); + return 1; + } + if (iconv_close (cd0) != 0) + { + puts ("first iconv_close failed"); + return 1; + } + if (iconv_close (cd1) != 0) + { + puts ("second iconv_close failed"); + return 1; + } + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c"