From 9e26f1295a6924cca895566708670c6787cfaa9e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 9 Mar 2004 10:04:55 +0000 Subject: Update. * iconv/gconv_db.c: Don't define lock as static. Rename to __gconv_lock and export from the file. * iconv/gconv_int.h: Declare __gconv_lock. * libio/iofclose.c [_LIBC] (_IO_new_fclose): Lock gconv lock before __gconv_release_step calls. Patch by Shunichi Sagawa . * iconv/gconv_simple.c (internal_ucs4_loop): Fix typo in last change. * iconv/gconv_db.c --- libio/iofclose.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libio') diff --git a/libio/iofclose.c b/libio/iofclose.c index da0f9febe4..a372ae2b24 100644 --- a/libio/iofclose.c +++ b/libio/iofclose.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1995,1997-2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1993,1995,1997-2003,2004 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 @@ -71,8 +71,10 @@ _IO_new_fclose (fp) the conversion functions. */ struct _IO_codecvt *cc = fp->_codecvt; + __libc_lock_lock (__gconv_lock); __gconv_release_step (cc->__cd_in.__cd.__steps); __gconv_release_step (cc->__cd_out.__cd.__steps); + __libc_lock_unlock (__gconv_lock); #endif } else -- cgit 1.4.1